- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am following the sample
Direct Consuming of the NV12 VAAPI Video Decoder Surface on Linux
and try to build a model on the va device used in ffmpeg hardware decoder. But I encounted some error below when calling the function compile_model().
My system infomation:
- OpenVINO=> 2022.1
- Operating System / Platform => ubuntu20.04
Part of my codes:
size_t input_height = 300;
size_t input_width = 300;
// initialize the core and load the network
ov::Core core;
auto model = core.read_model("/opt/intel/openvino_2022.1.0.643/samples/cpp/hello_remote_blob/public/ssd300/FP32/ssd300.xml");
printf("Preprocessing...\n");
auto p = PrePostProcessor(model);
p.input().tensor().set_element_type(ov::element::u8)
.set_color_format(ov::preprocess::ColorFormat::NV12_TWO_PLANES, {"y", "uv"})
.set_memory_type(ov::intel_gpu::memory_type::surface);
p.input().preprocess()
.convert_color(ov::preprocess::ColorFormat::BGR);
p.input().model().set_layout("NCHW");
model = p.build();
printf("Build finished\n");
// create the shared context object
auto shared_va_context = ov::intel_gpu::ocl::VAContext(core, display);
// compile model within a shared context
auto compiled_model = core.compile_model(model, shared_va_context);
printf("Compile model finished\n");
The error:
terminate called after throwing an instance of 'ov::Exception'
what(): Error has occured for: add:data/mean
Sizes equal or broadcast is possible(true) should be false
Invalid input shapes
part of ssd300.xml file(This file is obtained by omz_downloader and omz_converter):
<layer id="0" name="data" type="Parameter" version="opset1">
<data shape="1,3,300,300" element_type="f32"/>
<rt_info>
<attribute name="fused_names" version="0" value="data"/>
</rt_info>
<output>
<port id="0" precision="FP32" names="data">
<dim>1</dim>
<dim>3</dim>
<dim>300</dim>
<dim>300</dim>
<rt_info>
<attribute name="layout" version="0" layout="[N,C,H,W]"/>
</rt_info>
</port>
</output>
</layer>
<layer id="1" name="data/mean_input_port_1/value8827915" type="Const" version="opset1">
<data element_type="f32" shape="1, 3, 1, 1" offset="0" size="12"/>
<rt_info>
<attribute name="fused_names" version="0" value="data/mean_input_port_1/value8827915"/>
</rt_info>
<output>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>1</dim>
<dim>1</dim>
</port>
</output>
</layer>
<layer id="2" name="data/mean" type="Add" version="opset1">
<data auto_broadcast="numpy"/>
<rt_info>
<attribute name="fused_names" version="0" value="data/mean"/>
</rt_info>
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>300</dim>
<dim>300</dim>
</port>
<port id="1" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>1</dim>
<dim>1</dim>
</port>
</input>
<output>
<port id="2" precision="FP32">
<dim>1</dim>
<dim>3</dim>
<dim>300</dim>
<dim>300</dim>
</port>
</output>
</layer>
The XML file seems to correct, I don't know why this error is raised. And my complete code in this repository.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
Sorry for my late response as I still facing challenges in installing FFMPEG with VAAPI support. By the way, it is glad to hear that the error was resolved as per this GitHub discussion.
As for the C API of RemoteBlob, there is no plan yet from our development.
Sincerely,
Peh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
Thanks for reaching out to us.
By adding the pre-processing step of converting to ‘float’, did the error resolved?
p.input().preprocess()
.convert_element_type(ov::element::f32)
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh_Intel,
Thanks for reply,
After modified, my code is
p.input().tensor().set_element_type(ov::element::u8)
.set_color_format(ov::preprocess::ColorFormat::NV12_TWO_PLANES, {"y", "uv"})
.set_memory_type(ov::intel_gpu::memory_type::surface);
p.input().preprocess()
.convert_element_type(ov::element::f32)
.convert_color(ov::preprocess::ColorFormat::BGR);
But the error still occurs:
terminate called after throwing an instance of 'ov::Exception'
what(): cldnn program build failed! Error has occured for: convert:Convert_826
No image_nv12 to image_nv12 reorder is supported
Aborted (core dumped)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
I was not able to reproduce the issue because fail to build the application based on your repository.
Can you share the config.h file that included in the main.cpp?
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh_Intel,
Thanks for reply,
I push the config.h file to the repository. If you need to build this project, you need to install FFMPEG with VAAPI support first. And I added the complement information in the readme.md file. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
Thanks for the updates in building the project.
We are still investigating this issue and will get back to you at the earliest.
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh_Intel,
Thanks for reply and helping me solve this issue
By the way, does openvino community plan to develop C API of RemoteBlob?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
Sorry for my late response as I still facing challenges in installing FFMPEG with VAAPI support. By the way, it is glad to hear that the error was resolved as per this GitHub discussion.
As for the C API of RemoteBlob, there is no plan yet from our development.
Sincerely,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kizna1ver,
Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.
Regards,
Peh
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page