-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add Wider Face format support #65
Conversation
datumaro/plugins/wider_format.py
Outdated
|
||
class WiderExtractor(SourceExtractor): | ||
def __init__(self, path): | ||
assert osp.isfile(path), path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to provide some meaningful error message.
datumaro/plugins/wider_format.py
Outdated
Importer, SourceExtractor) | ||
|
||
|
||
class WiderPath: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra symbols.
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)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, maintain the formatting:
- spaces in slices and function args
- ascending direction in comparisons (<, <=)
datumaro/plugins/wider_format.py
Outdated
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add .image
existence check with .has_image
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this check if it already exists in _save_image
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_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.
Summary
Added support for Wider Face format
How to test
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.