深度学习-卷积神经网络--Mask RCNN-项目运行-63

目录

    1. git clone https://github.com/matterport/Mask_RCNN.git

    2. 创建虚拟环境
      python --version
      Python 3.7.5

      安装依赖 requirements.txt
      pip3 install imgaug

    3. 安装 jupyter工具
      jupyter 1.0.0
      jupyter_client 7.4.9
      jupyter-console 6.6.3
      jupyter_core 4.12.0
      jupyter-server 1.24.0
      jupyterlab-pygments 0.2.2
      jupyterlab_widgets 3.0.10

    4. 运行demo.ipynb笔记

      点击链接进入笔记

    5. 下载mask_rcnn_balloon.h5 放到项目根目录
      https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5

    6. pycocotools 准备
      git clone https://github.com/philferriere/cocoapi
      使用与上面相同的环境
      pip3 install Cython
      cd PythonAPI
      python setup.py bdist_wheel
      cd dist
      pip install pycocotools-2.0-cp37-cp37m-win_amd64.whl
      pip list检查一下是否安装ok

    7. 回到mask_rcnn项目
      demo.ipynb笔记 就可以一行行 跑完不报错
      最终会输出一张测试样例

    显示的时候加两个参数show_mask=False, show_bbox=False:
    visualize.display_instances(image, r['rois'], r['masks'], r['class_ids'],
    class_names, r['scores'], show_mask=False, show_bbox=False)
    则不显示框 也不显示mask

    posted @ 2024-04-02 16:41  jack-chen666  阅读(7)  评论(0编辑  收藏  举报