Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-trained models #16

Closed
xiaomengyc opened this issue Jan 16, 2018 · 35 comments
Closed

Pre-trained models #16

xiaomengyc opened this issue Jan 16, 2018 · 35 comments

Comments

@xiaomengyc
Copy link

Can you please share your trained models? Thank you!

@jwyang
Copy link
Owner

jwyang commented Jan 16, 2018

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

@xiaomengyc
Copy link
Author

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

@jwyang
Copy link
Owner

jwyang commented Jan 17, 2018

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.

@xiaomengyc
Copy link
Author

Thanks a lot!

@Cadene
Copy link

Cadene commented Jan 17, 2018

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

@jwyang
Copy link
Owner

jwyang commented Jan 17, 2018

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

@Cadene
Copy link

Cadene commented Jan 20, 2018

@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 :)

@jwyang
Copy link
Owner

jwyang commented Jan 20, 2018

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

@Cadene
Copy link

Cadene commented Jan 20, 2018

@jwyang as much as possible (2500 classes)

@jwyang
Copy link
Owner

jwyang commented Jan 20, 2018

@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
Copy link

Cadene commented Jan 20, 2018

@jwyang
Copy link
Owner

jwyang commented Jan 20, 2018

@Cadene appreciate!

@jwyang
Copy link
Owner

jwyang commented Jan 20, 2018

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

@Cadene
Copy link

Cadene commented Jan 21, 2018

@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'])

@jwyang
Copy link
Owner

jwyang commented Jan 21, 2018

@Cadene got it, thanks!

@jwyang jwyang closed this as completed Jan 22, 2018
@jnhwkim
Copy link
Contributor

jnhwkim commented Mar 16, 2018

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

@coldmanck
Copy link

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

@coldmanck
Copy link

coldmanck commented Jun 23, 2018

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?

@aronsar
Copy link

aronsar commented Aug 31, 2018

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

@coldmanck
Copy link

@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.

@aronsar
Copy link

aronsar commented Sep 4, 2018

@coldmanck

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

Thank you!
-Aron

@coldmanck
Copy link

coldmanck commented Sep 6, 2018

@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]

@aronsar
Copy link

aronsar commented Sep 7, 2018

@coldmanck Thank you so much!

@ghost
Copy link

ghost commented Sep 26, 2018

@coldmanck What's the mAP on your model?

@YuanGao-cs
Copy link

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?

@xf15
Copy link

xf15 commented Dec 7, 2018

@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

@czydfj
Copy link

czydfj commented Nov 28, 2019

@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'?

@czydfj
Copy link

czydfj commented Nov 28, 2019

@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?

@yestinl
Copy link

yestinl commented May 20, 2020

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

@UQEKV
Copy link

UQEKV commented Dec 25, 2020

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

@FlyDre
Copy link

FlyDre commented Jan 9, 2021

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!

@chenbl21
Copy link

我在编译的过程中输入sh make.sh 报错:/home/cbl/miniconda3/envs/py27/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC/THCGeneral.h:12:18: 致命错误:cuda.h:没有那个文件或目录
#include "cuda.h"
^
编译中断。
请问如何解决?

@YuanGao-cs
Copy link

YuanGao-cs commented Mar 20, 2022 via email

@kalng62
Copy link

kalng62 commented Oct 20, 2022

ImportError: cannot import name 'imread' from 'scipy.misc' (/usr/local/lib/python3.7/dist-packages/scipy/misc/init.py)
I have run this in the colab and got the error code like this

@YuanGao-cs
Copy link

YuanGao-cs commented Oct 20, 2022 via email

rman1223 pushed a commit to rman1223/faster-rcnn.pytorch that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests