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

RuntimeError: File output\rtdetr_r18vd_6x_coco\checkpoint.pth cannot be opened. #247

Closed wsy-yjys closed 7 months ago

wsy-yjys commented 7 months ago
D:\Anaconda\envs\py39torch110\python.exe E:\paper\【Paper2】LightningDet\code\RT-DETR-main\rtdetr_pytorch\train.py -c ./configs/rtdetr/rtdetr_r18vd_6x_coco.yml 
Not init distributed mode.
Start training
Initial lr:  [1e-05, 1e-05, 0.0001, 0.0001]
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
number of params: 20184464
Epoch: [0]  [0/5]  eta: 0:01:25  lr: 0.000010  loss: 34.5976 (34.5976)  loss_vfl: 0.0958 (0.0958)  loss_bbox: 3.5559 (3.5559)  loss_giou: 1.8998 (1.8998)  loss_vfl_aux_0: 0.1110 (0.1110)  loss_bbox_aux_0: 3.5606 (3.5606)  loss_giou_aux_0: 1.9425 (1.9425)  loss_vfl_aux_1: 0.1217 (0.1217)  loss_bbox_aux_1: 3.5373 (3.5373)  loss_giou_aux_1: 1.9028 (1.9028)  loss_vfl_aux_2: 0.0803 (0.0803)  loss_bbox_aux_2: 3.6764 (3.6764)  loss_giou_aux_2: 1.8882 (1.8882)  loss_vfl_dn_0: 0.9969 (0.9969)  loss_bbox_dn_0: 1.8165 (1.8165)  loss_giou_dn_0: 1.2445 (1.2445)  loss_vfl_dn_1: 1.0230 (1.0230)  loss_bbox_dn_1: 1.8165 (1.8165)  loss_giou_dn_1: 1.2445 (1.2445)  loss_vfl_dn_2: 1.0221 (1.0221)  loss_bbox_dn_2: 1.8165 (1.8165)  loss_giou_dn_2: 1.2445 (1.2445)  time: 17.1162  data: 14.4875  max mem: 1628
Epoch: [0]  [4/5]  eta: 0:00:03  lr: 0.000010  loss: 23.2840 (25.6653)  loss_vfl: 0.1773 (0.1975)  loss_bbox: 1.5141 (2.0160)  loss_giou: 1.7730 (1.7734)  loss_vfl_aux_0: 0.1785 (0.1839)  loss_bbox_aux_0: 1.5137 (2.0232)  loss_giou_aux_0: 1.7858 (1.7997)  loss_vfl_aux_1: 0.1801 (0.2111)  loss_bbox_aux_1: 1.4980 (1.9928)  loss_giou_aux_1: 1.7852 (1.8009)  loss_vfl_aux_2: 0.1768 (0.1780)  loss_bbox_aux_2: 1.4971 (2.0289)  loss_giou_aux_2: 1.8132 (1.8115)  loss_vfl_dn_0: 0.7979 (0.8377)  loss_bbox_dn_0: 0.9444 (1.0547)  loss_giou_dn_0: 1.3351 (1.3204)  loss_vfl_dn_1: 0.7744 (0.8281)  loss_bbox_dn_1: 0.9446 (1.0549)  loss_giou_dn_1: 1.3418 (1.3266)  loss_vfl_dn_2: 0.8184 (0.8330)  loss_bbox_dn_2: 0.9448 (1.0553)  loss_giou_dn_2: 1.3507 (1.3377)  time: 3.7578  data: 2.8997  max mem: 3370
Epoch: [0] Total time: 0:00:19 (3.8730 s / it)
Averaged stats: lr: 0.000010  loss: 23.2840 (25.6653)  loss_vfl: 0.1773 (0.1975)  loss_bbox: 1.5141 (2.0160)  loss_giou: 1.7730 (1.7734)  loss_vfl_aux_0: 0.1785 (0.1839)  loss_bbox_aux_0: 1.5137 (2.0232)  loss_giou_aux_0: 1.7858 (1.7997)  loss_vfl_aux_1: 0.1801 (0.2111)  loss_bbox_aux_1: 1.4980 (1.9928)  loss_giou_aux_1: 1.7852 (1.8009)  loss_vfl_aux_2: 0.1768 (0.1780)  loss_bbox_aux_2: 1.4971 (2.0289)  loss_giou_aux_2: 1.8132 (1.8115)  loss_vfl_dn_0: 0.7979 (0.8377)  loss_bbox_dn_0: 0.9444 (1.0547)  loss_giou_dn_0: 1.3351 (1.3204)  loss_vfl_dn_1: 0.7744 (0.8281)  loss_bbox_dn_1: 0.9446 (1.0549)  loss_giou_dn_1: 1.3418 (1.3266)  loss_vfl_dn_2: 0.8184 (0.8330)  loss_bbox_dn_2: 0.9448 (1.0553)  loss_giou_dn_2: 1.3507 (1.3377)
Test:  [0/3]  eta: 0:00:44    time: 14.8290  data: 14.1930  max mem: 3370
Test:  [2/3]  eta: 0:00:05    time: 5.0869  data: 4.7337  max mem: 3370
Test: Total time: 0:00:15 (5.2462 s / it)
Averaged stats: 
Accumulating evaluation results...
DONE (t=0.06s).
IoU metric: bbox
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.000
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.000
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.000
best_stat:  {'epoch': 0, 'coco_eval_bbox': 0.0}
Epoch: [1]  [0/5]  eta: 0:01:11  lr: 0.000010  loss: 21.0227 (21.0227)  loss_vfl: 0.9321 (0.9321)  loss_bbox: 0.9749 (0.9749)  loss_giou: 1.2634 (1.2634)  loss_vfl_aux_0: 0.8506 (0.8506)  loss_bbox_aux_0: 0.9795 (0.9795)  loss_giou_aux_0: 1.2971 (1.2971)  loss_vfl_aux_1: 0.8328 (0.8328)  loss_bbox_aux_1: 0.9897 (0.9897)  loss_giou_aux_1: 1.3359 (1.3359)  loss_vfl_aux_2: 0.9096 (0.9096)  loss_bbox_aux_2: 0.9716 (0.9716)  loss_giou_aux_2: 1.2947 (1.2947)  loss_vfl_dn_0: 0.7870 (0.7870)  loss_bbox_dn_0: 0.6578 (0.6578)  loss_giou_dn_0: 1.3819 (1.3819)  loss_vfl_dn_1: 0.7559 (0.7559)  loss_bbox_dn_1: 0.6594 (0.6594)  loss_giou_dn_1: 1.3807 (1.3807)  loss_vfl_dn_2: 0.7273 (0.7273)  loss_bbox_dn_2: 0.6610 (0.6610)  loss_giou_dn_2: 1.3799 (1.3799)  time: 14.3339  data: 13.5141  max mem: 3370
Epoch: [1]  [4/5]  eta: 0:00:03  lr: 0.000010  loss: 21.0227 (22.3642)  loss_vfl: 0.3858 (0.4844)  loss_bbox: 0.9749 (1.2699)  loss_giou: 1.6611 (1.6557)  loss_vfl_aux_0: 0.3641 (0.4489)  loss_bbox_aux_0: 0.9795 (1.3034)  loss_giou_aux_0: 1.6629 (1.6643)  loss_vfl_aux_1: 0.3759 (0.4485)  loss_bbox_aux_1: 0.9897 (1.2869)  loss_giou_aux_1: 1.6794 (1.6701)  loss_vfl_aux_2: 0.3403 (0.4321)  loss_bbox_aux_2: 0.9716 (1.3392)  loss_giou_aux_2: 1.6747 (1.6900)  loss_vfl_dn_0: 0.7870 (0.7510)  loss_bbox_dn_0: 0.7117 (0.8206)  loss_giou_dn_0: 1.3406 (1.3522)  loss_vfl_dn_1: 0.7495 (0.7019)  loss_bbox_dn_1: 0.7138 (0.8221)  loss_giou_dn_1: 1.3397 (1.3518)  loss_vfl_dn_2: 0.7273 (0.6952)  loss_bbox_dn_2: 0.7163 (0.8242)  loss_giou_dn_2: 1.3394 (1.3519)  time: 3.2070  data: 2.7048  max mem: 3859
Epoch: [1] Total time: 0:00:16 (3.3079 s / it)
Averaged stats: lr: 0.000010  loss: 21.0227 (22.3642)  loss_vfl: 0.3858 (0.4844)  loss_bbox: 0.9749 (1.2699)  loss_giou: 1.6611 (1.6557)  loss_vfl_aux_0: 0.3641 (0.4489)  loss_bbox_aux_0: 0.9795 (1.3034)  loss_giou_aux_0: 1.6629 (1.6643)  loss_vfl_aux_1: 0.3759 (0.4485)  loss_bbox_aux_1: 0.9897 (1.2869)  loss_giou_aux_1: 1.6794 (1.6701)  loss_vfl_aux_2: 0.3403 (0.4321)  loss_bbox_aux_2: 0.9716 (1.3392)  loss_giou_aux_2: 1.6747 (1.6900)  loss_vfl_dn_0: 0.7870 (0.7510)  loss_bbox_dn_0: 0.7117 (0.8206)  loss_giou_dn_0: 1.3406 (1.3522)  loss_vfl_dn_1: 0.7495 (0.7019)  loss_bbox_dn_1: 0.7138 (0.8221)  loss_giou_dn_1: 1.3397 (1.3518)  loss_vfl_dn_2: 0.7273 (0.6952)  loss_bbox_dn_2: 0.7163 (0.8242)  loss_giou_dn_2: 1.3394 (1.3519)
Traceback (most recent call last):
  File "E:\paper\【Paper2】LightningDet\code\RT-DETR-main\rtdetr_pytorch\train.py", line 48, in <module>
    main(args)
  File "E:\paper\【Paper2】LightningDet\code\RT-DETR-main\rtdetr_pytorch\train.py", line 34, in main
    solver.fit()
  File "E:\paper\【Paper2】LightningDet\code\RT-DETR-main\rtdetr_pytorch\src\solver\det_solver.py", line 49, in fit
    dist.save_on_master(self.state_dict(epoch), checkpoint_path)
  File "E:\paper\【Paper2】LightningDet\code\RT-DETR-main\rtdetr_pytorch\src\misc\dist.py", line 92, in save_on_master
    torch.save(*args, **kwargs)
  File "D:\Anaconda\envs\py39torch110\lib\site-packages\torch\serialization.py", line 440, in save
    with _open_zipfile_writer(f) as opened_zipfile:
  File "D:\Anaconda\envs\py39torch110\lib\site-packages\torch\serialization.py", line 315, in _open_zipfile_writer
    return container(name_or_buffer)
  File "D:\Anaconda\envs\py39torch110\lib\site-packages\torch\serialization.py", line 288, in __init__
    super().__init__(torch._C.PyTorchFileWriter(str(name)))
RuntimeError: File output\rtdetr_r18vd_6x_coco\checkpoint.pth cannot be opened.