- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am currently trying to deploy a cv model in C++ using Openvino API.
My model only takes in grayscale images. When I set up my PrePostProcessor input preprocess, there is no grayscale in ov::preprocess::ColorFormat. This is confirmed in ColorFormat documentation.
The code below is the correct way to do this with an RBG image, however I am unsure how to achieve this with grayscale, as GRAY is not supported in ov::preprocess::ColorFormat. Any help is greatly appreciated!
// Inizialize Preprocessing for the model
ov::preprocess::PrePostProcessor ppp = ov::preprocess::PrePostProcessor(model);
// Specify input image format
ppp.input().tensor().set_element_type(ov::element::u8).set_layout("NHWC").set_color_format(ov::preprocess::ColorFormat::BGR);
// Specify preprocess pipeline to input image without resizing
ppp.input().preprocess().convert_element_type(ov::element::f32).convert_color(ov::preprocess::ColorFormat::RGB).scale({255., 255., 255.});
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jrrw1,
Thanks for reaching out to us.
Input color format for preprocessing in OpenVINO™ Inference Engine C++ API are as follows:
- RAW
- RGB
- BGR
- RGBX
- BGRX
- NV12
- I420
For more information, please refer to the enum InferenceEngine::ColorFormat.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jrrw1,
Thanks for your question.
Please submit a new question if additional information is needed as this thread will no longer be monitored.
Regards,
Wan

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