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

Cypress. Update case_1. Added check label color. #4045

Conversation

dvkruchinin
Copy link
Contributor

Related on #4007

Motivation and context

Updating the test to check for label color collisions.
I wrote a small script to identify color collisions of labels with different names.

from cvat.apps.dataset_manager.formats.utils import get_label_color
import itertools

label_color = {}
dublicates = {}

lst = [''.join(x) for x in itertools.product('abcdifg', repeat=4)]
for i in lst:
    label_color[i] = get_label_color(i, label_color.keys())

for key, value in label_color.items():
    dublicates.setdefault(value, set()).add(key)

dubl = [values for key, values in dublicates.items() if len(values) > 1]

print(dubl)

As a result , I got the names of the labels:
adaf and adia
Which had the same color before the fix rgb(50, 182, 148).
Based on these data, the test has been redesigned.

How has this been tested?

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) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

…o dkru/update-case-1-check-label-color-collision
@azhavoro azhavoro merged commit 6abc8da into cvat-ai:develop Dec 21, 2021
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.

2 participants