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

OHEM implementation? #16

Closed
WeihongM opened this issue Sep 16, 2019 · 4 comments
Closed

OHEM implementation? #16

WeihongM opened this issue Sep 16, 2019 · 4 comments

Comments

@WeihongM
Copy link

Hello,
After read your paper, I have some question on your OHEM implementation.
you mean the OHEM is used on the RPN stage? Do you used it only on the RPN?
In my own understanding, you random sample from the RPN output, (maybe value N) and then put all the N proposals to calculate the sum loss, after get the loss, sorting, and choose Top 512 to update the network.
I dont know whether my understanding is right, ask for your help, thanks.

@JingChaoLiu
Copy link
Collaborator

Sorry for the misleading expression in the paper. The sensences in the paper are:

OHEM: In the bounding box branch, we adopt the OHEM [38] to learn the hard samples. In our settings, we first sort the samples provided by RPN in the descending order of the sum of classification loss and location loss, then select the top 512 difficult samples to update the network.

What I want to express is that we perform OHEM in the bounding box branch. In the bbox branch, we first predict the object class and box offset for the anchors proposed by the RPN, then sort these anchors by the sum of cls_loss and reg_loss. The word RPN is only used to indicate where these anchors are from.

In other words, we change nothing for RPN, and perform OHEM in the bounding box branch.

@WeihongM
Copy link
Author

WeihongM commented Sep 16, 2019

Thanks for your reply, Liu.
so in your words, you dont use ohem method to update the network on the roi box head stage, which is the rcnn head(second stage) .
In my understanding, you use code balanced_positive_negative_sample.py which is in the origin facebook maskrcnn_benchmark implementation in the second stage to update. is it right?

@JingChaoLiu
Copy link
Collaborator

No, the bounding box branch refers to the rcnn, we only modify the rcnn. We didn't change any thing in RPN.

@WeihongM
Copy link
Author

WeihongM commented Sep 17, 2019

Sorry, maybe I speak not clearly,
In some other works, I find ohem strategy mostly used in the second stage, in your work, it seems you use ohem only in the RPN network to update? dont know whether it matters.
Find answer from Duplicate of #8 Thx.

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