Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when i training damo-yolo to ditect face #122

Open
4 tasks done
oussaifi-majdi opened this issue Aug 18, 2023 · 1 comment
Open
4 tasks done

error when i training damo-yolo to ditect face #122

oussaifi-majdi opened this issue Aug 18, 2023 · 1 comment
Labels
question Further information is requested

Comments

@oussaifi-majdi
Copy link

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for finetune on your data carefully and organize my dataset correctly; 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the DAMO-YOLO issues and found no similar questions.

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 278, in
main()
└ <function main at 0x7a181b8277f0>

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/damoyolo_tinynasL20_...
│ └ <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

@oussaifi-majdi oussaifi-majdi added the question Further information is requested label Aug 18, 2023
@ksv87
Copy link

ksv87 commented Mar 29, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants