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

Unsuccessful remap_labels #314

Closed
sizov-kirill opened this issue Jun 28, 2021 · 0 comments · Fixed by #408
Closed

Unsuccessful remap_labels #314

sizov-kirill opened this issue Jun 28, 2021 · 0 comments · Fixed by #408
Labels
BUG Something isn't working

Comments

@sizov-kirill
Copy link

Expected Behaviour

Successful remapping

Current Behaviour

Transformation fails:

2021-06-27 19:53:21,789 INFO: Loading the project...
2021-06-27 19:54:15,506 INFO: Transforming the project...
2021-06-27 19:54:15,506 ERROR: 22
Traceback (most recent call last):
  File "<path/to/datumaro>/venv/bin/datum", line 33, in <module>
    sys.exit(load_entry_point('datumaro', 'console_scripts', 'datum')())
  File "<path/to/datumaro>/datumaro/cli/__main__.py", line 126, in main
    return args.command(args)
  File "<path/to/datumaro>/datumaro/cli/contexts/project/__init__.py", line 685, in transform_command
    dataset.transform_project(
  File "<path/to/datumaro>/datumaro/components/project.py", line 294, in transform_project
    transformed = self.transform(method, **method_kwargs)
  File "<path/to/datumaro>/datumaro/components/project.py", line 256, in transform
    return method(self, *args, **kwargs)
  File "<path/to/datumaro>/datumaro/plugins/transforms.py", line 502, in __init__
    dst_mask_cat.colormap = {
  File "<path/to/datumaro>/datumaro/plugins/transforms.py", line 503, in <dictcomp>
    id: src_mask_cat.colormap[id]
KeyError: 22

Steps to Reproduce

  1. Create a dataset containing labels categories and masks categories of different lengths (e.g Pascal VOC 2012)
  2. Try to perform remap labels:
datum create
datum add path -f voc <path/to/dataset>
datum transform -t remap_labels -- -l cat:label_0

Environment

  • Git hash commit (git log -1): 7e35c8
@sizov-kirill sizov-kirill added the BUG Something isn't working label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant