zzsyppt commited on
Commit
42a8085
·
verified ·
1 Parent(s): d85e873

Update README

Browse files
Files changed (1) hide show
  1. README.md +182 -183
README.md CHANGED
@@ -1,184 +1,183 @@
1
- ---
2
- pretty_name: Outpainted for Image Cropping
3
- license: other
4
- license_name: research-only-source-license-dependent
5
- task_categories:
6
- - image-to-image
7
- - object-detection
8
- tags:
9
- - image
10
- - computer-vision
11
- - image-cropping
12
- - bounding-box
13
- - outpainting
14
- - inpainting
15
- - stable-diffusion
16
- - composition
17
- - imagefolder
18
- size_categories:
19
- - 10K<n<100K
20
- ---
21
-
22
- # Outpainted for Image Cropping
23
-
24
- <p align="center">
25
- <a href="./README.md">English</a> | <a href="./README_zh.md">涓枃</a>
26
- </p>
27
-
28
- ## Dataset Overview
29
-
30
- This dataset contains a collection of images generated by **Stable Diffusion v2 Inpaint** through outpainting, along with bounding box annotations indicating the 鈥渙riginal image region鈥?within each outpainted image. The dataset is mainly intended for research tasks such as image cropping, original frame recovery, composition-aware cropping, and outpainting-aware visual understanding.
31
-
32
- Each sample contains:
33
-
34
- - An outpainted image;
35
- - `orig_bbox`: the location of the original image in the expanded canvas;
36
- - `composition_tags`: a list of image composition tags, some of which may be empty.
37
-
38
- ## Data Generation Pipeline
39
-
40
- ![pipeline_en](./assets/pipeline_en.png)
41
-
42
- The data generation pipeline is as follows:
43
-
44
- 1. Collect professional photographs or high-aesthetic-score images.
45
- 2. Obtain or generate image descriptions, for example by using BLIP to generate captions.
46
- 3. Set the expansion margins.
47
- 4. Use **Stable Diffusion v2 Inpaint** to complete the expanded regions.
48
- 5. Use positive prompts to constrain the generated content.
49
- 6. Use negative prompts to reduce undesired content, such as `frame`, `border`, `text`, `watermark`, etc.
50
- 7. Perform artifact detection and consistency detection on the generated results.
51
- 8. Conduct manual inspection.
52
- 9. Keep the samples that pass quality control, and record the bbox of the original image region to form training pairs.
53
-
54
-
55
- `orig_bbox` uses the following format:
56
-
57
- ```text
58
- [x_min, y_min, x_max, y_max]
59
- ```
60
-
61
- This bbox represents the position of the original image region in the outpainted canvas, rather than an object bounding box in object detection.
62
-
63
- ## Data Sources
64
-
65
- The source images of this dataset come from or refer to the following public datasets/repositories:
66
-
67
- 1. **PICD: Photographic Image Composition Dataset**
68
- https://github.com/CV-xueba/PICD_ImageComposition
69
-
70
- 2. **LAION Aesthetics v2 4.75**
71
- https://huggingface.co/datasets/laion/aesthetics_v2_4.75
72
-
73
- 3. **Landscape-Dataset**
74
- https://github.com/koishi70/Landscape-Dataset/tree/master
75
-
76
-
77
- ## Dataset Structure
78
-
79
- ```text
80
- outpainted-for-image-cropping/
81
- 鈹溾攢鈹€ README.md
82
- 鈹溾攢鈹€ metadata.jsonl
83
- 鈹溾攢鈹€ stats.json
84
- 鈹斺攢鈹€ images/
85
- 鈹溾攢鈹€ img_000000.png
86
- 鈹溾攢鈹€ img_000001.png
87
- 鈹斺攢鈹€ ...
88
- ```
89
-
90
- Each line in `metadata.jsonl` corresponds to one sample, for example:
91
-
92
- ```json
93
- {
94
- "file_name": "images/img_000000.png",
95
- "orig_bbox": [281, 77, 881, 487],
96
- "composition_tags": ["HORI2"]
97
- }
98
- ```
99
-
100
- ### Field Description
101
-
102
- - `file_name`: the relative path of the outpainted image.
103
- - `orig_bbox`: the bounding box of the original image region in the outpainted canvas, in the format `[x_min, y_min, x_max, y_max]`.
104
- - `composition_tags`: a list of composition tags parsed from the original dataset. If there is no reliable composition tag, it is an empty list `[]`.
105
-
106
- ## Dataset Statistics
107
- High-frequency composition tags:
108
-
109
- | Tag | Count |
110
- |---|---:|
111
- | HORI2 | 1,956 |
112
- | HORI3 | 1,694 |
113
- | DIFFUSE | 1,600 |
114
- | DENSE | 1,436 |
115
- | DIA | 1,305 |
116
- | LINE_VERTI3 | 1,156 |
117
- | PATTERN | 1,000 |
118
- | LINE_VERTI_MANY | 983 |
119
- | POINT_MULTI_HORI | 64 |
120
- | LINE_VERTI2 | 55 |
121
-
122
- ## Usage
123
-
124
- Load from the Hugging Face Hub:
125
-
126
- ```python
127
- from datasets import load_dataset
128
-
129
- dataset = load_dataset("zzsyppt/outpainted-for-image-cropping")
130
- print(dataset)
131
- print(dataset["train"][0])
132
- ```
133
-
134
- Check locally before uploading:
135
-
136
- ```python
137
- from datasets import load_dataset
138
-
139
- dataset = load_dataset("imagefolder", data_dir="./hf_dataset")
140
- print(dataset)
141
- print(dataset["train"][0])
142
- ```
143
-
144
- Expected fields include:
145
-
146
- ```text
147
- image
148
- orig_bbox
149
- composition_tags
150
- ```
151
-
152
- ## Citation
153
-
154
- This dataset is for personal use only. If you use this dataset, please cite the corresponding upstream datasets based on the actual source of the samples used.
155
-
156
- ### PICD
157
-
158
- ```bibtex
159
- @inproceedings{zhao2025can,
160
- title={Can Machines Understand Composition? Dataset and Benchmark for Photographic Image Composition Embedding and Understanding},
161
- author={Zhao, Zhaoran and Lu, Peng and Zhang, Anran and Li, Peipei and Li, Xia and Liu, Xuannan and Hu, Yang and Chen, Shiyi and Wang, Liwei and Guo, Wenhao},
162
- booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
163
- pages={14411--14421},
164
- year={2025}
165
- }
166
- ```
167
-
168
- ### LAION-Aesthetics
169
-
170
- Please refer to the official LAION page and the corresponding Hugging Face dataset page to cite the related work of LAION-Aesthetics / LAION-5B:
171
-
172
- - https://laion.ai/blog/laion-aesthetics/
173
- - https://huggingface.co/datasets/laion/aesthetics_v2_4.75
174
-
175
- ### Landscape-Dataset
176
-
177
- Please refer to the original repository:
178
-
179
- - https://github.com/koishi70/Landscape-Dataset/tree/master
180
-
181
- ## Acknowledgements
182
-
183
- The generation of this dataset used Stable Diffusion v2 Inpaint and referenced or used public image data sources. We thank the creators and maintainers of the upstream datasets, repositories, and models.
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Outpainted for Image Cropping
3
+ license: other
4
+ license_name: research-only
5
+ task_categories:
6
+ - image-to-image
7
+ - object-detection
8
+ tags:
9
+ - image
10
+ - computer-vision
11
+ - image-cropping
12
+ - bounding-box
13
+ - outpainting
14
+ - inpainting
15
+ - stable-diffusion
16
+ - composition
17
+ - imagefolder
18
+ size_categories:
19
+ - 10K<n<100K
20
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
+ # Outpainted for Image Cropping
23
+
24
+ <p align="center">
25
+ <a href="./README.md">English</a> | <a href="./README_zh.md">中文</a>
26
+ </p>
27
+
28
+ ## Dataset Overview
29
+
30
+ This dataset contains a collection of images generated by **Stable Diffusion v2 Inpaint** through outpainting, along with bounding box annotations indicating the “original image region” within each outpainted image. The dataset is mainly intended for research tasks such as image cropping, original frame recovery, composition-aware cropping, and outpainting-aware visual understanding.
31
+
32
+ Each sample contains:
33
+
34
+ - An outpainted image;
35
+ - `orig_bbox`: the location of the original image in the expanded canvas;
36
+ - `composition_tags`: a list of image composition tags, some of which may be empty.
37
+
38
+ ## Data Generation Pipeline
39
+
40
+ ![pipeline_en](./assets/pipeline_en.png)
41
+
42
+ The data generation pipeline is as follows:
43
+
44
+ 1. Collect professional photographs or high-aesthetic-score images.
45
+ 2. Obtain or generate image descriptions, for example by using BLIP to generate captions.
46
+ 3. Set the expansion margins.
47
+ 4. Use **Stable Diffusion v2 Inpaint** to complete the expanded regions.
48
+ 5. Use positive prompts to constrain the generated content.
49
+ 6. Use negative prompts to reduce undesired content, such as `frame`, `border`, `text`, `watermark`, etc.
50
+ 7. Perform artifact detection and consistency detection on the generated results.
51
+ 8. Conduct manual inspection.
52
+ 9. Keep the samples that pass quality control, and record the bbox of the original image region to form training pairs.
53
+
54
+
55
+ `orig_bbox` uses the following format:
56
+
57
+ ```text
58
+ [x_min, y_min, x_max, y_max]
59
+ ```
60
+
61
+ This bbox represents the position of the original image region in the outpainted canvas, rather than an object bounding box in object detection.
62
+
63
+ ## Data Sources
64
+
65
+ The source images of this dataset come from or refer to the following public datasets/repositories:
66
+
67
+ 1. **PICD: Photographic Image Composition Dataset**
68
+ https://github.com/CV-xueba/PICD_ImageComposition
69
+
70
+ 2. **LAION Aesthetics v2 4.75**
71
+ https://huggingface.co/datasets/laion/aesthetics_v2_4.75
72
+
73
+ 3. **Landscape-Dataset**
74
+ https://github.com/koishi70/Landscape-Dataset/tree/master
75
+
76
+
77
+ ## Dataset Structure
78
+
79
+ ```text
80
+ outpainted-for-image-cropping/
81
+ ├── README.md
82
+ ├── metadata.jsonl
83
+ ├── stats.json
84
+ └── images/
85
+ ├── img_000000.png
86
+ ├── img_000001.png
87
+ └── ...
88
+ ```
89
+
90
+ Each line in `metadata.jsonl` corresponds to one sample, for example:
91
+
92
+ ```json
93
+ {
94
+ "file_name": "images/img_000000.png",
95
+ "orig_bbox": [281, 77, 881, 487],
96
+ "composition_tags": ["HORI2"]
97
+ }
98
+ ```
99
+
100
+ ### Field Description
101
+
102
+ - `file_name`: the relative path of the outpainted image.
103
+ - `orig_bbox`: the bounding box of the original image region in the outpainted canvas, in the format `[x_min, y_min, x_max, y_max]`.
104
+ - `composition_tags`: a list of composition tags parsed from the original dataset. If there is no reliable composition tag, it is an empty list `[]`.
105
+
106
+ ## Dataset Statistics
107
+ High-frequency composition tags:
108
+
109
+ | Tag | Count |
110
+ |---|---:|
111
+ | HORI2 | 1,956 |
112
+ | HORI3 | 1,694 |
113
+ | DIFFUSE | 1,600 |
114
+ | DENSE | 1,436 |
115
+ | DIA | 1,305 |
116
+ | LINE_VERTI3 | 1,156 |
117
+ | PATTERN | 1,000 |
118
+ | LINE_VERTI_MANY | 983 |
119
+ | POINT_MULTI_HORI | 64 |
120
+ | LINE_VERTI2 | 55 |
121
+
122
+ ## Usage
123
+
124
+ Load from the Hugging Face Hub:
125
+
126
+ ```python
127
+ from datasets import load_dataset
128
+
129
+ dataset = load_dataset("zzsyppt/outpainted-for-image-cropping")
130
+ print(dataset)
131
+ print(dataset["train"][0])
132
+ ```
133
+
134
+ Check locally before uploading:
135
+
136
+ ```python
137
+ from datasets import load_dataset
138
+
139
+ dataset = load_dataset("imagefolder", data_dir="./hf_dataset")
140
+ print(dataset)
141
+ print(dataset["train"][0])
142
+ ```
143
+
144
+ Expected fields include:
145
+
146
+ ```text
147
+ image
148
+ orig_bbox
149
+ composition_tags
150
+ ```
151
+
152
+ ## Citation
153
+
154
+ This dataset is for personal use only. If you use this dataset, please cite the corresponding upstream datasets based on the actual source of the samples used.
155
+
156
+ ### PICD
157
+
158
+ ```bibtex
159
+ @inproceedings{zhao2025can,
160
+ title={Can Machines Understand Composition? Dataset and Benchmark for Photographic Image Composition Embedding and Understanding},
161
+ author={Zhao, Zhaoran and Lu, Peng and Zhang, Anran and Li, Peipei and Li, Xia and Liu, Xuannan and Hu, Yang and Chen, Shiyi and Wang, Liwei and Guo, Wenhao},
162
+ booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
163
+ pages={14411--14421},
164
+ year={2025}
165
+ }
166
+ ```
167
+
168
+ ### LAION-Aesthetics
169
+
170
+ Please refer to the official LAION page and the corresponding Hugging Face dataset page to cite the related work of LAION-Aesthetics / LAION-5B:
171
+
172
+ - https://laion.ai/blog/laion-aesthetics/
173
+ - https://huggingface.co/datasets/laion/aesthetics_v2_4.75
174
+
175
+ ### Landscape-Dataset
176
+
177
+ Please refer to the original repository:
178
+
179
+ - https://github.com/koishi70/Landscape-Dataset/tree/master
180
+
181
+ ## Acknowledgements
182
+
183
+ The generation of this dataset used Stable Diffusion v2 Inpaint and referenced or used public image data sources. We thank the creators and maintainers of the upstream datasets, repositories, and models.