predict error
2020-02-27 19:03:07.918249437 [W:onnxruntime:, graph.cc:73 MergeShapeInfo] Error merging shape info for output. '106_convolutional' source:{1,18,52,52} target:{1,255,52,52}. Falling back to lenient merge. 2020-02-27 19:03:07.918328307 [W:onnxruntime:, graph.cc:73 MergeShapeInfo] Error merging shape info for output. '094_convolutional' source:{1,18,26,26} target:{1,255,26,26}. Falling back to lenient merge. 2020-02-27 19:03:07.918373737 [W:onnxruntime:, graph.cc:73 MergeShapeInfo] Error merging shape info for output. '082_convolutional' source:{1,18,13,13} target:{1,255,13,13}. Falling back to lenient merge. Why I met this bug?
And the result without onnx and with onnx is different.Why?
What is the number of classes on which you are training/testing? Default Yolov3 is trained on 80 classes. 255 = (80 + 5)*3 It seems you are training for only 1 class. 18 = (1 + 5)*3 So in your case, simply replace 255 by 18 and it should work.
Please tell me where I should change the config file.
I know the problem.But the result is a little strange.I get the result like [330, 640, 330, 665].Why?
The weight should be correct.I get the correct result without using onnx by using detect.py
I think you should create the ONNX File Again. Make sure :
- args.reso is equal to resolution mentioned config file
- Change Line 748-750. Update 255 --> 18 (Since you are doing inference on 1 class)
My previous comment was regarding updating the create_onnx.py file.
I found there is another problem. Layer of type yolo not supported, skipping ONNX node generation. Error in onnx generation.It cause the wrong detection result?How to solve
Sample Config File?
I don't change the config file except the num_classes value.