先下載開源碼
https://github.com/matterport/Mask_RCNN
解壓縮到某一個硬碟
下載已經訓練好的權重 :
https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5
放到剛剛的資料夾,通常是Mask_RCNN-master
安裝必要的包
conda create -n MaskRCNN python=3.6
activate Maskrcnn
pip install tensorflow==1.6.0
pip install numpy==1.18.1
pip install opencv-python
pip install keras==2.1.6
pip install scipy
pip install matplotlib
pip install imgaug
pip install Cython
pip install scikit-image
https://docs.floydhub.com/guides/environments/
如果imgaug安裝失敗, 傳送門
下載Pycocotools
https://github.com/philferriere/cocoapi
把Pycocotools解壓縮到MASK_RCNN資料夾下
進入cocoapi-master\PythonAPI輸入
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
不過要記得先安裝git
如果這裡有問題, 可以參考我之前的文章
傳送門 :
然後在Mask_RCNN-master目錄下輸入:
python setup.py install
看到成功就OK了~
然後打開jupyter notebook
打開sample\demo.py
一步一步運行就可以得到這樣的結果
留言列表