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

Update Datumaro dependency to 0.2.0 #3813

Merged
merged 6 commits into from
Oct 28, 2021
Merged

Conversation

sizov-kirill
Copy link
Contributor

@sizov-kirill sizov-kirill commented Oct 20, 2021

Motivation and context

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

@sizov-kirill sizov-kirill changed the title [WIP] Update Datumaro dependency to 0.2.0 Update Datumaro dependency to 0.2.0 Oct 20, 2021
dataset = Dataset.from_extractors(GetCVATDataExtractor(
instance_data=instance_data, include_images=save_images), env=dm_env)
with TemporaryDirectory() as tmp_dir:
dataset.export(tmp_dir, 'datumaro', save_images=save_images)
Copy link
Contributor

@zhiltsov-max zhiltsov-max Oct 20, 2021

Choose a reason for hiding this comment

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

Please check if the annotations do not include absolute image paths.

What about the format tests?

Also, think about loading tracks, if all the annotations have a track_id attribute.

Copy link
Contributor Author

@sizov-kirill sizov-kirill Oct 22, 2021

Choose a reason for hiding this comment

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

Committed solution for problem with absolute image paths.

The format is tested along with all other formats in files: test_formats.py, test_rest_api_formats.py.

About tracks, I have a few thoughts:

  1. Not to support tracks with Datumaro format until Datumaro as a tool starts to support them.
  2. Or we can check for track_id attribute for all formats in the import_dm_annotations function (in other case we'll just duplicate similar code as for MOT format).

How do you think which solution is better?

Copy link
Contributor

Choose a reason for hiding this comment

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

The second solution looks better to me, but implementing it straight will cause unexpected side-effects. I think, we can try to add a common import option to import tracks, if possible. Not all formats will support this, of course, but those, that do, will utilize it. Not in this PR, though. MOT code is already duplicated with some adjustments in MOTS, btw, so I think the generic variant might be a bit complicated.


class DeleteImagePath(ItemTransform):
def transform_item(self, item):
if not item.has_image:
Copy link
Contributor

Choose a reason for hiding this comment

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

Check 3d tasks too.

zhiltsov-max
zhiltsov-max previously approved these changes Oct 25, 2021
@nmanovic nmanovic merged commit b574679 into develop Oct 28, 2021
@nmanovic nmanovic deleted the sk/update-datumaro-dependency branch October 28, 2021 11:29
@zhiltsov-max zhiltsov-max mentioned this pull request Nov 1, 2021
8 tasks
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.

Upload Datumaro 1.0 Annotations
3 participants