# picobanana The training set `edit/picobanana` as the OpenEmbed models were trained on it, as records that name each instruction and image where Apple and Open Images publish them. Nothing of Pico-Banana-400K ships in this folder (CC BY-NC-ND 4.0): the loader fetches the instructions from Apple's manifest and the images from Apple's CDN and the Open Images mirror. * Registry id: `edit/picobanana`. Category: editing (the source image and the edit instruction retrieve the edited image). * 490,761 records in 480 TFRecord shards. Each record is a `tf.train.Example` with the source image (`jpg`), the edited image (`cand_jpg`), the edit instruction (`query_text`: Apple's long or short instruction of the edit, unchanged) and the stored strings `src`, `neg_text` and `text` (the last two empty). * Source: Pico-Banana-400K by Apple, single-turn part: `sft.jsonl` (https://ml-site.cdn-apple.com/datasets/pico-banana-300k/nb/jsonl/sft.jsonl; ETag "97f1404bd52d7c180f730a402e5d92a2-11", Last-Modified Mon, 27 Oct 2025 18:17:54 GMT, 178,471,996 bytes, md5 672b59c2a5bcc10ec114757726ffc6d6; 257,730 rows), edits of Open Images photos. * Images: all 981,522 point to their publisher. The edited image is a PNG on Apple's CDN; the source image is the photo on the Open Images mirror (CVDF, `https://open-images-dataset.s3.amazonaws.com/train/.jpg`), with the Flickr original as a fallback. On 2026-11-11 every one of them could be fetched; of 300 Flickr originals sampled that day, 42 were gone (HTTP 404 or 410). ## Approximate rebuild Our conversion re-encoded every image (RGB; resized to our size where it differs, bicubic; JPEG quality 95, 4:2:0, Pillow), and its bytes cannot be reproduced exactly, so the loader re-encodes each downloaded image the same way and the rebuilt images match our training images approximately. Texts, feature order and record order are exact. On our checks (full resolution, 0-255 scale, mean absolute pixel difference per image): * edited images: 200 of 200 sampled within 3, mean 0.35, largest 1.25. * source images: 200 of 200 sampled within 3, mean 0.47, largest 1.72. ## Files * `records.parquet`: one row per record in shard order (`shard`, `ordinal`): `feature_order`, `texts` (JSON, the stored string features other than the instruction), `query_text_source` (JSON: the line of `sft.jsonl`, 0-based, the field `text` or `summarized_text`, and the sha256 of our training text) and, per image (`jpg`, `cand_jpg`), `*_ptr` (JSON: type `url`, the URL, fallback URLs for the source image, its Open Images ImageID, and the re-encoding), `*_sha256` and `*_len` of our training bytes, and `*_reason`. * `shards.parquet`: per shard the record count and the md5 of our training shard (the rebuild differs in the re-encoded images). * `sources.parquet`: the 232,309 Open Images photos used as source images, with the attribution CC BY 2.0 asks for: `ImageID`, `OriginalURL` and `OriginalLandingURL` (the Flickr photo and its page), `Author`, `AuthorProfileURL`, `License`, `Title`. * `set.json`: these facts in machine-readable form. ## Rebuild From the repository root (`pip install pyarrow huggingface_hub Pillow crc32c`): ``` python tools/openembed_data/rebuild_edit.py --set-dir editing/picobanana --out shards/ --cache cache/ ``` The script downloads `sft.jsonl` and takes each instruction from its line and field, checked against the sha256; it downloads every image from its URL (257,728 PNGs from Apple's CDN and 232,309 photos from the Open Images mirror; downloads are kept in `--cache` and read once) and re-encodes them. The URLs have no pinned revision: an image that disappears leaves its record out of the rebuild, since we cannot ship it. Download and disk: `sft.jsonl` (178 MB) and about 462 GB of images (Apple's CDN about 388 GB, the Open Images mirror about 73 GB; estimated from the sizes of 500 sampled URLs of each). The rebuilt shards take 247.98 GB. ## How the records were matched Each of our records carries one of Apple's two instructions for an edit, unchanged, so records were matched to `sft.jsonl` rows by instruction text: 462,979 by an instruction found in one row only, 24,699 whose instruction is both the long and the short instruction of one row, and 3,083 by the image pair they share with the other record of their row. The Flickr URL of each source photo maps to its Open Images ImageID through the Open Images image list (all 232,309 found). ## Verified End to end on 2026-11-12: 1 shard(s) rebuilt with the script above from Apple's manifest and the URLs and compared with our training shards: 1,024 records with the same texts, feature order and record order; 2,048 re-encoded images with mean absolute pixel difference 0.40 at most per shard, 99th percentile 1.27 at most, largest 2.09. ## Terms Pico-Banana-400K is published by Apple under CC BY-NC-ND 4.0 (non-commercial, attribution, no sharing of adapted material), so this folder holds only our records and pointers, with no instruction or image of the dataset. The source photos come from Open Images, which lists them as CC BY 2.0; `sources.parquet` gives the attribution of each. These records are released for research use; we remove items on request.