openvinotoolkit/openvino

[Feature Request]: Add clamp functionality to input.preprocess

Open

#23.001 aperta il 21 feb 2024

Vedi su GitHub
 (31 commenti) (0 reazioni) (1 assegnatario)C++ (3229 fork)auto 404
enhancementfeaturegood first issue

Metriche repository

Star
 (10.286 star)
Metriche merge PR
 (Merge medio 14g 3h) (305 PR mergiate in 30 g)

Descrizione

Request Description

My team deploys Tensorflow and Pytorch models converted to OpenVINO's IR format to the edge which require preprocessing. Our data is often non-RGB, like thermal or depth data. Often for preprocessing the dataset before or during training we apply a clamping operation, like np.clip, to remove things like background noise in thermal data.

A lot of the models and frameworks we use we don't have access to the low-level layer code of the model so we end up converting the model to Openvino's IR format and deploying that model to our edge software along with metadata about the clip values (minimum_temperature and maximum_temperature) and we need to apply this preprocessing outside of the OpenVINO model Preprocessing Pipeline as there is no built-in clamp function in OpenVINO.

If clamping functionality was built in to OpenVINO's Preprocessing API it would allow some portability in implementation for our models as well. We usually train our models in Python but our edge software using the C++ OpenVINO API.

Another avenue (which may require a separate feature request?) could include an option during model conversion to add this clamping similar to how you can pass mean values into the convert model function.

Feature Use Case

No response

Issue submission checklist

  • The feature request or improvement must be related to OpenVINO

Guida contributor