| --- |
| license: cc-by-4.0 |
| task_categories: |
| - image-to-image |
| language: |
| - en |
| tags: |
| - image-editing |
| - diffusion |
| - identity-preservation |
| - synthetic-data |
| - augmentation |
| - spatial-reasoning |
| pretty_name: Identity Preservation Augmentation Dataset for Image Editing |
| size_categories: |
| - 10K<n<100K |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: '*.jpg' |
| dataset_info: |
| features: |
| - name: target_image |
| dtype: image |
| - name: instruct_prompt |
| dtype: string |
| - name: reference_image |
| dtype: image |
| splits: |
| - name: train |
| --- |
| |
| # Identity Preservation Augmentation Dataset for Image Editing |
|
|
| ## Overview |
|
|
| This dataset contains algorithmically generated image pairs designed to |
| teach diffusion-based image editing models **pixel-level identity |
| preservation** — the ability to keep unchanged regions of an image exactly |
| intact while applying targeted edits. |
|
|
| Every example consists of a reference image, a target image, and a short |
| natural-language prompt. The transformation between reference and target is |
| always a deterministic, rule-based operation (no generative model was used |
| at any stage). This guarantees perfect ground truth with zero hallucination |
| and makes the dataset fully reproducible from any source image collection. |
|
|
| The dataset is intended as a **complementary augmentation layer** alongside |
| semantic edit datasets such as |
| [molbal/multi_reference_image_editing](https://huggingface.co/datasets/molbal/multi_reference_image_editing). |
| On its own it teaches preservation and spatial reasoning; combined with |
| semantic edit data it closes the gap between "follows the instruction" and |
| "keeps everything else pixel-perfect." |
|
|
| --- |
|
|
| ## Motivation |
|
|
| Models trained exclusively on semantic edit pairs learn to always apply a |
| transformation. They have never seen a training signal that says |
| *"the reference pixels must survive unchanged in the output."* The |
| consequences are visible at inference time as: |
|
|
| - Face identity drift even on minor edits |
| - Background detail loss |
| - Texture and colour shifts outside the edited region |
|
|
| This dataset provides three complementary curriculum signals to fix that: |
|
|
| | Signal | What it teaches | |
| |---|---| |
| | **Identity copy** | Full preservation — output must equal reference | |
| | **Spatial transforms** | Partial preservation with geometric change | |
| | **Photometric transforms** | Preservation under tone/colour/degradation | |
|
|
| --- |
|
|
| ## Source Images |
|
|
| All source images are the 10,000 real-world photographs from |
| [molbal/multi_reference_image_editing](https://huggingface.co/datasets/molbal/multi_reference_image_editing), |
| which were originally sourced from Pexels with the longest edge capped at |
| 2048 px. No additional imagery was introduced. |
|
|
| --- |
|
|
| ## Pair Types |
|
|
| ### 1. Identity Copy |
|
|
| | Field | Value | |
| |---|---| |
| | Prompt | *(empty string)* | |
| | Reference | Original image | |
| | Target | Identical copy of reference | |
|
|
| The prompt is intentionally empty. This forces the model to learn that the |
| reference latent itself carries the preservation signal rather than any |
| text instruction. These examples are the strongest anchor for pixel-level |
| fidelity. |
|
|
| --- |
|
|
| ### 2. Spatial Transforms |
|
|
| All spatial pairs use the following convention for operations that would |
| reduce sharpness through interpolation: |
|
|
| > **The target is always the sharp image.** The reference is the |
| > geometrically transformed (potentially softer) version. This means |
| > the model always has to produce a sharp output and never has to |
| > hallucinate detail it was not given. |
|
|
| #### 2a. Pan / Shift |
|
|
| Two overlapping crops from the same image, simulating a camera pan. |
| The overlapping region (~65–80% of the frame) must be reproduced exactly; |
| the non-overlapping region must be plausibly completed. |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `pan-right` | pan the view to the right | |
| | `pan-left` | pan the view to the left | |
| | `pan-down` | pan the view downward | |
| | `pan-up` | pan the view upward | |
| | `pan-right-s` | shift the view slightly to the right | |
| | `pan-left-s` | shift the view slightly to the left | |
| | `pan-down-s` | shift the view slightly downward | |
| | `pan-up-s` | shift the view slightly upward | |
|
|
| Shift fractions: 30% (full pan) and 20% (slight shift). |
| Output dimensions are derived from the crop aspect ratio and snapped to |
| the nearest 64-pixel boundary. No rotation or distortion is introduced. |
|
|
| #### 2b. Directional Zoom-In |
|
|
| Reference = full image resized to output dimensions (slightly soft). |
| Target = directional crop resized to output dimensions (sharp). |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `zoom-in-center-1x5` | zoom in on the centre | |
| | `zoom-in-center-2x` | zoom in close on the centre | |
| | `zoom-in-left` | zoom in on the left side | |
| | `zoom-in-right` | zoom in on the right side | |
| | `zoom-in-top` | zoom in on the top part | |
| | `zoom-in-bottom` | zoom in on the bottom part | |
|
|
| Crop factors: 60% of the relevant axis for directional zooms, |
| 67% and 50% for centre zooms. |
|
|
| #### 2c. Zoom-Out |
|
|
| Reference = centre crop (zoomed-in view the model sees). |
| Target = full image (always sharp, what the model must produce). |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `zoom-out-1x5` | zoom out to reveal more of the scene | |
| | `zoom-out-2x` | zoom out to show the full scene | |
|
|
| #### 2d. Flip |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `flip-h` | mirror the image horizontally | |
| | `flip-v` | flip the image vertically | |
|
|
| --- |
|
|
| ### 3. Photometric Transforms |
|
|
| Reference = original image. Target = transformed image. |
| *(Exception: JPEG pairs — see below.)* |
|
|
| #### 3a. Brightness |
|
|
| | Slug | Prompt | Factor | |
| |---|---|---| |
| | `brightness-darker` | darken the image | 0.55 | |
| | `brightness-brighter` | brighten the image | 1.45 | |
|
|
| #### 3b. Contrast |
|
|
| | Slug | Prompt | Factor | |
| |---|---|---| |
| | `contrast-low` | reduce the contrast | 0.45 | |
| | `contrast-high` | increase the contrast | 1.85 | |
|
|
| #### 3c. Saturation |
|
|
| | Slug | Prompt | Factor | |
| |---|---|---| |
| | `saturation-bw` | convert to black and white | 0.0 | |
| | `saturation-desat` | desaturate the image | 0.35 | |
| | `saturation-vivid` | make the colors more vivid | 1.85 | |
|
|
| #### 3d. Colour Temperature |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `temp-warm` | make the image warmer | |
| | `temp-cool` | make the image cooler | |
|
|
| Warm: red channel ×1.20, blue ×0.80. Cool: inverse. |
|
|
| #### 3e. Blur |
|
|
| | Slug | Prompt | Radius | |
| |---|---|---| |
| | `blur-slight` | add a slight blur | 2 | |
| | `blur-medium` | blur the image | 5 | |
| | `blur-heavy` | heavily blur the image | 10 | |
|
|
| #### 3f. Tilt-Shift |
|
|
| A horizontal band (30–70% of image height) is kept sharp; top and bottom |
| are Gaussian blurred (radius 8) with 30-pixel feathering. |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `tiltshift` | apply tilt-shift effect | |
|
|
| #### 3g. Sharpen |
|
|
| Unsharp mask (radius 2, strength 160%, threshold 3). |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `sharpen` | sharpen the image | |
|
|
| #### 3h. Noise |
|
|
| Additive Gaussian noise. |
|
|
| | Slug | Prompt | Std | |
| |---|---|---| |
| | `noise-slight` | add slight noise to the image | 12 | |
| | `noise-medium` | add noise to the image | 35 | |
| | `noise-heavy` | add heavy grain to the image | 65 | |
|
|
| #### 3i. JPEG Compression / Restoration |
|
|
| **Inverted convention:** reference = JPEG-compressed image, |
| target = original sharp image. Prompt instructs removal of artifacts. |
|
|
| | Slug | Prompt | Quality | |
| |---|---|---| |
| | `jpeg-heavy` | remove JPEG compression artifacts | 15 | |
| | `jpeg-severe` | remove severe JPEG compression artifacts | 5 | |
|
|
| #### 3j. Vignette |
|
|
| Radial darkening mask applied multiplicatively. |
|
|
| | Slug | Prompt | Strength | |
| |---|---|---| |
| | `vignette-medium` | add vignette | 0.55 | |
| | `vignette-heavy` | add strong vignette | 0.80 | |
|
|
| #### 3k. Colour Tint Overlay |
|
|
| RGBA overlay composited onto the image. |
|
|
| | Slug | Prompt | Colour (RGBA) | |
| |---|---|---| |
| | `tint-warm-orange` | add a warm orange tint | (255, 200, 150, 75) | |
| | `tint-cool-blue` | add a cool blue tint | (150, 200, 255, 75) | |
| | `tint-green` | add a green tint | (200, 255, 200, 60) | |
| | `tint-dark` | add a dark overlay | (0, 0, 0, 110) | |
|
|
| #### 3l. Film Grain |
|
|
| Multiplicative noise sampled from uniform(0.82, 1.18) per channel per pixel. |
|
|
| | Slug | Prompt | |
| |---|---| |
| | `filmgrain` | add film grain | |
|
|
| #### 3m. Pixelate |
|
|
| Nearest-neighbour downsample then upsample. |
|
|
| | Slug | Prompt | Factor | |
| |---|---|---| |
| | `pixelate-medium` | pixelate the image | 8 | |
| | `pixelate-heavy` | heavily pixelate the image | 16 | |
|
|
| --- |
|
|
| ## File Structure |
|
|
| All files sit in a single flat directory. No subdirectories. |