simonm3 / maskr

Other
27 stars 4 forks source link

Pytorch MaskRCNN

This is a Pytorch/Fastai implementation of MaskRCNN based on previous versions by Matterport and MultiModal Learning (see acknowledgements at bottom of page). This was mainly a personal learning exercise but the simplified structure may help others wanting to understand maskrcnn.

Includes:

Todo:

Structure

This diagram shows how it all fits together Note that training and prediction follow slightly different paths.

The core code reflects the diagram:

Utilities

Samples

Test (experimental)

Installation

  1. Clone this repository.

    git clone https://github.com/simonm3/maskr.git
  2. Download pretrained coco weights from Google Drive.

  3. Build the nms and roialign binaries:

    cd maskr/maskr/lib
    ./make.sh
  4. Install the python package and dependencies in edit mode

    cd maskr
    pip install -e .

Acknowledgements and links

Blogs

These are useful introductions to image segmentation and maskrcnn

A Brief History of CNNs in Image Segmentation: From R-CNN to Mask R-CNN

Deep Learning for Instance-level Object Understanding. Tutorial on Deep Learning for Objects and Scenes (by Ross Girshick).

Object Detection using Deep Learning for advanced users

Faster R-CNN: Down the rabbit hole of modern object detection

Region of Interest Pooling explained

Papers

These are the main papers that led to maskrcnn:

FastRCNN

FasterRCNN

MaskRCNN

Feature Pyramid Networks

Packages

This package was based on the multimodal package which was based on matterport.

Matterport Mask_RCNN. A keras/tensorflow implementation of maskrcnn

Multimodal learning. Pytorch version of matterport.

Facebook detectron. Facebook super package that includes implementation of a wide range of image segmentation algorithms using Caffe2.

Pytorch detectron. Conversion of detectron to pytorch.