Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Text Detection C++ Demo show no image

ininder__gg
Beginner
907 Views

hi sir.

I'm trying new 2019 version Openvino's Text Detection C++ demo. after some test, it works fine and outputs something like :

text detection model inference (ms) (fps): 655 1.52672
text detection postprocessing (ms) (fps): 141 7.0922

text recognition model inference (ms) (fps): 26.76 37.3692
text recognition postprocessing (ms) (fps): 0.0261467 38245.8

text crop (ms) (fps): 0.0584533 17107.7

However, it doesn't show any imshow window no matter how the -no_show tag is set or not set. Also, the -i tag cannot find a video file or camera.

 

what I have tried:

./text_detection_demo -i /dev/video0 -m_td ~/textmodel/text-detection-0002.xml -m_tr ~/textmodel/text-recognition-0012.xml -no_show 1
 

 and return 

Could not read an image: /dev/video0
 

 

./text_detection_demo -i ~/a.png -m_td ~/textmodel/text-detection-0002.xml -m_tr ~/textmodel/text-recognition-0012.xml -no_show 0

works but no image show

./text_detection_demo -i ~/a.png -m_td ~/textmodel/text-detection-0002.xml -m_tr ~/textmodel/text-recognition-0012.xml -no_show 1

works but no image show

./text_detection_demo -i ~/a.png -m_td ~/textmodel/text-detection-0002.xml -m_tr ~/textmodel/text-recognition-0012.xml

works but no image shows ,neither

 

and if I want to read video file

./text_detection_demo -m_td ~/textmodel/text-detection-0002.xml -m_tr ~/textmodel/text-recognition-0012.xml -i ~/a.avi 

 

and return

Could not read an image: /home/gino/a.avi
 

what should I do?

0 Kudos
8 Replies
Shubha_R_Intel
Employee
907 Views

Dear ininder, gg,

I'm assuming that you obtained your models from :

https://download.01.org/opencv/2019/open_model_zoo/R1/models_bin/

Correct  ? I am looking at this issue for you. Thanks for your patience,

Thanks,

Shubha

0 Kudos
Shubha_R_Intel
Employee
907 Views

Dearest ininder, gg,

This is a bug. Thanks for finding it. I have reproduced your issues ! I will file a bug on your behalf,

Sincerely,

Shubha

 

0 Kudos
nikos1
Valued Contributor I
907 Views

Hello ininder, gg,

How are you getting the text recognition results?

My understanding is you need a CTC decoder. I think there is an Intel OpenCL version of a greedy CTC decoder and possibly a CPU version too.

Have not checked the sample yet... maybe already using the CTC decoder?

Cheers,

nikos

 

0 Kudos
nikos1
Valued Contributor I
907 Views

Never mind I can see the CTCGreedyDecoder is already in the sample. Works nicely!

0 Kudos
nikos1
Valued Contributor I
907 Views

What happens if you try 

./text_detection_demo -i video.mp4 -m_td text-detection-0002.xml -m_tr text-recognition-0012.xml -dt video

Works fine here processing the input video and drawing text regions and OCR results

Cheers,

Nikos

0 Kudos
Shubha_R_Intel
Employee
907 Views

nikos, thanks ! yes -dt video solved the problem. Still a bug though, because it should be clear in the documentation. it's not !

Thanks for helping out,

Shubha

0 Kudos
ininder__gg
Beginner
907 Views

ok, it works fine.

thank you, sir.

0 Kudos
ininder__gg
Beginner
907 Views

after taking a while look in text detection example,

I try CPU + MYRIAD ( I have only 1 NCS stick )

when using MYRIAD to detect, CPU to recognize they work fine as using CPU in both tasks, however

, if using CPU to detect, MYRIAD to recognize, it would find nothing and no text to be outputed.

I think it's the way the neural compute stick works.

0 Kudos
Reply