question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to extract feature from any layer in a pre-trained detector?

See original GitHub issue

Thanks for your great work! The performances of the detectors are amazing!

I have some questions on detectron2.

  1. Now I have a list of bbox coordinates with respect to some images, how can I run a pre-trained detector (i.e. Faster-RCNN-R50-FPN) on these images, and crop the feature map (i.e. extract the 7x7 rois in the detector) according to the bbox coordinates? Is there an API in detectron2 to do the work?
  2. How can I generate the proposals for Fast-RCNN, should I run the RPN directly to get the .pkl file?

Thank you again for your attention!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:18

github_iconTop GitHub Comments

13reactions
Programmnixcommented, Jan 21, 2020

Hi,

for everybody how is interested in feature extraction for bounding boxes. There is a fork of this repo with example code. https://github.com/airsplay/py-bottom-up-attention

11reactions
ppwwyyxxcommented, Nov 2, 2020

UPDATE: see https://detectron2.readthedocs.io/tutorials/models.html#partially-execute-a-model

from detectron2.modeling import build_backbone
from detectron2.modeling.poolers import ROIPooler
backbone = build_backbone(cfg)
pooler = ROIPooler(...)
rois = pooler(backbone(NCHW_images), [kx4 tensors])
  1. Running inference on a dataset with a RPN-only model will produce the proposals for the dataset in output/inference. An example command is
python tools/train_net.py --config-file configs/COCO-Detection/rpn_R_50_FPN_1x.yaml --eval-only
Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracting Features from an Intermediate Layer of a Pretrained ...
In this article, we are going to see how we can extract features of the input, from an intermediate layer in a pre-trained...
Read more >
Extract Features, Visualize Filters and Feature Maps in VGG16 ...
Here I'm going to discuss how to extract features, visualize filters and feature maps for the pretrained models VGG16 and VGG19 for a...
Read more >
Extract Image Features Using Pretrained Network - MathWorks
This example shows how to extract learned image features from a pretrained convolutional neural network and use those features to train an image...
Read more >
Feature extraction for model inspection - PyTorch
Extracting features to compute image descriptors for tasks like facial recognition, copy-detection, or image retrieval. Passing selected features to ...
Read more >
Feature Extraction - Pytorch Image Models - GitHub Pages
There are three ways to obtain unpooled features. Without modifying the network, one can call model.forward_features(input) on any model instead of the usual ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found