【solo】环境配置

发布于:2022-07-24 ⋅ 阅读:(930) ⋅ 点赞:(0)

此帖记录一下SOLO环境配置的过程以及一些问题和解决办法。

步骤

1.通过git下载SOLO源码

git clone https://github.com/WXinlong/SOLO.git
cd SOLO

在使用git命令时,anaconda prompt不能识别,但是cmd可以识别,对此直接conda install git(这一步真是费了好多时间)

2.安装依赖

pip install -r requirements/build.txt

3.安装pycocoapi

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

不能用下面这种,会出错

pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"

4.配置mmdet,最好和官方文档要求一致

pip install mmcv==0.2.16

5.cuda版本过高不行,比如我第一次时cuda11.3,后来换了cuda10.1,RTX30系列显卡好像不支持10.x,唉TAT。安装pytorch,这里参考了这篇文章cuda10.1+pytorch1.7配置centernet环境
配置清华镜像conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
安装pytorch

conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1

6.编译

python setup.py develop

7.环境测试(这一步参考【SOLO】环境配置(mmdetection=1.0.0+mmcv = 0.2.15)
SOLO目录下创建checkpoints文件夹,存入model文件,Decoupled_SOLO_R50_3x:

md checkpoints
cd checkpoints
copy C:\Users\admin\Downloads\DECOUPLED_SOLO_R50_3x.pth
cd..
cd demo
python inference_demo.py
demo_out.jpg

最后结果如图所示:在这里插入图片描述

本文含有隐藏内容,请 开通VIP 后查看

网站公告

今日签到

点亮在社区的每一天
去签到