Fully Convolutional Instance-aware Semantic Segmentation
Cuda
1,562
50 commits
updated Sep 27, 2021
The major contributors of this repository include Haozhi Qi, Yi Li, Guodong Zhang, Haochen Zhang, Jifeng Dai, and Yichen Wei.
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 a CVPR 2017 spotlight paper. It is worth noticing that:
This is an official implementation for Fully Convolutional Instance-aware Semantic Segmentation (FCIS) based on MXNet. It is worth noticing that:
© Microsoft, 2017. Licensed under an MIT license.
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}
}
| training data | testing data | mAP^[email protected] | mAP^[email protected] | time | |
|---|---|---|---|---|---|
| FCIS, ResNet-v1-101 | VOC 2012 train | VOC 2012 val | 66.0 | 51.9 | 0.23s |
| training data | testing data | mAP^r | mAP^[email protected] | mAP^[email protected] | mAP^r@S | mAP^r@M | mAP^r@L | |
|---|---|---|---|---|---|---|---|---|
| FCIS, ResNet-v1-101, OHEM | coco trainval35k | coco minival | 29.2 | 50.8 | 29.7 | 7.9 | 31.4 | 51.1 |
| FCIS, ResNet-v1-101, OHEM | coco trainval35k | coco test-dev | 29.6 | 51.4 | 30.2 | 8.0 | 31.0 | 49.7 |
Running time is counted on a single Maxwell Titan X GPU (mini-batch size is 1 in inference).
MXNet from the offical repository. We tested our code on MXNet@(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.
Python packages might missing: cython, opencv-python >= 3.2.0, easydict. If pip is set up on your system, those packages should be able to be fetched and installed by running
pip install Cython
pip install opencv-python==3.2.0.6
pip install easydict==1.6
pip install hickle
For Windows users, Visual Studio 2015 is needed to compile cython module.
Any NVIDIA GPUs with at least 5GB memory should be OK
git clone https://github.com/msracver/FCIS.git
For Windows users, run cmd .\init.bat. For Linux user, run sh ./init.sh. The scripts will build cython module automatically and create some folders.
Install MXNet:
Note: The MXNet's Custom Op cannot execute parallelly using multi-gpus after this PR. We strongly suggest the user rollback to version MXNet@(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 to MXNet@(commit 998378a) by
git clone --recursive https://github.com/dmlc/mxnet.git
git checkout 998378a
git submodule init
git 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 python
sudo python setup.py install
3.6 For advanced users, you may put your Python packge into ./external/mxnet/$(YOUR_MXNET_PACKAGE), and modify MXNET_VERSION in ./experiments/fcis/cfgs/*.yaml to $(YOUR_MXNET_PACKAGE). Thus you can switch among different versions of MXNet quickly.
To run the demo with our trained model (on COCO trainval35k), please download the model manually from OneDrive (Chinese users can also get it from BaiduYun with code tmd4), and put it under folder model/.
Make sure it looks like this:
./model/fcis_coco-0000.params
Run
python ./fcis/demo.py
Please download VOC 2012 dataset with additional annotations from SBD. Move inst, 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 of SDS.
.data/VOCdevkit/VOCSDS/img/
.data/VOCdevkit/VOCSDS/inst/
.data/VOCdevkit/VOCSDS/cls/
Please download COCO dataset and annotations for the 5k image minival subset and val2014 minus minival (val35k). Make sure it looks like this:
.data/coco/
.data/coco/annotations/instances_valminusminival2014.json
.data/coco/annotations/instances_minival2014.json
Please download ImageNet-pretrained ResNet-v1-101 model manually from OneDrive, and put it under folder ./model. Make sure it looks like this:
./model/pretrained_model/resnet_v1_101-0000.params
./experiments/fcis/cfgs.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 under output/fcis/coco/ or output/fcis/voc/.Code has been tested under:
551 followers · starred Oct 2016
7,554 followers · starred Nov 2018
445 followers · starred May 2017
197 followers · starred Apr 2017
Fully Convolutional Instance-aware Semantic Segmentation
Cuda
1,562
50 commits
updated Sep 27, 2021
The major contributors of this repository include Haozhi Qi, Yi Li, Guodong Zhang, Haochen Zhang, Jifeng Dai, and Yichen Wei.
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 a CVPR 2017 spotlight paper. It is worth noticing that:
This is an official implementation for Fully Convolutional Instance-aware Semantic Segmentation (FCIS) based on MXNet. It is worth noticing that:
© Microsoft, 2017. Licensed under an MIT license.
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}
}
| training data | testing data | mAP^[email protected] | mAP^[email protected] | time | |
|---|---|---|---|---|---|
| FCIS, ResNet-v1-101 | VOC 2012 train | VOC 2012 val | 66.0 | 51.9 | 0.23s |
| training data | testing data | mAP^r | mAP^[email protected] | mAP^[email protected] | mAP^r@S | mAP^r@M | mAP^r@L | |
|---|---|---|---|---|---|---|---|---|
| FCIS, ResNet-v1-101, OHEM | coco trainval35k | coco minival | 29.2 | 50.8 | 29.7 | 7.9 | 31.4 | 51.1 |
| FCIS, ResNet-v1-101, OHEM | coco trainval35k | coco test-dev | 29.6 | 51.4 | 30.2 | 8.0 | 31.0 | 49.7 |
Running time is counted on a single Maxwell Titan X GPU (mini-batch size is 1 in inference).
MXNet from the offical repository. We tested our code on MXNet@(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.
Python packages might missing: cython, opencv-python >= 3.2.0, easydict. If pip is set up on your system, those packages should be able to be fetched and installed by running
pip install Cython
pip install opencv-python==3.2.0.6
pip install easydict==1.6
pip install hickle
For Windows users, Visual Studio 2015 is needed to compile cython module.
Any NVIDIA GPUs with at least 5GB memory should be OK
git clone https://github.com/msracver/FCIS.git
For Windows users, run cmd .\init.bat. For Linux user, run sh ./init.sh. The scripts will build cython module automatically and create some folders.
Install MXNet:
Note: The MXNet's Custom Op cannot execute parallelly using multi-gpus after this PR. We strongly suggest the user rollback to version MXNet@(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 to MXNet@(commit 998378a) by
git clone --recursive https://github.com/dmlc/mxnet.git
git checkout 998378a
git submodule init
git 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 python
sudo python setup.py install
3.6 For advanced users, you may put your Python packge into ./external/mxnet/$(YOUR_MXNET_PACKAGE), and modify MXNET_VERSION in ./experiments/fcis/cfgs/*.yaml to $(YOUR_MXNET_PACKAGE). Thus you can switch among different versions of MXNet quickly.
To run the demo with our trained model (on COCO trainval35k), please download the model manually from OneDrive (Chinese users can also get it from BaiduYun with code tmd4), and put it under folder model/.
Make sure it looks like this:
./model/fcis_coco-0000.params
Run
python ./fcis/demo.py
Please download VOC 2012 dataset with additional annotations from SBD. Move inst, 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 of SDS.
.data/VOCdevkit/VOCSDS/img/
.data/VOCdevkit/VOCSDS/inst/
.data/VOCdevkit/VOCSDS/cls/
Please download COCO dataset and annotations for the 5k image minival subset and val2014 minus minival (val35k). Make sure it looks like this:
.data/coco/
.data/coco/annotations/instances_valminusminival2014.json
.data/coco/annotations/instances_minival2014.json
Please download ImageNet-pretrained ResNet-v1-101 model manually from OneDrive, and put it under folder ./model. Make sure it looks like this:
./model/pretrained_model/resnet_v1_101-0000.params
./experiments/fcis/cfgs.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 under output/fcis/coco/ or output/fcis/voc/.Code has been tested under:
551 followers · starred Oct 2016
7,554 followers · starred Nov 2018
445 followers · starred May 2017
197 followers · starred Apr 2017