Ubuntu18.04は、より高速なRCNNターゲット検出とマスクRCNNインスタンスセグメンテーションを実現するようにdetectron2を構成します(1)

1.背景紹介

2.環境要件

  • Ubuntu 18.04
  • CUDA10
  • pytorch == 1.3.0
  • torchvision == 0.4.1
  • pycocotools

3.インストール手順

3.1インストールの依存関係

  • ココアピ
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
  • Cython
pip install cython

3.2detectron2をインストールする

git clone https://github.com/facebookresearch/detectron2.git
cd detectron2 && python -m pip install -e .

4.インストールをテストします

インストールが完了したら、次のコマンドを入力して、インストールが成功したかどうかをテストできます。

python3 demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
  --input cat.jpg \
  --output result_cat.jpg \
  --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl

入力画像は次のとおりです。
cat.img
結果画像は次のとおりです。
result.jpg
テストは成功し、インストールが成功したことを示します。フレームワークは、さらなるトレーニング、テストなどに使用できます。

おすすめ

転載: blog.csdn.net/linghu8812/article/details/105701408