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

Zero RPN bias #53

Closed
bk-00 opened this issue Dec 23, 2017 · 9 comments
Closed

Zero RPN bias #53

bk-00 opened this issue Dec 23, 2017 · 9 comments

Comments

@bk-00
Copy link

bk-00 commented Dec 23, 2017

Hi @ruotianluo , i did a train on new model on PASVAL_VOC dataset with Vgg16 (CPU only with roi_pooling, Python 3.6.3) downloaded from https://github.com/jcjohnson/pytorch-vgg. However, i found that there is always zero at the bias of rpn_net, rpn_cls_score_net, rpn_bbox_pred_net, cls_score_net, bbox_pred_net. Is it an error ? If yes, may i know which part should be modified or change ?

@ruotianluo
Copy link
Owner

It looks like an error. The biases are initialized to be 0, but they should be updated. Can you check if the learning rate of biases are greater than 0 and the weight decay of biases is not too large.

@bk-00
Copy link
Author

bk-00 commented Dec 24, 2017

Hi @ruotianluo , can you show me the line of learning rate and weight decay of biases ? I changed the following few lines in "network.py", but still get the same error.
13
to
image
My train.learning_rate=0.0001 and train.weight_decay=0.0001

@ruotianluo
Copy link
Owner

https://github.com/ruotianluo/pytorch-faster-rcnn/blob/master/lib/model/train_val.py#L126
Here is the place where I set the learning rate and weight decay.

@bk-00
Copy link
Author

bk-00 commented Dec 25, 2017

Hi @ruotianluo , thank you very much. The problem solved after setting the flag TRAIN.BIAS_DECAY.

@bk-00
Copy link
Author

bk-00 commented Jan 11, 2018

Hi @ruotianluo , I would like to be appreciate if you could provide some idea or solution for me about the inaccurate localization box shown on figure below.
image
My learning rate = weight decay=0.0001, crop pooling, rpn = 7x7, 5000 iterations
Thank you

@ruotianluo
Copy link
Owner

Did you change the anchor sizes you use?

@bk-00
Copy link
Author

bk-00 commented Jan 11, 2018

yes, I use anchor scale = (4, 8, 16) and anchor ratio = (0.5, 1, 2). In generate_anchors.py, the base_size = 16, should the base_size change to some smaller value ?

@ruotianluo
Copy link
Owner

You may need to change the ratios to some more suitable values because most texts are lower in height.

The result is still wierd, but the good side is the left up corner is correct. So it's definitely doing something correctly. Maybe it's because you prepared the data incorrectly? You shifted the height and width??

I'm not sure.

@bk-00
Copy link
Author

bk-00 commented Jan 14, 2018

Hi @ruotianluo , thank you very much. The error is solved after reverse width and height.

@bk-00 bk-00 closed this as completed Feb 11, 2018
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

2 participants