Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.17 KB

train.md

File metadata and controls

49 lines (32 loc) · 1.17 KB

Train

Training Dataset

You should prepare Adobe Image Matting Dataset and COCO for training.

Check ViTMatte/configs/common/dataloader to modify PATH TO TRAINING DATA.

Pretrained Model

  • Get DINO pretrained ViT-S and MAE pretrained ViT-B.

  • Or you could download and preprocess pretrained weights by

    cd ViTMatte/pretrained
    python preprocess.py
    

Train ViTMatte

ViTMatte has 2 sizes: ViTMatte-S and ViTMatte-B.

You can modify configs in configs/ViTMatte_S_100ep.py and configs/ViTMatte_B_100ep.py.

Run:

    python main.py \
        --config-file configs/ViTMatte_S_100ep.py \
        --num-gpus 2

to train ViTMatte-S.

Run:

    python main.py \
        --config-file configs/ViTMatte_B_100ep.py \
        --num-gpus 2

to train ViTMatte-B.

Training output will be saved in ViTMatte/output_of_train/