Code Monkey home page Code Monkey logo

fpn_pytorch's People

Contributors

jwyang avatar ruoqianguo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fpn_pytorch's Issues

RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at /opt/conda/conda

Hello,I used your code to train. However, the model terminate after first iter
Would you please help me find out the problem?
Thank you
Here are my Trace backs:
[session 1][epoch 1][iter 0] loss: 4.0006, lr: 1.00e-02
fg/bg=(128/384), time cost: 7.218862
rpn_cls: 0.6919, rpn_box: 0.1386, rcnn_cls: 2.8319, rcnn_box 0.3382
Traceback (most recent call last):
File "trainval_net.py", line 330, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 73, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 83, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/parallel_apply.py", line 67, in parallel_apply
raise output
RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at /opt/conda/conda-bld/pytorch_1518238409320/work/torch/lib/THC/generic/THCTensorScatterGather.cu:29

Train this project in pycharm

Thanks for your nice work!
Here, I have two questions:
1.How can I train this project in pycharm?
2.In the file "trainval_net",line 51,the argument of "exp_name",why not is "--exp_name"?And how can I set this default value in pycharm?
Looking forward to your reply!

IndexError: too many indices for array

[session 1][epoch 1][iter 1500/6468] loss: 0.5808, lr: 1.00e-03
fg/bg=(7/121), time cost: 23.705823
rpn_cls: 0.0890, rpn_box: 0.0042, rcnn_cls: 0.2387, rcnn_box 0.1058
Traceback (most recent call last):
File "trainval_net.py", line 355, in
data = data_iter.next()
File "/home/hyc/anaconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 281, in next
return self._process_next_batch(batch)
File "/home/hyc/anaconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 301, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/hyc/anaconda2/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 55, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/hyc/FPN_Pytorch-master/lib/roi_data_layer/roibatchLoader.py", line 67, in getitem
blobs = get_minibatch(minibatch_db, self._num_classes)
File "/home/hyc/FPN_Pytorch-master/lib/roi_data_layer/minibatch.py", line 30, in get_minibatch
im_blob, im_scales = _get_image_blob(roidb, random_scale_inds)
File "/home/hyc/FPN_Pytorch-master/lib/roi_data_layer/minibatch.py", line 73, in _get_image_blob
im = im[:,:,::-1]

Argument --ls in testnet.py

There is an option to pass --ls (large scale) as an argument in the testnet.py file, but it doesn't seem to be used in the script. Can you please explain what this is and how to use it? Thank you

index(): argument 'indices' (position 1) must be tuple of Tensors, not Tensor

when i run trainval_net.py in python 3.6, pytorch 0.4.0,i meet this error ,how can i solve it,than you!
Traceback (most recent call last):
File "/FPN_Pytorch-master/trainval_net.py", line 366, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/FPN_Pytorch-master/lib/model/fpn/fpn.py", line 195, in forward
roi_data = self.RCNN_proposal_target(rois, gt_boxes, num_boxes)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/FPN_Pytorch-master/lib/model/rpn/proposal_target_layer.py", line 52, in forward
rois_per_image, self._num_classes)
File "/FPN_Pytorch-master/lib/model/rpn/proposal_target_layer.py", line 133, in _sample_rois_pytorch
labels = gt_boxes[:,:,4].contiguous().view(-1).index(offset.view(-1))
TypeError: index(): argument 'indices' (position 1) must be tuple of Tensors, not Tensor

RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor

Hi, Im a new hand, when I use python3 to run your code and jwyang/fpn.pytorch meeting the same problem, as follow:
Preparing training data...
done
before filtering, there are 10022 images...
after filtering, there are 10022 images...
10022 roidb entries
Loading pretrained weights from data/pretrained_model/resnet101_caffe.pth
/home/wangshaoju/.conda/envs/ycy/lib/python3.6/site-packages/torch/nn/functional.py:1749: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/home/wangshaoju/jwyang/FPN_Pytorch/lib/model/rpn/rpn_fpn.py:79: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape)
Traceback (most recent call last):
File "trainval_net.py", line 366, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/home/wangshaoju/.conda/envs/ycy/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wangshaoju/jwyang/FPN_Pytorch/lib/model/fpn/fpn.py", line 191, in forward
rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(rpn_feature_maps, im_info, gt_boxes, num_boxes)
File "/home/wangshaoju/.conda/envs/ycy/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wangshaoju/jwyang/FPN_Pytorch/lib/model/rpn/rpn_fpn.py", line 109, in forward
rpn_data = self.RPN_anchor_target((rpn_cls_score_alls.data, gt_boxes, im_info, num_boxes, rpn_shapes))
File "/home/wangshaoju/.conda/envs/ycy/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wangshaoju/jwyang/FPN_Pytorch/lib/model/rpn/anchor_target_layer_fpn.py", line 141, in forward
positive_weights = 1.0 / num_examples
File "/home/wangshaoju/.conda/envs/ycy/lib/python3.6/site-packages/torch/tensor.py", line 320, in rdiv
return self.reciprocal() * other
RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor

This virtual environment can run the jwyang/faster-rcnn.pytorch. I have no idea, can you help me?
Thanks very much!

训练0712的时候显存变大

@guoruoqian 请问为何在训练voc 0712数据集的时候显存占用会远远大于训练voc 07呢?我只能把batch size设为1才能训练。

Soft-NMS

你好,这个代码里面包括了这个算法吧!

some detail question with your job

In readme.md introduction part ,(The following things are what your did) .i want to know are these three tips used in the code. for example I can not find your modification in code.
在你的介绍说明中,做出了三个改进地方,但我在代码中没有看到更改,比如FPN_FEAT_STRIDES 在代码中依然是[4, 8, 16, 32, 64],第二个_PyramidRoI_Feat中 log和log2我并没有找到 代码中对应位置 能否指明一下。
还是说你的三个改进只是一个建议,并没有在代码中这么做。

非常感谢你的工作 ,希望解答一下疑惑

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.