- This is the simplified implementation of Images Speak in Images: A Generalist Painter for In-Context Visual Learning (CVPR 2023).
- Since the original repository had a lot of files and different ways of loading different datasets, it was easy to get confused. So this repository simplifies and comments the code so that beginners and interested researchers can quickly test it with their own tasks or images.
- Linux (Recommend)
- PyTorch >= 1.8.1
- Other requirements
pip install -r requirements.txt
You can make your own datasets based on test_img
- Download the pre-trained Painter from here. Place it in the same directory with
test.py
. - Run the following command:
python test.py --task denoise
Tasks include denoise, derain, image_enhancement, instance_segmentation, keypoint_detection, and semantic_segmentation.
- If there is an error reported by the torch version of _six.py, try the following solution:
import collections.abc as container_abcs → from torch._six import container_abcs
@article{Painter,
title={Images Speak in Images: A Generalist Painter for In-Context Visual Learning},
author={Wang, Xinlong and Wang, Wen and Cao, Yue and Shen, Chunhua and Huang, Tiejun},
journal={arXiv preprint arXiv:2212.02499},
year={2022}
}