完璧!? Windowsでmask_rcnnを動かす
○環境
Windows10
Python 3.7.3
Anaconda 4.3.1 (64-bit)
tensorflow1.14.0
keras2.1.6
imaug0.4.0
numpy1.16.4
c:/~/> conda create -n r_cnn python=3.7.3
(r_cnn)c:/~/> git clone https://github.com/matterport/Mask_RCNN.git
*必要なライブラリを一括インストールするために
(r_cnn)c:/~/> cd Mask_RCNN
(r_cnn)c:/~/Mask_RCNN> pip install -r requirements.txt
(r_cnn)c:/~/Mask_RCNN> python setup.py install
●COCO APIのインストール
*サンプルプログラムを動かすにはpycocotoolsというモジュールが必要なので、こちらもクローンし、インストール
(r_cnn)c:/~/Mask_RCNN> git clone https://github.com/pdollar/coco.git
(r_cnn)c:/~/Mask_RCNN> cd coco/PythonAPI
setup.pyの
#14行目
#extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'],
#修正後
extra_compile_args=['-std=c99'],
(r_cnn)c:/~/Mask_RCNN/coco/PythonAPI> python setup.py install
●データセットのインストール
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
pip install tensorflow==1.14.0
(pip install tensorflow-gpu==1.3.0)
*必要であれば
keras2.1.6
imaug0.4.0
numpy1.16.4
もVersionをそろえてください。
●Jupyter Notebookのインストール
$ pip install jupyter
* jupyter notebookの立上げ(コマンド)
$ jupyter notebook
*cocoのエラーが出る場合【module not found)
pip install pycocotools-windows
https://www.j-world.co.jp/business/agri_it/agri_it_diary/2019/20190904s.html