Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\lowlight\\YOLOX-main\\YOLOX_outputs\\yolox_voc_s\\epoch_1_ckpt.pth'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
不知道为什么torch.save没有成功保存epoch_ckpt.ph
2023-04-03 20:26:08 | INFO | yolox.core.trainer:203 - ---> start train epoch1
2023-04-03 20:26:12 | INFO | yolox.core.trainer:255 - epoch: 1/100, iter: 1/3, gpu mem: 2933Mb, mem: 13.4Gb, iter_time: 3.301s, data_time: 0.196s, total_loss: 18.7, iou_loss: 4.6, l1_loss: 0.0, conf_loss: 12.8, cls_loss: 1.3, lr: 6.944e-05, size: 640, ETA: 0:16:26
2023-04-03 20:26:12 | INFO | yolox.core.trainer:255 - epoch: 1/100, iter: 2/3, gpu mem: 2933Mb, mem: 13.4Gb, iter_time: 0.442s, data_time: 0.232s, total_loss: 20.9, iou_loss: 4.5, l1_loss: 0.0, conf_loss: 15.1, cls_loss: 1.4, lr: 2.778e-04, size: 640, ETA: 0:09:17
2023-04-03 20:26:13 | INFO | yolox.core.trainer:255 - epoch: 1/100, iter: 3/3, gpu mem: 2933Mb, mem: 13.4Gb, iter_time: 0.408s, data_time: 0.201s, total_loss: 20.2, iou_loss: 4.6, l1_loss: 0.0, conf_loss: 14.4, cls_loss: 1.2, lr: 6.250e-04, size: 640, ETA: 0:06:50
2023-04-03 20:26:13 | INFO | yolox.core.trainer:358 - Save weights to D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s
100%|#####################################################################################################################################################| 1/1 [00:00<00:00, 3.43it/s]
2023-04-03 20:26:13 | INFO | yolox.evaluators.voc_evaluator:Writing bicycle VOC results file
144 - Evaluate in main process...Writing boat VOC results file
Writing bottle VOC results file
Writing bus VOC results file
Writing car VOC results file
Writing cat VOC results file
Writing cup VOC results file
Writing chair VOC results file
Writing table VOC results file
Writing dog VOC results file
Writing motorbike VOC results file
Writing people VOC results file
Eval IoU : 0.50
AP for bicycle = 0.0000
AP for boat = 0.0000
AP for bottle = 0.0000
AP for bus = 0.0000
AP for car = 0.0000
AP for cat = 0.0000
AP for cup = 0.0000
AP for chair = 0.0000
AP for table = 0.0000
AP for dog = 0.0000
AP for motorbike = 0.0000
AP for people = 0.0000
Mean AP = 0.0000
Results:
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
Results computed with the unofficial Python eval code.
Results should be very close to the official MATLAB eval code.
Recompute with ./tools/reval.py --matlab ... for your paper.
-- Thanks, The Management
Eval IoU : 0.55
Eval IoU : 0.60
Eval IoU : 0.65
Eval IoU : 0.70
Eval IoU : 0.75
Eval IoU : 0.80
Eval IoU : 0.85
Eval IoU : 0.90
Eval IoU : 0.95
map_5095: 0.0
map_50: 0.0
2023-04-03 20:26:13 | INFO | yolox.core.trainer:348 -
Average forward time: 0.00 ms, Average NMS time: 0.00 ms, Average inference time: 0.00 ms
2023-04-03 20:26:13 | INFO | yolox.core.trainer:358 - Save weights to D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s
2023-04-03 20:26:13 | INFO | yolox.core.trainer:358 - Save weights to D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s
2023-04-03 20:26:14 | INFO | yolox.core.trainer:195 - Training of experiment is done and the best AP is 0.00
2023-04-03 20:26:14 | ERROR | yolox.core.launch:98 - An error has been caught in function 'launch', process 'MainProcess' (31088), thread 'MainThread' (44124):
Traceback (most recent call last):
File "./tools\train.py", line 137, in
launch(
└ <function launch at 0x000001C6BDBE2B80>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\launch.py", line 98, in launch
main_func(*args)
│ └ (╒═══════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════...
└ <function main at 0x000001C6BD376700>
File "./tools\train.py", line 118, in main
trainer.train()
│ └ <function Trainer.train at 0x000001C6C5B0CEE0>
└ <yolox.core.trainer.Trainer object at 0x000001C6C5B12A90>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\trainer.py", line 76, in train
self.train_in_epoch()
│ └ <function Trainer.train_in_epoch at 0x000001C6C5B118B0>
└ <yolox.core.trainer.Trainer object at 0x000001C6C5B12A90>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\trainer.py", line 86, in train_in_epoch
self.after_epoch()
│ └ <function Trainer.after_epoch at 0x000001C6C5B11C10>
└ <yolox.core.trainer.Trainer object at 0x000001C6C5B12A90>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\trainer.py", line 222, in after_epoch
self.evaluate_and_save_model()
│ └ <function Trainer.evaluate_and_save_model at 0x000001C6C5B11EE0>
└ <yolox.core.trainer.Trainer object at 0x000001C6C5B12A90>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\trainer.py", line 353, in evaluate_and_save_model
self.save_ckpt(f"epoch_{self.epoch + 1}", ap=ap50_95)
│ │ └ 0.0
│ └ <function Trainer.save_ckpt at 0x000001C6C5B11F70>
└ <yolox.core.trainer.Trainer object at 0x000001C6C5B12A90>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\core\trainer.py", line 372, in save_ckpt
save_checkpoint(
└ <function save_checkpoint at 0x000001C6C5520550>
File "D:\conda\envs\yolox\lib\site-packages\yolox-0.3.0-py3.8.egg\yolox\utils\checkpoint.py", line 46, in save_checkpoint
shutil.copyfile(filename, best_filename)
│ │ │ └ 'D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s\best_ckpt.pth'
│ │ └ 'D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s\epoch_1_ckpt.pth'
│ └ <function copyfile at 0x000001C6B4F75670>
└ <module 'shutil' from 'D:\conda\envs\yolox\lib\shutil.py'>
File "D:\conda\envs\yolox\lib\shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
│ └ 'D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s\best_ckpt.pth'
└ 'D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s\epoch_1_ckpt.pth'
FileNotFoundError: [Errno 2] No such file or directory: 'D:\lowlight\YOLOX-main\YOLOX_outputs\yolox_voc_s\epoch_1_ckpt.pth'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tools/train.py and follow the traceback into yolox/core/trainer.py, especially evaluate_and_save_model and save_ckpt, then inspect yolox/utils/checkpoint.py and the save_checkpoint call. Reproduce the Windows training run and verify whether epoch_1_ckpt.pth is created before the copy to best_ckpt.pth; done means checkpoint saving completes without FileNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100