安装配置 cvpods 框架

 

目录

1.手动配置 (cpu版本的torch)

2.第二次配置 (torch版本低了)

3. 第三次配置


1.手动配置 (cpu版本的torch)

conda install numpy tqdm termcolor
pip install docutils>=0.14
pip install Sphinx==3.0.0
pip install recommonmark==0.4.0
pip install sphinx_rtd_theme catalyst-sphinx-theme sphinx-markdown-tables
pip install mock matplotlib yacs  
pip install tabulate cloudpickle
pip install Pillow==6.2.2
pip install future requests six colorama
pip install easydict lvis
pip install https://download.pytorch.org/whl/cpu/torch-1.5.0%2Bcpu-cp37-cp37m-linux_x86_64.whl
pip install https://download.pytorch.org/whl/cpu/torchvision-0.6.0%2Bcpu-cp37-cp37m-linux_x86_64.whl

他这个应该是cpu版本的torch

2.第二次配置 (torch版本低了)

(cvpods) root@aaa:~/data/zjx/cvpods1# git clone https://github.com/Megvii-BaseDetection/cvpods.git
-bash: git: command not found

出现问题,解决如下

apt-get update
apt-get install -y git
(cvpods) root@aaa:~/data/zjx/cvpods1# git clone https://github.com/Megvii-BaseDetection/cvpods.git
Cloning into 'cvpods'...
fatal: unable to access 'https://github.com/Megvii-BaseDetection/cvpods.git/': Failed to connect to github.com port 443: Connection timed out

解决方法:

当时是在云端执行的这个,在CSDN上直接搜这个错误就行,但是试了很多都不行,然后就启动了本地的Linux系统,运行时报错

lingyun@lingyun:~/models/cvpods$ git clone https://github.com/Megvii-BaseDetection/cvpods.git
Cloning into 'cvpods'...
fatal: unable to access 'https://github.com/Megvii-BaseDetection/cvpods.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.

解决方法

git clone --recursive https://github.com/Megvii-BaseDetection/cvpods.git

或者直接去github下载压缩包然后解压也可以

然后安装torch等

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
pip install torch==1.12.0 torchvision==0.13.0 
python3 -m pip install -e cvpods

3. 第三次配置

下载然后解压好cvpods,在cvpods的上层目录下执行下列语句

conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.1
python3 -m pip install -e cvpods

先在cvpods数据集下面建立coco文件夹,并在此下面建立软连接,格式如下

安装配置 cvpods 框架_第1张图片

训练测试:以DeFCN为例 。下载解压好后然后直接把 DeFCN-main 文件夹复制过来,可以放在与cvpods平行的文件夹下

然后根据github官网在对应的config文件夹下执行下面语句即可

pods_train --num-gpus 1 --dir ~/data/zjx/cvpods1/DeFCN-main/playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.3dmf

你可能感兴趣的:(python,开发语言,深度学习,pytorch)