Error using sequential on faster-rcnn to get regional proposal network object features
See original GitHub issueI’m trying to use pretrained FasterRCNN network provided in torchvision.
model=torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
model.eval()
model([image_tensor])
working perfectly fine but when I use sequential to stop at intermediate layers like this
model2=nn.Sequential(*list(model.children())[:-2])
to use until RPN network I’m getting error when passing a image as show below
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not tuple
So then, I tried to inherit nn.module and implement based on Generalized RCNN and faster-rcnn.py as shown here but instead of Kx2048 features I’m getting 862x4. feature vector.
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (9 by maintainers)
Top Results From Across the Web
An Enhanced Region Proposal Network for object detection ...
Inspired by RPN of Faster R-CNN, we propose a novel proposal generation method called Enhanced Region Proposal Network (ERPN). Four improvements ...
Read more >Faster R-CNN - - NeuralCeption -
The first module extracts features and identifies regions which could contain objects. This module consists of the Region Proposal Network [22].
Read more >Faster R-CNN: Towards Real-Time Object ... - YouTube
Faster R-CNN : Towards Real-Time Object Detection with Region Proposal Networks. 2.4K views 2 years ago. nPlan. nPlan. 930 subscribers.
Read more >Revisiting Faster R-CNN: A Deeper Look at Region Proposal ...
In Faster R-CNN, RPN is built on top of high-level convolutional feature ... To summarise, we propose an object detection network with region...
Read more >Faster R-CNN with Region Proposal Refinement - CS231n
Region -based Convolutional Neural Network, or R-CNN, was proposed not long after the emergence of. CNN and it greatly improved the detection performance...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks much @fmassa your solution works so well for me. I used this in my application and am posting here your code wrapped as a function for any one who may have a similar requirement:
No worries! Let us know if you have any other comment / feedback