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

what the field "keep_aspect_ratio_resizer" means in the .config file? #1794

Closed
wxp0329 opened this issue Jun 28, 2017 · 14 comments
Closed

what the field "keep_aspect_ratio_resizer" means in the .config file? #1794

wxp0329 opened this issue Jun 28, 2017 · 14 comments

Comments

@wxp0329
Copy link

wxp0329 commented Jun 28, 2017

model {
faster_rcnn {
num_classes: 37
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 600
max_dimension: 1024
}
}
feature_extractor {
type: 'faster_rcnn_resnet101'
first_stage_features_stride: 16
}

on the above,what the min_dimension or max_dimension represents ? Please interprete it ,thank you very much.

@jch1
Copy link
Contributor

jch1 commented Jun 28, 2017

Hi @wxp0329 - Specifying the keep_aspect_ratio_resizer follows the image resizing scheme described in the Faster R-CNN paper. In this case it always resizes an image so that the smaller edge is 600 pixels and if the longer edge is greater than 1024 edges, it resizes such that the longer edge is 1024 pixels. The resulting image always has the same aspect ratio as the input image.

@wxp0329
Copy link
Author

wxp0329 commented Jun 28, 2017

@jch1 I understand now , I admire you very much .

@tombstone
Copy link
Contributor

closing as the question was addressed.

@shamanez
Copy link

shamanez commented Jul 24, 2017

@wxp0329
@jch1
Can this network takes any size of image with in above mentioned limits ?

@mikeliao97
Copy link

So would it be okay for images to be bigger than this size?

@sxr3455
Copy link

sxr3455 commented Nov 8, 2017

Does it have anything to do with the annotations? i.e, do the annotations get disturbed because of this? because my dataset has images of 1080x1920 resolution and resizing it to 600 and 1024 is okay?

sorry if the question is silly. this is a newbie.

@SMS786
Copy link

SMS786 commented Jul 17, 2018

Hi sxr3455 , did you figure this out? I have the same query and was not able to find anything.
@jch1 Any inputs on what happens to the annotations during resize ? If the image is resized and the annotations remain unchanged, will it not lead to incorrect inputs?

@leccyril
Copy link

+1

@swg209
Copy link

swg209 commented Sep 19, 2018

@jch1 Hi,I want to make sure if my input image is 640 x 352 ,then after image_resizer will the input image still be 640 x 352?

@amin07
Copy link

amin07 commented Oct 3, 2018

Hi @SMS786, @sxr3455 did you guys find answer to that questions? What happens to bounding boxes/masks in case of resizing?

@tasercake
Copy link

tasercake commented Oct 25, 2018

@amin07 The bounding box coordinates are normalised to the range [0 .. 1], so resizing the images won't affect those annotations.

EDIT:
Masks are resized or otherwise transformed along with the image, and always have the same dimensions as the image.

@amin07
Copy link

amin07 commented Oct 25, 2018

@tasercake Thanks

@Borda
Copy link

Borda commented Feb 27, 2020

hi, just to clarify with min=600 and max=800 the CNN input size is then 800x800 square, right?

@natures66
Copy link

I just wanna know if I use keep_aspect_ratio_resizer in .config file , it means I will resize the input images to same aspect ratio but not a fixed shape like 224*224 , right?

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

No branches or pull requests