How to integrate a pytorch model with dnn module.

asked 2019-03-08 05:24:55 -0600

vikashChouhan gravatar image

updated 2019-03-09 04:43:14 -0600

berak gravatar image

I have a pytorch model. I want to integrate it with dnn module in opencv. I want to add it with other predefined models in dnn module. It is necessary to convert it in ONNX.

A simple guide would be helpful.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

1

read wiki

LBerger gravatar imageLBerger ( 2019-03-08 08:01:44 -0600 )edit
1

onnx export might be your best bet here. can you try, and tell us the outcome ?

(there seems to be no way to export a tf graph from a pytorch model, so that's probably the only way to get something working witjh opencv's dnn)

berak gravatar imageberak ( 2019-03-09 02:42:30 -0600 )edit