Skip to content

github98317/PanoDetNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PanoDetNet: Multi-Resolution Panoramic Object Detection with Adaptive Feature Attention

要求

Linux(推荐)
Python 3.7+
PyTorch ≥ 1.7
CUDA 9.0 或更高版本

安装

CUDA 驱动程序版本 ≥ CUDA 工具包版本(运行时版本)= torch.version.cuda

a. 创建 conda 虚拟环境并激活,例如,

conda create -n Py38_Torch1.10_cu11.3 python=3.8 -y
source activate Py38_Torch1.10_cu11.3

b. 确保您的 CUDA 运行时 API 版本 ≤ CUDA 驱动程序版本。(例如 11.3 ≤ 11.4)

nvcc -V
nvidia-smi

c. 按照官方说明安装 PyTorch 和 torchvision ,确保 cudatoolkit 版本与 CUDA 运行时 api 版本相同,例如,

pip3 install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
nvcc -V
python

import torch
torch.version.cuda
exit()

d.克隆 PanoDetNet 存储库

git clone https://github.com/github98317/PanoDetNet
cd PanoDetNet

e. 安装环境

pip install -r requirements.txt

f. 安装DCNv3

cd PanoDetNet/models/DCNv3/ops_dcnv3/
sh make.sh

准备自定义全景数据集——PanoDet

PanoDetNet
├── PanoDet
 └── images
   └── train
   ...
   └── val
   ...
   └── test
   ...
 └── labels
   └── train
   ...
   └── val
   ...
   └── test
   ...
  └── classes.txt
  └── test.txt
  └── train.txt
  └── val.txt

下载yolov7预训练模型到PanoDetNet/weights/

在YOLOv7的GitHub开源网址上下载yolov7预训练模型:https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt

训练

python train.py --img 1280 --batch 4 --epoch 100 --data data/PanoDet.yaml --cfg cfg/training/PanoDetNet.yaml --weights weights/yolov7.pt --device '0'

测试

python test.py --task 'val' --data data/PanoDet.yaml --img-size 1280 --weights 'runs/train/PanoDetNet/weights/best.pt' --device 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors