openvinotoolkit/openvino

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

Open

#22.985 aperta il 21 feb 2024

Vedi su GitHub
 (31 commenti) (3 reazioni) (1 assegnatario)C++ (3229 fork)auto 404
category: Coregood first issueno_stale

Metriche repository

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

Descrizione

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

Guida contributor