iSmallNet环境配置
论文地址:iSmallNet: Multi-scale Nested Network with Label Decoupling for Infrared Small Target Detection
项目地址:https://github.com/huzhihen/iSmallNet
第一步:Pytorch环境搭建
1.1 安装pytorch环境
conda create -n pytorch-iSmallNet python=3.9
conda activate pytorch-iSmallNet
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
1.2 验证pytorch环境
python # 3.9.13
import torch
torch.__version__ # 1.12.0
torch.version.cuda # 11.3
torch.cuda.is_available() # True
exit()
第二步:安装其它包
2.1 安装其他包
conda install tqdm
conda install tensorboard
pip install opencv-python
pip install Pillow==6.2.2 --user
pip install scikit-image
2.2 安装apex
git clone https://github.com/NVIDIA/apex
cd apex
python setup.py install
第三步:克隆项目地址和下载数据集
3.1 克隆项目地址
git clone git@github.com:huzhihen/iSmallNet.git
3.2 下载数据集并存放到 data/ 文件夹下,组织成以下所示的结构
NUAA-SIRST
NUDT-SIRST
IRSTD-1k
iSmallNet
├── data
│ ├── NUAA-SIRST
│ │ ├── image
│ │ ├── mask
│ │ ├── train.txt
│ │ ├── test.txt
│ ├── NUDT-SIRST
│ │ ├── image
│ │ ├── mask
│ │ ├── train.txt
│ │ ├── test.txt
│ ├── IRSTD-1k
│ │ ├── image
│ │ ├── mask
│ │ ├── train.txt
│ │ ├── test.txt
├── eval
├── train
├── utils.py
第四步:训练、测试以及可视化
python utils.py --dataset [dataset-name]
python train.py --dataset [dataset-name]
python test.py --dataset [dataset-name]
python visualization.py --dataset [dataset-name]
python eval.py --dataset [dataset-name]
至此,iSmallNet环境配置完满结束!感谢大家的观看!