当前位置:网站首页>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 .
边栏推荐
- \Begin{algorithm} notes
- Leetcode 2194. Cellules dans une plage dans un tableau Excel (OK, résolu)
- Play kubernetes every 5 minutes summary
- latex表格 在线生成
- redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required
- STL——函数对象
- Unit sshd. service could not be found
- The C programming language (version 2) notes / 8 UNIX system interface / 8.5 instance (implementation of fopen and Getc functions)
- Double write consistency problem
- Token and idempotency
猜你喜欢

Some minor problems and solutions encountered when using ubantu

goland变成中文版了怎么修改回英文版

博士申请 | 新加坡国立大学Xinchao Wang老师招收图神经网络方向博士/博后

Male god goddess voting source code v5.5.21 voting source code

Leetcode 2194. Cells within a range in Excel table (yes, solved)
![[Hunan University] information sharing of the first and second postgraduate entrance examinations](/img/15/298ea6f7367741e1e085007c498e51.jpg)
[Hunan University] information sharing of the first and second postgraduate entrance examinations

About component value transfer

Uniapp壁纸小程序源码/双端微信抖音小程序源码

Google browser debugging skills

使用GCC的PGO(Profile-guided Optimization)优化整个系统
随机推荐
Latex table online generation
CVPR 2022 | meta learning performance in image regression task
Picture online collection and delivery system source code
How to play the map with key as assertion
Possible problems of long jump in gaussdb
CAS optimistic lock
canvas 高级功能(下)
从50亿图文中提取中文跨模态新基准Zero,奇虎360全新预训练框架超越多项SOTA
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required
Idea how to set the guide package without * sign
价值超高的CA证书解析
The C programming language (version 2) notes / 8 UNIX system interface / 8.5 instance (implementation of fopen and Getc functions)
C#期末复习编程题(老师猜的)
2022-2028 global press dehydrator industry research and trend analysis report
Modify the configuration of the router connected to your computer. The website is 192.168.1.1
STL——函数对象
Canvas advanced functions (Part 2)
\begin{algorithm} 笔记
Recommend 6 open source projects of yyds
uabntu的sudo