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

Support for Market-1501 dataset format #2869

Merged
merged 9 commits into from
Mar 22, 2021
Merged

Support for Market-1501 dataset format #2869

merged 9 commits into from
Mar 22, 2021

Conversation

yasakova-anastasia
Copy link
Contributor

@yasakova-anastasia yasakova-anastasia commented Feb 25, 2021

Motivation and context

Add support for Market-1501 dataset format
Depends on openvinotoolkit/datumaro#102, openvinotoolkit/datumaro#108 and openvinotoolkit/datumaro#114

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

@nmanovic
Copy link
Contributor

@yasakova-anastasia , there are some problems with tests:

    task.export_task(task_id, temp_file, dst_format,
  File "/home/django/cvat/apps/dataset_manager/task.py", line 749, in export_task
    task.export(f, exporter, host=server_url, save_images=save_images)
  File "/home/django/cvat/apps/dataset_manager/task.py", line 631, in export
    exporter(dst_file, task_data, **options)
  File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
    f_or_cls(*args, **kwargs)
  File "/home/django/cvat/apps/dataset_manager/formats/market1501.py", line 23, in _export
    for item in dataset._data._source:
AttributeError: 'Dataset' object has no attribute '_data'

@yasakova-anastasia
Copy link
Contributor Author

@nmanovic , this PR depends on openvinotoolkit/datumaro#102, openvinotoolkit/datumaro#108 and openvinotoolkit/datumaro#114, so the tests fail.

@yasakova-anastasia yasakova-anastasia changed the title Support for Market-1501 dataset format [WIP] Support for Market-1501 dataset format Feb 26, 2021
dataset = Dataset.from_extractors(CvatTaskDataExtractor(
task_data, include_images=save_images), env=dm_env)
with TemporaryDirectory() as temp_dir:
for item in dataset._data._source:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be done this way, use transform for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find transform for this task. What should I use here?

@coveralls
Copy link

coveralls commented Mar 3, 2021

Coverage Status

Coverage increased (+0.07%) to 75.843% when pulling b8c6551 on ay/add-market1501 into eb1cb83 on develop.

@yasakova-anastasia yasakova-anastasia changed the title [WIP] Support for Market-1501 dataset format Support for Market-1501 dataset format Mar 19, 2021
task_data, include_images=save_images), env=dm_env)
with TemporaryDirectory() as temp_dir:
dataset.transform(LabelAttrToAttr, 'market-1501')
dataset.export(temp_dir, 'market1501', save_images=save_images)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In future, it would be nice to provide an option to choose the label. Maybe, we should check for and use the only existing label in the task?

@bsekachev bsekachev merged commit ce1666f into develop Mar 22, 2021
@bsekachev bsekachev deleted the ay/add-market1501 branch March 24, 2021 12:40
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.

5 participants