SlongLiu / query2labels

Official implementation of paper "Query2Label: A Simple Transformer Way to Multi-Label Classification".
MIT License
413 stars 65 forks source link

about training on VOC dataset and other backbone #57

Open aooating opened 8 months ago

aooating commented 8 months ago

Is there a config file for training on the VOC dataset? If other backbones are used, such as TResNet-M, do the corresponding model parameters need to be adjusted?

Zhong1015 commented 8 months ago

VOC2007 ResNet101 448 bs 66

torchrun --nnodes=1 --nproc_per_node=6 --rdzv_id=100 --rdzv_backend=c10d \ /root/nas-private/Q2L/main_mlc.py -a 'Q2L-R101-448' \ --dataset_dir '/root/nas-private/Dataset' \ --backbone resnet101 --dataname voc2007 --batch-size 66 --print-freq 40 \ --output './output/ResNet_448_voc2007/' \ --world-size 1 --rank 0 --dist-url tcp://127.0.0.1:3716 \ --gamma_pos 0 --gamma_neg 0 --dtgfl --loss_clip 0 \ --epochs 80 --lr 0.0001 --optim AdamW --pretrained \ --num_class 20 --img_size 448 --weight-decay 0.01 \ --cutout --n_holes 1 --cut_fact 0.5 --length 224 \ --hidden_dim 2048 --dim_feedforward 8192 \ --resume '/root/nas-private/Q2L/command/output/ResNet_448_MSCOCO14/coco14_resnet101_bs66_e1-d2_asl-0-4-00_lr5e-05_lrp01_wd0005_AdamW_cropamp/model_best.pth.tar' \ --resume_omit query_embed.weight fc.W fc.b \ --enc_layers 1 --dec_layers 2 --nheads 4 --position_embedding v3 \ --early-stop --amp \ --ema-decay 0.9997 \ --out_aps \ --gpus 0,1,2,3,4,5

VOC2007 TResNetL 448 bs 66

torchrun --nnodes=1 --nproc_per_node=6 --rdzv_id=100 --rdzv_backend=c10d \ /root/nas-private/Q2L/main_mlc.py -a 'Q2L-TResL-448' \ --dataset_dir '/root/nas-private/Dataset' \ --backbone tresnetl --dataname voc2007 --batch-size 66 --print-freq 40 \ --output './output/Tresnet_448_voc2007' \ --world-size 1 --rank 0 --dist-url tcp://127.0.0.1:3716 \ --gamma_pos 0 --gamma_neg 0 --dtgfl --loss_clip 0 \ --epochs 80 --lr 1e-4 --optim Adam_twd --pretrained \ --num_class 20 --img_size 448 --weight-decay 1e-2 \ --cutout --n_holes 1 --cut_fact 0.5 --length 224 --orid_norm \ --resume '/root/nas-private/Q2L/command/output/TResNetL_448_COCO/coco14_tresnetl_bs252_e1-d2_asl-0-0-00_norm_lr00002_lrp01_wd002_Adam_twd_cropamp/model_best.pth.tar' \ --resume_omit query_embed.weight fc.W fc.b \ --hidden_dim 2432 --dim_feedforward 2432 \ --enc_layers 1 --dec_layers 2 --nheads 4 --position_embedding v3 \ --early-stop --amp \ --ema-decay 0.9997 \ --out_aps \ --seed 1015 \ --ema-epoch 3 \ --gpus 0,1,2,3,4,5

I think this can help you. The results is good.