Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Good First Issue]: Extend PrePostProcessor module with Clamp #24996

Open
p-wysocki opened this issue Jun 13, 2024 · 2 comments
Open

[Good First Issue]: Extend PrePostProcessor module with Clamp #24996

p-wysocki opened this issue Jun 13, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers no_stale Do not mark as stale

Comments

@p-wysocki
Copy link
Contributor

Context

Some models require preprocessing done to the data before inference. Usually it's done with packages like numpy or pillow for images, but it adds dependencies and additional steps to the inference pipeline, not to mention that these steps may not be properly performant.

PrePostProcessor module allows users to define such preprocessing steps (also postprocessing if you need it), and then embed it into the graph. It not only fixes the issues mentioned above, but also allows OpenVINO graph transformations and performance improvements to take place, increasing overall inference performance.

Lately there has been a request for a new PrePostProcessor operation - Clamp: #23001. The issue contains information relevant to the task, it's recommended to read it.

What needs to be done?

  1. Modify https://github.com/openvinotoolkit/openvino/blob/master/src/core/src/preprocess/pre_post_process.cpp to include Clamp operation. It should most likely be placed in PreProcessSteps section at https://github.com/openvinotoolkit/openvino/blob/master/src/core/src/preprocess/pre_post_process.cpp#L257.
  2. Add the implementation to https://github.com/openvinotoolkit/openvino/blob/master/src/core/src/preprocess/preprocess_steps_impl.cpp

The implementation is preferred to use existing OpenVINO operators - in this case we have a perfect operator for that: https://docs.openvino.ai/2024/documentation/openvino-ir-format/operation-sets/operation-specs/activation/clamp-1.html
3. Add tests to https://github.com/openvinotoolkit/openvino/blob/master/src/core/tests/preprocess.cpp

Example Pull Requests

Resources

Contact points

@p-wysocki

Ticket

N/A

@amansharma612
Copy link

I would like to work on this issue. Could you please assign this to me?

@mlukasze
Copy link
Contributor

The task is yours @amansharma612, have fun :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers no_stale Do not mark as stale
Projects
Status: Assigned
Development

No branches or pull requests

3 participants