Instead of doing C++ to Python bindings for each and every OpenVINO operator, we are using internal NodeFactory, which takes the name of the operator as an argument:
op = NodeFactory().create("ROIAlignRotated", *args, **kwargs) # pseudocode
Such an API is counter intuitive for an end user, so we are also adding Python API with a proper, pythonic and clear functions. Those Python functions are just wrappers around NodeFactory object call, and their primary goal is to provide appropriate inputs docs and more pythonic API:
op = ops.roi_align_rotated(*args, **kwargs) # pseudocode
This task regards adding such a Python API function for ROIAlignRotated-15 operator.
What needs to be done?
Extend Python API and Python compatibility API with ROIAlignRotated (operator should be added to the opset15/ops.py)
Add tests for both APIs
Create a PR
ROIAlignRotated is a similar op to ROIAlign, with some modifications to enable rotation.
Context
Instead of doing C++ to Python bindings for each and every OpenVINO operator, we are using internal
NodeFactory
, which takes the name of the operator as an argument:Such an API is counter intuitive for an end user, so we are also adding Python API with a proper, pythonic and clear functions. Those Python functions are just wrappers around
NodeFactory
object call, and their primary goal is to provide appropriate inputs docs and more pythonic API:This task regards adding such a Python API function for ROIAlignRotated-15 operator.
What needs to be done?
ROIAlignRotated
is a similar op toROIAlign
, with some modifications to enable rotation.Python API
roi_align
can be used as an example: https://github.com/openvinotoolkit/openvino/blob/bc505ba8ddafe938e01fa5530ac5d6cc492efe17/src/bindings/python/src/openvino/runtime/opset9/ops.py#L97-L141Python API
roi_align_rotated
function should reflect ROIAlignRotated C++ constructor: https://github.com/openvinotoolkit/openvino/blob/bc505ba8ddafe938e01fa5530ac5d6cc492efe17/src/core/include/openvino/op/roi_align_rotated.hpp#L20-L39Please see attached PR, this task is very similar to the linked
Col2Im
Python API.Example Pull Requests
https://github.com/openvinotoolkit/openvino/pull/24569
Resources
Contact points
@mitruska @p-wysocki @akuporos
Ticket
141569