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

Question about 'RPN' location! #2

Closed
fighting-liu opened this issue Sep 13, 2016 · 4 comments
Closed

Question about 'RPN' location! #2

fighting-liu opened this issue Sep 13, 2016 · 4 comments

Comments

@fighting-liu
Copy link

Thanks for this great work.
A question here, as in faster rcnn work itself and its implementation in ResNet paper, 'RPN' layer is inserted right after Res4X, but in your implementation, you insert it right after Res5X, will it affect final results?

@YuwenXiong
Copy link
Owner

YuwenXiong commented Sep 13, 2016

Hi @fighting-liu ,
Actually that is my own decision. The original faster rcnn with ResNet cannot insert RPN after res5c because of ROIPooling. But in R-FCN we can do that, and it may look a little bit strange if we make these two parts derive from different layers, so I decided to make them both on top of res5c. And I don't think it will affect final results much, you can try it by yourself :).

@xiaoxiongli
Copy link

Dear Orpine,
I am using the res5c too, and I find that if you use res5c, this happed:

Now I am training the 4th R-FCN stage (totally 4 stage, with OHEM, 229 category), and
I met a situation that the highest training accuracy(0.949) happened in Iteration 0 (that means just
use the stage 2' model). And after training several iteration(max 110000 as the author set), the final accuray is still lower than Iteration 0.

I feel confuse that Why this happens..., if this always happens, we even do not need the last training stage..., this problem bother me a lot......, help..

I try 3 kind of base learning rate: 0.01, 0.001, 0.0001. the situation I mentioned just now is almost same. just like this:

------------------------- Iteration 0 -------------------------
Training : # accuracy 0.949, loss (cls 0.124, reg 0.243)
Testing : accuracy 0.926, loss (cls 0.201, reg 0.223)

------------------------- Iteration 2000 -------------------------
Training : accuracy 0.938, loss (cls 0.148, reg 0.0596)
Testing : accuracy 0.927, loss (cls 0.2, reg 0.0525)

------------------------- Iteration 4000 -------------------------
Training : accuracy 0.938, loss (cls 0.147, reg 0.0418)
Testing : accuracy 0.927, loss (cls 0.199, reg 0.0504)

------------------------- Iteration 6000 -------------------------
Training : accuracy 0.94, loss (cls 0.144, reg 0.0399)
Testing : accuracy 0.927, loss (cls 0.198, reg 0.0497)

.....
.....

------------------------- Iteration 98000 -------------------------
Training : accuracy 0.943, loss (cls 0.135, reg 0.0315)
Testing : accuracy 0.929, loss (cls 0.193, reg 0.0431)

------------------------- Iteration 100000 -------------------------
Training : accuracy 0.943, loss (cls 0.137, reg 0.0317)
Testing : accuracy 0.929, loss (cls 0.193, reg 0.0431)

------------------------- Iteration 102000 -------------------------
Training : # accuracy 0.943, loss (cls 0.134, reg 0.0317)
Testing : accuracy 0.929, loss (cls 0.193, reg 0.0429)

....
....

And even worse, when testing the image, the proposals I get with RFCN is bad than faster-rcnn(ZF)...., I do not know why?

@YuwenXiong
Copy link
Owner

Hi @xiaoxiongli , I see you post this in the original R-FCN repo too, and the reason is that the iteration 0 info is useless. It just run 1 iteration, which means it just use 2 images(ims_per_batch=2 if you didn't change it). So the iteration 0's training log is inaccurate(Note that validation loss is accurate) . That's no problem, we can see that the loss decreased indeed.

And it is possible that stage-2 model achieves better result than stage-4 model, because stage-2 model didn't share weights, the RPN you used to produce rois has different weights with R-FCN, which means you introduce more parameters.

I don't understand your last statement, I think R-FCN doesn't produce region proposals, you mean in 4-step training, RPN with R-FCN(ResNet) gives worse region proposals than RPN with fast-rcnn(ZF)?

@xiaoxiongli
Copy link

Dear @orpine :
thank you for your reply.
Yes, in 4 step training, in my experiment, it seems that RPN with R-FCN(ResNet101) gives worse region proposals than RPN with fast-rcnn(ZF). as I mentioned just now, I am using the res5c which means I share the weight from beginning of the ResNet101 to res5c(including res5c).
I've send a email to 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

No branches or pull requests

3 participants