Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ishida__Ken
Beginner
141 Views

Python Object detection, can't return to prompt

I make object detection using openvino R1.1, opencv dnn and Python 3.6.5.

The program runs fine, but when it exits, it can't return to the anaconda prompt.

Please let me know if you know the solution.

net = cv2.dnn.readNet('lrmodel/MobileNetSSD/MobileNetSSD_deploy.xml', 'lrmodel/MobileNetSSD/MobileNetSSD_deploy.bin')

net.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)

blob = cv2.dnn.blobFromImage(color_image, 0.007843, size=(300, 300),  mean=(127.5,127.5,127.5), swapRB=False, crop=False)

net.setInput(blob)       

out = net.forward()  <---

Best Regards

 

0 Kudos
4 Replies
JesusE_Intel
Moderator
141 Views

Hi Ken,

Thanks for reaching out. Do you see the same behavior on the latest OpenVINO toolkit 2019 R3.1? When the program exits what happens? Does it hang or does the anaconda prompt ends? Do you see the same behavior when using one of our demo applications using the inference engine?

Regards,

Jesus

Ishida__Ken
Beginner
141 Views

Thank you for reply.

I will check demo application site.

 

Ishida__Ken
Beginner
141 Views

Hello,

I reinstalled openvino R3,

My program return to Prompt.

But sometime it can't restart.

warning

[ WARN:0] global C:\jenkins\workspace\OpenCV\OpenVINO\build\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback

Please teach me this means.

 

 

 

JesusE_Intel
Moderator
141 Views

Hi Ken,

The error message you are seeing may be caused by the camera handle not being released. Try adding cv2.destroyAllWindows() to the end of your application.

Take a look at the OpenVINO object_detection_demo_yolov3_async demo to see how we are ending the application.

Regards,

Jesus

Reply