All Projects → mitmul → Chainer Faster Rcnn

mitmul / Chainer Faster Rcnn

Licence: mit
Object Detection with Faster R-CNN in Chainer

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Chainer Faster Rcnn

chainer-Fast-WaveNet
A Chainer implementation of Fast WaveNet(mel-spectrogram vocoder).
Stars: ✭ 33 (-88.46%)
Mutual labels:  chainer
neural style synthesizer
No description or website provided.
Stars: ✭ 15 (-94.76%)
Mutual labels:  chainer
waifu2x-chainer
Chainer implementation of waifu2x
Stars: ✭ 137 (-52.1%)
Mutual labels:  chainer
lda2vec
Mixing Dirichlet Topic Models and Word Embeddings to Make lda2vec from this paper https://arxiv.org/abs/1605.02019
Stars: ✭ 27 (-90.56%)
Mutual labels:  chainer
chainer-ADDA
Adversarial Discriminative Domain Adaptation in Chainer
Stars: ✭ 24 (-91.61%)
Mutual labels:  chainer
chainer-DenseNet
Densely Connected Convolutional Network implementation by Chainer
Stars: ✭ 39 (-86.36%)
Mutual labels:  chainer
char-rnn-text-generation
Character Embeddings Recurrent Neural Network Text Generation Models
Stars: ✭ 64 (-77.62%)
Mutual labels:  chainer
captioning chainer
A fast implementation of Neural Image Caption by Chainer
Stars: ✭ 17 (-94.06%)
Mutual labels:  chainer
graph-nvp
GraphNVP: An Invertible Flow Model for Generating Molecular Graphs
Stars: ✭ 69 (-75.87%)
Mutual labels:  chainer
chainer-wasserstein-gan
Chainer implementation of the Wesserstein GAN
Stars: ✭ 20 (-93.01%)
Mutual labels:  chainer
kaggle-champs-scalar-coupling
19th place solution in "Predicting Molecular Properties"
Stars: ✭ 26 (-90.91%)
Mutual labels:  chainer
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (-80.42%)
Mutual labels:  chainer
deep-INFOMAX
Chainer implementation of deep-INFOMAX
Stars: ✭ 32 (-88.81%)
Mutual labels:  chainer
chainer-notebooks
Jupyter notebooks for Chainer hands-on
Stars: ✭ 23 (-91.96%)
Mutual labels:  chainer
voxelnet chainer
VoxelNet implementation in Chainer
Stars: ✭ 26 (-90.91%)
Mutual labels:  chainer
deep-learning-platforms
deep-learning platforms,framework,data(深度学习平台、框架、资料)
Stars: ✭ 17 (-94.06%)
Mutual labels:  chainer
chainer-dense-fusion
Chainer implementation of Dense Fusion
Stars: ✭ 21 (-92.66%)
Mutual labels:  chainer
Portrait matting
Implementation of "Automatic Portrait Segmentation" and "Deep Automatic Portrait Matting" with Chainer.
Stars: ✭ 267 (-6.64%)
Mutual labels:  chainer
inv rl
Inverse Reinforcement Learning Argorithms
Stars: ✭ 34 (-88.11%)
Mutual labels:  chainer
book-ml
書籍「今すぐ試したい!機械学習・深層学習(ディープラーニング)画像認識プログラミングレシピ」のソースコードを配布するレポジトリです。
Stars: ✭ 29 (-89.86%)
Mutual labels:  chainer

Faster R-CNN

This repo has been deprecated. Here is the complete codes for training Faster-RCNN on your data and using the pre-trained Faster-RCNN model for new data: ChainerCV

This is an experimental implementation of Faster R-CNN in Chainer based on Ross Girshick's work: py-faster-rcnn codes.

Requirement

Using anaconda is strongly recommended.

  • Python 2.7.6+, 3.4.3+, 3.5.1+

    • Chainer 1.22.0+
    • NumPy 1.9, 1.10, 1.11
    • Cython 0.25+
    • OpenCV 2.9+, 3.1+

Installation of dependencies

pip install numpy
pip install cython
pip install chainer
pip install chainercv
# for python3
conda install -c https://conda.binstar.org/menpo opencv3
# for python2
conda install opencv

For Windows users

There's a known problem in cpu_nms.pyx. But a workaround has been posted here (and see also the issue posted to the original py-faster-rcnn).

Setup

1. Build extensions

python setup.py build_ext -i

Inference

1. Download pre-trained model

if [ ! -d data ]; then mkdir data; fi
curl https://dl.dropboxusercontent.com/u/2498135/faster-rcnn/VGG16_faster_rcnn_final.model?dl=1 -o data/VGG16_faster_rcnn_final.model

NOTE: The model definition in faster_rcnn.py has been changed, so if you already have the older pre-trained model file, please download it again to replace the older one with the new one.

2. Use forward.py

curl -O http://vision.cs.utexas.edu/voc/VOC2007_test/JPEGImages/004545.jpg
python forward.py --img_fn 004545.jpg --gpu 0

--gpu 0 turns on GPU. When you turn off GPU, use --gpu -1 or remove --gpu option.

Layers

Summarization of Faster R-CNN layers used during inference

RPN

The region proposal layer (RPN) is consisted of AnchorTargetLayer and ProposalLayer. RPN takes feature maps from trunk network like VGG-16, and performs 3x3 convolution to it. Then, it applies two independent 1x1 convolutions to the output of the first 3x3 convolution. Resulting outputs are rpn_cls_score and rpn_bbox_pred.

  • The shape of rpn_cls_score is (N, 2 * n_anchors, 14, 14) because each pixel on the feature map has n_anchors bboxes and each bbox should have 2 values that mean object/background.
  • The shape of rpn_bbox_pred is (N, 4 * n_anchors, 14, 14) because each pixel on the feature map has n_anchors bboxes, and each bbox is represented with 4 values that mean left top x and y, width and height.

Training

1. Make sure chainercv has been installed

ChainerCV is a utility library enables Chainer to treat various datasets easily. It also provides some transformation utility for data augmentation, and includes some standard algorithms for some comptuer vision tasks. Check the repo to know details. Here I use (VOCDetectionDataset)[http://chainercv.readthedocs.io/en/latest/reference/datasets.html#vocdetectiondataset] of ChainerCV. Anyway, before starting training of FasterRCNN, please install ChainerCV via pip.

pip install chainercv

2. Start training

python train_rpn.py

Faster R-CNN Architecture

Note that it is a visualization of the workflow DURING INFERENCE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].