openvinotoolkit/openvino

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

Open

#23,001 建立於 2024年2月21日

在 GitHub 查看
 (31 留言) (0 反應) (1 負責人)C++ (3,229 fork)auto 404
enhancementfeaturegood first issue

倉庫指標

Star
 (10,286 star)
PR 合併指標
 (平均合併 14天 3小時) (30 天內合併 305 個 PR)

描述

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

貢獻者指南