mmdection安裝、測試與調試


安裝過程直接按照官方的步驟安裝.

官方地址:https://github.com/open-mmlab/mmdetection

由於使用conda安裝,所以安裝成功后會在anaconda下創建mmdetection如圖1,我們所需要的東西在mmcv下的mmdetection下.

                 

                                                                       圖1

      

                                                                       圖2

 

安裝成功的另一種狀態

 

 

   安裝成功后進行測試可按照 此文章的方法

   faster_rcnn_r50_fpn_1x_20181010-3d1b3351.pth 下載地址 百度網盤鏈接mmdetection(密碼:dpyl).

報錯1:RuntimeError: CUDA out of memory. Tried to allocate 120.00 MiB (GPU 0; 3.81 GiB total capacity; 2.78 GiB already allocated; 76.19 MiB free; 132.42 MiB cached)

修改bach size對應cofig里imgs_per_gpu.

報錯2:urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)>導致下載不了

在代碼中添加

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

參考:https://www.freesion.com/article/5564134964/


報錯3:在run的時候完全正常,但debug時報錯且閃退,在程序運行到from mmdet.apis.inference import init_detector, inference_detector, show_result的時候直接閃退
顯示This application failed to start because it could not find or load the Qt platform plugin "xcb".

解決:我的pycharm使用的環境是在anaconda下創建的虛擬環境open-mmlab1.0 bin文件下的python
所以直接anaconda\plugins里的platforms文件夾拷貝到open-mmlab1.0下的bin文件夾里就行了,主要是需要跟用的python放在一起
參考:https://www.jianshu.com/p/c1be256d5b95?utm_source=oschina-app

報錯
4:如果在加載模型的時候報錯:比如storage..,則重新下載一個預訓練模型


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM