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

datum cli import coco and voc dataset error #1539

Closed
Kevin-Delnoije opened this issue May 14, 2020 · 4 comments
Closed

datum cli import coco and voc dataset error #1539

Kevin-Delnoije opened this issue May 14, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Kevin-Delnoije
Copy link

My actions before raising this issue

I have installed CVAT on ubuntu 20.04 using the installation instructions.
(i did have a previous version of CVAT, but didnt get any errors while re-running installations instructions)
everything seems to work fine when starting a new dataset and playing around with the UI.
when trying the dataset import feature using cli datum I get an import error both with official pascal voc and official coco dataset.

Current Behaviour

i used the following commands

datum project import --format coco --input-path ~/Documents/datasets/coco/

output:

020-05-14 16:00:58,476 INFO: Importing project from '/home/kevin/Documents/datasets/coco/'
2020-05-14 16:00:58,476 INFO: Importing project as 'coco'
2020-05-14 16:00:58,790 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/captions_train2017.json'
2020-05-14 16:00:58,790 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/person_keypoints_train2017.json'
2020-05-14 16:00:58,790 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/instances_train2017.json'
2020-05-14 16:00:58,791 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/instances_val2017.json'
2020-05-14 16:00:58,791 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/captions_val2017.json'
2020-05-14 16:00:58,791 INFO: Found a dataset at '/home/kevin/Documents/datasets/coco/annotations/person_keypoints_val2017.json'
2020-05-14 16:00:58,791 INFO: Checking the dataset...
creating index...
index created!
creating index...
index created!
2020-05-14 16:01:13,823 ERROR: unhashable type: 'list'
Traceback (most recent call last):
  File "/home/kevin/.local/bin/datum", line 8, in <module>
    sys.exit(main())
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/cli/__main__.py", line 156, in main
    return args.command(args)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/cli/contexts/project/__init__.py", line 220, in import_command
    dataset = project.make_dataset()
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/project.py", line 765, in make_dataset
    return ProjectDataset(self)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/project.py", line 479, in __init__
    sources[s_name] = env.make_extractor(s_format,
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/project.py", line 274, in make_extractor
    return self.extractors.get(name)(*args, **kwargs)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/coco_format/extractor.py", line 244, in __init__
    super().__init__(path, **kwargs)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/coco_format/extractor.py", line 44, in __init__
    self._load_categories(loader)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/coco_format/extractor.py", line 79, in _load_categories
    person_kp_categories = self._load_person_kp_categories(loader)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/coco_format/extractor.py", line 103, in _load_person_kp_categories
    categories.add(label_id=label_id,
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/extractor.py", line 498, in add
    self.items[label_id] = self.Category(labels, set(adjacent))
TypeError: unhashable type: 'list'
datum project import --format voc --input-path ~/Documents/datasets/VOCdevkit/VOC2012/

output:

2020-05-14 16:00:02,955 INFO: Importing project from '/home/kevin/Documents/datasets/VOCdevkit/VOC2012/'
2020-05-14 16:00:02,955 INFO: Importing project as 'voc'
2020-05-14 16:00:02,956 INFO: Checking the dataset...
2020-05-14 16:00:09,686 ERROR: list index out of range
Traceback (most recent call last):
  File "/home/kevin/.local/bin/datum", line 8, in <module>
    sys.exit(main())
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/cli/__main__.py", line 156, in main
    return args.command(args)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/cli/contexts/project/__init__.py", line 220, in import_command
    dataset = project.make_dataset()
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/project.py", line 765, in make_dataset
    return ProjectDataset(self)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/components/project.py", line 509, in __init__
    for item in source:
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/voc_format/extractor.py", line 224, in __iter__
    anns = self._load_annotations(item_id)
  File "/home/kevin/.local/lib/python3.8/site-packages/datumaro/plugins/voc_format/extractor.py", line 266, in _load_annotations
    for a in label_cat.items[label_id].attributes
IndexError: list index out of range
@zhiltsov-max zhiltsov-max self-assigned this May 14, 2020
@zhiltsov-max
Copy link
Contributor

Hi, thanks for the report. Could you specify which version of python you are using?

@Kevin-Delnoije
Copy link
Author

I am using python3.8, will make a venv of python3.6
To see if error changes when I am on pc

@Kevin-Delnoije
Copy link
Author

The same error occurs on python 3.5, 3.7 and 3.8.
btw i am using this from local install not the cvat docker container, not sure if that is required or not.

@zhiltsov-max zhiltsov-max added the bug Something isn't working label May 15, 2020
@zhiltsov-max zhiltsov-max added this to the 1.0.0-release milestone May 15, 2020
@zhiltsov-max
Copy link
Contributor

These problems should be fixed now.

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

No branches or pull requests

2 participants