CoolFace
Datasetpublic

molbal/identity_preservation_image_editing

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… See the full description on the dataset page: https://huggingface.co/datasets/molbal/identity_preservation_image_editing.

sourceHugging Facecc-by-4.0updated 2mo agoView on Hugging Face
4likes1.1kdownloads
Dataset Card

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. 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:

SignalWhat it teaches
Identity copyFull preservation — output must equal reference
Spatial transformsPartial preservation with geometric change
Photometric transformsPreservation under tone/colour/degradation

Source Images

All source images are the 10,000 real-world photographs from 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

FieldValue
Prompt(empty string)
ReferenceOriginal image
TargetIdentical 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.

SlugPrompt
pan-rightpan the view to the right
pan-leftpan the view to the left
pan-downpan the view downward
pan-uppan the view upward
pan-right-sshift the view slightly to the right
pan-left-sshift the view slightly to the left
pan-down-sshift the view slightly downward
pan-up-sshift 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).

SlugPrompt
zoom-in-center-1x5zoom in on the centre
zoom-in-center-2xzoom in close on the centre
zoom-in-leftzoom in on the left side
zoom-in-rightzoom in on the right side
zoom-in-topzoom in on the top part
zoom-in-bottomzoom 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).

SlugPrompt
zoom-out-1x5zoom out to reveal more of the scene
zoom-out-2xzoom out to show the full scene
2d. Flip
SlugPrompt
flip-hmirror the image horizontally
flip-vflip the image vertically

3. Photometric Transforms

Reference = original image. Target = transformed image. (Exception: JPEG pairs — see below.)

3a. Brightness
SlugPromptFactor
brightness-darkerdarken the image0.55
brightness-brighterbrighten the image1.45
3b. Contrast
SlugPromptFactor
contrast-lowreduce the contrast0.45
contrast-highincrease the contrast1.85
3c. Saturation
SlugPromptFactor
saturation-bwconvert to black and white0.0
saturation-desatdesaturate the image0.35
saturation-vividmake the colors more vivid1.85
3d. Colour Temperature
SlugPrompt
temp-warmmake the image warmer
temp-coolmake the image cooler

Warm: red channel ×1.20, blue ×0.80. Cool: inverse.

3e. Blur
SlugPromptRadius
blur-slightadd a slight blur2
blur-mediumblur the image5
blur-heavyheavily blur the image10
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.

SlugPrompt
tiltshiftapply tilt-shift effect
3g. Sharpen

Unsharp mask (radius 2, strength 160%, threshold 3).

SlugPrompt
sharpensharpen the image
3h. Noise

Additive Gaussian noise.

SlugPromptStd
noise-slightadd slight noise to the image12
noise-mediumadd noise to the image35
noise-heavyadd heavy grain to the image65
3i. JPEG Compression / Restoration

Inverted convention: reference = JPEG-compressed image, target = original sharp image. Prompt instructs removal of artifacts.

SlugPromptQuality
jpeg-heavyremove JPEG compression artifacts15
jpeg-severeremove severe JPEG compression artifacts5
3j. Vignette

Radial darkening mask applied multiplicatively.

SlugPromptStrength
vignette-mediumadd vignette0.55
vignette-heavyadd strong vignette0.80
3k. Colour Tint Overlay

RGBA overlay composited onto the image.

SlugPromptColour (RGBA)
tint-warm-orangeadd a warm orange tint(255, 200, 150, 75)
tint-cool-blueadd a cool blue tint(150, 200, 255, 75)
tint-greenadd a green tint(200, 255, 200, 60)
tint-darkadd a dark overlay(0, 0, 0, 110)
3l. Film Grain

Multiplicative noise sampled from uniform(0.82, 1.18) per channel per pixel.

SlugPrompt
filmgrainadd film grain
3m. Pixelate

Nearest-neighbour downsample then upsample.

SlugPromptFactor
pixelate-mediumpixelate the image8
pixelate-heavyheavily pixelate the image16

File Structure

All files sit in a single flat directory. No subdirectories.