EmbedMask: Embedding Coupling for One-stage Instance Segmentation;
Hui Ying, Zhaojin Huang, Shu Liu, Tianjia Shao and Kun Zhou;
arXiv preprint arXiv:1912.01954
[Paper
]
This EmbedMask implementation is based on AdelaiDet, which is also on top of Detectron2.
First install Detectron2 following the official guide: INSTALL.md. Then build AdelaiDet with:
git clone https://github.com/yinghdb/AdelaiDet.git
cd AdelaiDet
python setup.py build develop
Then, follow datasets/README.md to set up the datasets (e.g., MS-COCO).
The pretrained models can be downloaded from here. And you should place them in the 'models' directory.
For demo, run the following command lines:
python demo/demo.py \
--config-file configs/EmbedMask/MS_R_101_3x.yaml \
--input demo/images \
--output demo/outputs \
--opts MODEL.WEIGHTS models/EmbedMask_R_101_3x.pth
For evaluation on COCO, run:
OMP_NUM_THREADS=1 python tools/train_net.py \
--config-file configs/EmbedMask/MS_R_50_1x.yaml \
--eval-only \
--num-gpus 4 \
OUTPUT_DIR training_dir/EmbedMask_R_50_1x \
MODEL.WEIGHTS models/EmbedMask_R_50_1x.pth
For training on COCO, run:
OMP_NUM_THREADS=1 python tools/train_net.py \
--config-file configs/EmbedMask/MS_R_50_1x.yaml \
--num-gpus 4 \
OUTPUT_DIR training_dir/EmbedMask_R_50_1x
Name | box AP (val) | mask AP (val) | box AP (test-dev) | mask AP (test-dev) |
---|---|---|---|---|
EmbedMask_MS_R_50_1x | 39.9 | 36.2 | 40.1 | 36.3 |
EmbedMask_MS_R_101_3x | 44.2 | 39.5 | 44.6 | 40.0 |
The main network architecture in this implementation is similar with that of CondInst and the auxiliary semantic segmentation task is used to help with the mask prediction.
Please consider citing our paper in your publications if the project helps your research. BibTeX reference is as follows.
@misc{ying2019embedmask,
title={EmbedMask: Embedding Coupling for One-stage Instance Segmentation},
author={Hui Ying and Zhaojin Huang and Shu Liu and Tianjia Shao and Kun Zhou},
year={2019},
eprint={1912.01954},
archivePrefix={arXiv},
primaryClass={cs.CV}
}