NVIDIA JETSON原始环境python降版本(3.7->3.6)+torch1.6+torchvision0.7+mmcv1.2.4+mmdet1.10.0+运行SWIN demo(纯净版)

1.python降版本

sudo rm -rf /usr/bin/python

sudo ln -s /usr/bin/python3.6 /usr/bin/python

删除原始python版本(3.7)对应软链接

构建python3.6对应的软链接

2.torch1.6(科学上网)

JETSON官方适配torch版本下载https://www.elinux.org/Jetson_ZooNVIDIA JETSON原始环境python降版本(3.7->3.6)+torch1.6+torchvision0.7+mmcv1.2.4+mmdet1.10.0+运行SWIN demo(纯净版)_第1张图片

sudo apt-get install python3-pip libopenblas-base libopenmpi-dev

pip3 install Cython

pip3 install numpy torch-1.6.0-cp36-cp36m-linux_aarch64.whl

import torch报错Illegal instruction (core dumped)

 sudo gedit /etc/profile 
在末尾添加

export OPENBLAS_CORETYPE=ARMV8 

保存
source /etc/profile

3.torchvision0.7.0

A.换国内源(否则网速慢,且有可能断连接)

sudo apt-get install libjpeg-dev zlib1g-dev

git clone --branch v0.7.0 https://github.com/pytorch/vision guo

cd guo

sudo python3 setup.py instal

B.torvision版本下载

下载完成后更改文件名。

pip3 install torchvision-0.7.0-cp36-cp36m-linux_aarch64.whl

 4.上述环节验证

>>> import torch
>>> import torchvision
>>> torch.__version__
>>> torchvision.__version__
>>> torch.cuda.is_available()

5.mmcv1.2.4

pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6.0/index.html

6.mmdet2.10.0

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -v -e .

7.验证上述步骤

>>>import mmcv
>>>import mmdet

8.下载相应文件,放在第一层级文件夹内

mask_rcnn_swin_tiny_patch4_window7.pth

9.Swin-Transformer-Object-Detection运行demo报错KeyError:‘Swin Transformer is not in the backbone registry’

python setup.py develop

你可能感兴趣的:(linux,pytorch,深度学习,人工智能)