mmdetection installation

REFERENCES:

1. mmdetection installation reference:https://blog.csdn.net/deeplearningfeng/article/details/105554547#commentBox

2. official tutorial:  https://github.com/open-mmlab/mmdetection/blob/master/demo/MMDet_Tutorial.ipynb

3. mmcv installation: https://github.com/open-mmlab/mmcv

INSTALLATION

1. ERROR:

return _bootstrap._gcd_import(name[level:], package, level)

ModuleNotFoundError: No module named 'mmcv._ext'package

package mmcv-full installation failed as the cuda cersion(10.0 here)

there is no instructions to install python package mmcv-full with cuda version 10.0.as you can see from mmcv project on github.

https://github.com/open-mmlab/mmcv

To solve the problem:

install cuda 10.1, cudnn 7.6.1

注意不要安装成了mmcv,要mmcv-full,可以直接pip install mmcv-full

 

2. Install PyTorch

conda install pytorch==1.5 cudatoolkit=10.1 torchvision -c pytorch

RUN DEMO

1.Download checkpoints:

wget -c https://open-mmlab.s3.ap-northeast-2.amazonaws.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth

2. Run demo.py

from mmdet.apis import inference_detector, init_detector, show_result_pyplot

# Choose to use a config and initialize the detector
config = '/home/liemars/maoz/mmdetection/configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco.py'
# Setup a checkpoint file to load
checkpoint = './mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth'
# initialize the detector
model = init_detector(config, checkpoint, device='cuda:0')

# Use the detector to do inference
img = './demo.jpg'
result = inference_detector(model, img)

# Let's plot the result
show_result_pyplot(model, img, result, score_thr=0.3)

TRAIN YOUR OWN NETWORK with VOC dataset

https://zhuanlan.zhihu.com/p/76191492

https://blog.csdn.net/syysyf99/article/details/96574325

1. config settings

2. training classes

3.evaluation classes

TRAIN Libra-rcnn on mmdetection

https://blog.csdn.net/summermaoz/article/details/107761453

你可能感兴趣的:(deep,learning)