/in-context-matting

Primary LanguagePythonMIT LicenseMIT

In-Context Matting [CVPR 2024, Highlight]

This is the official repository of the paper In-Context Matting.

Details of the model architecture and experimental results can be found in our homepage.

TODO:

  • Release code
  • Release pre-trained models and instructions for inference
  • Release ICM-57 dataset
  • Release training dataset and instructions for training

Requirements

We follow the environment setup of Stable Diffusion Version 2.

Usage

To evaluate the performance on the ICM-57 dataset using the eval.py script, follow these instructions:

  1. Download the Pretrained Model:

    • Download the pretrained model from this link.
  2. Prepare the dataset: Ensure that your ICM-57 is ready.

  3. Run the Evaluation: Use the following command to run the evaluation script. Replace the placeholders with the actual paths if they differ.

    python eval.py --checkpoint PATH_TO_MODEL --save_path results/ --config config/eval.yaml

Dataset

ICM-57

  • Download link: ICM-57 Dataset
  • Installation Guide:
    1. After downloading, unzip the dataset into the datasets/ directory of the project.
    2. Ensure the structure of the dataset folder is as follows:
      datasets/ICM57/
      ├── image
      └── alpha
      

Acknowledgments

We would like to express our gratitude to the developers and contributors of the DIFT and Prompt-to-Prompt projects. Their shared resources and insights have significantly aided the development of our work.

Statement

This project is under the MIT license. For technical questions, please contact He Guo at hguo01@hust.edu.cn. For commerial use, please contact Hao Lu at hlu@hust.edu.cn