v7labs / darwin-py

Library and commandline tool for managing datasets on darwin.v7labs.com
MIT License
115 stars 42 forks source link

[DAR-1104][External] Fix colours mismatch between files on semantic mask export #789

Closed AndriiKlymchuk closed 5 months ago

AndriiKlymchuk commented 5 months ago

Problem

The same semantic mask could be represented by different colors in the files of the same export.

Solution

The root cause of the issue is an assumption that labels in the raster_layer.data.mask_annotation_ids_mapping are the same across different files which is not true. Because of that assumption labels were used as colors ids causing the mismatch. I changed the logic to have static color ids for all files and convert labels into color ids for every file separately.

Changelog

Fix colours mismatch between files on semantic mask export

linear[bot] commented 5 months ago

DAR-1104 BUG: Inconsistent mapping between classes and colours in semantic mask export

AndriiKlymchuk commented 5 months ago

@umbertoDifa you were to fast. I found one issue during testing. Opening another PR.