Mask R-CNN的MXNet实现
An MXNet implementation of Mask R-CNN.
This repository is based largely on the mx-rcnn implementation of Faster RCNN available here.
Method | Training data | Test data | Average | person | rider | car | truck | bus | train | motorcycle | bicycle | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ours | fine-only | test | 26.9 | 33.0 | 25.7 | 47.7 | 21.6 | 27.4 | 23.0 | 19.9 | 16.9 | ||
Reference[5] | fine-only | test | 26.2 | 30.5 | 23.8 | 46.9 | 22.8 | 32.2 | 18.6 | 19.1 | 16.0 | ||
Ours | fine-only | val | 31.3 | 32.6 | 26.6 | 49.5 | 26.5 | 45.4 | 32.1 | 17.6 | 20.4 | ||
Reference[5] | fine-only | val | 31.5 | - | - | - | - | - | - | - | - | - | - |
Coming soon, please stay tuned.
We tested our code on:
Ubuntu 16.04, Python 2.7 with
numpy(1.12.1), cv2(2.4.9), PIL(4.3), matplotlib(2.1.0), cython(0.26.1), easydict
data/cityscape/
├── leftImg8bit/
│ ├── train/
│ ├── val/
│ └── test/
├── gtFine/
│ ├── train/
│ ├── val/
│ └── test/
└── imglists/
├── train.lst
├── val.lst
└── test.lst
3. Build MXNet with ROIAlign operator.
cp rcnn/CXX_OP/* incubator-mxnet/src/operator/
To build MXNet from source, please refer to the [tutorial](https://mxnet.incubator.apache.org/get_started/build_from_source.html).
4. Build related cython code.
make
5. Kick off training
bash scripts/train_alternate.sh
## Preparation for Evaluation
1. Prepare Cityscapes evaluation scripts.
bash scripts/download_cityscapescripts.sh
2. Eval
bash scripts/eval.sh
## Demo
1. Download model, available at [Dropbox](https://www.dropbox.com/s/zidcbbt7apwg3z6/final-0000.params?dl=0)/[BaiduYun](https://pan.baidu.com/s/1o8n4VMU), and place it in the model folder.
2. Make sure that you have the cityscapes data in 'data/cityscapes' folder.
bash scripts/demo.sh
```
Preparation for Training
(step1-step4)bash scripts/demo_single_image.sh
, you can change the image path in script demo_single_image.sh.Q: It says AttributeError: 'module' object has no attribute 'ROIAlign'
.
A: This is because either
or you install the wrong MXNet
Please print mxnet.__path__
to make sure you use correct MXNet
Q: I encounter incubator-mxnet/mshadow/mshadow/././././cuda/tensor_gpu-inl.cuh
at the begining. Check failed: err == cudaSuccess (7 vs. 0) Name: MapPlanKernel ErrStr:too many resources requested for launch
A: Please try adding MSHADOW_CFLAGS += -DMSHADOW_OLD_CUDA=1
in mxnet/mshadow/make/mshadow.mk
and re-compile MXNet.