Code Monkey home page Code Monkey logo

lighthead-rcnn-in-pytorch0.4.1's Introduction

Lighthead - RCNN

Implementation of Lighthead-RCNN in Pytorch 0.4.1 codes

Contributions

  • The first reimplementation of Lighthead-RCNN in full stable Pytorch codes
  • A new implementation of CUDA codes of Position Sensitive ROI Pooling is provided, in case all previous ones don't work under the Pytorch version >= 0.4
  • Pretrained model is provided

  • At the time being, this repo only support single batch training.
  • Dataloader from chainercv is used in training

Pretrained model and Performance

res101_lighthead_rcnn@ Google drive

Implementation [email protected]:0.95/all [email protected]/all [email protected]/all mAP:0.5:0.95/small mAP:0.5:0.95/medium mAP:0.5:0.95/large
Original 0.400 0.621 0.429 0.225 0.446 0.540
Ours 0.3963 0.601 0.432 0.217 0.447 0.539
map/iou=0.50:0.95/area=all/max_dets=100: 0.396344
map/iou=0.50/area=all/max_dets=100: 0.601353
map/iou=0.75/area=all/max_dets=100: 0.432155
map/iou=0.50:0.95/area=small/max_dets=100: 0.217397
map/iou=0.50:0.95/area=medium/max_dets=100: 0.447772
map/iou=0.50:0.95/area=large/max_dets=100: 0.538968
mar/iou=0.50:0.95/area=all/max_dets=1: 0.319597
mar/iou=0.50:0.95/area=all/max_dets=10: 0.496089
mar/iou=0.50:0.95/area=all/max_dets=100: 0.513308
mar/iou=0.50:0.95/area=small/max_dets=100: 0.296478
mar/iou=0.50:0.95/area=medium/max_dets=100: 0.578120
mar/iou=0.50:0.95/area=large/max_dets=100: 0.692352

I have only trained it with 18 epochs instead of 30 epochs in the original paper due to it took too long time on my single 1080TI card system.

How to use

Preparation

  1. Clone the this repository.

    git clone https://github.com/TreB1eN/Lighthead-RCNN-in-Pytorch0.4.1.git
    cd Lighthead-RCNN-in-Pytorch0.4.1/
  2. Prepare COCO dataset.

    It is recommended to symlink the dataset root to $Lighthead-RCNN-Pytorch/data.

  3. Create following folders and download the pretrained model to work_space/final

Lighthead-RCNN-Pytorch
├── functions
├── models
├── utils
├── data
│   ├── coco2014
│   │   ├── annotations
│   │   ├── train2014
│   │   ├── val2014
├── work_space
│   ├── model
│   ├── log
│   ├── final
│   ├── save

Installation

  1. Install PyTorch 0.4.1 and torchvision following the official instructions.

  2. Install dependencies

    pip install -r requirements.txt
  3. Compile cuda extensions.

    ./compile.sh  # or "PYTHON=python3 ./compile.sh" if you use system python3 without virtual environments

Inference

python detect.py -f data/person.jpg -o data/person_detected.jpg

Evaluate

python eval.py

Train

  1. Download the pretrained backbone Res101 model to models folder

  2. python train.py 
  3. More detailed configuration is in utils/config.py

References

chainer-light-head-rcnn

light_head_rcnn

paper

Demos


Contact

Email : [email protected]

Questions and PRs are welcome

lighthead-rcnn-in-pytorch0.4.1's People

Contributors

treb1en 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.