Datasets:
Update Chinese README
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156---pretty_name: Outpainted for Image Croppinglicense: otherlicense_name: research-only-source-license-dependenttask_categories:- image-to-image- object-detectiontags:- image- computer-vision- image-cropping- bounding-box- outpainting- inpainting- stable-diffusion- composition- imagefoldersize_categories:- 10K<n<100K---# Outpainted for Image Cropping<p align="center"><a href="./README.md">English</a> | <a href="./README_zh.md">涓枃</a></p>## 鏁版嵁闆嗙畝浠?鏈暟鎹泦鍖呭惈涓€鎵归€氳繃 **Stable Diffusion v2 Inpaint** 鎵╁浘寰楀埌鐨勫浘鍍忥紝浠ュ強姣忓紶鎵╁浘鍥惧儚涓€滃師濮嬪浘鍍忓尯鍩熲€濈殑杈圭晫妗嗘爣娉ㄣ€傛暟鎹泦涓昏闈㈠悜鍥惧儚瑁佸壀銆佸師濮嬬敾骞呮仮澶嶃€佹瀯鍥炬劅鐭ヨ鍓拰鎵╁浘鎰熺煡瑙嗚鐞嗚В绛夌爺绌朵换鍔°€?姣忎釜鏍锋湰鍖呭惈锛?- 涓€寮犳墿鍥惧悗鐨勫浘鐗囷紱- `orig_bbox`锛氬師鍥惧湪鎵╁睍鐢诲竷涓殑浣嶇疆锛?- `composition_tags`锛氬浘鐗囨瀯鍥炬爣绛惧垪琛紝閮ㄥ垎涓虹┖銆?## 鏁版嵁鐢熸垚娴佺▼鏁版嵁鐢熸垚娴佺▼濡備笅锛?1. 鏀堕泦涓撲笟鎽勫奖鍥剧墖鎴栭珮缇庡璇勫垎鍥剧墖銆?2. 鑾峰彇鎴栫敓鎴愬浘鍍忔弿杩帮紝渚嬪浣跨敤 BLIP 鐢熸垚 caption銆?3. 璁剧疆寰呮墿灞曡竟璺濄€?4. 浣跨敤 **Stable Diffusion v2 Inpaint** 瀵规墿灞曞尯鍩熻繘琛岃ˉ鍏ㄣ€?5. 浣跨敤姝i潰鎻愮ず璇嶇害鏉熺敓鎴愬唴瀹广€?6. 浣跨敤璐熼潰鎻愮ず璇嶅噺灏戜笉甯屾湜鍑虹幇鐨勫唴瀹癸紝渚嬪 `frame`銆乣border`銆乣text`銆乣watermark` 绛夈€?7. 瀵圭敓鎴愮粨鏋滆繘琛屼吉褰辨娴嬨€佷竴鑷存€ф娴嬨€?8. 杩涜浜哄伐鏍告煡銆?9. 淇濈暀閫氳繃璐ㄩ噺妫€鏌ョ殑鏍锋湰锛屽苟璁板綍鍘熷浘鍖哄煙 bbox锛屽舰鎴?training pairs銆?`orig_bbox` 浣跨敤濡備笅鏍煎紡锛?```text[x_min, y_min, x_max, y_max]```璇?bbox 琛ㄧず鍘熷鍥惧儚鍖哄煙鍦ㄦ墿鍥惧悗鐢诲竷涓殑浣嶇疆锛岃€屼笉鏄洰鏍囨娴嬩腑鐨勭墿浣撴銆?## 鏁版嵁鏉ユ簮鏈暟鎹泦鐨勬簮鍥惧儚鏉ヨ嚜鎴栧弬鑰冧互涓嬪叕寮€鏁版嵁闆?浠撳簱锛?1. **PICD: Photographic Image Composition Dataset**https://github.com/CV-xueba/PICD_ImageComposition2. **LAION Aesthetics v2 4.75**https://huggingface.co/datasets/laion/aesthetics_v2_4.753. **Landscape-Dataset**https://github.com/koishi70/Landscape-Dataset/tree/master## 鏁版嵁缁撴瀯```textoutpainted-for-image-cropping/鈹溾攢鈹€ README.md鈹溾攢鈹€ metadata.jsonl鈹溾攢鈹€ stats.json鈹斺攢鈹€ images/鈹溾攢鈹€ img_000000.png鈹溾攢鈹€ img_000001.png鈹斺攢鈹€ ...````metadata.jsonl` 涓瘡涓€琛屽搴斾竴涓牱鏈紝渚嬪锛?```json{"file_name": "images/img_000000.png","orig_bbox": [281, 77, 881, 487],"composition_tags": ["HORI2"]}```### 瀛楁璇存槑- `file_name`锛氭墿鍥惧悗鍥剧墖鐨勭浉瀵硅矾寰勩€?- `orig_bbox`锛氬師鍥惧尯鍩熷湪鎵╁浘鐢诲竷涓殑杈圭晫妗嗭紝鏍煎紡涓?`[x_min, y_min, x_max, y_max]`銆?- `composition_tags`锛氫粠鍘熷鏁版嵁闆嗕腑瑙f瀽寰楀埌鐨勬瀯鍥炬爣绛惧垪琛ㄣ€傝嫢娌℃湁鍙潬鐨勬瀯鍥炬爣绛撅紝鍒欎负绌哄垪琛?`[]`銆?## 鏁版嵁闆嗙粺璁?楂橀鏋勫浘鏍囩锛?| 鏍囩 | 鏁伴噺 ||---|---:|| HORI2 | 1,956 || HORI3 | 1,694 || DIFFUSE | 1,600 || DENSE | 1,436 || DIA | 1,305 || LINE_VERTI3 | 1,156 || PATTERN | 1,000 || LINE_VERTI_MANY | 983 || POINT_MULTI_HORI | 64 || LINE_VERTI2 | 55 |## 浣跨敤鏂瑰紡浠?Hugging Face Hub 鍔犺浇锛?```pythonfrom datasets import load_datasetdataset = load_dataset("zzsyppt/outpainted-for-image-cropping")print(dataset)print(dataset["train"][0])```鏈湴涓婁紶鍓嶆鏌ワ細```pythonfrom datasets import load_datasetdataset = load_dataset("imagefolder", data_dir="./hf_dataset")print(dataset)print(dataset["train"][0])```棰勬湡瀛楁鍖呮嫭锛?```textimageorig_bboxcomposition_tags```## 寮曠敤鏈暟鎹泦浠呯敤浜庝釜浜虹敤閫斻€傚鏋滀娇鐢ㄦ湰鏁版嵁闆嗭紝璇锋牴鎹疄闄呬娇鐢ㄧ殑鏍锋湰鏉ユ簮寮曠敤瀵瑰簲涓婃父鏁版嵁闆嗐€?### PICD```bibtex@inproceedings{zhao2025can,title={Can Machines Understand Composition? Dataset and Benchmark for Photographic Image Composition Embedding and Understanding},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},booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},pages={14411--14421},year={2025}}```### LAION-Aesthetics璇峰弬鑰?LAION 瀹樻柟椤甸潰鍜屽搴?Hugging Face 鏁版嵁闆嗛〉闈㈠紩鐢?LAION-Aesthetics / LAION-5B 鐩稿叧宸ヤ綔锛?- https://laion.ai/blog/laion-aesthetics/- https://huggingface.co/datasets/laion/aesthetics_v2_4.75### Landscape-Dataset璇峰弬鑰冨師濮嬩粨搴擄細- https://github.com/koishi70/Landscape-Dataset/tree/master## 鑷磋阿鏈暟鎹泦鐨勭敓鎴愪娇鐢ㄤ簡 Stable Diffusion v2 Inpaint锛屽苟鍙傝€冩垨浣跨敤浜嗗叕寮€鍥惧儚鏁版嵁婧愩€傛劅璋笂娓告暟鎹泦銆佷粨搴撳拰妯″瀷鐨勫垱寤鸿€呬笌缁存姢鑰呫€?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183---pretty_name: Outpainted for Image Croppinglicense: otherlicense_name: research-onlytask_categories:- image-to-image- object-detectiontags:- image- computer-vision- image-cropping- bounding-box- outpainting- inpainting- stable-diffusion- composition- imagefoldersize_categories:- 10K<n<100K---# Outpainted for Image Cropping<p align="center"><a href="./README.md">English</a> | <a href="./README_zh.md">中文</a></p>## 数据集简介本数据集包含一批通过 **Stable Diffusion v2 Inpaint** 扩图得到的图像,以及每张扩图图像中“原始图像区域”的边界框标注。数据集主要面向图像裁剪、原始画幅恢复、构图感知裁剪和扩图感知视觉理解等研究任务。每个样本包含:- 一张扩图后的图片;- `orig_bbox`:原图在扩展画布中的位置;- `composition_tags`:图片构图标签列表,部分为空。## 数据生成流程数据生成流程如下:1. 收集专业摄影图片或高美学评分图片。2. 获取或生成图像描述,例如使用 BLIP 生成 caption。3. 设置待扩展边距。4. 使用 **Stable Diffusion v2 Inpaint** 对扩展区域进行补全。5. 使用正面提示词约束生成内容。6. 使用负面提示词减少不希望出现的内容,例如 `frame`、`border`、`text`、`watermark` 等。7. 对生成结果进行伪影检测、一致性检测。8. 进行人工核查。9. 保留通过质量检查的样本,并记录原图区域 bbox,形成 training pairs。`orig_bbox` 使用如下格式:```text[x_min, y_min, x_max, y_max]```该 bbox 表示原始图像区域在扩图后画布中的位置,而不是目标检测中的物体框。## 数据来源本数据集的源图像来自或参考以下公开数据集/仓库:1. **PICD: Photographic Image Composition Dataset**https://github.com/CV-xueba/PICD_ImageComposition2. **LAION Aesthetics v2 4.75**https://huggingface.co/datasets/laion/aesthetics_v2_4.753. **Landscape-Dataset**https://github.com/koishi70/Landscape-Dataset/tree/master## 数据结构```textoutpainted-for-image-cropping/├── README.md├── metadata.jsonl├── stats.json└── images/├── img_000000.png├── img_000001.png└── ...````metadata.jsonl` 中每一行对应一个样本,例如:```json{"file_name": "images/img_000000.png","orig_bbox": [281, 77, 881, 487],"composition_tags": ["HORI2"]}```### 字段说明- `file_name`:扩图后图片的相对路径。- `orig_bbox`:原图区域在扩图画布中的边界框,格式为 `[x_min, y_min, x_max, y_max]`。- `composition_tags`:从原始数据集中解析得到的构图标签列表。若没有可靠的构图标签,则为空列表 `[]`。## 数据集统计高频构图标签:| 标签 | 数量 ||---|---:|| HORI2 | 1,956 || HORI3 | 1,694 || DIFFUSE | 1,600 || DENSE | 1,436 || DIA | 1,305 || LINE_VERTI3 | 1,156 || PATTERN | 1,000 || LINE_VERTI_MANY | 983 || POINT_MULTI_HORI | 64 || LINE_VERTI2 | 55 |## 使用方式从 Hugging Face Hub 加载:```pythonfrom datasets import load_datasetdataset = load_dataset("zzsyppt/outpainted-for-image-cropping")print(dataset)print(dataset["train"][0])```本地上传前检查:```pythonfrom datasets import load_datasetdataset = load_dataset("imagefolder", data_dir="./hf_dataset")print(dataset)print(dataset["train"][0])```预期字段包括:```textimageorig_bboxcomposition_tags```## 引用本数据集仅用于个人用途。如果使用本数据集,请根据实际使用的样本来源引用对应上游数据集。### PICD```bibtex@inproceedings{zhao2025can,title={Can Machines Understand Composition? Dataset and Benchmark for Photographic Image Composition Embedding and Understanding},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},booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},pages={14411--14421},year={2025}}```### LAION-Aesthetics请参考 LAION 官方页面和对应 Hugging Face 数据集页面引用 LAION-Aesthetics / LAION-5B 相关工作:- https://laion.ai/blog/laion-aesthetics/- https://huggingface.co/datasets/laion/aesthetics_v2_4.75### Landscape-Dataset请参考原始仓库:- https://github.com/koishi70/Landscape-Dataset/tree/master## 致谢本数据集的生成使用了 Stable Diffusion v2 Inpaint,并参考或使用了公开图像数据源。感谢上游数据集、仓库和模型的创建者与维护者。
README_zh.md+183-156