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

Parameters for smaller images #371

Open
SHEKOLDA opened this issue Oct 10, 2016 · 13 comments
Open

Parameters for smaller images #371

SHEKOLDA opened this issue Oct 10, 2016 · 13 comments

Comments

@SHEKOLDA
Copy link

Hi, so I'm trying to train Faster R-CNN on a dataset of pretty small images (85x29). As far as I'm aware, when given such an image, Faster R-CNN expands it to be 1000x600, then this image goes through the neural network. But with default parameters for stride and base anchor size, which are 16 pixels (on the expanded image), isn't it like producing 9 identicall 1x1 ancors for each pixel of the original image (since it is more than 200 times smaller, 16 pixels on the large image equals less than a pixel on the small one)?

Do I get it right? And if so, should I greatly increase stride and anchor size for it to work with smaller images? Or is it better to change those 1000x600 sizes and not expand the image so much? Thank you.

@haihaoshen
Copy link

I am also interested in the proposal. From my viewpoint, you can resize the image to smaller size. RCNN actually accepts the image of 224 x 224.

@absorbguo
Copy link

Hi,@haihaoshen
In faster-rcnn ,the network did not resize the input image to 224*224. Indeed,with the ROI pooling layer the network could process the raw input without resizing it.

@haihaoshen
Copy link

Yes, but for scoring, no matter the image size is resized (to 224 x 224) or
not, the result is same.

On Fri, Oct 28, 2016 at 9:23 AM, 小郭 notifications@github.com wrote:

Hi,@haihaoshen https://github.com/haihaoshen
In faster-rcnn ,the network did not resize the input image to 224*224.
Indeed,with the ROI pooling layer the network could process the raw input
without resizing it.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#371 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB46ZKEqIAY7Oiykvun_66RY1sOwAvUWks5q4U57gaJpZM4KSWR4
.

@acpn
Copy link

acpn commented Nov 29, 2016

I was with the same problem, but when I change the parameter of images sizes in config.py script inside lib/fastrcnn the detections were very high and solve my problem.

@haihaoshen
Copy link

haihaoshen commented Dec 1, 2016 via email

@acpn
Copy link

acpn commented Dec 5, 2016

Exactly that, remember of change in test stage too in the same script.

@haihaoshen
Copy link

haihaoshen commented Dec 6, 2016 via email

@harjatinsingh
Copy link

Did only changing the image input size work for detecting smaller objects ?

@absorbguo
Copy link

@harjatinsingh I don't think only resize the input image would work a lot for detetecting small objects because key parameters of detection are anchor size and featstride in the region proposal networks.

@harjatinsingh
Copy link

@absorbguo Thank you for the reply. I have understood the use of anchor size and fixed it, however i am not able to understand the use of feat_stride parameter. Can you point me in the right direction to learn about the meaning of feat_stride ?

@absorbguo
Copy link

@harjatinsingh In short, smaller featstride represents denser anchor boxes, larger featstride represents sparser anchor boxes. Denser anchor boxes means predicting more proposal in the same area compared with sparser anchor boxes.You can review the generator.py for more details.

@harjatinsingh
Copy link

@absorbguo Thank you.

@gentlebreeze1
Copy link

can not only change __C.TEST.SCALES = (1080,) __C.TEST.MAX_SIZE = 1920 what else should i change? @absorbguo

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

6 participants