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

Enable coco format to import bbox annotations #1360

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/openvinotoolkit/datumaro/pull/1262>)
- Fix explore command without project
(<https://github.com/openvinotoolkit/datumaro/pull/1271>)
- Fix enable COCO to import only bboxes
(<https://github.com/openvinotoolkit/datumaro/pull/1360>)

## Jan. 2024 Release 1.5.2
### Enhancements
Expand Down
6 changes: 3 additions & 3 deletions src/datumaro/plugins/data_formats/coco/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2022 Intel Corporation
# Copyright (C) 2019-2024 Intel Corporation
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -29,7 +29,6 @@
DatasetImportError,
InvalidAnnotationError,
InvalidFieldTypeError,
MissingFieldError,
UndeclaredLabelError,
)
from datumaro.components.importer import ImportContext
Expand Down Expand Up @@ -450,7 +449,8 @@ def _parse_field(
) -> Any:
value = ann.get(key, NOTSET)
if value is NOTSET:
raise MissingFieldError(key)
log.warning(f"field '{key}' is not existed in the annotation file.")
return None
elif not isinstance(value, cls):
vinnamkim marked this conversation as resolved.
Show resolved Hide resolved
cls = (cls,) if isclass(cls) else cls
raise InvalidFieldTypeError(
Expand Down
Loading