# US 2022/0292311 A1 · Method for object detection and recognition based on neural network

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292311 A1
- Document ID: US20220292311A1
- Status: Published application
- Kind: A1
- Application number: 17/368,946
- Filed: 2021-07-07
- Published: 2022-09-15
- Earliest claimed: 2021-03-12
- Assignees: Dibi (Chongqing) Intelligent Technology Research Institute Co., Ltd.
- Applicants: Dibi (Chongqing) Intelligent Technology Research Institute Co., Ltd.
- Inventors: Yongduan Song; Shilei Tan; Li Huang; Ziqiang Jiang; Jian Liu; Lihui Tan
- Web page: https://patentgrep.com/patent/US20220292311A1

## CPC

- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06F 18/2415: based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06T 3/4046: using neural networks
- G06V 10/454: {Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]}
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

The present disclosure provides a method for object detection and recognition based on a neural network. The method includes: adding a detection layer following three detection layers of an existing YOLOv5 network model, to construct a new YOLOv5 network model; then, training the new YOLOv5 network model by considering an overlapping area between a predicted box and a ground truth box, a center-to-center distance between the two boxes, and an aspect ratio of the two boxes; and finally, inputting a to-be-detected image into the trained new YOLOv5 network model, outputting a predicted box of an object and probability values corresponding to a class to which the object belongs, and setting a class corresponding to a maximum probability value as a predicted class of the object in the to-be-detected image. This method can quickly and effectively detect multiple classes of objects. Especially, a detection effect for small objects is more ideal.

## Claims

### Claim 1

A method for object detection and recognition based on a neural network, comprising:
S100: constructing a new YOLOv5 network model by adding a detection layer following three detection layers of an existing YOLOv5 network model;
S200: training the new YOLOv5 network model, wherein a specific training process comprises:
S210: constructing a training data set: acquiring N images, resizing each of the images to make it suitable for model training, and labeling each of the images, to be specific, labeling the image with ground truth boxes and object class labels, wherein all of the labeled images constitute the training data set;
S220: setting thresholds for a center-to-center distance and an aspect ratio of the new YOLOv5 network model;
S230: initializing parameters in the new YOLOv5 network model;
inputting all samples of the training data set into the new YOLOv5 network model, performing calculation through a following formula:
s
i
=
{
s
i
,
IoU
-
R
CIoU
⁡
(
M
,
B
i
)
<
ɛ
0
,
IoU
-
R
CIoU
⁡
(
M
,
B
i
)
≥
ɛ
(
1
)
IoU represents an aspect ratio of a predicted box and a ground truth box, and is expressed by:
IoU
=

b
⋂
b
gt


b
⋃
b
gt

(
2
)
RCIoU represents a center-to-center distance between an overlapping area and the ground truth box, and is expressed by:
R
CIoU
=
ρ
2
⁡
(
b
,
b
gt
)
c
2
+
αμ
(
3
)
α
=
μ
(
1
-
IoU
)
+
μ
(
4
)
μ
=
4
π
2
⁢
(
arctan
⁢
⁢
ω
gt
h
gt
-
arctan
⁢
⁢
ω
h
)
2
(
5
)
where si represents a classification score of an object of each class, ε represents an artificially set NMS threshold, M represents a value of the predicted box with a highest score, Bi represents a list of the predicted boxes, b represents the predicted box, bgt represents the ground truth box, ρ2 (b, bgt) represents a center-to-center distance between the predicted box and the ground truth box, and is expressed by a diagonal length of a smallest enclosing rectangular box covering the predicted box and the ground truth box, ωgt and hgt respectively indicate width and height of the ground truth box, and ω and h respectively indicate width and height of the predicted box;
S240: during the training in S230, due to suppression problems of the predicted box, when a difference between IoU-CIoU of the predicted box M with the highest score and IoU-CIoU of another box Bi is less than the set threshold ε, keeping a score si of the box Bi unchanged; otherwise, directly changing si to 0, to filter out the predicted box; and
calculating loss functions, the loss functions include an object loss function, a class loss function, and a box loss function, performing repeated iterative training to minimize the loss functions, and obtaining optimal parameters of the network model; and
S300: detecting a to-be-detected image: resizing the to-be-detected image through the method in S210 and inputting resized images into the trained new YOLOv5 network model for prediction, outputting the predicted box of an object and probability values corresponding to a class to which the object belongs, and setting a class corresponding to a maximum probability value as a predicted class of the object in the to-be-detected image.

### Claim 2 (depends on 1)

The method for object detection and recognition based on a neural network according to claim 1, wherein when constructing the training data set in the S210, Mosaic data augmentation is performed on the N labeled images to increase a data amount of the training data set.
