Giter Site home page Giter Site logo

shapeprop's Introduction

Learning Saliency Propagation for Semi-supervised Instance Segmentation

illustration

PyTorch Implementation

This repository contains:

  • the PyTorch implementation of ShapeProp.
  • the Classwise semi-supervision (COCO's VOC->Non-VOC) demo.

Please follow the instruction below to install it and run the experiment demo.

Prerequisites

  • Linux (tested on ubuntu 16.04LTS)
  • NVIDIA GPU + CUDA CuDNN (tested on 8x GTX 2080 Ti)
  • COCO 2017 Dataset (download and unzip)

Getting started

  1. Create a conda environment:

    conda create --name ShapeProp -y
    conda activate ShapeProp
  2. Clone this repo:

    # git version must be greater than 1.9.10
    git clone https://github.com/SalProp/SP.git -b review --single-branch ShapeProp
    cd ShapeProp
    export DIR=$(pwd)
  3. Install dependencies via a single command bash $DIR/scripts/install.sh or do it manually as follows:

    # Python
    conda install -y ipython pip
    # PyTorch
    conda install -y pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
    # Install deps
    pip install ninja yacs cython matplotlib tqdm opencv-python
    rm -r libs
    mkdir libs
    # COCOAPI
    cd $DIR/libs
    git clone https://github.com/cocodataset/cocoapi.git
    cd cocoapi/PythonAPI
    python setup.py build_ext install
    # APEX
    cd $DIR/libs
    git clone https://github.com/NVIDIA/apex.git
    cd apex
    python setup.py install --cuda_ext --cpp_ext
    # ShapeProp
    cd $DIR
    python setup.py build develop
    
  4. Prepare dataset:

    cd $DIR
    mkdir datasets
    ln -s PATH_TO_YOUR_COCO_DATASET datasets/coco
    bash scripts/prepare_data.sh
  5. Run the classwise semi-supervision demo:

    cd $DIR
    # Mask R-CNN w/ ShapeProp
    bash scripts/train_shapeprop.sh
    # Mask R-CNN
    bash scripts/train_baseline.sh

Citation

If you use the code in your research, please cite:

@INPROCEEDINGS{Zhou2020ShapeProp,
    author = {Zhou, Yanzhao and Wang, Xin and and Jiao, Jianbin and Darrell, Trevor and Yu, Fisher},
    title = {Learning Saliency Propagation for Semi-supervised Instance Segmentation},
    booktitle = {CVPR},
    year = {2020}
}

shapeprop's People

Contributors

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