Ask Your Question
1

How to discover the input and output format of a cv::dnn::Net?

asked 2020-12-03 10:56:54 -0600

hammockman gravatar image

I often find some neuural network models on the internet which are not very clear about what is the shape/format of their required input and output. Then I try to run them on opencv::dnn but I have no idea what shape/data type I should feed into them with the blob, and I also do not know what datatype/format I should save the output in (in c++ I need to declare a variable to get the network output, what data type/shape should this variable have? ).

Thank you in advance for the advise.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-12-03 16:31:28 -0600

crackwitz gravatar image

the network's description can tell you the dimensions of every layer, particularly first and last layers.

it can't tell you any normalization and scaling required on the values, or how to interpret their meaning.

that information needs to given alongside the network. look for a publication (documentation, repo, scientific paper) on the network you intend to use.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-12-03 10:56:54 -0600

Seen: 669 times

Last updated: Dec 03 '20