pytorch-faster-rcnn icon indicating copy to clipboard operation
pytorch-faster-rcnn copied to clipboard

How to use self trained resnet in faster rcnn

Open SakshamDarolia opened this issue 5 years ago • 2 comments

I am trying to use a self trained resnet101 in faster rcnn. I think that i can get more accurate inferences and results by using one. The issue that I have is when training starts, it throws a Pdb error. This error occurs inside _sample_rois() function located in proposal_target_layer.py. In this function after calculating fg_inds and bg_inds, there are several conditions as shown in below screenshot. Screenshot from 2019-08-21 01-50-34 And according to the conditions the control of the program goes into else(i.e. Pdb block) iff fg_inds and bg_inds both are zero simultaneously. Just for an example, In below screenshot I have used resnet50 from the link provided in GitHub repo, and after some iterations Pdb error occurs. (I have printed fg_inds and bg_inds for preview) Screenshot from 2019-08-19 17-05-17 And if I use a self trained resnet(on a custom dataset), then also it throws a Pdb error, even before the iterations start. So, do I need to train the resnet in caffe(on custom dataset), then convert to pth and then use in faster rcnn? Will that solve this Pdb error? (Right now I have trained Resnet in pytorch.) Or is it that self trained resnets are not supported as of now? And pretrained res50(the one provided in this repo) doesnt work for me either. Please get me with a solution as soon as possible. It is really important. Thanks in advance

SakshamDarolia avatar Aug 20 '19 20:08 SakshamDarolia

I am posting first time on GitHub, so I'm sorry if there are any mistakes.

SakshamDarolia avatar Aug 20 '19 20:08 SakshamDarolia

Hello, I have the same problem. Have you solved it?

StrongBirds avatar Dec 30 '19 03:12 StrongBirds