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

Allow to import Open Images annotations without images #463

Merged
merged 7 commits into from
Sep 21, 2021

Conversation

sizov-kirill
Copy link

@sizov-kirill sizov-kirill commented Sep 14, 2021

Summary and Motivation

Open Images requires you to know the size of the image.
Current format implementation does not add Image to Item if the image has no path.
It is not possible to load a dataset without images, but with meta information about them.

How to test

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

@@ -269,7 +269,7 @@ def load_from(annotation_name):
if _RE_INVALID_PATH_COMPONENT.fullmatch(subset):
raise UnsupportedSubsetNameError(item_id=image_id, subset=subset)

image_path = image_paths_by_id.get(image_id)
image_path = image_paths_by_id.get(image_id, image_id)

image = None
if image_path is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Now, this condition is never False, and then image.path is set to an incorrect value.

Copy link
Author

Choose a reason for hiding this comment

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

Changed this solution

@sizov-kirill sizov-kirill changed the title Allow to add image without path Allow to import Open Images annotations without images Sep 14, 2021
Copy link
Contributor

@zhiltsov-max zhiltsov-max left a comment

Choose a reason for hiding this comment

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

Will you add a test for this? There was a test for the image meta, maybe it needs to be changed?

@sizov-kirill sizov-kirill linked an issue Sep 15, 2021 that may be closed by this pull request
@sizov-kirill
Copy link
Author

Will you add a test for this? There was a test for the image meta, maybe it needs to be changed?

Added test.

zhiltsov-max
zhiltsov-max previously approved these changes Sep 15, 2021
Copy link
Contributor

@zhiltsov-max zhiltsov-max left a comment

Choose a reason for hiding this comment

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

I don't see there is image metainfo extractor parameter, probably you will need to add it for CVAT integration.

@zhiltsov-max zhiltsov-max merged commit 2fb5189 into develop Sep 21, 2021
@zhiltsov-max zhiltsov-max deleted the sk/fix-open-images branch September 21, 2021 15:06
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.

Can't correct import Open Images dataset without images
2 participants