Open oussaifi-majdi opened 1 year ago
error in you command
you
!python converter.py
-f damoyolo_tinynasL20_T.py
-c /content/damo-yolo/damoyolo_tinynasL20_T_436.onnx
--batch_size 1
--img_size 640
tutorial
!python tools/converter.py -f configs/damoyolo_tinynasL25_S.py -c damoyolo_tinynasL25_S.pth --batch_size 1 --img_size 640
your need change .onnx to .pth in parameter -c (this is path to checkpoint)
Before Asking
[X] I have read the README carefully. 我已经仔细阅读了README上的操作指引。
[X] I want to train my custom dataset, and I have read the tutorials for finetune on your data carefully and organize my dataset correctly; 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。
[X] I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。
Search before asking
Question
!python converter.py \ -f damoyolo_tinynasL20_T.py \ -c /content/damo-yolo/damoyolo_tinynasL20_T_436.onnx \ --batch_size 1 \ --img_size 640
the Error
2023-08-18 16:55:33.105 | INFO | main:main:180 - args value: Namespace(mode='onnx', config_file='damoyolo_tinynasL20_T.py', benchmark=False, ckpt='/content/damo-yolo/damoyolo_tinynasL20_T_436.onnx', trt=False, trt_type='fp32', batch_size=1, img_size=640, input='images', output='output', opset=11, end2end=False, ort=False, trt_eval=False, with_preprocess=False, topk_all=100, iou_thres=0.65, conf_thres=0.05, device='0', opts=[]) 2023-08-18 16:55:33.236 | ERROR | main::278 - An error has been caught in function '', process 'MainProcess' (41628), thread 'MainThread' (134246818092864):
Traceback (most recent call last):
File "/content/damo-yolo/converter.py", line 204, in main ckpt = torch.load(args.ckpt, map_location=device) │ │ │ │ └ device(type='cpu') │ │ │ └ '/content/damo-yolo/damoyolo_tinynasL20_T_436.onnx' │ │ └ Namespace(mode='onnx', config_file='damoyolo_tinynasL20_T.py', benchmark=False, ckpt='/content/damo-yolo/damoyolotinynasL20... │ └ <function load at 0x7a1889f07640> └ <module 'torch' from '/usr/local/lib/python3.10/site-packages/torch/init.py'>
File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 815, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) │ │ │ │ └ {'encoding': 'utf-8'} │ │ │ └ <module 'pickle' from '/usr/local/lib/python3.10/pickle.py'> │ │ └ device(type='cpu') │ └ <_io.BufferedReader name='/content/damo-yolo/damoyolo_tinynasL20_T_436.onnx'> └ <function _legacy_load at 0x7a1889f077f0> File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 1033, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) │ │ │ └ {'encoding': 'utf-8'} │ │ └ <_io.BufferedReader name='/content/damo-yolo/damoyolo_tinynasL20_T_436.onnx'> │ └
└ <module 'pickle' from '/usr/local/lib/python3.10/pickle.py'>
_pickle.UnpicklingError: invalid load key, '\x08'.
Additional
No response