Giter Club home page Giter Club logo

simplest_fasterrcnn_pytorch's People

Contributors

kyle1993 avatar

Stargazers

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

Watchers

 avatar  avatar

simplest_fasterrcnn_pytorch's Issues

Hi, I have this error in runing train.py!

你好,我非常感兴趣您的这个项目,觉得很简洁;但是当我在运行train.py 的时候,出现了以下的错误,您能帮忙解决一下吗?谢谢!
Traceback (most recent call last):
File "train.py", line 25, in
losses = model.train_step(img,bbox,label,scale,epoch)
File "/home/a/Bcw_data/simplest_FasterRcnn_pytorch/model/faster_rcnn_vgg16.py", line 178, in train_step
features, roi, rpn_loc_loss, rpn_cls_loss = self.train_extracor_and_rpn(img, bbox, scale, retain_graph=True)
File "/home/a/Bcw_data/simplest_FasterRcnn_pytorch/model/faster_rcnn_vgg16.py", line 209, in train_extracor_and_rpn
rpn_loc, rpn_score, roi, anchor = self.rpn(features, img_size, scale, training=True)
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/a/Bcw_data/simplest_FasterRcnn_pytorch/model/regin_proposal_network.py", line 195, in forward
roi = self.proposcal_creator(rpn_locs[0].cpu().detach().numpy(),rpn_scores[0].cpu().detach().numpy(),anchor, img_size,scale=scale,training=training)
File "/home/a/Bcw_data/simplest_FasterRcnn_pytorch/model/creator.py", line 450, in call
keep = np.where((hs >= min_size) & (ws >= min_size))[0]
TypeError: le() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:

  • (Tensor other)
    didn't match because some of the arguments have invalid types: (numpy.ndarray)
  • (Number other)
    didn't match because some of the arguments have invalid types: (numpy.ndarray)

TypeError: __init__() got an unexpected keyword argument 'pretrained'

dear,when i run the test.py, has the problem as follow:

Connected to pydev debugger (build 182.4505.26)
Traceback (most recent call last):
File "/home/yjs/Downloads/pycharm/helpers/pydev/pydevd.py", line 1664, in
main()
File "/home/yjs/Downloads/pycharm/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/yjs/Downloads/pycharm/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/yjs/Downloads/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/yjs/Downloads/simplest_FasterRcnn_pytorch-master/test.py", line 10, in
model = FasterRCNNVGG16(opt)
File "/home/yjs/Downloads/simplest_FasterRcnn_pytorch-master/model/faster_rcnn_vgg16.py", line 102, in init
vgg16 = vgg16_bn(pretrained=True)
File "/home/yjs/.conda/envs/py36-tf13/lib/python3.6/site-packages/torchvision/models/vgg.py", line 130, in vgg16_bn
return VGG(make_layers(cfg['D'], batch_norm=True), **kwargs)
TypeError: init() got an unexpected keyword argument 'pretrained'

关于什么时候切换numpy或者cuda.tensor的问题

RT,我看到你的代码中时不时的要把数据从numpy上切换到cuda.tensor上或者从cuda.tensor切换到numpy上面,这一点我在chenyuntc/simple-faster-rcnn-pytorch的代码中也有发现。请问你知道有关这方面的技巧吗?让代码运行更快的技巧。就是应该在什么时候从numpy->cuda,而什么时候从cuda->numpy。或者如果你知道相关论文博客链接的话也可以。

batchsize

请问如何才能改变batchsize的大小呢?

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.