weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.68k forks source link

How to generate the picture with detected box? #127

Open ZoneFv opened 8 years ago

ZoneFv commented 8 years ago

I found that this program will generate the postiton of the objects,but I want to see the position of the detected boxes on the picture. What should I do to get the pictures with detected boxes?

weiliu89 commented 8 years ago

you could refer to ssd_detect.ipynb

guhaohitsz commented 8 years ago

@ZoneFv @weiliu89 Have you solved the problem, want to get the detected boxes with classified name too, but i don't know how to use the reference ssd_detect.ipynb.

ZoneFv commented 8 years ago

@weiliu89 I'm working on the linux server without browser, so I can't use the ipython notebook to open the .ipynb file. What should I do to open the .ipynb file?

ZoneFv commented 8 years ago

@guhaohitsz Now I am trying to write a code to solve my problem by refer to the demo.py of faster-rcnn

guhaohitsz commented 8 years ago

@ZoneFv I get the detected boxes by add some codes in ssd_detect.cpp using opencv command. You can get a try. Looking forward to your faster rcnn too

weiliu89 commented 8 years ago

@ZoneFv @guhaohitsz You could just open the ssd_detect.ipynb in github. It will show you the code that I used to plot the detection results. You can refer to it and paste it wherever you like.

zhenxing9968 commented 8 years ago

What should i do with this ? @weiliu89

zxzhao@zxzhao-All-Series:~/caffe_ssd$ python ./examples/ssd/ssd-detect.py File "./examples/ssd/ssd-detect.py", line 3 %matplotlib inline ^ SyntaxError: invalid syntax

ck196 commented 8 years ago

@zhenxing9968 : you could comment out it. I edited ssd-detect.py (ssd_500) to generate images with bouding box using opencv. You can take a look. https://gist.github.com/ck196/ac889a1490787ea8b9d2c165134aae7e

zhenxing9968 commented 8 years ago

@ck196 thanks. I have already solved.

cloudyszz commented 7 years ago

@guhaohitsz I also have the question about generating pictures with detected boxes and I also add some codes in ssd_detect.cpp using opencv command.But I can not deal with how to save all the images in the test picture list exactly,I use cvSaveImage ,but I can only save the last image in the picture list. Could you show me your modified ssd_detect.cpp ?

weiliu89 commented 7 years ago

@cloudyszz You should save result inside the loop not outside. For example, you could place your saving code after this line.

Besides, for those who are interested, I have also provided a script to plot results output by ssd_detect.cpp.

cloudyszz commented 7 years ago

@weiliu89 Thank you for your so kind reply! I will rechange it by your hints. It's so cool that I can also use your new script to generate detected boxes. Thank you for your contribution!