Ubuntu18.04 configures the Swin Transformer environment

1. Install pytorch

pip install torch==1.8.1 -i https://pypi.douban.com/simple/
pip install torchvision==0.9.1 -i https://pypi.douban.com/simple/

2. Install mmcv (cuda and torch version numbers can be modified by yourself)

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.1/index.html

3. Install mmdetection

cd '/home/xzz/Swin-Transformer-Object-Detection-master'
 pip install -r requirements.txt -i https://pypi.douban.com/simple/
python setup.py develop

4. Install apex

cd apex-master
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .

Or download it yourself:

git clone  https://github.com/NVIDIA/apex
cd apex
python setup.py install --cpp_ext

5. run

python demo/image_demo.py demo/demo.jpg configs/swin/mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_adamw_3x_coco.py mask_rcnn_swin_tiny_patch4_window7.pth

Guess you like

Origin blog.csdn.net/qq_45752541/article/details/119979305