Skip to content
/ ICE Public

The official repository for CVPR2025 Highlight paper "ICE: Intrinsic Concept Extraction from a Single Image via Diffusion Models"

Notifications You must be signed in to change notification settings

Visual-AI/ICE

Repository files navigation

ICE

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
page arXiv

Installation

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.

Data & Setup

Please ensure that:

  1. You create a folder ($folder_name) under the data/ directory.
  2. Your input image is renamed to img.jpg before running this script,

thus the image will be located at data/$folder_name/img.jpg

Run concept extraction

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

Inference

(please refer to README-infer.md for more details)

$ CUDA_VISIBLE_DEVICES=0 bash scripts/infer.sh

License

This project is under the CC BY-NC-SA 4.0 license. See LICENSE for details.

Acknowledgements

Our code is developed based on Break-A-Scene.

Citation

@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}
}

About

The official repository for CVPR2025 Highlight paper "ICE: Intrinsic Concept Extraction from a Single Image via Diffusion Models"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published