Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Fully Convolutional Instance-aware Semantic Segmentation

License

NotificationsYou must be signed in to change notification settings

msracver/FCIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The major contributors of this repository includeHaozhi Qi,Yi Li,Guodong Zhang,Haochen Zhang,Jifeng Dai, andYichen Wei.

Introduction

FCIS is a fully convolutional end-to-end solution for instance segmentation, which won the first place in COCO segmentation challenge 2016.

FCIS is initially described in aCVPR 2017 spotlight paper. It is worth noticing that:

  • FCIS provides a simple, fast and accurate framework for instance segmentation.
  • Different fromMNC, FCIS performs instance mask estimation and categorization jointly and simultanously, and estimates class-specific masks.
  • We did not exploit the various techniques & tricks in the Mask RCNN system, like increasing RPN anchor numbers (from 12 to 15), training on anchors out of image boundary, enlarging the image (shorter side from 600 to 800 pixels), utilizing FPN features and aligned ROI pooling. These techniques & tricks should be orthogonal to our simple baseline.

Resources

  1. Visual results on the first 5k images from COCO test set of ourCOCO 2016 challenge entry:OneDrive.
  2. Slides inImageNet ILSVRC and COCO workshop 2016:OneDrive.

Disclaimer

This is an official implementation forFully Convolutional Instance-aware Semantic Segmentation (FCIS) based on MXNet. It is worth noticing that:

  • The original implementation is based on our internal Caffe version on Windows. There are slight differences in the final accuracy and running time due to the plenty details in platform switch.
  • The code is tested on officialMXNet@(commit 62ecb60) with the extra operators for FCIS.
  • We trained our model based on the ImageNet pre-trainedResNet-v1-101 using amodel converter. The converted model produces slightly lower accuracy (Top-1 Error on ImageNet val: 24.0% v.s. 23.6%).
  • This repository used code fromMXNet rcnn example andmx-rfcn.

License

© Microsoft, 2017. Licensed under an MIT license.

Citing FCIS

If you find FCIS useful in your research, please consider citing:

@inproceedings{li2016fully,  Author = {Yi Li, Haozhi Qi, Jifeng Dai, Xiangyang Ji and Yichen Wei}  Title = {Fully Convolutional Instance-aware Semantic Segmentation},  Conference = {CVPR},  year = {2017}}

Main Results

training datatesting datamAP^r@0.5mAP^r@0.7time
FCIS, ResNet-v1-101VOC 2012 trainVOC 2012 val66.051.90.23s
training datatesting datamAP^rmAP^r@0.5mAP^r@0.75mAP^r@SmAP^r@MmAP^r@L
FCIS, ResNet-v1-101, OHEMcoco trainval35kcoco minival29.250.829.77.931.451.1
FCIS, ResNet-v1-101, OHEMcoco trainval35kcoco test-dev29.651.430.28.031.049.7

Running time is counted on a single Maxwell Titan X GPU (mini-batch size is 1 in inference).

Requirements: Software

  1. MXNet fromthe offical repository. We tested our code onMXNet@(commit 62ecb60). Due to the rapid development of MXNet, it is recommended to checkout this version if you encounter any issues. We may maintain this repository periodically if MXNet adds important feature in future release.

  2. Python packages might missing: cython, opencv-python >= 3.2.0, easydict. Ifpip is set up on your system, those packages should be able to be fetched and installed by running

    pip install Cythonpip install opencv-python==3.2.0.6pip install easydict==1.6pip install hickle
  3. For Windows users, Visual Studio 2015 is needed to compile cython module.

Requirements: Hardware

Any NVIDIA GPUs with at least 5GB memory should be OK

Installation

  1. Clone the FCIS repository, and we'll call the directory that you cloned FCIS as ${FCIS_ROOT}.
git clone https://github.com/msracver/FCIS.git
  1. For Windows users, runcmd .\init.bat. For Linux user, runsh ./init.sh. The scripts will build cython module automatically and create some folders.

  2. Install MXNet:

    Note: The MXNet's Custom Op cannot execute parallelly using multi-gpus after thisPR. We strongly suggest the user rollback to versionMXNet@(commit 998378a) for training (following Section 3.2 - 3.6).

    Quick start

    3.1 Install MXNet and all dependencies by

    pip install -r requirements.txt

    If there is no other error message, MXNet should be installed successfully.

    Build from source (alternative way)

    3.2 Clone MXNet and checkout toMXNet@(commit 998378a) by

    git clone --recursive https://github.com/dmlc/mxnet.gitgit checkout 998378agit submodule initgit submodule update

    3.3 Copy channel operators in$(FCIS_ROOT)/fcis/operator_cxx to$(YOUR_MXNET_FOLDER)/src/operator/contrib by

    cp -r $(FCIS_ROOT)/fcis/operator_cxx/channel_operator* $(MXNET_ROOT)/src/operator/contrib/

    3.4 Compile MXNet

    cd ${MXNET_ROOT}make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1

    3.5 Install the MXNet Python binding by

    Note: If you will actively switch between different versions of MXNet, please follow 3.5 instead of 3.4

    cd pythonsudo python setup.py install

    3.6 For advanced users, you may put your Python packge into./external/mxnet/$(YOUR_MXNET_PACKAGE), and modifyMXNET_VERSION in./experiments/fcis/cfgs/*.yaml to$(YOUR_MXNET_PACKAGE). Thus you can switch among different versions of MXNet quickly.

Demo

  1. To run the demo with our trained model (on COCO trainval35k), please download the model manually fromOneDrive (Chinese users can also get it fromBaiduYun with codetmd4), and put it under foldermodel/.

    Make sure it looks like this:

    ./model/fcis_coco-0000.params
  2. Run

    python ./fcis/demo.py

Preparation for Training & Testing

  1. Please download VOC 2012 dataset with additional annotations fromSBD. Moveinst, cls, img folders to VOCdevit and make sure it looks like this:

    Please use the train&val split in this repo, which follows the protocal ofSDS.

    .data/VOCdevkit/VOCSDS/img/.data/VOCdevkit/VOCSDS/inst/.data/VOCdevkit/VOCSDS/cls/
  2. Please downloadCOCO dataset and annotations for the 5k imageminival subset andval2014 minus minival (val35k). Make sure it looks like this:

    .data/coco/.data/coco/annotations/instances_valminusminival2014.json.data/coco/annotations/instances_minival2014.json
  3. Please download ImageNet-pretrained ResNet-v1-101 model manually fromOneDrive, and put it under folder./model. Make sure it looks like this:

    ./model/pretrained_model/resnet_v1_101-0000.params

Usage

  1. All of our experiment settings (GPU #, dataset, etc.) are kept in yaml config files at folder./experiments/fcis/cfgs.
  2. Two config files have been provided so far: FCIS@COCO with OHEM and FCIS@VOC without OHEM. We use 8 and 4 GPUs to train models on COCO and on VOC, respectively.
  3. To perform experiments, run the python scripts with the corresponding config file as input. For example, to train and test FCIS on COCO with ResNet-v1-101, use the following command
    python experiments/fcis/fcis_end2end_train_test.py --cfg experiments/fcis/cfgs/resnet_v1_101_coco_fcis_end2end_ohem.yaml
    A cache folder would be created automatically to save the model and the log underoutput/fcis/coco/ oroutput/fcis/voc/.
  4. Please find more details in config files and in our code.

Misc.

Code has been tested under:

  • Ubuntu 14.04 with a Maxwell Titan X GPU and Intel Xeon CPU E5-2620 v2 @ 2.10GHz
  • Windows Server 2012 R2 with 8 K40 GPUs and Intel Xeon CPU E5-2650 v2 @ 2.60GHz
  • Windows Server 2012 R2 with 4 Pascal Titan X GPUs and Intel Xeon CPU E5-2650 v4 @ 2.30GHz

About

Fully Convolutional Instance-aware Semantic Segmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp