Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MBhat97
Beginner
825 Views

Inference Python API for real-time Object Detection, Intel Realsense D435

Hello developers, I am very new to OpenVINO, Kindly help me with the following: 

# --------------------------- Performing inference ----------------------------------------------------
    log.info("Loading model to the device")
    exec_net = ie.load_network(network=net, device_name=args.device)
    log.info("Creating infer request and starting inference")
    res = exec_net.infer(inputs={input_blob: images}) # I am assuming this is the input.

# --------------------------- -----------------------------------------------------------------------------------

In the above piece of code I wanna perform object detection in real-time with Intel Realsense D435 camera, so how do I take the input from the camera and inference it using .xml and .bin files.  

You can find the entire code in deployment_tools/inference_engine/samples/python_samples/object_detection_sample_ssd.

Thanks in advance. 

0 Kudos
4 Replies
Sahira_Intel
Moderator
825 Views

Hi Manoj,

From my understanding, you are trying to run the object detection ssd sample with the RealSense D435 camera as your input device, correct?

In that case, after you have successfully installed OpenVINO, use the Model Optimizer to convert the model to .xml and .bin files so they can then be used to deploy your model with the Inference Engine. If you would like to use the RealSense D435, use the command -i <path_to_video> in your Inference Engine command. This will allow the model to use the RealSense camera when running inference. 

See the documentation for the Object Detection SSD Sample. 

I hope this information is helpful.

Best Regards,

Sahira 

MBhat97
Beginner
825 Views

Yes @Sahira R. that is correct. The object_detection_ssd sample only inputs an image and creates an output image. But I want to run the inference engine in real time, as in when I give the -i parameter the camera should turn on, keep on detecting the objects that comes in the range of the camera until and unless I terminate it. So how do I modify the same to do the real-time object detection??

Can I use this

https://docs.openvinotoolkit.org/2018_R5/_samples_object_detection_demo_README.html

to do the real-time object detection? or this https://docs.openvinotoolkit.org/2018_R5/_samples_object_detection_demo_ssd_async_README.html? ;

Sahira_Intel
Moderator
825 Views

Hi Manoj,

Thank you for clarifying!

Yes, you can use this model: https://github.com/opencv/open_model_zoo/tree/master/demos/object_detection_demo_ssd_async to do real time object detection. You can just pass the video input in with the -i parameter. 

The Open Model Zoo also has some models you can try out: https://github.com/opencv/open_model_zoo/tree/master/demos/object_detection_demo_yolov3_async 

I hope this is helpful!

Best Regards,

Sahira 

MBhat97
Beginner
825 Views

Yes, thank you Sahira R for your help. Also I have found an interesting code that fits my application.

https://github.com/PINTO0309/MobileNet-SSD-RealSense

 

 

Reply