GenSpace
收藏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年



