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.
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 functionload_image
using PIL backend for reading mapillary mask, then it returns array with the shape [H, W, 1], at the same time ifload_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.