Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

breznak
Copy link
Contributor

@breznak breznak commented Feb 11, 2020

as segmentation does not work well if images are too low resolution.

Fixes #319

as segmentation does not work well if images are too low resolution.
@breznak breznak requested a review from dbolya February 11, 2020 08:54
Copy link
Contributor Author

@breznak breznak left a 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."
Copy link
Contributor Author

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?

Copy link
Owner

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.

Copy link
Contributor Author

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

breznak added 3 commits May 16, 2020 22:53
make it a warning,
checked in Yolact init()
review feedback, thank you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust pred_scales for different input image size?
2 participants