deepcam-cn / yolov5-face

YOLO5Face: Why Reinventing a Face Detector (https://arxiv.org/abs/2105.12931) ECCV Workshops 2022)
GNU General Public License v3.0
2.01k stars 491 forks source link

Convert models to onnx with dynamic shape #256

Open NahidEbrahimian opened 1 year ago

NahidEbrahimian commented 1 year ago

Hi, I used export.py in the repository, and set dynamic_axes as follows:

dynamic_axes = {'input': { 2: "?", 3: "?"}, 'output': { 1: "?", } }

to convert the model to onnx with a dynamic shape.

The model converted successfully. I visualize the model with Netron and seems that is correctly converted with a dynamic shape:

Screenshot from 2023-06-20 09-32-37

But, when I get the inference with a 1280x1280 input shape, I get this error:

Screenshot from 2023-06-20 09-34-53

I don't know what was happen! and what is the problem!!

Has anyone encountered this problem and can help?