All Projects → foolwood → Deepmask Pytorch

foolwood / Deepmask Pytorch

Licence: mit
PyTorch re-implementation of DeepMask

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deepmask Pytorch

Ffn
Flood-Filling Networks for instance segmentation in 3d volumes.
Stars: ✭ 252 (+25.37%)
Mutual labels:  segmentation, instance-segmentation
CAP augmentation
Cut and paste augmentation for object detection and instance segmentation
Stars: ✭ 93 (-53.73%)
Mutual labels:  segmentation, instance-segmentation
Tfwss
Weakly Supervised Segmentation with Tensorflow. Implements instance segmentation as described in Simple Does It: Weakly Supervised Instance and Semantic Segmentation, by Khoreva et al. (CVPR 2017).
Stars: ✭ 212 (+5.47%)
Mutual labels:  segmentation, instance-segmentation
uoais
Codes of paper "Unseen Object Amodal Instance Segmentation via Hierarchical Occlusion Modeling", ICRA 2022
Stars: ✭ 77 (-61.69%)
Mutual labels:  segmentation, instance-segmentation
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (-72.14%)
Mutual labels:  segmentation, instance-segmentation
Tfvos
Semi-Supervised Video Object Segmentation (VOS) with Tensorflow. Includes implementation of *MaskRNN: Instance Level Video Object Segmentation (NIPS 2017)* as part of the NIPS Paper Implementation Challenge.
Stars: ✭ 151 (-24.88%)
Mutual labels:  segmentation, instance-segmentation
BCNet
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
Stars: ✭ 434 (+115.92%)
Mutual labels:  segmentation, instance-segmentation
Entity
EntitySeg Toolbox: Towards Open-World and High-Quality Image Segmentation
Stars: ✭ 313 (+55.72%)
Mutual labels:  segmentation, instance-segmentation
Multi Human Parsing
🔥🔥Official Repository for Multi-Human-Parsing (MHP)🔥🔥
Stars: ✭ 507 (+152.24%)
Mutual labels:  segmentation, instance-segmentation
Seg By Interaction
Unsupervised instance segmentation via active robot interaction
Stars: ✭ 78 (-61.19%)
Mutual labels:  segmentation, instance-segmentation
Keraspersonlab
Keras-tensorflow implementation of PersonLab (https://arxiv.org/abs/1803.08225)
Stars: ✭ 163 (-18.91%)
Mutual labels:  segmentation, instance-segmentation
Squeeze and excitation
PyTorch Implementation of 2D and 3D 'squeeze and excitation' blocks for Fully Convolutional Neural Networks
Stars: ✭ 192 (-4.48%)
Mutual labels:  segmentation
Solov2
SOLOv2: Dynamic, Faster and Stronger, achives 39.5mAP on coco test-dev (36 epochs result)
Stars: ✭ 174 (-13.43%)
Mutual labels:  instance-segmentation
Awesome Cell Detection Segmentation
nucleus/cell and histopathology image classification,detection,segmentation
Stars: ✭ 173 (-13.93%)
Mutual labels:  segmentation
3dunet Tensorflow Brats18
3D Unet biomedical segmentation model powered by tensorpack with fast io speed
Stars: ✭ 173 (-13.93%)
Mutual labels:  segmentation
Seismic Deeplearning
Deep Learning for Seismic Imaging and Interpretation
Stars: ✭ 198 (-1.49%)
Mutual labels:  segmentation
Dataset loaders
A collection of dataset loaders
Stars: ✭ 187 (-6.97%)
Mutual labels:  segmentation
Deep Learning For Image Processing
deep learning for image processing including classification and object-detection etc.
Stars: ✭ 5,808 (+2789.55%)
Mutual labels:  segmentation
Unet Tensorflow Keras
A concise code for training and evaluating Unet using tensorflow+keras
Stars: ✭ 172 (-14.43%)
Mutual labels:  segmentation
Ochumanapi
API for the dataset proposed in "Pose2Seg: Detection Free Human Instance Segmentation" @ CVPR2019.
Stars: ✭ 168 (-16.42%)
Mutual labels:  segmentation

deepmask-pytorch

This repository contains a PyTorch re-implementation for the DeepMask and SharpMask object proposal algorithms.

Requirements and Dependencies

  • Linux
  • NVIDIA GPU with compute capability 3.5+
  • python3
  • PyTorch 0.4.1

Quick Start

To run pretrained DeepMask models to generate object proposals, follow these steps:

  1. Clone this repository into $DEEPMASK:

    git clone https://github.com/foolwood/deepmask-pytorch.git
    cd deepmask-pytorch
    DEEPMASK=$PWD
    export PYTHONPATH=$DEEPMASK:$PYTHONPATH
    
  2. Download pre-trained DeepMask models:

    mkdir -p $DEEPMASK/pretrained/deepmask; cd $DEEPMASK/pretrained/deepmask
    wget http://www.robots.ox.ac.uk/~qwang/DeepMask.pth.tar
    
  3. Run computeProposals.py with a given model and optional target image (specified via the -img option):

    # apply to a default sample image (data/testImage.jpg)
    cd $DEEPMASK
    python tools/computeProposals.py --arch DeepMask --resume $DEEPMASK/pretrained/deepmask/DeepMask.pth.tar --img ./data/test.jpg
    

Training Your Own Model

To train your own DeepMask models, follow these steps:

Preparation

  1. If you have not done so already, clone this repository into $DEEPMASK:

    git clone https://github.com/foolwood/deepmask-pytorch.git
    cd deepmask-pytorch
    DEEPMASK=$PWD
    export PYTHONPATH=$DEEPMASK:$PYTHONPATH
    
  2. Download and extract the COCO images and annotations:

    mkdir -p $DEEPMASK/data/coco; cd $DEEPMASK/data/coco
    wget http://images.cocodataset.org/zips/train2017.zip
    wget http://images.cocodataset.org/zips/val2017.zip
    wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
    
    unzip ./train2017.zip && unzip ./val2017.zip && unzip ./annotations_trainval2017.zip
    cd $DEEPMASK/loader/pycocotools && make
    

Training

To train DeepMask, launch the train.py script. It contains several options, to list them, simply use the --help flag.

cd $DEEPMASK
CUDA_VISIBLE_DEVICES=0,1,2,3 python tools/train.py --dataset coco -j 20 --freeze_bn
CUDA_VISIBLE_DEVICES=0,1,2,3 python tools/train.py --dataset coco -j 20 --arch SharpMask --freeze_bn

Testing

Test on COCO validation set (5K).

sh scripts/test_recall_coco.sh

Our results

                +-----------------+------------------------+------------------------+
                |                 |      Box Proposals     | Segmentation Proposals |
                +                 +------------------------+------------------------+
                |                 | AR_10 | AR_100 | AR_1K | AR_10 | AR_100 | AR_1K |
                +-----------------+-------+--------+-------+-------+--------+-------+
                | DeepMask(paper) |  18.7 |  34.9  |  46.5 |  14.4 |  25.8  |  33.1 |
                +-----------------+-------+--------+-------+-------+--------+-------+
                | DeepMask(ours)  |  18.3 |  35.9  |  48.4 |  13.6 |  26.0  |  33.5 |
                +-----------------+-------+--------+-------+-------+--------+-------+

Naive Cascade Instance Segmentation (YOLOv3+DeepMask=10FPS~28FPS)

git clone https://github.com/pjreddie/darknet.git
cd darknet
make # Compile with CUDA https://pjreddie.com/darknet/install/
sed -i 's/= data/= .\/darknet\/data/g' cfg/coco.data
sed -i 's/batch=64/batch=1/g' cfg/yolov3.cfg
sed -i 's/subdivisions=16/subdivisions=1/g' cfg/yolov3.cfg
cd $DEEPMASK
wget https://pjreddie.com/media/files/yolov3.weights
wget https://pjreddie.com/media/files/yolov3-tiny.weights
python tools/yolo_deepmask.py

Naive Cascade Video Object Segmentation (DaSiamRPN+DeepMask=60FPS)

git clone https://github.com/foolwood/DaSiamRPN.git
mkdir tracker && mv DaSiamRPN/code/* ./tracker/ && rm -rf ./DaSiamRPN
touch tracker/__init__.py
sed -i 's/utils/.utils/g' tracker/run_SiamRPN.py
cd $DEEPMASK
wget www.robots.ox.ac.uk/~qwang/SiamRPNVOT.model
python tools/dasiamrpn_deepmask.py

Citations

Please consider citing this project in your publications if it helps your research. The following is a BibTeX reference. The BibTeX entry requires the url LaTeX package.

@misc{wang2018deepmask,
author = {Wang Qiang},
title = {{deepmask-pytorch}},
year = {2018},
howpublished = {\url{https://github.com/foolwood/deepmask_pytorch}}
}
@inproceedings{DeepMask,
   title = {Learning to Segment Object Candidates},
   author = {Pedro O. Pinheiro and Ronan Collobert and Piotr Dollár},
   booktitle = {NIPS},
   year = {2015}
}
@inproceedings{SharpMask,
   title = {Learning to Refine Object Segments},
   author = {Pedro O. Pinheiro and Tsung-Yi Lin and Ronan Collobert and Piotr Dollár},
   booktitle = {ECCV},
   year = {2016}
}

License

Licensed under an MIT license

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