Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default colors for masks #1549

Merged
merged 10 commits into from
Jun 3, 2020
Merged

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented May 16, 2020

  • Added default color table for mask export
  • Added an option to use the source colormap in VOC segmentation export when it's provided with source colormap mode
  • Removed label name changing when exporting masks

Motivation and context

When there are tasks with the same labels, possibly, in different order, it may be useful and is often expected that these tasks will have the same colors for the same labels. This patch adds this functionality by adding a default color table for typical labels.

How has this been tested?

Unit tests.

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@zhiltsov-max zhiltsov-max force-pushed the zm/add-default-colors-for-masks branch from e7be458 to 7e0a6df Compare May 16, 2020 08:33
@zhiltsov-max zhiltsov-max changed the title [WIP] Add default colors for masks Add default colors for masks May 16, 2020
@coveralls
Copy link

coveralls commented May 16, 2020

Pull Request Test Coverage Report for Build 5415

  • 52 of 58 (89.66%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 65.737%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cvat/apps/dataset_manager/formats/mask.py 30 33 90.91%
datumaro/datumaro/plugins/voc_format/converter.py 22 25 88.0%
Totals Coverage Status
Change from base Build 5409: 0.09%
Covered Lines: 10876
Relevant Lines: 16144

💛 - Coveralls

@nmanovic nmanovic added this to the 1.1.0-alpha milestone May 17, 2020
@nmanovic nmanovic merged commit ac922e3 into develop Jun 3, 2020
@nmanovic nmanovic deleted the zm/add-default-colors-for-masks branch June 6, 2020 04:53
frndmg pushed a commit to signatrix/cvat that referenced this pull request Aug 5, 2020
* Use default colors for masks

* do not change labels in voc converter

* update tests

* add backgound color handling

* consider case with existing source colormap

* update changelog

* fix file name

* fix insert

* move color table colors to beginning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants