[AI Combat] Small target detection model SSPNet--training environment built from scratch
Introduction to SSPNet
SSPNet: Scale Selection Pyramid Network for Tiny Person Detection from UAV Images
- Official link
https://github.com/MingboHong/SSPNet - arxiv
https://arxiv.org/abs/2107.01548
Environment build
The cuda of my machine is 10.2. According to your own cuda version, go to https://hub.docker.com/ to pull the corresponding image, and you
must pull the version image with devel
- Pull the gpu image
docker pull aegis1/cuda10.2-cudnn8-devel-ubuntu18.04:pcl
- create container
nvidia-docker run -it -d \
--name sspnet \
-v /bee/abc/test_model/:/notebooks \
-e TZ='Asia/Shanghai' \
--shm-size 16G \
-d aegis1/cuda10.2-cudnn8-devel-ubuntu18.04:pcl
- into the container
docker exec -it sspnet env LANG=C.UTF-8 /bin/bash
install dependencies
- Install Anaconda
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
ln -s /root/miniconda3/bin/conda /usr/bin/conda
- Create a py3.8 environment
conda create --name SSPNet python=3.8 -y
conda init
Exit the terminal
and enter the terminal again,
the following content will appear:
(base) root@1212:/#
- Enter our environment SSPNet
conda deactivate
conda activate SSPNet
As follows;
(SSPNet) root@1212:
- Install torch
my cuda is 10.02
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=10.2 -c pytorch
Other cuda versions can be installed according to
https://pytorch.org/get-started/previous-versions/
- install mim
pip install openmim
- Install mmcv-full
mim install mmcv-full==1.3.18
- Install cv2 dependencies
apt update
apt install libgl1-mesa-glx -y
- Install SSPNet
git clone https://github.com/MingboHong/SSPNet.git
cd SSPNet
pip install -r requirements.txt
python setup.py develop
【】Follow the above process to install step by step, you can run the model normally
reference
- https://github.com/MingboHong/SSPNet
- https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-mmcv
- https://mmdetection.readthedocs.io/zh_CN/latest/get_started.html
- https://github.com/open-mmlab/mim