Skip to content
SparseMask: Differentiable Connectivity Learning for Dense Image Prediction.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
VOC12 Init Apr 16, 2019
images Init Apr 16, 2019
models Init Apr 16, 2019
search_checkpoint Init Apr 16, 2019
train_checkpoint Init Apr 16, 2019
.gitignore
README.md awesome nas Apr 17, 2019
_config.yml Init Apr 16, 2019
awesome_nas.md awesome nas Apr 17, 2019
dataset.py Init Apr 16, 2019
eval_sparse_mask.py Init Apr 16, 2019
get_backbone.py Init Apr 16, 2019
mobilenet_v2.py
prune.py Init Apr 16, 2019
sparse_mask.pdf Init Apr 16, 2019
sparse_mask_eval_mode.py
sparse_mask_train_mode.py Init Apr 16, 2019
train_sparse_mask.py
train_sparse_mask_prune_mode.py Init Apr 16, 2019
train_sparse_mask_search_mode.py
utils.py

README.md

SparseMask: Differentiable Connectivity Learning for Dense Image Prediction

[Project] [Paper] [arXiv] [Home] [AWESOME NAS]

Official implementation of SparseMask: Differentiable Connectivity Learning for Dense Image Prediction. Automatically design the connectivity structure for dense image prediction tasks, achieving better fusion of multi-scale feature maps.

@inproceedings{wu2019sparsemask,
  title     = {SparseMask: Differentiable Connectivity Learning for Dense Image Prediction},
  author    = {Wu, Huikai and Zhang, Junge and Huang, Kaiqi},
  booktitle = {arXiv preprint arXiv:1904.07642},
  year = {2019}
}

Contact: Hui-Kai Wu (huikaiwu@icloud.com)

Overview

Method

Automatically Designed Architecture

Requirements

python==3.5
pytorch==1.0
cuda==9.0
scipy
scikit-image
tqdm
tensorboardX
tensorflow

Prepare Dataset: PASCAL-VOC 2012

  1. Download and unzip PASCAL VOC 2012 and SBD.
    ROOT
    ├── benchmark_RELEASE
    └── VOCdevkit
  2. Convert *.mat to *.png for SBD.
    python VOC12/convert_mat_to_png.py --sbd_path [ROOT]/benchmark_RELEASE
  3. Convert labels for PASCAL VOC 2012.
    python VOC12/convert_labels.py \
                [ROOT]/VOCdevkit/VOC2012/SegmentationClass \
                [ROOT]/VOCdevkit/VOC2012/ImageSets/Segmentation/trainval.txt \
                [ROOT]/VOCdevkit/VOC2012/SegmentationClass_1D
  4. Combine PASCAL VOC 2012 and SBD.
    cd [ROOT]
    mv VOCdevkit/VOC2012/SegmentationClass_1D/*.png benchmark_RELEASE/dataset/cls_png/
    mv VOCdevkit/VOC2012/JPEGImages/*.jpg benchmark_RELEASE/dataset/img/
  5. Soft link.
     ln -s [ROOT]/benchmark_RELEASE/dataset/cls_png data/gt
     ln -s [ROOT]/benchmark_RELEASE/dataset/img data/img

Step by Step

Search

 python train_sparse_mask.py --search

Prune

python prune.py --checkpoint search_checkpoint/checkpoint_33100.pth.tar

Train

python train_sparse_mask.py --mask_path search_checkpoint/mask_thres_0.001.npy
python train_sparse_mask.py --mask_path search_checkpoint/mask_thres_0.001.npy --training_list VOC12/data/train.txt --lr 0.0005 --ft_model [MODEL_PATH]

Eval

python eval_sparse_mask.py --pretrained_model train_checkpoint/checkpoint_4600.pth.tar --mask_path search_checkpoint/mask_thres_0.001.npy

Acknowlegement

Part of the work was conducted while I was an intern in Preferred Networks.

You can’t perform that action at this time.