MhLiao / TextBoxes_plusplus

TextBoxes++: A Single-Shot Oriented Scene Text Detector
Other
956 stars 281 forks source link

strange demo.py detection result #19

Closed ziyanghong closed 6 years ago

ziyanghong commented 6 years ago

I used the demo.py to run only the detection on the demo image, however I got some weird result: 681,232,604,233,1,1,1,1,0.9996038 658,94,615,93,1,1,1,1,0.9966356 662,160,620,160,1,1,1,1,0.996449 659,139,616,138,1,1,1,1,0.99529016 658,117,606,116,1,1,1,1,0.8200721

I am running on model_icdar15.caffemodel. Does anyone have a clue?

MhLiao commented 6 years ago

@ziyanghong I got the following detection results using "demo_det.py": 600,199,680,197,682,232,602,234,0.998967 619,73,661,74,659,93,617,93,0.964453 619,118,661,119,660,139,618,138,0.956784 603,96,669,97,668,117,603,116,0.937017 621,141,661,141,661,160,620,160,0.903893

ziyanghong commented 6 years ago

@MhLiao Thanks for the quick reply! I have just tried the demo_det.py, still producing weird result, some predictions are mapped to 1. Have you tried CPU mode? Since I am running the network on CPU mode.

ziyanghong commented 6 years ago

I solved it. The problem is due to the caffe cpu mode. If you switch back to GPU mode, it won't create any problem.

zyxrrr commented 6 years ago

@ziyanghong Hello,I want to run this on CPU mode, but it failed like F0312 17:47:01.322526 8361 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode. I have changed solver_mode = P.Solver.CPU in modeConfig.py and caffe.set_mode_cpu() in demo.py.

ziyanghong commented 6 years ago

@zyxrrr Hi! I compiled caffe with GPU version, in which it supports both CPU and GPU mode. Then I select the CPU mode, however I don't recommend running it on CPU mode, since the result is not correct.

zyxrrr commented 6 years ago

@ziyanghong Thanks! But I want to try it on my computer first, do you remeber changing what python codes?

ziyanghong commented 6 years ago

@zyxrrr Hi! I did not change any code for the CPU part since I later ran everything on my server...

SHaiHosh commented 6 years ago

Hi Here is the solution - to get the code work on cpu change in lines 1333-1336: decode_polygon->set_x1(x3); decode_polygon->set_y1(y3); decode_polygon->set_x2(x4); decode_polygon->set_y2(y4); to: decode_polygon->set_x3(x3); decode_polygon->set_y3(y3); decode_polygon->set_x4(x4); decode_polygon->set_y4(y4);

rajesh-bhat commented 6 years ago

@SHaiHosh which file are you referring?

rajesh-bhat commented 6 years ago

@SHaiHosh I found it here: TextBoxes_plusplus/src/caffe/util/bbox_util.cpp.