Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rachel_r_Intel
Employee
311 Views

Why does sample application ./interactive_face_detection_sample not support realsense camera?

Jump to solution

The sample application ./interactive_face_detection_sample uses standard camera by default. Why does it not support realsense camera?

0 Kudos
1 Solution
Maksim_S_Intel
Employee
311 Views

When you pass "cam" as input, the app choose first camera (/dev/video0), but on Linux you can provide exact video device: "-i /dev/video2".

You can check all available devices by running: "v4l2-ctl --list-devices". RealSense camera can add two devices - one for video another for depth image, you need the first one.

View solution in original post

7 Replies
Monique_J_Intel
Employee
311 Views

Hi Rachel,

Can you paste in the error that you are encountering and the command you used to run the sample?

Kind Regards,

Monique Jones

rachel_r_Intel
Employee
311 Views

Hi Monique,

the command:

./interactive_face_detection_sample -m /opt/intel/computer_vision_sdk/deployment_tools/intel_models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag /opt/intel/computer_vision_sdk/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_hp /opt/intel/computer_vision_sdk/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_em /opt/intel/computer_vision_sdk/deployment_tools/intel_models/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -d CPU -d_ag CPU -d_hp CPU -d_em CPU -i RealSenseCamera

the error:

InferenceEngine: 
	API version ............ 1.2
	Build .................. 13911
[ INFO ] Parsing input parameters
[ INFO ] Reading input
GStreamer: Error opening bin: no element "RealSenseCamera"

(interactive_face_detection_sample:2864): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
[ ERROR ] Cannot open input file or camera: RealSenseCamera

I make sure that realsense camera is connected during the run.

Is it because I used the wrong "-i" parameters?

Thank you very much,

Rachel

Monique_J_Intel
Employee
311 Views

Hi Rachel,

Yes, you have the wrong -i parameter for this sample.

I validated on a Realsense camera and it worked with the following command line please give it a try and let me know if this works for you.

./interactive_face_detection_sample -m /opt/intel/computer_vision_sdk/deployment_tools/intel_models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag /opt/intel/computer_vision_sdk/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_hp /opt/intel/computer_vision_sdk/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_em /opt/intel/computer_vision_sdk/deployment_tools/intel_models/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -d CPU -d_ag CPU -d_hp CPU -d_em CPU -i cam

 

Kind Regards,

Monique Jones

rachel_r_Intel
Employee
311 Views

Hi Monique,

Sorry, I use your command to re-run, but it doesn't work for me.

This is my RealSense camera:

root@intel-desktop:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build/intel64/Release# lsusb
Bus 002 Device 007: ID 8086:0b07 Intel Corp. 

The command:

root@intel-desktop:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build/intel64/Release# ./interactive_face_detection_sample -m /opt/intel/computer_vision_sdk/deployment_tools/intel_models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag /opt/intel/computer_vision_sdk/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_hp /opt/intel/computer_vision_sdk/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_em /opt/intel/computer_vision_sdk/deployment_tools/intel_models/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -d CPU -d_ag CPU -d_hp CPU -d_em CPU -i cam

The error:

InferenceEngine: 
	API version ............ 1.2
	Build .................. 13911
[ INFO ] Parsing input parameters
[ INFO ] Reading input

(interactive_face_detection_sample:5464): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
VIDEOIO ERROR: V4L: can't open camera by index 0
[ ERROR ] Cannot open input file or camera: cam

But, When I run the same command with Standard camera, everything is ok.

Bus 001 Device 011: ID 045e:0810 Microsoft Corp.

Thank you,

Rachel

Severine_H_Intel
Employee
311 Views

Dear Rachel, 

Can VLC read your RealSense camera input? V4L library is also used by VLC.

vlc -vvv v4l2:///dev/video0

Best, 

Severine

Maksim_S_Intel
Employee
312 Views

When you pass "cam" as input, the app choose first camera (/dev/video0), but on Linux you can provide exact video device: "-i /dev/video2".

You can check all available devices by running: "v4l2-ctl --list-devices". RealSense camera can add two devices - one for video another for depth image, you need the first one.

View solution in original post

rachel_r_Intel
Employee
311 Views

Thanks all for your help.

I solved my problem with the following command:

./interactive_face_detection_sample -m /opt/intel/computer_vision_sdk/deployment_tools/intel_models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag /opt/intel/computer_vision_sdk/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_hp /opt/intel/computer_vision_sdk/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_em /opt/intel/computer_vision_sdk/deployment_tools/intel_models/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -d CPU -d_ag CPU -d_hp CPU -d_em CPU -i /dev/video3

And, RealSense camera use three devices:

root@intel-desktop:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build/intel64/Release# v4l2-ctl --list-devices
Intel(R) RealSense(TM) 430: Int (usb-0000:00:14.0-4):
	/dev/video1
	/dev/video2
	/dev/video3

Thanks all very much,

Rachel

Reply