LAION-SG
收藏资源简介:
LAION-SG是一个大规模的图像-文本数据集,基于LAION-Aesthetics V2 (6.5+)构建,包含540,005条高质量的图像-文本对,并带有结构化的场景图注释。该数据集通过GPT-4o进行自动化注释,详细描述了图像中多个对象的属性及其关系,旨在提升复杂场景图像生成的准确性和语义一致性。LAION-SG的创建过程包括对象识别、属性识别和关系识别,确保注释的全面性和精确性。该数据集主要应用于复杂场景的图像生成和语义理解,旨在解决现有数据集在复杂场景生成中的不足。
LAION-SG is a large-scale image-text dataset built upon LAION-Aesthetics V2 (6.5+), which contains 540,005 high-quality image-text pairs with structured scene graph annotations. Annotated automatically via GPT-4o, this dataset elaborately describes the attributes and relationships of multiple objects in images, aiming to improve the accuracy and semantic consistency of complex scene image generation. The development pipeline of LAION-SG encompasses object recognition, attribute recognition and relationship recognition, ensuring the comprehensiveness and precision of the annotations. This dataset is primarily applied to complex scene image generation and semantic understanding, aiming to address the shortcomings of existing datasets in complex scene generation.
LAION-SG: 一个增强的大规模数据集,用于训练具有结构化注释的复杂图像-文本模型
数据集概述
LAION-SG 是一个大规模的图像-文本数据集,具有高质量的场景图(SG)结构化注释,能够精确描述多个对象的属性和关系,有效表示复杂场景中的语义结构。该数据集旨在解决现有图像-文本数据集在多对象和复杂关系生成方面的性能下降问题。
数据集发布
LAION-SG 数据集已发布在 Hugging Face 上,可通过以下链接访问:LAION-SG 数据集。
环境设置
数据集的训练和推理环境设置如下:
- 使用 Python 3.10 和 CUDA 11.8 进行测试。
- 安装所需的包: bash pip3 install -r requirements.txt
训练
提供了一个用于训练 sdxl-sg 模型的脚本 trainer_laion.py,使用以下命令启动训练:
bash
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 accelerate launch --multi_gpu --num_processes 8 trainer_laion.py
推理
提供了一个简单的推理脚本 test_laion.py,用于从 LAION-SG 数据集中生成图像。
-
下载预训练权重
点击 这里 下载预训练权重并将其放置在项目的根目录中。 -
创建输出目录
在项目的根目录中创建一个名为output的文件夹,用于存储生成的图像: bash mkdir output -
运行推理脚本
使用以下命令执行推理: bash python test_laion.py生成的图像将保存在
output/文件夹中,文件名为{img_id}.jpg,其中{img_id}对应于 LAION-SG 数据集中的图像 ID。
引用
@misc{li2024laionsgenhancedlargescaledataset, title={LAION-SG: An Enhanced Large-Scale Dataset for Training Complex Image-Text Models with Structural Annotations}, author={Zejian Li and Chenye Meng and Yize Li and Ling Yang and Shengyuan Zhang and Jiarui Ma and Jiayi Li and Guang Yang and Changyuan Yang and Zhiyuan Yang and Jinxiong Chang and Lingyun Sun}, year={2024}, eprint={2412.08580}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2412.08580}, }

- 1LAION-SG: An Enhanced Large-Scale Dataset for Training Complex Image-Text Models with Structural Annotations浙江大学, 江南大学, 北京大学, 阿里巴巴集团, 蚂蚁集团 · 2024年



