Faster-rcnn.pytorch: Pre-trained models

Created on 16 Jan 2018  Ā·  31Comments  Ā·  Source: jwyang/faster-rcnn.pytorch

Can you please share your trained models? Thank you!

Most helpful comment

@aronsar

I trained on 1600 classes of VG, following 1600-40-20 split by bottom-up attention.

Download my classes label: objects_vocab.txt and Trained model snapshot

You may simply modify the lines in demo.py of pascal_classes = ... to

with open('data/genome/1600-400-20/objects_vocab.txt', 'r') as f:
    data = f.readlines()
pascal_classes = np.asarray(['__background__'])
pascal_classes = np.append(pascal_classes, np.asarray(data))
pascal_classes = [x.strip('\n') for x in pascal_classes]

All 31 comments

@xiaomengyc, I will upload the pre-trained model today. stay tuned

Thanks!

By the way, I also encountered the exactly same problem when compiling the ROI polling layerhere, and I fixed it by changing the line 3 (CUDA_PATH=/usr/local/cuda/) in make.sh to CUDA_PATH=/usr/local/cuda/ and adding the environment variables
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH

great, thanks! @xiaomengyc.

I added them into my bashrc, while @g5996706 might do not.

I will add them to make.sh, and remind in readme that these two should be exported.

thanks again!

BTW, I am retraining all the models with the most recent code. I already uploaded a trained resnet101 on pascal-voc (see the link in the table). Now I am training in other settings. All models on pascal voc will be available tonight. COCO might be two days later.

Thanks a lot!

Thanks! Do you plan to train on visual genome as well? @jwyang

@Cadene , yes, I will once I have enough GPUs, :). It should be very soon after I finish the retraining on coco.

@jwyang I trained a VGG16 on Visual Genome for 20 epochs (it took me one week) and got a mAP of 4.4%.

I could share it. However, I just want to know if someone achieved a better mAP :)

@Cadene great, how many object categories did you try?

@jwyang as much as possible (2500 classes)

@Cadene I guess that performance should be ok, I tried 1600 categories, and got around 10 mAP. Do you want to share your trained model, you can give me a link, I will add it to readme.

@Cadene appreciate!

@Cadene , could you also tell me the detailed hyper parameters for training the model, as shown in the tables?

@jwyang So it was a VGG16 (not a Resnet101) trained on a single Tesla P100 with the default hyper parameters:

  • lr 0.001
  • lr_decay 5
  • batch_size 4
  • max_epoch 20
  • 12707MiB / 16276MiB
  • around 3h40m per epoch on trainset

(args.set_cfgs = ['ANCHOR_SCALES', '[4, 8, 16, 32]', 'ANCHOR_RATIOS', '[0.5,1,2]', 'MAX_NUM_GT_BOXES', '50'])

@Cadene got it, thanks!

@jwyang, the pre-trained model of @Cadene is a VGG16, not ResNet-101 as he pointed out. README should be updated correctly.

Hi @Cadene
Could you please share the classes you used to train the model? So that we can try it out.

Hi @jwyang @Cadene

I have tried out the faster rcnn pretrained on Visual Genome, however as there's missing information on the classes data at this line, the detector cannot find the correct label: my detection results are like these:

img1_det
img2_det
img3_det

The labels are incorrect due to incorrect order of my 2,501 classes. I tried to sort by the name of the classes but still went wrong. Could you please give any advice?

I would also like to know the answer to coldmanck's question. Thanks!

@aronsar

Finally I trained the faster rcnn model on the VG dataset by myself. Just need to fix an order of classes then all are fine.

@coldmanck

Would it be possible for you to share your trained model and object vocabulary files?

Thank you!
-Aron

@aronsar

I trained on 1600 classes of VG, following 1600-40-20 split by bottom-up attention.

Download my classes label: objects_vocab.txt and Trained model snapshot

You may simply modify the lines in demo.py of pascal_classes = ... to

with open('data/genome/1600-400-20/objects_vocab.txt', 'r') as f:
    data = f.readlines()
pascal_classes = np.asarray(['__background__'])
pascal_classes = np.append(pascal_classes, np.asarray(data))
pascal_classes = [x.strip('\n') for x in pascal_classes]

@coldmanck Thank you so much!

@coldmanck What's the mAP on your model?

When I bash make.sh, there is such a mistake:
ā€œImportError: torch.utils.ffi requires the cffi packageā€
But when I installed cffi, there was another mistake:.ā€œCould not install packages due to an EnvironmentError: [Errno 13] ęƒé™äøå¤Ÿ:ā€
How do I solve this problem?

@coldmanck Thank you for the model and object vocab file.
The visual genome dataset looks overwhelming to me. bottom-up attention doesn't go into the details of preparing this dataset. Can someone expand on this?
If someone can provide res101 trained with 2500 classes or vgg16 rained with 1600 classes, I would appreciate that

@jwyang http://data.lip6.fr/cadene/faster-rcnn.pytorch/faster_rcnn_1_19_48611.pth

Thank u so much for your model!
But my 2500-classes vocab has different order with yours. Could you please share your 2500-classes vocab txt for your 'faster_rcnn_1_19_48611.pth'?

@aronsar

I trained on 1600 classes of VG, following 1600-40-20 split by bottom-up attention.

Download my classes label: objects_vocab.txt and Trained model snapshot

You may simply modify the lines in demo.py of pascal_classes = ... to

with open('data/genome/1600-400-20/objects_vocab.txt', 'r') as f:
    data = f.readlines()
pascal_classes = np.asarray(['__background__'])
pascal_classes = np.append(pascal_classes, np.asarray(data))
pascal_classes = [x.strip('\n') for x in pascal_classes]

Thank u for your object vocab very much !
But the link to the pre-trained model is not available. Could you please share a new link of the model?

@aronsar @czydfj Did you get the new link of the resnet101 model train on VG?

I have this error. How can I fix it? thank you
Traceback (most recent call last):
File "trainval_net.py", line 321, in
rois_label = fasterRCNN(im_data, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 159, in forward
return self.module(inputs[0], *kwargs[0])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/faster_rcnn/faster_rcnn.py", line 54, in forward
rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(base_feat, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/rpn/rpn.py", line 78, in forward
im_info, cfg_key))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/rpn/proposal_layer.py", line 147, in forward
keep_idx_i = nms(proposals_single, scores_single.squeeze(1), nms_thresh)
RuntimeError: Not compiled with GPU support

I have this error. How can I fix it? thank you
Traceback (most recent call last):
File "trainval_net.py", line 321, in
rois_label = fasterRCNN(im_data, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 159, in forward
return self.module(inputs[0], *kwargs[0])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/faster_rcnn/faster_rcnn.py", line 54, in forward
rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(base_feat, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/rpn/rpn.py", line 78, in forward
im_info, cfg_key))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, *kwargs)
File "/content/drive/My Drive/faster-rcnn.pytorch/lib/model/rpn/proposal_layer.py", line 147, in forward
keep_idx_i = nms(proposals_single, scores_single.squeeze(1), nms_thresh)
RuntimeError: Not compiled with GPU support

hello, sir. Have you saved this problem? if you do , could you please talk about it. Appreciate!

Was this page helpful?
0 / 5 - 0 ratings