openvinotoolkit / datumaro

Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
https://openvinotoolkit.github.io/datumaro/
MIT License
542 stars 135 forks source link

Different results for same image during `load_image` #540

Open sizov-kirill opened 3 years ago

sizov-kirill commented 3 years ago

The function load_image can return different images for different backends. This issue was discovered while experimenting with loading class masks from the original Mapillary Vistas dataset. If the function load_image using PIL backend for reading mapillary mask, then it returns array with the shape [H, W, 1], at the same time if load_image using OpenCV backend, then it returns array with the shape [H, W, 3].

Such behavior could potentially affects reading datasets in other formats too.

zhiltsov-max commented 2 years ago

Consider adding / extending tests for different backends. Maybe, running all tests with non-default backed is a good idea.