All Projects → AlphaJia → Pytorch Faster Rcnn

AlphaJia / Pytorch Faster Rcnn

pytorch based implementation faster rcnn

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch Faster Rcnn

object-tracking
Multiple Object Tracking System in Keras + (Detection Network - YOLO)
Stars: ✭ 89 (-64.54%)
Mutual labels:  detection, faster-rcnn
Kittibox
A car detection model implemented in Tensorflow.
Stars: ✭ 388 (+54.58%)
Mutual labels:  faster-rcnn, detection
Faster-RCNN-TensorFlow
TensorFlow implementation of Faster RCNN for Object Detection
Stars: ✭ 13 (-94.82%)
Mutual labels:  detection, faster-rcnn
Faster rcnn for dota
Code used for training Faster R-CNN on DOTA
Stars: ✭ 283 (+12.75%)
Mutual labels:  faster-rcnn, detection
Faster rcnn pytorch
Faster RCNN with PyTorch
Stars: ✭ 1,589 (+533.07%)
Mutual labels:  faster-rcnn, detection
Object-Detection-And-Tracking
Target detection in the first frame and Tracking target by SiamRPN.
Stars: ✭ 33 (-86.85%)
Mutual labels:  detection, faster-rcnn
Rectlabel Support
RectLabel - An image annotation tool to label images for bounding box object detection and segmentation.
Stars: ✭ 338 (+34.66%)
Mutual labels:  faster-rcnn, detection
Shadowless
A Fast and Open Source Autonomous Perception System.
Stars: ✭ 29 (-88.45%)
Mutual labels:  detection, faster-rcnn
Caffe Model
Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
Stars: ✭ 1,258 (+401.2%)
Mutual labels:  faster-rcnn, detection
Keras object detection
Convert any classification model or architecture trained in keras to an object detection model
Stars: ✭ 28 (-88.84%)
Mutual labels:  faster-rcnn, detection
Tffrcnn
FastER RCNN built on tensorflow
Stars: ✭ 898 (+257.77%)
Mutual labels:  faster-rcnn, detection
Faster Rcnn tf
Faster-RCNN in Tensorflow
Stars: ✭ 2,349 (+835.86%)
Mutual labels:  faster-rcnn, detection
Dockerface
Face detection using deep learning.
Stars: ✭ 173 (-31.08%)
Mutual labels:  faster-rcnn, detection
Caffe Faster Rcnn
faster rcnn c++ version. joint train; please checkout into dev branch (git checkout dev)
Stars: ✭ 210 (-16.33%)
Mutual labels:  faster-rcnn, detection
Libscout
LibScout: Third-party library detector for Java/Android apps
Stars: ✭ 217 (-13.55%)
Mutual labels:  detection
Training
🐝 A fast, easy and collaborative open source image annotation tool for teams and individuals.
Stars: ✭ 2,615 (+941.83%)
Mutual labels:  detection
Bccd dataset
BCCD (Blood Cell Count and Detection) Dataset is a small-scale dataset for blood cells detection.
Stars: ✭ 216 (-13.94%)
Mutual labels:  detection
Com.unity.perception
Perception toolkit for sim2real training and validation
Stars: ✭ 208 (-17.13%)
Mutual labels:  detection
Real time object detection and tracking
YOLOv2 and MobileNet_SSD detection algorithms used along with KCF object tracker
Stars: ✭ 241 (-3.98%)
Mutual labels:  detection
Icevision
End-to-End Object Detection Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come
Stars: ✭ 218 (-13.15%)
Mutual labels:  faster-rcnn

pytorch-faster-rcnn

1. Introduction

Pytorch based implementation of faster rcnn framework.For details about faster R-CNN please refer to the paper Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks by Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun

This detection framework has the following features:

  • It can be run as pure python code, and also pure based on pytorch framework, no need to build
  • It is easily trained by only running a train.py script, just set the data root dir
  • It has many backbone networks. like vgg, resnet-fpn, mobilenet, high resolution net(HRNet)
  • It can be a really detection framework. You only need to change super parameters in config file and get different models to compare different model
  • It's memory-efficient (about 3GB for vgg16)

2. Installation

2.1 Prerequisites

  • Python 2.7 or 3.5
  • Pytorch 1.5.1
  • torchvision 0.6.1
  • numpy 1.15.4
  • Pillow 6.1.0
  • pycocotools 2.0
  • matplotlib 3.0.2
  • tensorboardX 2.0
pip install -r requirements.txt

2.2 Code-Preparing

 git clone https://github.com/AlphaJia/pytorch-faster-rcnn.git

3. Data Preparation

COCO

3.1 Download the training, validation, test data and annotations
 wget http://images.cocodataset.org/zips/train2017.zip  
 wget http://images.cocodataset.org/zips/val2017.zip
 wget http://images.cocodataset.org/zips/test2017.zip
 wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
3.2 Extract all of these tars into one directory named COCODevKit
 tar xvf train2017.zip
 tar xvf val2017.zip
 tar xvf test2017.zip
 tar xvf annotations_trainval2017.zip
3.3 Data dir should like this
   COCODevKit
       |-- train2017
               |-- [xxxxxxxxxxxx].jpg
       |-- val2017
               |-- [xxxxxxxxxxxx].jpg
       |-- test2017
               |-- [xxxxxxxxxxxx].jpg
       |-- annotations
               |-- instances_train2017.json
               |-- instances_val2017.json
               |-- image_info_test2017.json
3.4 modify data_root_dir cfg item in config/train_config.py with /path/COCODevKit/

4. Train

Modify model_save_dir cfg item in config/train_config.py with your own save path and device_name with your own device

  • Train with mobilenet
    Modify backbone cfg item in config/train_config.py with mobilenet, download pretrained weights here, and set backbone_pretrained_weights in config/train_config.py with downloaded path.
 python train.py
  • Train with resnet-fpn
    Modify backbone cfg item in config/train_config.py with resnet50_fpn, download pretrained weights here, and set backbone_pretrained_weights in config/train_config.py with downloaded path
 python train.py
  • Train with vgg16
    Modify backbone cfg item in config/train_config.py with vgg16
 python train.py
  • Train with HRNet
    Modify backbone cfg item in config/train_config.py with HRNe
 python train.py

Weights and tensorboard log will save in your model_save_path dir
you may refer to config/train_config.py for more argument.
Some Key arguments:
--backbone: feature extraction backbone network
--backbone_pretrained_weights: backbone pretrained weights, None or path
--train_horizon_flip_prob: data horizontal flip probability
--num_class: number of classification, including background
--data_root_dir: COCO dataset root dir
--model_save_dir: training weights save path
--device_name: training device
--num_epochs: training epochs

5. Test

Modify model_weights cfg item in config/test_config.py with your trained weights path and gpu_id with your own cuda device ID.
you may refer to config/test_config.py for more argument.
Some Key arguments:
--model_weights: training save path
--image_path: predicted images
--gpu_id: cuda device gpu ID
--num_classes: number of classification, including background
--data_root_dir: COCO dataset root dir

 python test.py

6. Demo

img

7. Framework Structure

backbone

This module includes backbone feature extraction network

config

This module includes config parameters in training period and testing period

  • test_config: specify config parameters in testing period like model_file, image_path_dir, save_dir, etc.
  • train_config: specify config parameters in training period like backbone network, batch_size, image_path_dir, anchor_size, ect.

dataloader

This module inherits pytorch dataloader classes, dataset IO.You can also generate your own dataset dataloader IO and put it in this module

test

This module includes the utils function test(common called unit test, also called UT)

  • anchor_utils_test: some unit testing for utils/anchor_utils.py

utils

This module includes some utilies for image processing, network architectures building, anchor generating, loss function, etc.

  • anchor_utils: some basic function for building anchors
  • im_utils: some basic function for image processing
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].