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

convert yolov3-tiny to onnx #313

Open
NazarovAV opened this issue Oct 30, 2020 · 3 comments
Open

convert yolov3-tiny to onnx #313

NazarovAV opened this issue Oct 30, 2020 · 3 comments

Comments

@NazarovAV
Copy link

Can I convert yolov3-tiny to onnx?
When I run darknet2onnx.py with my cfg and weights, I get an error:

convalution havn't activate linear
Traceback (most recent call last):
  File "darknet2onnx.py", line 59, in <module>
    transform_to_onnx(cfgfile, weightfile)
  File "darknet2onnx.py", line 8, in transform_to_onnx
    model = Darknet(cfgfile)
  File "/home/alex/work/repos/pytorch-YOLOv4/tool/darknet2pytorch.py", line 140, in __init__
    self.models = self.create_network(self.blocks)  # merge conv, bn,leaky
  File "/home/alex/work/repos/pytorch-YOLOv4/tool/darknet2pytorch.py", line 405, in create_network
    yolo_layer.scale_x_y = float(block['scale_x_y'])
KeyError: 'scale_x_y'
@lswgh
Copy link

lswgh commented Dec 16, 2020

same problem! have you solved the error?
THANKS!

@ROBYER1
Copy link

ROBYER1 commented Dec 20, 2020

Same here, lack of v3 tiny support is an issue

@bainro
Copy link

bainro commented Dec 29, 2020

Add "scale_x_y = 1.00" to each [yolo] layer in the cfg file. This is implicit for yolov3, but the parser doesn't know that currently.

ultralytics/yolov3#1121
https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny-3l.cfg

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

No branches or pull requests

4 participants