-
Notifications
You must be signed in to change notification settings - Fork 58
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
FPN ROI Choosing #5
Comments
k = k0 + log2(√(wh)/224) where k0 equals 4, k equals the output-layer's layer number, w and h are the width and height of the regional proposal. |
in file proposal_target_layer.py L101 `def calc_level(width, height):
this logic can be implemented either in proposal_target_layer or in roi_pooling_layer Do you think the latter one is a better chioce? |
Thank you for answering this question! I just finished my implementation of FPN over the new Tensorflow Object Detection API. I implemented this algorithm in roi pooling layer. |
Choosing ROI is definitely the better choice. Then I was just confused about where to add this formula. |
Hey man, |
The training result was not as good as the one mentioned in the paper (I only trained for 2 days). RPN loss was also many times larger than the Faster RCNN loss. (I don't know much about fast rcnn though). You can definitely try your method, see if it is correct. |
Hi, @xmyqsh @Max-Fu |
@Zehaos |
@xmyqsh |
@xmyqsh Hi, you mentioned that the logic of choosing the feature map for ROI can be implemented either in proposal_target_layer or in roi_pooling_layer. And I implemented this algorithm in roi pooling layer but I got a bad result. However, I find that proposal_target_layer is not used in the stage 'TEST', while roi_pooling_layer is both used in the stage 'TRAIN' and 'TEST'. So the implementation of these two situations should be different? Is there anything wrong with my understanding? |
@Johere I implemented the logic of choosing the feature map for ROI (k = k0 + log2(√(wh)/224)), I think it should be better to say P2~P5 aware/wising ROI, in proposal layer. My proposal layer in 'TEST' phase output P2~P5 aware/wising ROI, which is different from its output in 'TRAIN' phase. |
@xmyqsh |
I implement the feature map(P2/P3/P4/P5) choosing operate in proposal layer in 'TEST' phase, and in proposal target layer in 'TRAIN' phase. If you implement this in roi_pooling_layer, be aware of recoding the mapping of feature map (P2/P3/P4/P5) and ROIS, the mapping relationship should be used in backward process again. If your RPN performance is not as good as the paper says, and you just use one image, not two as the paper says, in one forward/backward process, I think you should use lower learning rate than the paper says, cause there are not enough I'm just optimizing and testing my RPN performance. Previous end-to-end training result is bad. |
@xmyqsh |
@Zehaos |
@xmyqsh |
@Zehaos |
@xmyqsh |
@Zehaos |
@xmyqsh You are welcome. |
@Zehaos |
@xmyqsh |
@xmyqsh Your current implementation for choosing the pyramid level assigns all rois to each feature map. For example, you are sampling 128 rois and assigning each of them to the 4 pyramid levels (P2~P5), resulting in 512 rois per image. Is this deliberate? Shouldn't each roi be assigned to a unique level in the feature pyramid -- given by the formula in the paper? For example, compare
leveled_idxs = [[]] * 4
for idx, roi in enumerate(rois):
level_idx = level(roi) - 2
leveled_idxs[level_idx].append(idx)
leveled_idxs = [[], [], [], []]
for idx, roi in enumerate(rois):
level_idx = level(roi) - 2
leveled_idxs[level_idx].append(idx) |
That's a really subtle error, have you tried training with that mod? |
@Feynman27 |
Yes, but surprisingly, it didn't really change the mAP much. It actually dropped it about 0.5-1.0 percentage point. |
@Feynman27 |
@xmyqsh Yes.
…On Wed, Sep 20, 2017, 9:23 AM xmyqsh ***@***.***> wrote:
@Feynman27 <https://github.com/feynman27>
Have you changed the related codes in proposal_layer.py and
proposal_target_layer.py simultaneously?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AL2y8H8d5dOfKKhZhu35bWuxMaZMN6v8ks5skRHvgaJpZM4OZBm7>
.
|
@Feynman27 The formula to choose level of proposal layer should be a balance of speed and accuracy. The proposals can benefit from other layers even. |
Hi there! As I scan through Feature Pyramid Network for Object Detection, I found a part where there is a formula for choosing the feature map for ROI based on the size of the region proposal. Can you show me how you implement this? I wish to implement FPN on the new Object Detection API provided by Tensorflow.
The text was updated successfully, but these errors were encountered: