openvinotoolkit/openvino

[Good First Issue] PostProcess supports RGB->NV12 color convert function

Open

#22,985 opened on 2024年2月21日

GitHub で見る
 (31 comments) (3 reactions) (1 assignee)C++ (3,229 forks)auto 404
category: Coregood first issueno_stale

Repository metrics

Stars
 (10,286 stars)
PR merge metrics
 (平均マージ 14d 3h) (30d で 305 merged PRs)

説明

Context

Some customer need run super-resolution models, which need convert original NV12 video data to RGB format with scale/mean before inference and do reversed operations (RGB->NV12 and scale/mean) after inference. Current ov::preprocess::PostProcessSteps doesn't support RGB->NV12 and scale/mean, this ticket is used to implement RGB->NV12 support.

What needs to be done?

PostProcess support RGB->NV12: ov::preprocess::PostProcessSteps &ov::preprocess::PostProcessSteps::convert_color(const ov::preprocess::ColorFormat &dst_format);

  1. Implement above API, maybe can implement op::v8::RGBtoNV12 to do color convert, similar to op::v8::NV12toRGB for preprocess.
  2. Support ColorFormat::NV12_SINGLE_PLANE
  3. Support ColorFormat::NV12_TWO_PLANES, can set subname for Y and UV plane tensors
  4. Add test cases

Example Pull Requests

No response

Resources

Contact points

@ilya-lavrenov @riverlijunjie

Ticket

No response

コントリビューターガイド