Please refer to requirements.txt for installation.
pip3 install -r requirements.txt
You should download the Imagenet-1k dataset and set the train1k_path in config/dpt.toml
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 -m torch.distributed.launch --nproc_per_node=8 main.py
You could use MatteFormer for fine-tuning by using our pre-trained DPT model for initialization.
If you want to test your performance during pre-training phase, you could generate test images with the same setting of training phase, and set the test path in config/dpt.toml
It is worth emphasizing that the performance of pre-training is not directly proportional to the performance of fine-tuning
python3 inference.py
You can download our model weights from the link: https://1drv.ms/u/s!AtQiYwqUDNqOjWtwYb0FC1MuTQ0O?e=5BIbCQ and use inference.py for testing the performance.