yolov5 and yolov4 Very similar

Mosaic Data enhancement

1, Read four pictures at a time .

2, Flip the four pictures separately , zoom , Gamut change, etc , And set it in four directions .
3, The combination of pictures and boxes

For small target detection effect is very good

Adaptive anchor frame calculation

stay Yolo In the algorithm , For different data sets , There will be anchor frames with initial length and width .

In network training , The network outputs the prediction frame based on the initial anchor frame , And then the real box groundtruth Compare , Calculate the difference between the two , Reverse update again , Iterative network parameters .

Therefore, the initial anchor frame is also an important part , such as Yolov5 stay Coco The initial anchor box on the dataset :

3) Adaptive image scaling

In the common target detection algorithm , Different pictures are different in length and width , Therefore, the common way is to scale the original image to a standard size , And then into the detection network .

such as Yolo Commonly used in algorithms 416*416,608*608 Equal size , For example, below 800*600 Zoom in and out of the image .

Yolov5 In the code of datasets.py Of letterbox Function , Adding least black edges adaptively to the original image .

Neck

Yolov5 current Neck and Yolov4 It's the same in China , All adopted FPN+PAN The structure of , But in Yolov5 When I first came out , Only used FPN structure , It was added later PAN structure , In addition, other parts of the network have also been adjusted .

therefore , Dabai is here Yolov5 When it was first proposed , A lot of structural drawings , They have all been readjusted .

Cost Function

YOLO The series loss calculation is based on objectness score, class probability score, and bounding box
regression score.

YOLO V5 use GIOU Loss As bounding box The loss of .

YOLO V5 Using binary cross entropy and Logits The loss function calculates the loss of class probability and target score . We can also use fl _ gamma Parameter to activate Focal
loss Calculating the loss function .

YOLO V4 use CIOU Loss As bounding box The loss of , Compared with other methods mentioned above ,CIOU It brings faster convergence and better performance .

 

 

Technology
©2019-2020 Toolsou All rights reserved,
Hikvision - Embedded software written test questions C Language application 0 The length of array in memory and structure is 0 In depth analysis data structure --- The preorder of binary tree , Middle order , Subsequent traversal How to do it ipad Transfer of medium and super large files to computer elementui Shuttle box el-transfer Display list content text too long 2019 The 10th Blue Bridge Cup C/C++ A Summary after the National Games ( Beijing Tourism summary )unity Shooting games , Implementation of first person camera python of numpy Module detailed explanation and application case Study notes 【STM32】 Digital steering gear Horizontal and vertical linkage pan tilt Vue Used in Element Open for the first time el-dialog Solution for not getting element