Datasets:
File size: 7,037 Bytes
11267f9 70d9884 11267f9 70d9884 02418c1 55f208b 70d9884 740ebe2 70d9884 740ebe2 55f208b 740ebe2 70d9884 740ebe2 55f208b 70d9884 55f208b 740ebe2 70d9884 740ebe2 70d9884 740ebe2 70d9884 740ebe2 70d9884 740ebe2 55f208b 740ebe2 55f208b 11267f9 | 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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | ---
license: mit
task_categories:
- image-to-image
language:
- en
pretty_name: a
size_categories:
- 10M<n<100M
---
# AnyInsertion
<p align="center">
<a href="https://song-wensong.github.io/"><strong>Wensong Song</strong></a>
·
<a href="https://openreview.net/profile?id=~Hong_Jiang4"><strong>Hong Jiang</strong></a>
·
<a href="https://z-x-yang.github.io/"><strong>Zongxing Yang</strong></a>
·
<a href="https://scholar.google.com/citations?user=WKLRPsAAAAAJ&hl=en"><strong>Ruijie Quan</strong></a>
·
<a href="https://scholar.google.com/citations?user=RMSuNFwAAAAJ&hl=en"><strong>Yi Yang</strong></a>
<br>
<br>
<a href="https://arxiv.org/pdf/2504.15009" style="display: inline-block; margin-right: 10px;">
<img src='https://img.shields.io/badge/arXiv-InsertAnything-red?color=%23aa1a1a' alt='Paper PDF'>
</a>
<a href='https://song-wensong.github.io/insert-anything/' style="display: inline-block; margin-right: 10px;">
<img src='https://img.shields.io/badge/Project%20Page-InsertAnything-cyan?logoColor=%23FFD21E&color=%23cbe6f2' alt='Project Page'>
</a>
<a href='https://github.com/song-wensong/insert-anything' style="display: inline-block;">
<img src='https://img.shields.io/badge/GitHub-InsertAnything-black?logoColor=23FFD21E&color=%231d2125'>
</a>
<br>
<b>Zhejiang University | Harvard University | Nanyang Technological University </b>
</p>
## News
* <span style="color:red">**[2025.5.9]** Release new **AnyInsertion** v1 text- and mask-prompt dataset on [HuggingFace](https://huggingface.co/datasets/WensongSong/AnyInsertion_V1).</span>
* **[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
<div style="display: flex; text-align: center; align-items: center; justify-content: space-between;">
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/ref_image.png" alt="Ref_image" style="width: 100%;">
<figcaption>Ref_image</figcaption>
</figure>
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/ref_mask.png" alt="Ref_mask" style="width: 100%;">
<figcaption>Ref_mask</figcaption>
</figure>
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/tar_image.png" alt="Tar_image" style="width: 100%;">
<figcaption>Tar_image</figcaption>
</figure>
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/tar_mask.png" alt="Tar_mask" style="width: 100%;">
<figcaption>Tar_mask</figcaption>
</figure>
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/add.png" alt="Add" style="width: 100%;">
<figcaption>Add</figcaption>
</figure>
<figure style="margin: 10px; width: calc(25% - 20px);">
<img src="examples/replace.png" alt="Replace" style="width: 100%;">
<figcaption>Replace</figcaption>
</figure>
</div>
### Text Prompt
Add Prompt: Add [label from `tar_image` (in label.json) ]</p>
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}
}
``` |