Code Monkey home page Code Monkey logo

pytorch_rfcn's Introduction

Region-based FCN implemented with PyTorch

This is a PyTorch implementation of R-FCN for object detection. This project is mainly based on faster_rcnn_pytorch

For details about R-FCN please refer to the paper R-FCN: Object Detection via Region-based Fully Convolutional Networks by Jifeng Dai, Yi Li, Kaiming He, Jian Sun.

Installation

  1. Clone the this repository

    git clone https://github.com/PureDiors/pytorch_RFCN.git
  2. Build the Cython modules for nms and the psroi_pooling layer

    cd faster_rcnn_pytorch/faster_rcnn
    ./make.sh

The psroi pooling layer is defined in the folder faster_rcnn/psroi_pooling, and the whole detection network is implemented in faster_rcnn/rfcn.py.

Training on Pascal VOC 2007

Follow this project (TFFRCNN) to download and prepare the training, validation, test data and the VGG16 model pre-trained on ImageNet.

Since the program loading the data in faster_rcnn_pytorch/data by default, you can set the data path as following.

cd faster_rcnn_pytorch
mkdir data
cd data
ln -s $VOCdevkit VOCdevkit2007

The speed for training the rfcn with VGG16 on a Nvidia Titan X(Pascal) is 4.9 fps, and 12 fps for testing.

You can set some hyper-parameters in train.py and training parameters in the .yml file.

Training with TensorBoard

With the aid of Crayon, we can access the visualisation power of TensorBoard for any deep learning framework.

To use the TensorBoard, install Crayon (https://github.com/torrvision/crayon) and set use_tensorboard = True in faster_rcnn/train.py.

Evaluation

Set the path of the trained model in test.py.

cd faster_rcnn_pytorch
mkdir output
python test.py

pytorch_rfcn's People

Contributors

shadowxzt avatar

Watchers

 avatar

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.