SHI-Labs / OneFormer

OneFormer: One Transformer to Rule Universal Image Segmentation, arxiv 2022 / CVPR 2023
https://praeclarumjj3.github.io/oneformer
MIT License
1.41k stars 128 forks source link

how to use pretrained model? #19

Closed StawEndl closed 1 year ago

StawEndl commented 1 year ago

hi, i want to use pretained model for new trainning, how should i do? i want to trainning with dataset B, and i want to use model_0159999.pth which is producted at trainning on dataset A, as the pretrained model.

praeclarumjj3 commented 1 year ago

Hi, you can directly set the MODEL.WEIGHTS as model_0159999.pth to use it as the pretrained checkpoint.

python train_net.py --dist-url 'tcp://127.0.0.1:50163' \
    --num-gpus 8 \
    --config-file <path-to-config>  \
    MODEL.WEIGHTS model_0159999.pth \
    OUTPUT_DIR <output_dir> WANDB.NAME <name>