CN111931573A - Helmet detection and early warning method based on YOLO evolution deep learning model - Google Patents

Helmet detection and early warning method based on YOLO evolution deep learning model Download PDF

Info

Publication number
CN111931573A
CN111931573A CN202010644553.6A CN202010644553A CN111931573A CN 111931573 A CN111931573 A CN 111931573A CN 202010644553 A CN202010644553 A CN 202010644553A CN 111931573 A CN111931573 A CN 111931573A
Authority
CN
China
Prior art keywords
yolo
deep learning
learning model
target
responsible
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010644553.6A
Other languages
Chinese (zh)
Inventor
罗旺
席丁鼎
白义传
胡牧
徐华荣
郝运河
张佩
吴超
娄超
夏源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nari Information and Communication Technology Co
Original Assignee
Nari Information and Communication Technology Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nari Information and Communication Technology Co filed Critical Nari Information and Communication Technology Co
Priority to CN202010644553.6A priority Critical patent/CN111931573A/en
Publication of CN111931573A publication Critical patent/CN111931573A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames

Abstract

The invention discloses a helmet detection and early warning method based on a YOLO evolution deep learning model in the technical field of computer vision image processing, and aims to solve the technical problems that in the prior art, whether a pedestrian wears a helmet or not in an industrial production environment is detected and early warned in a manual mode, the efficiency is low, the effect is poor, and the actual demand cannot be met. The method comprises the following steps: inputting a target video image acquired in real time into a pre-trained YOLO evolution deep learning model, and marking a human body without a safety helmet in the target video image; and sending out an early warning signal to the marked human body.

Description

Helmet detection and early warning method based on YOLO evolution deep learning model
Technical Field
The invention relates to a helmet detection and early warning method based on a YOLO evolution deep learning model, and belongs to the technical field of computer vision image processing.
Background
With the rapid development of socioeconomic and industrial scales, pedestrian safety is receiving more and more extensive attention in industrial production environments. At present, the most important safety measure is that pedestrians must wear safety helmets in an industrial production environment, and meanwhile, a video monitoring system is used for detecting and early warning to remind pedestrians who do not wear the safety helmets in time.
The video monitoring method usually only utilizes the real-time browsing function of the video, and finally needs to rely on naked eye identification and judgment. For large-scale industrial production environment, because manual uninterrupted observation is needed, a large amount of manpower and material resources are consumed, the efficiency is low, the influence of the surrounding environment is very easily caused, especially, when light is poor or the human body is tired due to long-time observation, the detection effect can be directly influenced, and the current requirement cannot be met.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a helmet detection and early warning method based on a YOLO evolution deep learning model, so as to solve the technical problems that in the prior art, whether a pedestrian wears a helmet or not in an industrial production environment is detected and early warned in a manual mode, the efficiency is low, the effect is poor, and the actual requirements cannot be met.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a helmet detection and early warning method based on a YOLO evolution deep learning model comprises the following steps:
inputting a target video image acquired in real time into a pre-trained YOLO evolution deep learning model, and marking a human body without a safety helmet in the target video image;
and sending out an early warning signal to the marked human body.
Further, the method for training the YOLO evolution deep learning model includes:
decomposing a video image acquired in advance frame by frame into picture samples;
adding a label to the safety helmet in the picture sample;
and training the YOLO evolution deep learning model by using the picture sample added with the label with the minimum pre-constructed loss function as a target.
Further, before the step of tagging the safety helmet in the picture sample, the method further comprises the following steps: preprocessing the picture samples, wherein the preprocessing comprises deleting invalid pictures in the picture samples, and the invalid pictures comprise the picture samples without safety helmets.
Further, when training the YOLO evolution deep learning model, the method further includes: and performing HSV color space conversion on the recognition result of the image sample by using the YOLO evolution deep learning model.
Further, the loss function is expressed as follows:
Figure BDA0002572667210000021
in the formula, λcoordTo locate lost weights, λnoobjThe confidence loss weight of a grid containing no target, S is the length (or width) of the grid, B is the number of predicted frames of the grid, xiPredicted value of the abscissa of the center point of the target frame, y, for which the grid is responsibleiPredicted value of the ordinate of the center point of the target frame, w, for which the grid is responsibleiPredicted value of the width of the target frame for which the grid is responsible, hiPredicted value of the height of the target frame for which the grid is responsible, CiIs supported by the gridWhether the object box of interest contains a confidence value, p, of the objecti(c) The class probability of the predicted target for the ith mesh,
Figure BDA0002572667210000022
the real value of the abscissa of the center point of the target frame for which the mesh is responsible,
Figure BDA0002572667210000023
the real value of the ordinate of the center point of the target frame responsible for the grid,
Figure BDA0002572667210000024
the true value of the width of the target box for which the mesh is responsible,
Figure BDA0002572667210000025
for the true value of the target box height for which the mesh is responsible,
Figure BDA0002572667210000026
as to whether the ith mesh contains a confidence value for the target,
Figure BDA0002572667210000027
the class of the target box for which the mesh is responsible is probabilistic,
Figure BDA0002572667210000028
whether the jth anchor box for the ith mesh is responsible for this goal,
Figure BDA0002572667210000031
the jth anchor box for the ith mesh is not responsible for this goal,
Figure BDA0002572667210000032
classes predict all object classes for the ith mesh, if the ith mesh contains an object.
Further, the YOLO evolutionary deep learning model adopts a Yolov3 network.
Further, the adoption method of the Yolov3 network comprises the following steps:
adding safety caps in classification categories of the Yolov3 network;
helmet-independent categories in the Yolov3 network were shielded.
Compared with the prior art, the invention has the following beneficial effects: adding a safety helmet in the classification category of the Yolov3 network, performing HSV color space conversion on the recognition result of the picture sample to avoid the false detection of the head of a person as the safety helmet, inputting a target video image acquired in real time into a pre-trained Yolov3 network, marking a human body without the safety helmet in the target video image, and sending an early warning signal to the marked human body. The method creatively introduces a novel technology of deep learning, accurately judges whether the pedestrian wears the safety helmet in the video by utilizing the deep learning and carries out early warning.
Drawings
FIG. 1 is a schematic flow diagram of an embodiment of the method of the present invention;
fig. 2 is a schematic structural diagram of the Yolov3 network in the embodiment of the method of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The invention provides a helmet detection and early warning method based on a YOLO evolution deep learning model, which is a flow schematic diagram of an embodiment of the method as shown in FIG. 1 and comprises the following steps:
step (1), training image preprocessing scheme
The method is based on a YOLO evolution deep learning model, and the learning is supervised learning, so that the acquired training images need to be preprocessed. After obtaining video image data obtained from an industrial production environment, the following work is mainly done:
firstly, decomposing the obtained video image data into a frame-by-frame picture sample for training a YOLO evolution deep learning model;
then, screening multiple picture samples, and deleting invalid data in the picture samples, such as pictures without safety helmets, so as to prevent the training effect from being poor;
and finally, marking the picture samples, and adding a label to the safety helmet in each picture, so that the YOLO evolution deep learning model can be identified.
Step (2), a YOLO evolution deep learning model scheme
In this embodiment, the YOLO evolutionary deep learning model adopts a YOLO 3 network, which is an evolutionary version of the YOLO network, and the YOLO converts a target detection problem into a regression problem, and gives an input image, and directly regresses a bounding box of a target and a classification category thereof at a plurality of positions of the image. And extracting features by adopting a convolutional network, then obtaining a predicted value by using a full-link layer, adopting a ReLU activation function for the convolutional layer and the full-link layer, and adopting a linear activation function for the last layer. And Yolov3 adds three innovation points on the basis of Yolo: the first uses a pyramid network; secondly, replacing Softmax Loss with Logistic Loss; third, the network architecture uses Darknet 53. Specifically, as shown in fig. 2, it is a schematic structural diagram of the Yolov3 network in the method embodiment of the present invention. An important technical feature of the method embodiment of the present invention is that a Yolov3 network is modified, which mainly includes the following two steps:
(1) on the basis of the original classification, the safety helmet is added. Since there are currently no helmets in the classification category of Yolov3, the present embodiment inventively proposes to use Yolov3 to detect helmets;
(2) and modifying the Yolov3 network, completely shielding the categories irrelevant to the safety helmet in the original Yolov3 network, and not detecting, thereby being beneficial to greatly reducing the calculation complexity.
Step (3), training the Yolov3 network
And (2) putting the image sample marked with the label in the step (1) into a Yolov3 network for training, obtaining a training weight through continuous iteration by taking the minimum pre-constructed loss function as a target, and inputting test data under a weight file for verification. The loss function is expressed as follows:
Figure BDA0002572667210000051
in the formula, λcoordTo locate lost weights, λnoobjThe confidence loss weight of a grid containing no target, S is the length (or width) of the grid, B is the number of predicted frames of the grid, xiPredicted value of the abscissa of the center point of the target frame, y, for which the grid is responsibleiPredicted value of the ordinate of the center point of the target frame, w, for which the grid is responsibleiPredicted value of the width of the target frame for which the grid is responsible, hiPredicted value of the height of the target frame for which the grid is responsible, CiConfidence value, p, of whether the target box for which the grid is responsible contains a targeti(c) The class probability of the predicted target for the ith mesh,
Figure BDA0002572667210000052
the real value of the abscissa of the center point of the target frame for which the mesh is responsible,
Figure BDA0002572667210000053
the real value of the ordinate of the center point of the target frame responsible for the grid,
Figure BDA0002572667210000054
the true value of the width of the target box for which the mesh is responsible,
Figure BDA0002572667210000055
for the true value of the target box height for which the mesh is responsible,
Figure BDA0002572667210000056
as to whether the ith mesh contains a confidence value for the target,
Figure BDA0002572667210000057
the class of the target box for which the mesh is responsible is probabilistic,
Figure BDA0002572667210000058
whether the jth anchor box for the ith mesh is responsible for this goal,
Figure BDA0002572667210000059
the jth anchor box for the ith mesh is not responsible for this goal,
Figure BDA00025726672100000510
classes predict all object classes for the ith mesh, if the ith mesh contains an object.
More specifically, the first row is a prediction of box center coordinates (x, y), the second row is a prediction of width and height, with the root of the width and height instead of the original width and height, which is done primarily because the same width and height errors affect a small target accuracy more than a large target; the third row is a prediction of confidence of the bounding box containing the target, the fourth row is a prediction of confidence of the bounding box containing no target, and the fifth row is a prediction of the class.
λcoordAnd λnoobjIs used for balancing the network unbalance problem, and endows small pass weight with lambda to the confidence pass of box without objectnoobjCorresponding confidence loss of box with object, given large loss weight lambdacoord. Wherein the content of the first and second substances,
Figure BDA0002572667210000061
Figure BDA0002572667210000062
and in the training process, performing HSV color space conversion on the recognition result of the image sample by using the YOLO evolution deep learning model. Since the head of a person is mistakenly detected as a safety helmet and the hair of the person is generally black, the black part is shielded by the HSV color space, which requires the accuracy of threshold division of the HSV color space, otherwise false detection and missing detection may be caused.
Step (4), inputting the target video image obtained in real time into a trained YOLO evolution deep learning model, namely a classifier of a Yolov3 network, and marking a human body without wearing a safety helmet in the target video image, so as to effectively judge whether the human body in the video wears the safety helmet or not; and sends out early warning signals to the marked human body without wearing the safety helmet, and the reminder wears the safety helmet.
The embodiment of the method creatively introduces a novel technology of deep learning, accurately judges whether pedestrians wear safety helmets in videos by utilizing the deep learning and carries out early warning, is slightly influenced by the environment, and liberates manpower and material resources.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (7)

1. A safety helmet detection and early warning method based on a YOLO evolution deep learning model is characterized by comprising the following steps:
inputting a target video image acquired in real time into a pre-trained YOLO evolution deep learning model, and marking a human body without a safety helmet in the target video image;
and sending out an early warning signal to the marked human body.
2. The method for detecting and warning a helmet based on a YOLO evolutionary deep learning model of claim 1, wherein the method for training the YOLO evolutionary deep learning model comprises the following steps:
decomposing a video image acquired in advance frame by frame into picture samples;
adding a label to the safety helmet in the picture sample;
and training the YOLO evolution deep learning model by using the picture sample added with the label with the minimum pre-constructed loss function as a target.
3. The method for detecting and warning safety helmets based on the YOLO evolution deep learning model as claimed in claim 2, wherein before the step of tagging the safety helmets in the picture sample, the method further comprises: preprocessing the picture samples, wherein the preprocessing comprises deleting invalid pictures in the picture samples, and the invalid pictures comprise the picture samples without safety helmets.
4. The method for detecting and warning a helmet based on a YOLO evolutionary deep learning model of claim 2, wherein when the YOLO evolutionary deep learning model is trained, the method further comprises: and performing HSV color space conversion on the recognition result of the image sample by using the YOLO evolution deep learning model.
5. The method for detecting and warning safety helmets based on the YOLO evolution deep learning model as claimed in claim 2, wherein the loss function has the following expression:
Figure FDA0002572667200000021
in the formula, λcoordTo locate lost weights, λnoobjThe confidence loss weight of a grid containing no target, S is the length (or width) of the grid, B is the number of predicted frames of the grid, xiPredicted value of the abscissa of the center point of the target frame, y, for which the grid is responsibleiPredicted value of the ordinate of the center point of the target frame, w, for which the grid is responsibleiPredicted value of the width of the target frame for which the grid is responsible, hiPredicted value of the height of the target frame for which the grid is responsible, CiConfidence value, p, of whether the target box for which the grid is responsible contains a targeti(c) The class probability of the predicted target for the ith mesh,
Figure FDA0002572667200000022
real value of abscissa of center point of target frame for the mesh,
Figure FDA0002572667200000023
The real value of the ordinate of the center point of the target frame responsible for the grid,
Figure FDA0002572667200000024
the true value of the width of the target box for which the mesh is responsible,
Figure FDA0002572667200000025
for the true value of the target box height for which the mesh is responsible,
Figure FDA0002572667200000026
as to whether the ith mesh contains a confidence value for the target,
Figure FDA0002572667200000027
the class of the target box for which the mesh is responsible is probabilistic,
Figure FDA0002572667200000028
whether the jth anchor box for the ith mesh is responsible for this goal,
Figure FDA0002572667200000029
the jth anchor box for the ith mesh is not responsible for this goal,
Figure FDA00025726672000000210
classes predict all object classes for the ith mesh, if the ith mesh contains an object.
6. The helmet detection and early warning method based on the YOLO evolutionary deep learning model of claim 1, wherein the YOLO evolutionary deep learning model adopts a Yolov3 network.
7. The method for detecting and early warning of safety helmets based on the Yolo evolution deep learning model as claimed in claim 6, wherein the method for adopting the Yolov3 network comprises:
adding safety caps in classification categories of the Yolov3 network;
helmet-independent categories in the Yolov3 network were shielded.
CN202010644553.6A 2020-07-07 2020-07-07 Helmet detection and early warning method based on YOLO evolution deep learning model Pending CN111931573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010644553.6A CN111931573A (en) 2020-07-07 2020-07-07 Helmet detection and early warning method based on YOLO evolution deep learning model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010644553.6A CN111931573A (en) 2020-07-07 2020-07-07 Helmet detection and early warning method based on YOLO evolution deep learning model

Publications (1)

Publication Number Publication Date
CN111931573A true CN111931573A (en) 2020-11-13

Family

ID=73312750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010644553.6A Pending CN111931573A (en) 2020-07-07 2020-07-07 Helmet detection and early warning method based on YOLO evolution deep learning model

Country Status (1)

Country Link
CN (1) CN111931573A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297900A (en) * 2021-04-02 2021-08-24 中国地质大学(武汉) Method, device, equipment and storage medium for identifying video stream safety helmet based on YOLO
CN113486860A (en) * 2021-08-03 2021-10-08 云南大学 YOLOv 5-based safety protector wearing detection method and system
CN116229570A (en) * 2023-02-21 2023-06-06 四川轻化工大学 Aloft work personnel behavior situation identification method based on machine vision

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110796049A (en) * 2019-10-18 2020-02-14 国家电网有限公司 Production worker safety helmet wearing detection method and system based on image processing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110796049A (en) * 2019-10-18 2020-02-14 国家电网有限公司 Production worker safety helmet wearing detection method and system based on image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林俊 等: "基于YOLO的安全帽检测方法", 《计算机系统应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297900A (en) * 2021-04-02 2021-08-24 中国地质大学(武汉) Method, device, equipment and storage medium for identifying video stream safety helmet based on YOLO
CN113486860A (en) * 2021-08-03 2021-10-08 云南大学 YOLOv 5-based safety protector wearing detection method and system
CN116229570A (en) * 2023-02-21 2023-06-06 四川轻化工大学 Aloft work personnel behavior situation identification method based on machine vision
CN116229570B (en) * 2023-02-21 2024-01-23 四川轻化工大学 Aloft work personnel behavior situation identification method based on machine vision

Similar Documents

Publication Publication Date Title
CN111931573A (en) Helmet detection and early warning method based on YOLO evolution deep learning model
CN111898514B (en) Multi-target visual supervision method based on target detection and action recognition
CN108596221B (en) Image recognition method and device for scale reading
CN110263686A (en) A kind of construction site safety of image cap detection method based on deep learning
CN111881730A (en) Wearing detection method for on-site safety helmet of thermal power plant
CN112163469B (en) Smoking behavior recognition method, system, equipment and readable storage medium
CN110826514A (en) Construction site violation intelligent identification method based on deep learning
CN113553977B (en) Improved YOLO V5-based safety helmet detection method and system
CN110222672A (en) The safety cap of construction site wears detection method, device, equipment and storage medium
CN111144262A (en) Process anomaly detection method based on monitoring video
Xie et al. A convolutional neural network based approach towards real-time hard hat detection
CN110569843B (en) Intelligent detection and identification method for mine target
CN108197575A (en) A kind of abnormal behaviour recognition methods detected based on target detection and bone point and device
CN113139500B (en) Smoke detection method, system, medium and equipment
CN113516076A (en) Improved lightweight YOLO v4 safety protection detection method based on attention mechanism
CN108664875A (en) Underground belt-conveying monitoring method based on image recognition
CN115761537A (en) Power transmission line foreign matter intrusion identification method oriented to dynamic characteristic supplement mechanism
CN116052082A (en) Power distribution station room anomaly detection method and device based on deep learning algorithm
CN113158993B (en) Method for creating wearing recognition model of multi-scene reflective vest and related components
CN110991245A (en) Real-time smoke detection method based on deep learning and optical flow method
CN104077571A (en) Method for detecting abnormal behavior of throng by adopting single-class serialization model
CN112183532A (en) Safety helmet identification method based on weak supervision collaborative learning algorithm and storage medium
CN105631410B (en) A kind of classroom detection method based on intelligent video processing technique
CN116385962A (en) Personnel monitoring system in corridor based on machine vision and method thereof
US20230186634A1 (en) Vision-based monitoring of site safety compliance based on worker re-identification and personal protective equipment classification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201113

RJ01 Rejection of invention patent application after publication