Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -85,6 +85,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/openvinotoolkit/datumaro/pull/1360>)
- Fix resize transform for RleMask annotation
- (<https://github.com/openvinotoolkit/datumaro/pull/1361>)
- Fix import YOLO variants from extractor when `urls` is not specified
(<https://github.com/openvinotoolkit/datumaro/pull/1362>)

## Jan. 2024 Release 1.5.2
### Enhancements
Expand Down
9 changes: 9 additions & 0 deletions src/datumaro/plugins/data_formats/yolo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,15 @@ def __init__(
if not osp.isdir(config_path):
raise DatasetImportError(f"{config_path} should be a directory.")

if not urls:
raise DatasetImportError(
f"`urls` should be specified for {self.__class__.__name__}, "
f"if you want to import a dataset with using this {self.__class__.__name__} directly. "
"In most case, it happens by giving an incorrect format name to the import interface. "
"Please consider to import your dataset with this format name, 'yolo', "
"such as `Dataset.import_from(..., format='yolo')`."
)

rootpath = self._get_rootpath(config_path)

self._image_info = YoloStrictBase.parse_image_info(rootpath, image_info)
Expand Down