- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Processor: Intel Core i5
OS: Windows
OpenVINO version: OpenVINO Toolkit 2021.1
Intel pre-trained model: face-detection-retail-0004.xml
input: video.264
I have tried running the object_detection_demo_ssd_async python sample in OpenVINO by giving backend API(CAP_INTEL_MFX) to VideoCapture for decoding the resulting file.
cap = cv2.VideoCapture(input_stream,cv2.CAP_INTEL_MFX)
I am able to view output but displaying the below line on terminal.
"MFX: getproperty() is not implemented"
Command used: python object_detection_demo_ssd_async.py -i=video.264 -m <path-to-model>\face-detection-retail-0004.xml
Please find the attached screenshots for your reference
Kindly let me know if you have any inputs.
TIA,
Lavanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem with CPP demo is the same as with Python one: VideoCapture with MediaSDK does not return frame dimensions via properties (get method). But CPP demo relies on these values not only to draw graphs but also to draw detections.
See:
Try to add initialization of width and height variables after the first frame have been read (https://github.com/openvinotoolkit/open_model_zoo/blob/75ec8ad4b6c4fd7fb161ae9d2c3056281b2443de/demo...), e.g. "width = curr_frame.width(); height = curr_frame.height();"
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MediaSDK backend in OpenCV does not implement getProperty method yet, so it does not return anything. As I can see the demo application uses frame width and height to create presenter and draw graphs:
I think you can ignore this warning or hardcode sizes passed to presenter if you need graphs to show correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maksim,
Thank you for the response.
OS: Windows
I have tried even running the object_detection_demo_ssd_async CPP demo with person-detection-retail-0013.xml and Input is video.264
Command: object_detection_demo_ssd_async.exe -i <path>\video.264 -m <path>\person_model\intel\person-detection-retail-0013\FP32\person-detection-retail-0013.xml
Not able to view the detection results on output frame.
Please find the attached screenshot and let me know your inputs.
TIA,
Lavanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lavanya,
person-detection-retail-0013 model is a pedestrian detector for the retail scenario.
I've just validated using people-detection video, available at https://github.com/intel-iot-devkit/sample-videos, and it works fine.
Regards,
Munesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mukesh,
Thank you for the response.
My aim is to use backend API in conjunction of OpenVINO when using OpenCV videoCapture method for video.264.
cap = new cv::VideoCapture(source, backendAPI);
So, I ran the object_detection_ssd_async CPP demo with video.264 format input using the opencv back end API for Video capture. so modified the below code accordingly.
cv::VideoCapture cap;
if (!((FLAGS_i == "cam") ? cap.open(0) : cap.open(FLAGS_i.c_str(),cv::CAP_INTEL_MFX))) {
throw std::logic_error("Cannot open input file or camera: " + FLAGS_i);
}
Converted the person-detection.mp4 to out_person_detection.264 using below command.
ffmpeg -i <path>\Downloads\people-detection.mp4 -an -vcodec libx264 -crf 23 out_people_detection.264
Command: object_detection_demo_ssd_async.exe -m <path_to_model>\intel\person-detection-retail-0013\FP32\person-detection-retail-0013.xml -i <path_to_video>\out_car-detection.h264
Sample is running but not able to view the detection results on output frame. Also getting below line in terminal.
"MFX: getproperty() is not implemented"
Please find the attached screenshots for your reference and let me know if you have any inputs.
TIA,
Lavanya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Munesh,
Ignore my previous reply.
Thank you for the response.
My aim is to use backend API in conjunction of OpenVINO when using OpenCV videoCapture method for video.264.
cap = new cv::VideoCapture(source, backendAPI);
So, I ran the object_detection_ssd_async CPP demo with video.264 format input using the opencv back end API for Video capture. so modified the below code accordingly.
cv::VideoCapture cap;
if (!((FLAGS_i == "cam") ? cap.open(0) : cap.open(FLAGS_i.c_str(),cv::CAP_INTEL_MFX))) {
throw std::logic_error("Cannot open input file or camera: " + FLAGS_i);
}
Converted the person-detection.mp4 to out_person_detection.264 using below command.
ffmpeg -i <path>\Downloads\people-detection.mp4 -an -vcodec libx264 -crf 23 out_people_detection.264
Command: object_detection_demo_ssd_async.exe -m <path_to_model>\intel\person-detection-retail-0013\FP32\person-detection-retail-0013.xml -i <path_to_video>\out_people_detection.264
Sample is running but not able to view the detection results on output frame. Also getting below line in terminal.
"MFX: getproperty() is not implemented"
Please find the attached screenshots for your reference and let me know if you have any inputs.
TIA,
Lavanya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem with CPP demo is the same as with Python one: VideoCapture with MediaSDK does not return frame dimensions via properties (get method). But CPP demo relies on these values not only to draw graphs but also to draw detections.
See:
Try to add initialization of width and height variables after the first frame have been read (https://github.com/openvinotoolkit/open_model_zoo/blob/75ec8ad4b6c4fd7fb161ae9d2c3056281b2443de/demo...), e.g. "width = curr_frame.width(); height = curr_frame.height();"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lavanya,
This thread will no longer be monitored since a solution has been provided. If you need any additional information from Intel, please submit a new question.
Regards,
Munesh

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page