-
Notifications
You must be signed in to change notification settings - Fork 41
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
[AI-1287] fixed the siutation when a user pass only a image #696
[AI-1287] fixed the siutation when a user pass only a image #696
Conversation
… is to throw an error and not let the user include images without annotations
output_annotation["masks"] = torch.tensor([]) | ||
|
||
if "area" in annotation: | ||
if "masks" in output_annotation and output_annotation["masks"].numel() > 0: |
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.
stylistic choice: could use masks
and bboxes
variables since have them but up to you
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 we keep at as it is, masks and bboxes are not the same since we do some conversion. masks for example is a list, and does not have .numel
left one stylistic comment abt using existing variables or not that I leave up to you, otherwise all good! |
Problem
One should be able to user the albumentations transform in this way:
Right now the transform output's a (img, target) tuple even when only an image is passed.
Solution
Add a check if there is only an image as input, and return only image if that is the case.
Changelog