This is the official PyTorch codes for the paper:
ICE: Intrinsic Concept Extraction from a Single Image via Diffusion Models
Fernando Julio Cendra and
Kai Han
Visual AI Lab, The University of Hong Kong
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2025
The environment can be installed through conda and pip. After cloning this repository, run the following command:
$ conda create -n ice python=3.11.11
$ conda activate ice
$ pip install -r requirements.txt
$ conda install pytorch==2.5.1 torchvision==0.20.1 pytorch-cuda=12.4 -c pytorch -c nvidia
$ pip install --upgrade keras-cv==0.6.4 tensorflow==2.14.0 numpy==1.23.5
$ pip uninstall tensorboard # TODO: need to fix this in the future
*After setting up the environment, it’s recommended to restart the kernel.
Please ensure that:
- You create a folder (
$folder_name
) under thedata/
directory. - Your input image is renamed to
img.jpg
before running this script,
thus the image will be located at data/$folder_name/img.jpg
The ICE framework operates through a two-stage process, i.e, Stage One: Automatic Concept Localization and Stage Two: Structured Concept Learning.
→ Stage One: Automatic Concept Localization (please refer to README-stage-one.md for more details)
$ CUDA_VISIBLE_DEVICES=0 bash scripts/run_stage_one.sh
→ Stage Two: Structured Concept Learning (please refer to README-stage-two.md for more details)
$ CUDA_VISIBLE_DEVICES=0 bash scripts/run_stage_two.sh
(please refer to README-infer.md for more details)
$ CUDA_VISIBLE_DEVICES=0 bash scripts/infer.sh
This project is under the CC BY-NC-SA 4.0 license. See LICENSE for details.
Our code is developed based on Break-A-Scene.
@inproceedings{cendra2025ICE,
author = {Fernando Julio Cendra and Kai Han},
title = {ICE: Intrinsic Concept Extraction from a Single Image via Diffusion Models},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2025}
}