lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
2.61k stars 303 forks source link

the checkpoint has smaller size than the trained model #448

Open arminiusresistance opened 2 months ago

arminiusresistance commented 2 months ago

I just started using RT-DETR. The checkpoint of rtdetrv2_r18vd_120e_coco_rerun_48.1.pth has around 77 MB, but after running this command, python tools/train.py -c configs/rtdetrv2/rtdetrv2_r18vd_120e_coco.yml--use-amp --seed=0

The checkpoints for each epoch are around 300MB

Shouldn't the checkpoints and the pretrained models have the same size?

lyuwenyu commented 2 months ago

rtdetrv2_r18vd_120e_coco_rerun_48.1.pth only contains ema.state_dict

checkpoint in training process contains model.state_dict, optimizer.state_dict, ema.state_dict, etc.


see detials https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetrv2_pytorch/src/solver/_solver.py#L102-L116