必须先下载 SD3 medium 基座模型和 DICEPTION_v1.pth 权重,并手动改 --pretrained_model_path 和 --diception_path 两个路径;--points 坐标是归一化到 [0,1] 的 (y,x) 顺序,容易写反;训练代码和 few-shot 微调代码尚未发布,目前只有推理。

Diception
aim-uofa长期未更新一个通用的扩散模型,用生成式方法统一处理深度估计、法线估计和分割等多种视觉感知任务,省去为每个任务单独建模的麻烦。
[NeurIPS 2025 Spotlight] A Generalist Diffusion Model for Vision Perception
conda create -n diception python=3.10 -y
conda activate diception
pip install -r requirements.txtREADME 未说明显存和 GPU 型号要求,但需先下载 Stable Diffusion 3 medium 作为基座模型,实际显存需求应参考 SD3。
一个扩散模型统一处理深度、法线、位姿、分割等多种视觉感知任务
一个通用的扩散模型,用生成式方法统一处理深度估计、法线估计和分割等多种视觉感知任务,省去为每个任务单独建模的麻烦。
核心能力
- 用单个扩散模型覆盖深度、法线、位姿、交互分割等六类任务
- 通过 [[image2depth]] 等提示词切换任务,无需换模型
- 支持 --points 坐标点做交互式分割,最多 5 个点
- 批量推理读 JSON 任务列表,可一次跑多图多任务
- 深度和法线支持 1 步推理,几乎不掉质量
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🎯 DICEPTION: A Generalist Diffusion Model for Vision Perception
One single model solves multiple perception tasks, on par with SOTA!
📰 News
- 2025-09-21: 🚀 Model and inference code released
- 2025-09-19: 🌟 Accepted as NeurIPS 2025 Spotlight
- 2025-02-25: 📝 Paper released
🛠️ Installation
conda create -n diception python=3.10 -y
conda activate diception
pip install -r requirements.txt
👾 Inference
⚡ Quick Start
🧩 Model Setup
-
Download SD3 Base Model: Download the Stable Diffusion 3 medium model from: https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers
-
Download Trained Weights: Please download the model from Hugging Face: https://huggingface.co/Canyu/DICEPTION
-
Update Paths: Set
--pretrained_model_pathto your SD3 path, and set--diception_pathto the local path of the downloadedDICEPTION_v1.pth. -
Sample JSON for Batch Inference: We provide several JSON examples for batch inference in the
DATA/jsons/evaluatedirectory.
▶️ Option 1: Simple Inference Script
For single image inference:
python inference.py \
--image path/to/your/image.jpg \
--prompt "[[image2depth]]" \
--pretrained_model_path PATH_TO_SD3 \
--diception_path PATH_TO_DICEPTION_v1.PTH \
--output_dir ./outputs \
--guidance_scale 2 \
--num_inference_steps 28
With coordinate points (for interactive segmentation):
python inference.py \
--image path/to/your/image.jpg \
--prompt "[[image2segmentation]]" \
--pretrained_model_path PATH_TO_SD3 \
--diception_path PATH_TO_DICEPTION_v1.PTH \
--output_dir ./outputs \
--guidance_scale 2 \
--num_inference_steps 28 \
--points "0.3,0.5;0.7,0.2"
The --points parameter accepts coordinates in format "y1,x1;y2,x2;y3,x3" where:
- Coordinates are normalized to [0,1] range
- Format is (y,x) where y=height/image_height, x=width/image_width
- Multiple points are separated by semicolons
- Maximum 5 points are supported
📦 Option 2: Batch Inference
For batch processing with a JSON dataset:
python batch_inference.py \
--pretrained_model_path PATH_TO_SD3 \
--diception_path PATH_TO_DICEPTION_v1.PTH \
--input_path example_batch.json \
--data_root_path ./ \
--save_path ./batch_results \
--batch_size 4 \
--guidance_scale 2 \
--num_inference_steps 28
# --save_npy (for depth and normal value)
JSON Format for Batch Inference: The input JSON file should contain a list of tasks in the following format:
[
{
"input": "path/to/image1.jpg",
"caption": "[[image2segmentation]]"
},
{
"input": "path/to/image2.jpg",
"caption": "[[image2depth]]"
},
{
"input": "path/to/image3.jpg",
"caption": "[[image2segmentation]]",
"target": {
"path": "path/to/sa1b.json" (For convenience, randomly select a region for point prompt from the GT json)
}
}
]
📋 Supported Tasks
DICEPTION supports various vision perception tasks:
- Depth Estimation:
[[image2depth]] - Surface Normal Estimation:
[[image2normal]] - Pose Estimation:
[[image2pose]] - Interactive Segmentation:
[[image2segmentation]] - Semantic Segmentation:
[[image2semantic]] + (category in coco), e.g.[[image2semantic]] person - Entity Segmentation:
[[image2entity]]
💡 Inference Tips
- General settings: For best overall results, use
--num_inference_steps 28and--guidance_scale 2.0. - 1-step/few-step inference: We found flow-matching diffusion models naturally support few-step inference, especially for tasks like depth and surface normals. DICEPTION can run with
--num_inference_steps 1and--guidance_scale 1.0with barely quality loss. If you prioritize speed, consider this setting. We provide a detailed analysis in our NeurIPS paper.
🗺️ Plan
- Release inference code and pretrained model v1
- Release training code
- Release few-shot finetuning code
🎫 License
For academic use, this project is licensed under the 2-clause BSD License. For commercial use, please contact Chunhua Shen.
🖊️ Citation
@article{zhao2025diception,
title={Diception: A generalist diffusion model for visual perceptual tasks},
author={Zhao, Canyu and Liu, Mingyu and Zheng, Huanyi and Zhu, Muzhi and Zhao, Zhiyue and Chen, Hao and He, Tong and Shen, Chunhua},
journal={arXiv preprint arXiv:2502.17157},
year={2025}
}