Ask Your Question
0

bounding boxes for caffe model matches

asked 2018-04-24 18:37:21 -0500

holger gravatar image

Hello,

I am using open cv 3.4.1 and i am sucessfuly able to import and run the google caffe model https://docs.opencv.org/3.4.0/d5/de7/...

My problem is that i want to visualize the matches in the picture. After calling forward i get the matrix of probabilities for each classifier. I need to convert this into x,y,width,height or find another to retrieve these information. Everything i found on the internet is using the Blob class which is outdated in 3.4.1

https://docs.opencv.org/3.4.0/da/d9d/... Is doing what i want but its based on yolo - and from the code i assume the result mat is not 1 * 1000 like returned from caffe.

Any help is welcome. Thank you and Greetings, Holger

edit retag flag offensive close merge delete

Comments

the googlenet caffemodel only does classification not object detection

you need another (type of) network for that, SSD, yolo, and you need to process results in a different way

berak gravatar imageberak ( 2018-04-24 20:41:42 -0500 )edit

ok got it - i am trying darknet now - mentioned in the https://docs.opencv.org/3.4.0/da/d9/t... tutorial. I am bit confused about the matrix returned but will try to understand. The question from this post is answered for me by berak - you cannot do this with caffe.

holger gravatar imageholger ( 2018-04-24 20:50:21 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-04-24 20:53:12 -0500

berak gravatar image

there is a sample here which can be used with SSD, yolo and rcnn models. give it a try and you'll probably have more questions

edit flag offensive delete link more

Comments

1

In my version i dont have the readNet() method. This method seems to be an abstraction over several dnn - which i like. Anyway i got it working for my darknet model and can draw matches - wow! Thank you again very much :-)

holger gravatar imageholger ( 2018-04-25 00:27:11 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-04-24 18:37:21 -0500

Seen: 44 times

Last updated: Apr 24 '18