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

imagenet_txt_format: implement automatic category creation #489

Merged
merged 4 commits into from
Oct 13, 2021
Merged

imagenet_txt_format: implement automatic category creation #489

merged 4 commits into from
Oct 13, 2021

Conversation

IRDonch
Copy link

@IRDonch IRDonch commented Oct 4, 2021

Summary

I implemented this as part of prototyping Accuracy Checker integration. AC is able to load ImageNet without a labels file, and while you can notionally do that with Datumaro by supplying an empty label list, it doesn't work in practice. As soon as Datumaro encounters the first annotation, it fails, since the label ID fails the range check.

Solve this by adding an option to automatically create new categories with generic names if an out-of-range label ID is encountered.

Also, add a way to specify an empty label list from the command line.

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

@IRDonch IRDonch mentioned this pull request Oct 5, 2021
7 tasks
Roman Donchenko added 2 commits October 8, 2021 13:01
I implemented this as part of prototyping AC integration. AC is able to load
ImageNet without a labels file, and while you can notionally do that with
Datumaro by supplying an empty label list, it doesn't work in practice. As
soon as Datumaro encounters the first annotation, it fails, since the label
ID fails the range check.

Solve this by adding an option to automatically create new categories with
generic names if an out-of-range label ID is encountered.

Also, add a way to specify an empty label list from the command line.
They are mutually exclusive, so we don't really need to have both.
zhiltsov-max
zhiltsov-max previously approved these changes Oct 13, 2021
CHANGELOG.md Outdated Show resolved Hide resolved
@zhiltsov-max zhiltsov-max merged commit b52c12f into openvinotoolkit:develop Oct 13, 2021
@IRDonch IRDonch deleted the imagenet-auto-labels branch October 19, 2021 10:51
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.

2 participants