当前位置:网站首页>Record the use of yolov5 to detect rotating targets
Record the use of yolov5 to detect rotating targets
2022-06-12 16:59:00 【Jiangxiaobai JLJ】
Because the internship company needs to use the detection of rotating targets , So I learned relevant knowledge these days , And found a lot of information , Many detours have been spared . The whole implementation process of the project is recorded below .
I refer to the following bloggers :
The personal space of chicken stewing technology _ Bili, Bili _Bilibili
First , First create a virtual environment for the project
VS2015
pytorch 1.6.0
torchvision 0.7.0
Among them the VS2015,17,19 All versions are available , however pytorch and torchvision Must be the required version , Otherwise, it could go wrong . Proposed installation pytorch and torchvision The offline installation package is used for installation , More stable . Address ,
https://download.pytorch.org/whl/torch_stable.html
Then open Anaconda prompt Create a virtual environment for the project
conda create -n royolov5 python=3.8
conda activate yolov5
After entering the created virtual environment cd Go to download pytorch and torchvision Folder . And then execute
pip install torch-1.6.0+cu101-cp38-cp38-win_amd64.whl
pip install torchvision-0.7.0+cu101-cp38-cp38-win_amd64.whl
Note the suffix here .whl Don't forget to .
Come here , will pytorch The frame is set up .
next , Download the compressed package I sent , After decompressing , Again cd Get into YOLOv5_DOTA_OBB-master Home directory of project files
perform pip install -r requirements.txt Install the relevant package .
Again , add to E:\PytorchPro\YOLOv5_DOTA_OBB-master\swigwin-4.0.2 To path Inside , Here you need to refresh the system environment , You can choose to restart , You can also enter cmd, Input set path=c refresh
Again , stay Anaconda prompt Medium royolov5 In the environment cd Get into utils Run respectively
swig -c++ -python polyiou.i
python setup.py build_ext --inplace
Again , take E:\ProgramData\Anaconda3\envs\royolov5\Lib\site-packages\shapely\DLLs all dll Copied to the E:\ProgramData\Anaconda3\envs\royolov5\Library\bin
To this step , The training environment is basically ready , Now let's start preparing the data set required for the rotation target
First, use rolabelimg Rotate target dimension tool , How to use self Baidu . Download address
https://github.com/cgvict/roLabelImg
After labeling the image, you get xml Format , Here you need to convert the data format , accord with yolov5 Of txt Format
First , function roxml_to_data.py, Quasi switch to dota Of 8 Point data format
Again , Get into DOTA_devkit_YOLO-master, modify DOTA_devkit_YOLO-master\dota_utils.py Medium classnames_v1_5, Modify the type of data marked for you

Again , Run respectively PaddingPIC.py and YOLO_Transform.py
among ,PaddingPIC.py The function of is to expand the picture to the same height and width , Easy data processing .YOLO_Transform.py The role of the dota The data format of is converted to yolov5 Data format .
Again , take yolov5 Pictures and... For training txt Put the files into DOTA_demo_view In a folder images and labels in

Revise data\DOTA_ROTATED.yaml in nc and names, Or write it yourself yaml file
You can modify the network model yaml file , If not, use the official yaml Just file
Finally, don't forget to download the weight file , Pay attention here , Because this project is based on v5-3.1 Version of , therefore , The latest weight file cannot be downloaded pt file , Otherwise, it will report a mistake .
Last , Just start training .
边栏推荐
- Uniapp壁纸小程序源码/双端微信抖音小程序源码
- 大端模式和小端模式的区别
- Exception assertion of assertj
- Anyone who watches "Meng Hua Lu" should try this Tiktok effect
- Possible problems of long jump in gaussdb
- RMI, JNDI, LDAP introduction +log4j vulnerability analysis
- C#期末复习编程题(老师猜的)
- Recommend AI intelligent drawing repair software
- MySQL提权总结
- Is the securities account opened by qiniu safe? Is it legal?
猜你喜欢

Information outline recording tool: omnioutliner 5 Pro Chinese version

How to play the map with key as assertion

修改自己电脑连接的路由器的配置网址192.168.1.1

JVM内存模型与本地内存

图片在线收款发货系统源码

初识GO语言

D. master router setting and 401 networking

Gerrit+2触发Jenkins任务

The C programming language (version 2) notes / 8 UNIX system interface / 8.7 instance (storage allocator)

两位新晋Committer的“升级攻略”
随机推荐
修改自己电脑连接的路由器的配置网址192.168.1.1
\Begin{algorithm} notes
Go的变量
[Hunan University] information sharing of the first and second postgraduate entrance examinations
Structural requirement analysis of software engineering student information management system
Google browser debugging skills
idea如何设置导包不带*号
Uniapp壁纸小程序源码/双端微信抖音小程序源码
Mongodb learning and sorting (basic command learning of users, databases, collections and documents)
Information outline recording tool: omnioutliner 5 Pro Chinese version
MongoDB 学习整理(用户,数据库,集合,文档 的基础命令学习)
Unit sshd.service could not be found
云开发坤坤鸡乐盒微信小程序源码
Large scale real-time quantile calculation -- a brief history of quantitative sketches
How to use the official documents of pytorch and torchvision
Leetcode 2194. Excel 表中某个范围内的单元格(可以,已解决)
\Begin{algorithm} notes
Loading shellcode in C and go languages
Preprocessing command section 3
(五)输出和输出