文章來源 | 恒源雲社群(專注人工智能/深度學習雲GPU伺服器訓練平台,618寵粉活動ing,官方體驗網址:https://gpushare.com/ )
MMCV 是一個面向計算機視覺的基礎庫,它支援了很多開源項目。
【注意事項】
RTX 3000 系列顯示卡在 PyTorch 1.8.1 (For CUDA 11.1) 上, MMCV 目前工作不正常,使用此系列顯示卡時,請選擇 PyTorch 1.7.1 版本鏡像。
平台 PyTorch 官方鏡像已經預裝了 mmcv-full 的包,大家可以直接安裝 OpenMMLab 其他的工具箱進行使用。
【MMDetection安裝】
MMDetection 是一個基于 PyTorch 的目标檢測開源工具箱。
MMDetection 對 MMCV 的版本要求,請檢視 Prerequisites。# 檢視 MMCV 版本
pip show mmcv-full | grep Version
git clone https://ghproxy.com/https://github.com/open-mmlab/mmdetection.git
cd mmdetection
# 根據 MMCV 的版本檢出支援的 MMDetection 版本
git checkout v2.13.0
# 安裝
pip install -r requirements/build.txt --no-cache
pip install -v -e . --no-cache
接下來,下載下傳一個模型檔案用于測試。mkdir checkpoints
cd checkpoints
curl -OL "http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth"
進入 JupyterLab,打開剛剛克隆下代碼中的 /root/mmdetection/demo/inference_demo.ipynb 記事本檔案。
點選菜單中的 運作 - 運作所有單元格 即可。