Zhejiang University | Harvard University | Nanyang Technological University
## News
* **[2025.5.7]** Release **AnyInsertion** v1 text prompt dataset on HuggingFace.
* **[2025.4.24]** Release **AnyInsertion** v1 mask prompt dataset on HuggingFace.
## Summary
This is the dataset proposed in our paper [**Insert Anything: Image Insertion via In-Context Editing in DiT**](https://arxiv.org/abs/2504.15009)
AnyInsertion dataset consists of training and testing subsets. The training set includes 136,385 samples across two prompt types: 58,188 mask-prompt image pairs and 78,197 text-prompt image pairs;the test set includes 158 data pairs: 120 mask-prompt pairs and 38 text-prompt pairs.
AnyInsertion dataset covers diverse categories including human subjects, daily necessities, garments, furniture, and various objects.

## Directory
```
data/
├── text_prompt/
│ ├── train/
│ │ ├── accessory/
│ │ │ ├── ref_image/ # Reference image containing the element to be inserted
│ │ │ ├── ref_mask/ # The mask corresponding to the inserted element
│ │ │ ├── tar_image/ # Ground truth
│ │ │ └── src_image/ # Source images
│ │ │ ├── add/ # Source image with the inserted element from Ground Truth removed
│ │ │ └── replace/ # Source image where the inserted element in Ground Truth is replaced
│ │ ├── object/
│ │ │ ├── ref_image/
│ │ │ ├── ref_mask/
│ │ │ ├── tar_image/
│ │ │ └── src_image/
│ │ │ ├── add/
│ │ │ └── replace/
│ │ └── person/
│ │ ├── ref_image/
│ │ ├── ref_mask/
│ │ ├── tar_image/
│ │ └── src_image/
│ │ ├── add/
│ │ └── replace/
│ └── test/
│ ├── garment/
│ │ ├── ref_image/
│ │ ├── ref_mask/
│ │ ├── tar_image/
│ │ └── src_image/
│ └── object/
│ ├── ref_image/
│ ├── ref_mask/
│ ├── tar_image/
│ └── src_image/
│
├── mask_prompt/
│ ├── train/
│ │ ├── accessory/
│ │ │ ├── ref_image/
│ │ │ ├── ref_mask/
│ │ │ ├── tar_image/
│ │ │ ├── tar_mask/ # The mask corresponding to the edited area of target image
│ │ ├── object/
│ │ │ ├── ref_image/
│ │ │ ├── ref_mask/
│ │ │ ├── tar_image/
│ │ │ ├── tar_mask/
│ │ └── person/
│ │ ├── ref_image/
│ │ ├── ref_mask/
│ │ ├── tar_image/
│ │ ├── tar_mask/
│ └── test/
│ ├── garment/
│ │ ├── ref_image/
│ │ ├── ref_mask/
│ │ ├── tar_image/
│ │ ├── tar_mask/
│ ├── object/
│ │ ├── ref_image/
│ │ ├── ref_mask/
│ │ ├── tar_image/
│ │ ├── tar_mask/
│ └── person/
│ ├── ref_image/
│ ├── ref_mask/
│ ├── tar_image/
│ ├── tar_mask/
```
## Example
Ref_imageRef_maskTar_imageTar_maskAddReplace
### Text Prompt
Add Prompt: Add [label from `tar_image` (in label.json) ]
Replace Prompt: Replace [label from `src_image` (in src_image/replace/replace_label.json) ] with [label from `tar_image` (in label.json) ]
## Citation
```
@article{song2025insert,
title={Insert Anything: Image Insertion via In-Context Editing in DiT},
author={Song, Wensong and Jiang, Hong and Yang, Zongxing and Quan, Ruijie and Yang, Yi},
journal={arXiv preprint arXiv:2504.15009},
year={2025}
}
```