-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 assert for min image size #331
base: master
Are you sure you want to change the base?
Conversation
as segmentation does not work well if images are too low resolution.
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.
Does this restriction make sense?
yolact.py
Outdated
@@ -215,6 +215,7 @@ def make_priors(self, conv_h, conv_w, device): | |||
""" Note that priors are [x,y,width,height] where (x,y) is the center of the box. """ | |||
global prior_cache | |||
size = (conv_h, conv_w) | |||
assert(cfg.max_size > 350),"Segmentation does not work with too low-res images. Try providing input images with size atleast 350pix." |
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.
is 350 a resonable minimum? Guess it should be compared to backbone's sizes (550x550), how do I access that?
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.
350 is reasonable, but should this be a warning not an assert? I don't want to limit anyone from testing a low resolution.
Also this should be in YOLACT's init function, not in the make_priors
function.
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.
Thanks for the feedback, modified accordingly
This reverts commit 4a8fe0e.
make it a warning, checked in Yolact init() review feedback, thank you
as segmentation does not work well if images are too low resolution.
Fixes #319