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

Add Roboflow data formats #1044

Merged
merged 19 commits into from
Jun 22, 2023
Merged

Conversation

wonjuleee
Copy link
Contributor

@wonjuleee wonjuleee commented Jun 12, 2023

Summary

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

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

@wonjuleee wonjuleee requested review from a team as code owners June 12, 2023 13:42
@wonjuleee wonjuleee added data formats PR is related to dataset formats FEATURE New feature & functionality labels Jun 13, 2023
@wonjuleee wonjuleee self-assigned this Jun 13, 2023
@wonjuleee wonjuleee added this to the 1.4.0 milestone Jun 13, 2023
src/datumaro/plugins/data_formats/coco/importer.py Outdated Show resolved Hide resolved
Comment on lines +128 to +129
frame_filename = parsed_record.get("image/filename", None).numpy().decode("utf-8")
frame_height = tf.cast(parsed_record.get("image/height", 0), tf.int64).numpy().item()
frame_width = tf.cast(parsed_record.get("image/width", 0), tf.int64).numpy().item()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these change except frame_id? If parsed_record.get("image/filename", None) => None, None.numpy() is impossible. This type of error can be confusing than raising KeyError.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I have thought about it, but tf_detection_api is used to contain them. Only the frame_id is not included in Roboflow TFRecord format. Is it better to update others under consideration of KeyError?

Copy link
Contributor

@vinnamkim vinnamkim Jun 20, 2023

Choose a reason for hiding this comment

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

I think that it is better to leave it to raise KeyError in this case because it is genuinely KeyError.

src/datumaro/plugins/data_formats/voc/base.py Show resolved Hide resolved
src/datumaro/plugins/data_formats/yolo/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vinnamkim vinnamkim left a comment

Choose a reason for hiding this comment

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

LGTM.

@wonjuleee wonjuleee merged commit 0b6c58b into openvinotoolkit:develop Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data formats PR is related to dataset formats FEATURE New feature & functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants