openvinotoolkit / open_model_zoo

Pre-trained Deep Learning models and demos (high quality and extremely fast)
https://docs.openvino.ai/latest/model_zoo.html
Apache License 2.0
4.1k stars 1.37k forks source link

text detection models on ncs2 #1259

Closed GotG closed 4 years ago

GotG commented 4 years ago

Hello

Is there any reason why the text detection models do not run on ncs2 stick?

Thanks

maxlytkin commented 4 years ago

Hello @GotG If you are talking about Text Detection C++ Demo, then there're some specific models that should work well on MYRIAD NCS2. These models are: text-detection-0003, text-detection-0004, text-recognition-0012, handwritten-score-recognition-0001

Best regards, Max.

GotG commented 4 years ago

https://docs.openvinotoolkit.org/latest/_demos_README.html according to the table posted there, they do not work on Myriad. Thanks, I tested them and the C++ version works. However the python one does not due to a layer issue: File "text_spotting_demo.py", line 384, in sys.exit(main() or 0)

File "text_spotting_demo.py", line 220, in main mask_rcnn_exec_net = ie.load_network(network=mask_rcnn_net, device_name=args.device, num_requests=2)

File "ie_api.pyx", line 134, in openvino.inference_engine.ie_api.IECore.load_network

File "ie_api.pyx", line 141, in openvino.inference_engine.ie_api.IECore.load_network

RuntimeError: Check (env.config.ignoreUnknownLayers) failed: Failed to compile layer 690 : Unsupported layer type :

ExperimentalDetectronPriorGridGenerator

Any suggestions please?

maxlytkin commented 4 years ago

@GotG I think this table states that these text-detection models being not officially supported and validated on MYRIAD, however they still may work. As for the Text Spotting Python Demo, you should run this app exactly with text-spotting models, not with text-detection ones.

python3 text_spotting_demo.py \ -m_m /text-spotting-0002-detector.xml \ -m_te /text-spotting-0002-recognizer-encoder.xml \ -m_td /text-spotting-0002-recognizer-decoder.xml \ -i input_image.jpg

GotG commented 4 years ago

Here is the error:

python3 text_spotting_demo.py -m_m /home/one/intel/openvino_2020.3.194/deployment_tools/tools/model_downloader/intel/text-spotting-0002-detector/FP16/text-spotting-0002-detector.xml -m_te /home/one/intel/openvino_2020.3.194/deployment_tools/tools/model_downloader/intel/text-spotting-0002-recognizer-encoder/FP16/text-spotting-0002-recognizer-encoder.xml -m_td /home/one/intel/openvino_2020.3.194/deployment_tools/tools/model_downloader/intel/text-spotting-0002-recognizer-decoder/FP16/text-spotting-0002-recognizer-decoder.xml -d MYRIAD -i cam [ INFO ] Creating Inference Engine... [ INFO ] Loading Mask-RCNN network [ INFO ] Loading encoder part of text recognition network [ INFO ] Loading decoder part of text recognition network [ INFO ] Loading IR to the plugin... Traceback (most recent call last): File "text_spotting_demo.py", line 375, in sys.exit(main() or 0) File "text_spotting_demo.py", line 211, in main mask_rcnn_exec_net = ie.load_network(network=mask_rcnn_net, device_name=args.device, num_requests=2) File "ie_api.pyx", line 178, in openvino.inference_engine.ie_api.IECore.load_network File "ie_api.pyx", line 187, in openvino.inference_engine.ie_api.IECore.load_network RuntimeError: Failed to compile layer "758": unsupported layer type "ExperimentalDetectronTopKROIs"

maxlytkin commented 4 years ago

@GotG We were able to reproduce this error running Text Spotting Python Demo with MYRIAD plugin. The situation supposed to be pretty much the same as with C++ demo, that at the current moment these models are not officially supported on MYRIAD/HDDL, thus it may or may not work. And here the model text-spotting-0002-detector does not work due to unsupported "758" layer. There has been a documentation change request submitted here https://github.com/opencv/open_model_zoo/pull/1272 We apologize for the inconvenience caused.

GotG commented 4 years ago

Is there anything I can do? Should I try to use a custom layer implementation?

maxlytkin commented 4 years ago

Hello @GotG Yes, please see this reply https://github.com/openvinotoolkit/openvino/issues/1117#issuecomment-651907764

IRDonch commented 4 years ago

Looks like this question was answered in openvinotoolkit/openvino#1117, so I'm closing this.