Giter VIP home page Giter VIP logo

faster_r-cnn_pytorch's Introduction

Faster_R-CNN_pytorch

Statement

  • Based on longcw/faster_rcnn_pytorch (python2.7), I modified the code so that it can run on python3.6 and numpy 1.13.3. So the numpy version do not need to change into 1.11.
  • Follow longcw's code, I draw some picture to understand the process of Faster R-CNN.

Thank longcw, his code helps me a lot to understand Faster R-CNN. Also the readme files of longcw and ruotianluo tell me how to build cython models. You can follow their code and readme file.

If there is something I can not write in my repertory, please contact me.

Environment and Compile

  • python 3.6
  • pytorch 0.3.0
  • numpy 1.13.3
  • opencv 3.3.0

Follow longcw/faster_rcnn_pytorch and ruotianluo/pytorch-faster-rcnn.

  1. Install requirements (directly copy from longcw/faster_rcnn_pytorch/README.md).

    conda install pip pyyaml sympy h5py cython numpy scipy
    conda install -c menpo opencv3
    pip install easydict
    
  2. Choose arch of GPU type. (directly copy from ruotianluo/pytorch-faster-rcnn/README.md)

GPU model Architecture
TitanX (Maxwell/Pascal) sm_52
GTX 960M sm_50
GTX 1080 (Ti) sm_61
Grid K520 (AWS g2.2xlarge) sm_30
Tesla K80 (AWS p2.xlarge) sm_37

modify the parameter arch in faster_rcnn_pytorch/faster_rcnn/make.sh

  1. Build Cython models (directly copy from longcw/faster_rcnn_pytorch/README.md).

    cd faster_rcnn_pytorch/faster_rcnn
    ./make.sh

Run

You can follow longcw/faster_rcnn_pytorch .

  • demo.py You need to download trained_weights(VGGnet_fast_rcnn_iter_70000.h5) and load it's weight.
  • train.py You need to download VOC dataset and VGG_imagenet_pretrained_weight(VGG_imagenet.npy).
  • test.py You need to download VOC dataset.

Process of Code

faster_r-cnn_pytorch's People

Contributors

alexhex7 avatar javiribera avatar longcw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

faster_r-cnn_pytorch's Issues

train.py RuntimeError

when I train on my own data,I meet an error when run the faster_rcnn.py,line 100,'rpn_loss_box = F.smooth_l1_loss(rpn_bbox_pred, rpn_bbox_targets, size_average=False) / (fg_cnt + 1e-4)'. It shows that "RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.cuda.LongTensor for argument #2 'other'โ€œ
what's mabey the reason??

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.