I would like to extract the features after ROI Align in object detection.
Specifically for every box detected (top k boxes), I would like to extract the backbone features, either the FC layer before classification or the layer before that in the backbone.
Can anyone suggest a straightforward way of doing this or provide a short script?
Thanks for the prompt response.
Now I have another issue. I was able to extract the features using a forward hook , but a F-RCNN network generates 1000 proposals at this stage.
The filtering step happens later when calling postprocess_detections(). Here we chose up to k boxes and return only those selected. I would like to also return the features only for these boxes but I don’t see any place where the indexes are returned. A list named “keep” internally but is not returned.
Any suggestion as to how to achieve this?
I have been encountering the same issue, has anyone solve it?
I am trying to get the features from the box_head but I keep getting the 1000 proposals from RPN, I know the later the RPN filters them by a threshold but I cant figure out how to call them.