YuwenXiong / py-R-FCN

R-FCN with joint training and python support
MIT License
1.05k stars 471 forks source link

Extract region proposal features #65

Closed kyleyeung closed 7 years ago

kyleyeung commented 7 years ago

I'm trying to extract the CNN features of several top-score region proposals in a image, could someone please tell me which layer I should get the feature from? Kind of confused by the inter-connection of the last several layers. Thx so much!

ghost commented 7 years ago

+1 Please help. Thanks!

kyleyeung commented 7 years ago

@yjy941124 I've figured out 2 ways to do this:

  1. Extract the output from layer 'psroipooled_cls_rois', which is a (300, 81, 7, 7) array, 300 for 300 region proposals, 81 for 81 classes(class 0 for background) and (7, 7) for position-sensitive pooling feature for each proposal. You can sort the proposals according to the output from layer 'cls_score', which is a (300, 81, 1, 1) array that stores all the scores for each proposal and class;

  2. Extract from layer 'res5c' or 'conv_new_1' (I not sure which one is better), which are the CNN features of the whole image, and then map the bbox of the object proposals you need on the map, pool them in some way to get the object features.

I've been trying on both. Hope this can help you.