GenSpace
收藏资源简介:
GenSpace是一个用于评估图像生成模型空间感知能力的新型基准和评估流程。该数据集包含1800个文本提示用于文本到图像生成任务,以及1800对源图像和编辑指令用于基于指令的图像编辑任务。数据集涵盖了三个层次的空间感知维度:空间姿态、空间关系和空间测量,旨在评估模型在理解文本或图像提示中的空间信息方面的能力。GenSpace通过结合多个视觉基础模型,如物体检测、物体分割、深度估计、方向估计和相机内部校准,来重建图像中的3D场景几何,从而提供更准确和与人类空间感知更一致的空间保真度度量。该数据集的创建旨在解决当前图像生成模型在空间感知方面的局限性,并为改进图像生成中的空间智能提供方向。
GenSpace is a novel benchmark and evaluation pipeline for assessing the spatial perception capabilities of image generation models. This dataset contains 1800 text prompts for text-to-image generation tasks, and 1800 pairs of source images and editing instructions for instruction-based image editing tasks. The dataset covers three hierarchical spatial perception dimensions: spatial pose, spatial relations, and spatial measurement, aiming to evaluate models' ability to understand spatial information in text or image prompts. GenSpace reconstructs the 3D scene geometry within images by integrating multiple visual foundation models, including object detection, object segmentation, depth estimation, orientation estimation, and camera intrinsic calibration, thereby providing spatial fidelity metrics that are more accurate and more aligned with human spatial perception. This dataset was developed to address the current limitations of image generation models in spatial perception, and to provide guidance for improving spatial intelligence in image generation.
GenSpace数据集概述
环境安装
- 基于Python 3.10创建conda环境
- 核心依赖:
- PyTorch 2.2.2系列
- OpenMIM(用于MMEngine)
- Wis3D(可视化工具,可选)
- Detectron2(SOM可视化)
- 其他库:iopath/pyequilib/albumentations/einops/open3d/imageio
- MMCV 2.0.0(需指定CUDA 11.6和Torch 1.13版本)
关键组件安装
-
Orient-Anything
- 从GitHub克隆并重命名
- 安装requirements.txt依赖
- 需移动Rotation.py到该目录
-
Grounded-SAM套件
- 包含三个子组件:
- Segment Anything(通过-e安装)
- Grounding DINO(无构建隔离安装)
- RAM(Recognize Anything模型)
- 包含三个子组件:
-
Perspective Fields
- 直接从GitHub克隆到external目录
数据准备
-
目录结构要求:
data ├── t2i/ # 文本到图像生成任务 │ ├── 0/ # 子任务类型 │ │ ├── 0.png │ │ └── 0.txt # 格式:<cat> <dog> ├── imageedit_unedit/ # 图像编辑前内容 └── imageedit/ # 图像编辑后内容
-
文本文件规范:所有对象类型必须用<>包裹且空格分隔
推理示例
-
文本到图像(T2I) bash python run_t2i.py --config configs/v2.py --input example/t2i
-
图像编辑任务
-
预处理: bash python run_imageedit_preprocess.py --config configs/v2.py --input example/imageedit_unedit
-
主执行: bash python run_imageedit.py --config configs/v2.py --input example/imageedit
-
-
复杂关系子域(CR)
-
特殊预处理: bash python run_imageedit_CR_preprocess.py --config configs/v2.py --input example/imageedit_CR_unedit
-
独立执行: bash python run_imageedit_CR.py --config configs/v2.py --input example/imageedit_CR
-

- 1GenSpace: Benchmarking Spatially-Aware Image Generation浙江大学; 海星人工智能实验室; 香港大学 · 2025年



