Git Product home page Git Product logo

dpt's Introduction

DPT: Disentangled Pre-training for Image Matting

Yanda Li, Zilong Huang, Gang Yu, Ling Chen, Yunchao Wei, Jianbo Jiao

University of Technology Sydney, Tencent, Beijing Jiaotong University, University of Birmingham

Accepted by WACV 2024 as an Oral Presentation (2.5%)

overview


Installation

Please refer to requirements.txt for installation.

pip3 install -r requirements.txt

Get Started

Training

Pre-training with single/multiple GPUs on Imagenet-1k.

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

Fine-tuning on Composition-1k training set.

You could use MatteFormer for fine-tuning by using our pre-trained DPT model for initialization.

Testing

Test for pre-training model

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

Test with single GPU on Composition-1k

python3 inference.py

Model weights for composition-1k based on Matteformer

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.

dpt's People

Contributors

crystraldo avatar jianbojiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Forkers

jianbojiao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.