shinjayne / shinTB

Textboxes : Image Text Detection Model : python package (tensorflow)
https://shinjayne.github.io/deeplearning/2017/07/21/text-boxes-paper-review-1.html
90 stars 35 forks source link

I use ' runner.test' and I get an error, can you tell me how to solve to solve it? #2

Open Tian14267 opened 7 years ago

Tian14267 commented 7 years ago

I run the "runner.test" and I get the error like this ; " cv2.namedWindow("outputs", cv2.WINDOW_NORMAL) cv2.error: /io/opencv/modules/highgui/src/window.cpp:565: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow " And I delete " cv2.namedWindow("outputs", cv2.WINDOW_NORMAL) " in the runner.test, then I get this; " File "/home/tian/tensorflow/example/11/shinTB-master/main.py", line 22, in runner.test(1000) File "/home/tian/tensorflow/example/11/shinTB-master/shintb/runner.py", line 196, in test self.outputdrawer.draw_outputs(test_imgs[0], output_boxes, output_confidence, wait=1) File "/home/tian/tensorflow/example/11/shinTB-master/shintb/output_drawer.py", line 104, in draw_outputs I = cv2.rectangle(I, rect_start, rect_end, (255, 0, 0) , 5 ) TypeError: integer argument expected, got float "

And the returned value is : " FILTERED BOXES INFO : [([-inf, -inf, inf, inf], 0.49975014, 0)... PICKED BOXES INFO : [([-inf, -inf, inf, inf], 0.49975014, 0)] "

can you tell me how to solve this problem? Thank you for your help.

saifhassan commented 6 years ago

Hello @Tian14267 I got same error Did you solve this issue? @shinjayne Please help

Thanks in advance

LuiCB commented 6 years ago

Hello, I have the same error. Besides, I have overflow warnings at shinTB/shintb/output_drawer.py:56: RuntimeWarning: overflow encountered in exp w = original[2] np.exp(diffs[2]) # w exp(dw) shinTB/shintb/output_drawer.py:57: RuntimeWarning: overflow encountered in exp h = original[3] np.exp(diffs[3]) # h exp(dh) shinTB/shintb/output_drawer.py:63: RuntimeWarning: overflow encountered in exp np.amax(np.exp(logits) / (np.sum(np.exp(logits)) + 1e-3)), which might lead to the TypeError.

Have anyone solved this issue?

DarrenCheung commented 6 years ago

I would like to know how to fix this problem? It is infeasible if convert x,y,w,h into integer.

I would appreciate it if you could help us on this issue.