TaobaoTmall-AlgorithmProducts commited on
Commit
ac8772e
·
verified ·
1 Parent(s): 9e6842b

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +140 -1
README.md CHANGED
@@ -1,3 +1,142 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - zh
4
+ configs:
5
+ - config_name: default
6
+ data_files:
7
+ - split: test
8
+ path: data/*_image_test.parquet
9
+ - config_name: single_image
10
+ data_files:
11
+ - split: test
12
+ path: data/single_image_test.parquet
13
+ - config_name: multi_image
14
+ data_files:
15
+ - split: test
16
+ path: data/multi_image_test.parquet
17
  ---
18
+
19
+ # CommerceGen-Bench
20
+
21
+ CommerceGen-Bench is an e-commerce product-poster generation/editing benchmark with 420 cases: 210 single-image cases and 210 two-image cases. This package contains test inputs and frozen instructions, not a training split or reference output images. Instructions and target selling-point text are in Chinese.
22
+
23
+ 本包包含 420 条电商商品海报生成/编辑样本:210 条单图、210 条双图。每条样本同时保存固定的 PE 和 no-PE 指令;输入图片直接嵌入 Parquet,无需公网图片链接,也无需单独上传图片文件夹。
24
+
25
+ ## Review status and rights
26
+
27
+ This is a local preparation package for private testing and manual review. Image, brand/logo, and text redistribution rights have not been verified. Keep the repository private until the relevant rights and dataset terms are approved. No permissive license or training permission is asserted by this package. Technical validation does not establish legal clearance.
28
+
29
+ 这是待审核的本地整理包,尚未核实图片、品牌/logo 与文案的再分发授权。首次上传请使用私有仓库;完成授权与许可审核前,不要公开发布。本包没有擅自指定 Apache、CC 等许可证,也不宣称允许训练或商业使用。
30
+
31
+ ## Files and configurations
32
+
33
+ - `data/single_image_test.parquet`: 210 single-image cases.
34
+ - `data/multi_image_test.parquet`: 210 two-image cases.
35
+ - `README.md`: dataset configuration, schema, protocol, and known limitations.
36
+
37
+ The `default` configuration loads all 420 cases. `single_image` and `multi_image` load their respective 210-case tracks. All configurations expose a `test` split. Both prompt conditions share the same image inputs; there is no duplicate PE/no-PE image export.
38
+
39
+ ## Schema
40
+
41
+ | Field | Type | Meaning |
42
+ | --- | --- | --- |
43
+ | `sample_id` | string | Stable anonymized identifier, `commercegen_0001` through `commercegen_0420`, preserving the original benchmark case order. |
44
+ | `track` | string | `single_image_editing` or `multi_image_editing`. |
45
+ | `product_image` | Image | First input: the product reference image. |
46
+ | `logo_image` | Image or null | Second input: the auxiliary logo reference; null for single-image cases. |
47
+ | `instruction_with_pe` | string | Frozen historical enhanced instruction, preserved from the actual PE run. |
48
+ | `instruction_without_pe` | string | Frozen strict no-PE instruction: the five-requirement poster prefix, newline-separated selling points, and the strict suffix described below. |
49
+ | `target_text_list` | list of strings | Selling-point strings to render in the generated poster. |
50
+ | `category` | string | The existing source category label in Chinese; 15 labels are retained without inventing a new category hierarchy. |
51
+
52
+ No `hard_case_tags`, unverified PE model name/version, training-isolation claims, business identifiers, source storage paths, credentials, or signed download URLs are added. Original physical source row order is recoverable from `sample_id`; row order after combining Parquet files should not be used as an identifier.
53
+
54
+ ## Image and task protocol
55
+
56
+ Pass `product_image` first. For a multi-image case, pass `logo_image` second as a separate image; do not concatenate the inputs. Select exactly one instruction column for a given experiment and record that choice with the model settings.
57
+
58
+ Images are losslessly encoded as RGB PNG bytes at their original dimensions, with source metadata removed. Their RGB pixels were checked against the source images and both historical PE/no-PE input snapshots. This export does not resize or pad images and does not prescribe a new output resolution. Model-specific resizing, output size, seed, and generation parameters should be recorded separately.
59
+
60
+ There is no confirmed curated ground-truth output in this package. Existing model-generated outputs are not labeled as ground truth and are intentionally excluded. This is an input benchmark, not a pixel-reference reconstruction dataset.
61
+
62
+ ## PE and no-PE protocol
63
+
64
+ `instruction_with_pe` is the existing frozen `prompt.cn_long`; it is not regenerated. The historical PE generator identity/version has not been verified for this package and is not asserted here.
65
+
66
+ `instruction_without_pe` uses the historical strict C variant: the fixed five-requirement poster prefix, the unnumbered selling points joined with newlines, followed by exactly:
67
+
68
+ ```text
69
+ 请严格按照我给的卖点内容进行生产,不允许添加新的卖点
70
+ ```
71
+
72
+ The historical B variant used by some open-source runs omits that final suffix. B and C are not identical. To reproduce a documented B run from this package, remove the final newline and that exact suffix only; do not otherwise rewrite the instruction. The packaged C instructions were checked against all 420 saved strict no-PE prompts.
73
+
74
+ Prompt line breaks are preserved. The comma-compacted English-template prompts used for presentation slides are not substituted into these data fields. This package does not make historical runs with different B/C instructions directly comparable by itself.
75
+
76
+ ## Known limitations
77
+
78
+ The historical PE instructions are preserved without silently repairing them:
79
+
80
+ - 33 cases do not contain at least one exact target selling-point string after whitespace normalization (35 missing strings total). This is a substring check, not proof that the corresponding semantic meaning is absent.
81
+ - 73 cases contain an image marker beyond the number of actual inputs, including references to `[image3]` although cases have at most two input images.
82
+ - The historical PE instruction for `commercegen_0301` includes a merchant storefront address. It is preserved for run fidelity and needs review before public distribution.
83
+
84
+ Any corrected prompt set should be versioned separately rather than replacing the prompts used in historical evaluations. No claim that all selling-point text survives PE is made here.
85
+
86
+ ## Load locally
87
+
88
+ Use a compatible recent `datasets`, `pyarrow`, and `Pillow` environment:
89
+
90
+ ```bash
91
+ python -m pip install -U datasets pyarrow Pillow
92
+ ```
93
+
94
+ Load both files after extracting the package:
95
+
96
+ ```python
97
+ from datasets import load_dataset
98
+
99
+ dataset = load_dataset(
100
+ "parquet",
101
+ data_files={"test": "CommerceGen-Bench/data/*_image_test.parquet"},
102
+ split="test",
103
+ )
104
+ assert len(dataset) == 420
105
+
106
+ sample = dataset[0]
107
+ images = [sample["product_image"]]
108
+ if sample["logo_image"] is not None:
109
+ images.append(sample["logo_image"])
110
+ prompt = sample["instruction_with_pe"]
111
+ ```
112
+
113
+ After uploading the files to the intended Hugging Face dataset repository:
114
+
115
+ ```python
116
+ from datasets import load_dataset
117
+
118
+ dataset = load_dataset(
119
+ "TaobaoTmall-AlgorithmProducts/CommerceGen-Bench",
120
+ split="test",
121
+ )
122
+ single = load_dataset(
123
+ "TaobaoTmall-AlgorithmProducts/CommerceGen-Bench",
124
+ "single_image",
125
+ split="test",
126
+ )
127
+ multi = load_dataset(
128
+ "TaobaoTmall-AlgorithmProducts/CommerceGen-Bench",
129
+ "multi_image",
130
+ split="test",
131
+ )
132
+ ```
133
+
134
+ Private repositories require authentication by an account with access. The repository identifier above is an intended destination, not a claim that it has already been created or uploaded.
135
+
136
+ ## Manual upload
137
+
138
+ Create a private Hugging Face **dataset** repository named `CommerceGen-Bench`. Extract the ZIP, then upload `README.md` to the repository root and both Parquet files to `data/`. Do not upload only the ZIP: the Viewer needs the extracted Parquet files and configuration. A separate image directory or public image URL is unnecessary because the image bytes are embedded.
139
+
140
+ For ModelScope, the same Parquet files can be uploaded to a dataset repository, but ModelScope-specific Viewer/subset configuration and live loading have not been verified. Downloaded files can always be loaded locally with the Parquet example above. Keep private until rights are approved there as well.
141
+
142
+ No repository has been created, and no files have been uploaded by this preparation step.