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

Statistics raise an error when there is a label annotation not in the category. #1204

Closed
jihyeonyi opened this issue Nov 27, 2023 · 0 comments
Assignees
Labels
BUG Something isn't working

Comments

@jihyeonyi
Copy link
Contributor

jihyeonyi commented Nov 27, 2023

I manually made a datumaro dataset which has 4 labels in the LabelCategories but has unknown label annotation(label=4).
When I tried to calculate annotation statistics, it raised an error like this:
image

I think compute_ann_statistics and corresponding validator should be checked to fix this bug.

@jihyeonyi jihyeonyi assigned jihyeonyi and unassigned vinnamkim Nov 27, 2023
@jihyeonyi jihyeonyi added the BUG Something isn't working label Dec 21, 2023
jihyeonyi added a commit that referenced this issue Dec 21, 2023
<!-- Contributing guide:
https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md
-->

### Summary
Regarding the issue #1204 , modify `compute_ann_statistics` function to
handle undefined labels.
And add corresponding unit test.

<!--
Resolves #111 and #222.
Depends on #1000 (for series of dependent commits).

This PR introduces this capability to make the project better in this
and that.

- Added this feature
- Removed that feature
- Fixed the problem #1234
-->

### How to test
<!-- Describe the testing procedure for reviewers, if changes are
not fully covered by unit tests or manual testing can be complicated.
-->

### Checklist
<!-- Put an 'x' in all the boxes that apply -->
- [x] I have added unit tests to cover my changes.​
- [ ] I have added integration tests to cover my changes.​
- [x] I have added the description of my changes into
[CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md).​
- [ ] I have updated the
[documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs)
accordingly

### License

- [x] I submit _my code changes_ under the same [MIT
License](https://github.com/openvinotoolkit/datumaro/blob/develop/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).

```python
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants