Skip to content

Bug during RGB converting in data pipeline #2584

@wonjuleee

Description

@wonjuleee

Describe the bug

When creating Image from datumato media, the media has been already converted to RGB as described in both cases

  1. Image from path: https://github.com/openvinotoolkit/training_extensions/blob/b4fcc6d055c27792d4769ee1ee343eb2b9bfea7e/src/otx/api/entities/image.py#L94
  2. Image from data: https://github.com/openvinotoolkit/training_extensions/blob/b4fcc6d055c27792d4769ee1ee343eb2b9bfea7e/src/otx/core/data/adapter/base_dataset_adapter.py#L412

But this has been again converted to RGB in data pipeline, for instances, in classification tasks: https://github.com/openvinotoolkit/training_extensions/blob/b4fcc6d055c27792d4769ee1ee343eb2b9bfea7e/src/otx/algorithms/classification/configs/base/data/data_pipeline.py#L8

As a result, there are some performance drop with current data pipelines..

to_rgb True (as-is) False (to-be)
CIFAR100 (#2500 training data) Acc: 0.423 / E2E time: 120.16 sec Acc: 0.473 / E2E time: 159.17 sec
CUB200 (#1200 training data) Acc: 0.615 / E2E time: 41.27 sec Acc: 0.680 / E2E time: 41.92 sec

Steps to Reproduce

  1. Turn to_rgb=False
  2. Do experiments

Environment:

  • OS: Ubuntu 20.04
  • Framework version: PyTorch 2.0
  • Python version: Python 3.10
  • OpenVINO version:
  • CUDA/cuDNN version: 11.7
  • GPU model and memory: RTX3090

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions