Skip to content

add assert for min image size#331

Open
breznak wants to merge 4 commits into
dbolya:masterfrom
breznak:warn_too_small_image
Open

add assert for min image size#331
breznak wants to merge 4 commits into
dbolya:masterfrom
breznak:warn_too_small_image

Conversation

@breznak

@breznak breznak commented Feb 11, 2020

Copy link
Copy Markdown
Contributor

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

@breznak breznak left a comment

Copy link
Copy Markdown
Contributor Author

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?

Comment thread yolact.py Outdated
""" 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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