forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OV20] Convert NV12 to RGB operation + preprocessing (openvinotoolkit…
…#7508) * # Conflicts: # docs/template_plugin/tests/functional/op_reference/convert_color_nv12.cpp # inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/convert_color_nv12.cpp # inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert_color_nv12.hpp # inference-engine/tests/functional/shared_test_classes/src/single_layer/convert_color_nv12.cpp # ngraph/core/include/openvino/core/preprocess/input_tensor_info.hpp # ngraph/core/include/openvino/core/preprocess/preprocess_steps.hpp # ngraph/core/include/openvino/op/nv12_to_bgr.hpp # ngraph/core/include/openvino/op/nv12_to_rgb.hpp # ngraph/core/src/op/nv12_to_bgr.cpp # ngraph/core/src/op/nv12_to_rgb.cpp # ngraph/core/src/preprocess/pre_post_process.cpp # ngraph/core/src/preprocess/preprocess_steps_impl.hpp # ngraph/test/CMakeLists.txt * Added more test to cover 100% of code Allow convert element type for 'multi-plane' color format * Inherit tensor names for 'convert_color' * Clang * Fix tests * Disable 'int8' preprocessing resize test * Fix review comments * Add more restrictions and tests for planes sub-names * 1) Added check for uniqueness of tensor names generated for nodes Raise error if user's plane sub-name conflicts with some node in a function 2) Added exception safety to preprocess build. Before, when input #2 fail, only one preprocess will be applied to function and it will be corrupted Exception guard will restore function to original state if exception occurs * Fix clang-format
- Loading branch information
Showing
15 changed files
with
1,130 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ngraph/core/include/openvino/core/preprocess/color_format.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (C) 2018-2021 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
namespace ov { | ||
namespace preprocess { | ||
|
||
/// \brief Color format enumeration for conversion | ||
enum class ColorFormat { | ||
UNDEFINED, | ||
NV12_SINGLE_PLANE, // Image in NV12 format as single tensor | ||
NV12_TWO_PLANES, // Image in NV12 format represented as separate tensors for Y and UV planes | ||
RGB, | ||
BGR | ||
}; | ||
|
||
} // namespace preprocess | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.