aiacademy: 深度學習 CNN GitHub: Mask-Rcnn 安裝
GitHub Mask_RCNN 安裝步驟 + 地雷小解 (環境不一樣,遇到狀況也不一樣)
- 我的作業系統
- OS: Windows 10
-
在 conda create new virtural envs
- conda craete -n
name
python=3.6.8
>> conda create -n mask_rcnn python=3.6.8 >> activate mask_rcnn
- conda craete -n
-
clone or download Mask R-CNN
-
跑 demo.ipynb 檔案
-
Run Mask_RCNN-master\samples\demo.ipynb
import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt # Root directory of the project ROOT_DIR = os.path.abspath("../") # Import Mask RCNN sys.path.append(ROOT_DIR) # To find local version of the library from mrcnn import utils import mrcnn.model as modellib from mrcnn import visualize # Import COCO config sys.path.append(os.path.join(ROOT_DIR, "samples/coco/")) # To find local version import coco %matplotlib inline # Directory to save logs and trained model MODEL_DIR = os.path.join(ROOT_DIR, "logs") # Local path to trained weights file COCO_MODEL_PATH = os.path.join(ROOT_DIR, "mask_rcnn_coco.h5") # Download COCO trained weights from Releases if needed if not os.path.exists(COCO_MODEL_PATH): utils.download_trained_weights(COCO_MODEL_PATH) # Directory of images to run detection on IMAGE_DIR = os.path.join(ROOT_DIR, "images")
- 遇到
ModuleNotFoundError: No module named 'pycocotools' mask rcnn
ModuleNotFoundError: No module named 'pycocotools' mask rcnn
-
要去 cocodataset/cocoapi,下載安裝 PythonAPI
- 在安裝 cocoapi 的時候遇到
invalid numeric argument '/Wno-cpp
- 這篇救了我
- 在安裝 cocoapi 的時候遇到
-
- 遇到
-
看成果!!!
-