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.
- Release code
- Release pre-trained models and instructions for inference
- Release ICM-57 dataset
- Release training dataset and instructions for training
We follow the environment setup of Stable Diffusion Version 2.
To evaluate the performance on the ICM-57 dataset using the eval.py
script, follow these instructions:
-
Download the Pretrained Model:
- Download the pretrained model from this link.
-
Prepare the dataset: Ensure that your ICM-57 is ready.
-
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
ICM-57
- Download link: ICM-57 Dataset
- Installation Guide:
- After downloading, unzip the dataset into the
datasets/
directory of the project. - Ensure the structure of the dataset folder is as follows:
datasets/ICM57/ ├── image └── alpha
- After downloading, unzip the dataset into the
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.
This project is under the MIT license. For technical questions, please contact He Guo at [email protected]. For commerial use, please contact Hao Lu at [email protected]