Merged
Conversation
datumaro/plugins/wider_format.py
Outdated
|
|
||
| class WiderExtractor(SourceExtractor): | ||
| def __init__(self, path): | ||
| assert osp.isfile(path), path |
Contributor
There was a problem hiding this comment.
It is better to provide some meaningful error message.
datumaro/plugins/wider_format.py
Outdated
| Importer, SourceExtractor) | ||
|
|
||
|
|
||
| class WiderPath: |
Contributor
There was a problem hiding this comment.
I think Wider is not clear enough, and suggest using Widerface instead.
README.md
Outdated
| @@ -1,4 +1,4 @@ | |||
| # Dataset Management Framework (Datumaro) | |||
| d# Dataset Management Framework (Datumaro) | |||
datumaro/plugins/wider_format.py
Outdated
| item_id = image[:-(len(WiderPath.IMAGE_EXT) + 1)] | ||
|
|
||
| bbox_count = lines[image_id + 1] | ||
| bbox_lines = lines[image_id + 2:image_id + 2 + int(bbox_count)] |
Contributor
There was a problem hiding this comment.
Please, maintain the formatting:
- spaces in slices and function args
- ascending direction in comparisons (<, <=)
| for item in subset: | ||
| wider_annotation += '%s\n' % (item.id + WiderPath.IMAGE_EXT) | ||
| if self._save_images: | ||
| self._save_image(item, osp.join(save_dir, subset_dir, |
Contributor
There was a problem hiding this comment.
Please, add .image existence check with .has_image.
Author
There was a problem hiding this comment.
Why add this check if it already exists in _save_image?
Contributor
There was a problem hiding this comment.
_save_image checks for image data, but it expects an image. It is possible that input data does not have image info at all, just annotations. A good question, though. Maybe, this check is worth adding there as well.
zhiltsov-max
previously approved these changes
Dec 15, 2020
zhiltsov-max
approved these changes
Dec 16, 2020
zhiltsov-max
pushed a commit
to zhiltsov-max/datumaro
that referenced
this pull request
Jan 27, 2026
* using get_test_asset_path everywhere in tests * moving cli to integration/cli * moving most tests to unit * pylint fixes * moving make_sample_video to tests/utils/video.py * removing ASSETS_DIR var
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added support for Wider Face format
How to test
Checklist
developbranchLicense
Feel free to contact the maintainers if that's a concern.