yjh0410 / YOWOv2

The second generation of YOWO action detector.
MIT License
207 stars 32 forks source link

How to convert the models to ONNX? #26

Open chenscottus opened 11 months ago

chenscottus commented 11 months ago

Hello,

 How to convert the models to ONNX?

 Thanks!

-Scott

Itto1992 commented 10 months ago

@chenscottus Firsr I tried to convert this model, it fails. Because the model contains numpy operation in the forward method, which cannot be converted into ONNX.

Thus, you can convert the model by

In actual, after commenting out all the numpy ops from YOWO class (https://github.com/yjh0410/YOWOv2/blob/master/models/yowo/yowo.py), I succeeded in conversion. (I have not checked the converted model is consistent with the one before conversion.)

AI-ctrl commented 9 months ago

@Itto1992 can you provide the modified script because i also the same but converted model is giving same results for every input kind of a constant output. Thanks