File size: 8,875 Bytes
c00c855
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# OpenEmbed training subset: Dress-ED (edit/dressed)

**Licence:** the Dress Code licence applies to the images and records in this folder (non-commercial research,
teaching and publication; `LICENCE_DressCode.txt`, from https://github.com/aimagelab/dress-code/blob/main/LICENCE),
and Dress-ED itself is CC BY-NC 4.0 (`CC-BY-NC-4.0.txt`). Keep `NOTICE` with any copy you share. Details under
"Licence notes" below.

## What it is

The exact records OpenEmbed trained on for the dataset `edit/dressed`: 264,402 records built from
the 132,201 rows of the Dress-ED `paired/train` split, two records per row.

| Direction | Query | Target |
|---|---|---|
| forward | person photo wearing the original garment + forward instruction | person photo after the edit |
| reverse | person photo after the edit + reverse (undo) instruction | person photo wearing the original garment |

The 259 TFRecord shards in `shards/` are byte-for-byte copies of the shards the training read
(`dressed-s00-00000.tfrecord` ... `dressed-s00-00258.tfrecord`, created 2026-08-03; md5 and CRC32C
of every copy equal the originals). Each record is a `tf.train.Example` with the bytes features
`text` (empty), `src` (`edit/dressed`), `query_text` (the instruction), `neg_text` (empty), `jpg`
(query image) and `cand_jpg` (target image); images are JPEG, 768 x 1024, RGB. The order of the
features inside a record differs between converter runs (30 orders across the 259 shards); the
index records it per record, and every record re-serializes byte for byte from its parsed fields
in that order.

## How training used the records

The trainer's read-time adapter (`openembed.adapters`, layout `img2img`, registry entry `edit/dressed`):
query = `jpg` + `query_text` with media placeholders removed; target = `cand_jpg`; the query
image is also the image negative; a record whose target equals its query image byte for byte is
dropped; a record whose text contains a registry instruction is rejected. On these 264,402
records the adapter keeps all of them: 0 byte-identical pairs, 0 instruction residue, 0 invalid
rows. The contamination scan against the evaluation sets covers all 264,402 records and blocks
none; the de-duplication found no duplicate records, so no skip list applies.

## Files

| File | Content |
|---|---|
| `shards/*.tfrecord` | the 259 training shards (54,853,987,774 bytes) |
| `index.jsonl.gz` | one line per record, in shard order (below) |
| `NOTICE` | the attribution the Dress Code licence requires when the data are published, and the Dress-ED attribution |
| `LICENCE_DressCode.txt`, `CC-BY-NC-4.0.txt` | the two licence texts, fetched from their official URLs when the package was built; `MANIFEST.json` records the URLs, time and sha256 |
| `loader_example.py` | standard-library loader that yields the training inputs, checking every record against the index |
| `match_dress_ed.py` | maps records to Dress-ED `item_id` / `filename` (run 2026-11-12, see below) |
| `apply_mapping.py` | writes the mapping into `index.jsonl.gz` |
| `reports/` | scan report, contamination-scan summary, `match_report.json` and `pixel_details.jsonl` (the Dress-ED mapping and its pixel check) |
| `MANIFEST.json` | size, md5 and CRC32C of every shard, the sha256 of the other files, and where the licence texts came from |
| `set.json` | this dataset's entry for the repository's build entry point (`tools/openembed_data/build.py`) |

Index columns: `record_id` (`<shard>#<ordinal>`), `shard`, `ordinal`, `offset` (byte offset of the
TFRecord frame), `record_sha256` and `record_len` of the serialized record, `key_order`,
`pair_id`, `pair_status`, `direction`, `direction_basis`, `instruction`, sha256 / length / size of
the query and the target image, `decode_ok`, `kept_by_adapter`, `adapter_drop_reasons`,
`training_query_text`, `image_negative`, `contamination_blocked`, `dedup_skipped`,
`dress_ed_split`, `dress_ed_item_id`, `dress_ed_filename`, `dress_ed_revision`, `dress_ed_file`,
`dress_ed_row_group`, `dress_ed_row_in_group` (where the row is in Dress-ED), `dress_ed_match` and
`dress_ed_edited_image_check` (below).

## Checks (2026-11-10)

- 259 of 259 shards read whole: md5 equal to the bucket listing, every TFRecord CRC valid, frame
  sizes sum to each object's size.
- 264,402 records; all 528,804 images decode with PIL (0 failures); every record re-serializes
  byte for byte from its parsed fields and key order.
- Pairing by swapped images: 132,201 pairs, 0 unpaired, 0 ambiguous; in every pair the reverse
  record directly follows the forward one in the same shard. Direction: for 127,392 pairs the
  original photo recurs across rows (Dress-ED renders several edits of one photo, while every
  edited image is unique); for the other 4,809 pairs neither image recurs and the earlier record is
  taken as forward, which is the order seen in all 127,392 pairs where direction is known.
  Dress-ED's own instructions (2026-11-12) confirm the direction of all 132,201 pairs.
  Distinct images: 176,817.
- The loader re-reads shard `dressed-s00-00000` and verifies all 1,024 records (record and image
  sha256), and random access by `offset` was checked on a sample.

## Dress-ED IDs

Every record carries its Dress-ED row: `dress_ed_item_id` and `dress_ed_filename`, and the row's place in the
repository (`davidelobba/Dress-ED`, revision `1ec378ea`, the only commit, made 2026-08-13; `dress_ed_file` under
`data/paired/train/`, `dress_ed_row_group`, `dress_ed_row_in_group`). Access was approved on 2026-11-11.

- Image bytes cannot match: Dress-ED stores its person photos at about 85 KB, our training copies are re-encodes of
  about 50 KB. Instruction text alone does not single a row out either (132,201 rows, 12,689 distinct instruction
  pairs).
- The pairs of this subset are stored in Dress-ED's own order: pair i (in shard order) is row i of the train files
  (sorted file names, rows in file order), and at all 132,201 positions both instructions agree with the row's
  `instruction_forward` and `instruction_reverse`. `match_dress_ed.py` aligns by position and takes each record's
  direction from those instructions.
- Pixel check on every row of 10 random row groups (1,000 rows; 96x128 grey thumbnails, mean absolute
  difference on the 0-255 scale, threshold 4): the original photo matches in 1,000 of 1,000
  rows (largest difference 0.047). The edited photo matches in 767 rows and differs in
  233 (largest difference 18.657), in every one of the 10 row groups but unevenly (1 to 93 of 100 per group; per
  group in `reports/match_report.json`, per row in `reports/pixel_details.jsonl`). As the original photo and both
  instructions agree, these are the same rows; the two we looked at show another generation of the same edit (same
  person, same instructions, a different garment result). Dress-ED's history was squashed into one commit on
  2026-08-13, after our shards were made (2026-08-03), so the version we downloaded cannot be told apart in the
  repository. `dress_ed_edited_image_check` says "same" or "differs" for the checked records and is empty for the
  others; the shards here are what training read.
- Result: 264,402 of 264,402 records mapped (0 unmatched).

## Licence notes (facts, not a legal opinion)

- The person photos come from the Dress Code dataset; Dress-ED adds the edited photos and the
  instructions. Dress-ED is released under CC BY-NC 4.0, and its card refers to the Dress Code
  licence for the underlying garment and person imagery.
- The Dress Code licence permits non-commercial academic research, teaching and publication use,
  including copying and distribution, allows changes only as needed for interoperability, and
  asks anyone who shares the data to keep its notices, to tell recipients that the licence applies
  (with a link), and to include a fixed attribution when publishing; that attribution is in
  `NOTICE`. It also covers works made using the dataset.
- Both licences apply to the original and to the edited photos.
- Distribution: this folder is part of the OpenEmbed data repository and downloads like the other
  folders. This card, `NOTICE` and the two licence texts tell recipients that the Dress Code licence
  applies.

## Using it

From the repository root, the build entry point checks every shard against `MANIFEST.json` (size and md5) and puts it
under `shards/editing/dressed/` (a hard link where possible), where `tools/openembed_data/install_training.py` looks
for it:

```bash
python tools/openembed_data/build.py rebuild --sets edit/dressed --out shards/
```

To read the records directly:

```bash
python loader_example.py --index index.jsonl.gz --shards shards --limit 5
```

`iter_training_inputs()` yields `query_image`, `instruction` (the text the trainer used),
`target_image` and `image_negative` per record, plus `record_id`, `pair_id`, `direction` and the
Dress-ED IDs.