A helmet wearing detection method based on squeeze-excitation residual network to improve YOLOv3
By introducing the extrusion excitation network and GIoU loss function in YOLOv3, feature extraction and loss calculation are improved, and the problem of poor detection effect of small and medium-sized safety helmet detection technology is solved, which improves detection accuracy and robustness.
Patent Information
- Application Number
- CN202210081802.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-01-24
AI Technical Summary
The existing safety helmet detection technology has problems such as complex processing process, weak robustness, susceptibility to noise interference, low detection efficiency and poor small target recognition effect. Especially in the complex context, the YOLOv3 algorithm has poor effect on small target detection. .
Improve YOLOv3 by introducing an extrusion excitation residual network, increasing the useful weight and upsampling detection scale of feature channels, and adding GIoU ideas to the loss function to improve feature extraction capabilities and detection accuracy.
It significantly improves the small object detection effect in the safety helmet wear detection task, and enhances the robustness and detection accuracy for complex backgrounds.
Smart Images

Figure CN114882389B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of helmet detection, and in particular to a helmet wearing detection method based on a squeeze excitation residual network to improve YOLOv3. Background Art
[0002] With the vigorous development of my country's infrastructure, safety in production has become increasingly important. In the process of safety in production, wearing a helmet is a basic safety measure that can protect the head of workers at critical moments of danger to avoid many fatal injuries. In the past, traditional helmet inspection work mainly relied on the supervision and inspection of safety management personnel, which was time-consuming, labor-intensive, costly and inefficient.
[0003] Early helmet detection technology was mainly based on image processing technology. It extracted features of images by identifying some physical characteristics such as the shape and color of the helmet and performing wavelet transform. Then, the images were classified according to the geometric and texture features of the graphics, and the entire image was structurally analyzed. Usually, before recognition, the image must be preprocessed, including filtering out noise and interference, improving contrast, enhancing edges, and geometric correction. However, this type of method has the disadvantages of complex processing, weak robustness, easy interference from noise, and poor recognition of small targets.
[0004] In recent years, as artificial intelligence and deep learning technologies have gradually matured and have wide applicability, they have provided a new research perspective for the intelligent detection of helmets. Currently, there are two main types of implementation algorithms that are widely used: one is the Two-Stage algorithm represented by R-CNN. The advantage of this type of detection algorithm is that the detection accuracy is higher, but the disadvantage is that the detection speed is slow, so that the Fast R-CNN algorithm and the Faster R-CNN algorithm were derived based on R-CNN. The other is the One-Stage algorithm represented by YOLO, which is characterized by sacrificing a small part of the accuracy to greatly improve the detection speed.
[0005] The YOLO v3 algorithm has improved the YOLO v1 and YOLO v2 algorithms: it uses a deeper feature extraction network Darknet-53; it uses three scales of features, large, medium and small, for detection frame prediction, and increases the number of anchors. Therefore, its detection accuracy has been significantly improved. However, the YOLO v3 target detection algorithm still has some problems: ① The features extracted by the main structure feature extraction network are not fully utilized, and the feature extraction for small targets is not accurate enough; ② The detection effect of small target detection tasks such as helmet wearing is not good; ③ Small targets are easily disturbed by complex background noise. In a complex background, the few pixels of a small target are easily blocked by other objects or merged with other objects, resulting in unclear edge contrast; ④ The edge information of the small target itself is blurred, and its semantic information is seriously lost after the convolution operation. After multiple downsampling, the features of the large receptive field basically no longer contain the semantic information of the small target. Summary of the invention
[0006] The purpose of the present invention is to provide a helmet wearing detection method based on a squeeze excitation residual network to improve YOLOv3, so as to solve the problems in the background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for detecting helmet wearing based on improved YOLOv3 using a squeeze excitation residual network comprises the following steps: Step 1: collecting and making a helmet data set: obtaining images and effective information of helmets, images of people wearing helmets, and capturing video frames of effective samples in monitoring videos of construction sites; Step 2: image annotation and data preprocessing: data preprocessing of the collected original data set includes: screening effective images and removing images that do not meet training conditions; dimensionality reduction and compression processing of images with too large pixels; making corresponding adjustments to the image size, selecting images one by one by running LabelImg and performing box classification annotation to form an XML file; Step 3: improving the SE-YOLO v3 algorithm: improving the network structure of feature extraction for helmet wearing detection and improving the YOLOv3 loss function based on GIoU; Step 4: model training: defining an initialized Darknet-53 network through the helmet wearing data set established above, inputting labeled and preprocessed image data, setting hyperparameters of the training network, and training and optimizing the improved SE-YOLOv3 helmet wearing detection model on this basis; Step 5: deploying the model on the Web: choosing to deploy the model on the Web.
[0009] On the basis of the above technical solution, the present invention also provides the following optional technical solution:
[0010] In an optional solution: the step 1 of collecting the helmet data set includes: using a python web crawler toolkit to obtain images of relevant helmets and screen effective information, using cameras and video camera tools in the laboratory to shoot people wearing helmets in all directions, angles, and postures, and capturing video frames of effective samples from surveillance videos of construction sites.
[0011] In an optional solution: the screening and production of the helmet data set includes the following two conditions: ① the images in the data set must cover images of different climates, different scenes, different postures, different shooting distances or targets with different degrees of occlusion to ensure the comprehensiveness of the algorithm training results; ② ensure the number of images and the number of detection targets in the data set.
[0012] In an optional solution: in step 2, the annotations in the data set are divided into five categories: persons wearing red, yellow, white, and blue helmets and persons not wearing helmets.
[0013] In an optional solution: the network structure of feature extraction for helmet wearing detection is improved: on the one hand, by introducing a squeeze excitation network, the residual network of the feature extraction network Darknet53 in the YOLOv3 algorithm is improved accordingly, and the weight of useful channels in the feature channel is increased; on the other hand, on the basis of the original three-scale detection, upsampling is performed to increase a detection scale; the former can obtain the importance of each channel during feature extraction by introducing the SE network structure, and according to this importance, useful features are enhanced and feature channels that are not very useful for the current task are suppressed, thereby improving the feature extraction capability; the latter increases the feature scale to improve the utilization rate of the extracted features.
[0014] In an optional solution: the YOLOv3 loss function is improved based on GIoU: the GIoU idea is added to the YOLOv3 objective function, which becomes a constraint of the original objective function. The objective function of YOLO v3 is modified on the previous version. The center point error and width and height coordinate error calculation of the prediction box still use square error, and the confidence error calculation and category error calculation of the box use binary cross entropy; the LossYOLOv3 function of YOLO v3 is as follows:
[0015] Loss YOLOv3 =loss xy +loss wh +loss conf +loss cls
[0016] In the formula, the YOLOv3 loss function is mainly composed of four items: center coordinate error loss xy , width and height coordinate error loss wh , confidence error lossconf And category error loss cls ;
[0017]
[0018]
[0019] The above formula uses the error square sum calculation method to calculate the center position error and width and height coordinate error of the prediction box; where λ coord represents the weight parameter; S 2 represents the total number of grids that the YOLOv3 algorithm divides the image into; B represents the number of anchor boxes, which is 9 in the original YOLOv3 algorithm and 12 in the present invention; Is a Boolean value indicating whether the j-th anchorbox of the ith grid is responsible for the object. Otherwise 0; x i and i Indicates the relative coordinates of the center point of the predicted target box; and Indicates the relative coordinates of the center point of the real frame; w i and h i Indicates the width and height of the predicted target box; and Indicates the width and height of the real box;
[0020]
[0021] Confidence error loss conf The formula uses binary cross entropy calculation method. 2 , B and The meaning is the same as the target frame position calculation formula; and It is divided into true value and predicted value, indicating whether the j-th anchor box of the i-th grid is responsible for the object. If it is responsible, it is 1, otherwise it is 0; and The meaning is the opposite, indicating that the j-th anchor box of the i-th grid is not responsible for the object.
[0022]
[0023] Category error loss cls The formula also uses the binary cross entropy calculation method. From the formula, we can see that only when The subsequent losses will be calculated only when it is equal to 1. is the true value; P i jis the predicted value; class represents all categories.
[0024] The GIoU and other ideas should be added to the YOLO v3 objective function to become the constraints of the original objective function; the new objective loss function Loss new As shown below, Loss YOLO v3 It is the original objective function of YOLO v3.
[0025] Loss new =Loss YOLOv3 +Loss G
[0026] LossG considers adding the GIoU calculation method as follows:
[0027]
[0028] The designed calculation method ensures that there will be no abnormalities in the area calculation and avoids the erroneous calculation of multiplying two negative numbers into a positive number; C Area The area of the smallest rectangle containing the target real box and the predicted box; AB Area It is the area of the intersection of the target prediction box and the target real box; the calculation formula is as follows:
[0029]
[0030]
[0031] Where x i and i Indicates the relative coordinates of the center point of the real target frame; and Indicates the relative coordinates of the center point of the prediction box; w i and h i Indicates the width and height of the real target box; and Represents the width and height of the prediction box; the units of the symbols are all pixel values.
[0032] In an optional solution: the hyperparameters of the training network set in step 4 include a learning rate, a number of training rounds, a single training data batch size, a loss function, and an optimization function.
[0033] In an optional solution: in step 4, after completing the entire number of training rounds, the trained model is tested and evaluated, and the parameters of the model with good test and evaluation results are saved.
[0034] In an optional solution, the method used to implement the Web-side deployment model is to deploy the trained YOLO v3 neural network model using TensorFlowServing+Docker.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] Aiming at the task of helmet wearing detection, the present invention makes corresponding improvements to the feature extraction DarkNet network and improves its target loss function based on the deep learning YOLOv3 target detection algorithm. The improved algorithm can effectively improve the detection effect of small target detection tasks such as helmet wearing. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 The figure is a schematic diagram of the structure of the method flow in one embodiment of the present invention.
[0038] Figure 2 This is the SE-YOLOv3 network structure diagram after the invention is improved based on YOLOv3 DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments; in the drawings or descriptions, similar or identical parts use the same reference numerals, and in practical applications, the shape, thickness or height of each component can be enlarged or reduced. The various embodiments listed in the present invention are only used to illustrate the present invention and are not used to limit the scope of the present invention. Any obvious modifications or changes made to the present invention do not depart from the spirit and scope of the present invention.
[0040] The present invention provides a helmet wearing detection method based on a squeeze excitation residual network to improve YOLOv3, comprising the following steps:
[0041] 1) Collection and production of helmet dataset
[0042] The design of the image acquisition solution for safety helmets is roughly derived from three aspects: ① Internet search and download (which can be obtained through crawlers); ② Surveillance videos of construction sites, through the capture of video frames; ③ Laboratory shooting.
[0043] 2) Image annotation and data preprocessing
[0044] The data preprocessing of the collected raw data set includes: screening effective images and removing images that do not meet the training conditions; dimensionality reduction and compression of images with too large pixels; and corresponding adjustment of image size; the image annotation of the helmet data set is marked using LabelImg software in the python environment. The annotations in the data set are divided into 5 categories: people wearing red, yellow, white, blue helmets and people not wearing helmets.
[0045] 3) Improvement of YOLOv3 detection algorithm (in two aspects)
[0046] ① Research on improved design scheme of feature extraction network structure for helmet wearing detection.
[0047] On the one hand, by introducing the squeeze excitation network (SE-Net), the residual network of the feature extraction network Darknet53 in the YOLOv3 algorithm is improved accordingly to increase the weight of useful channels in the feature channel. On the other hand, based on the original three-scale detection, upsampling adds a detection scale. The former can obtain the importance of each channel during feature extraction by introducing the SE network structure, and according to this importance, it can enhance useful features and suppress feature channels that are not very useful for the current task, thereby improving the feature extraction capability. The latter can increase the feature scale to improve the utilization rate of the extracted features, especially for the features of small targets.
[0048] ②Improve YOLOv3 loss function based on GIoU.
[0049] When the loss function is used as an evaluation indicator for learning criteria and optimization problems, the larger the loss function, the greater the difference between the actual value and the predicted value. Conversely, the smaller the loss function, the more robust the model is. In the YOLOv3 algorithm, only the sum of squared errors is used to calculate the error of width and height. When the sum of squared errors is equal, the IoU can be high or low. In order to solve the impact of the inconsistency between the evaluation index and the objective function on the model, this paper proposes: adding the GIoU idea to the YOLOv3 objective function as a constraint of the original objective function. The objective function of YOLOv3 is modified on the previous version. The squared error is still used to calculate the center point error and the width and height coordinate error of the prediction box. The binary cross entropy is used to calculate the confidence error and category error of the box. The LossYOLOv3 function of YOLOv3 is as follows:
[0050] Loss YOLOv3 =loss xy +loss wh +loss conf +loss cls (1.1)
[0051] In formula 1.1, the YOLOv3 loss function is mainly composed of four items: center coordinate error loss xy , width and height coordinate error loss wh , confidence error loss conf And category error loss cls .
[0052]
[0053]
[0054] The above formula uses the error square sum calculation method to calculate the center position error and width and height coordinate error of the prediction box. coord represents the weight parameter; S 2 represents the total number of grids that the YOLOv3 algorithm divides the image into; B represents the number of anchor boxes, which is 9 in the original YOLOv3 algorithm and 12 in the present invention; Is a Boolean value indicating whether the j-th anchor box of the ith grid is responsible for the object. Otherwise 0; x i and i Indicates the relative coordinates of the center point of the predicted target box; and Indicates the relative coordinates of the center point of the real frame; w i and h i Indicates the width and height of the predicted target box; and Indicates the width and height of the real box;
[0055]
[0056] Confidence error loss conf The formula uses binary cross entropy calculation method. 2 , B and The meaning is the same as the target frame position calculation formula; and It is divided into true value and predicted value, indicating whether the j-th anchor box of the i-th grid is responsible for the object. If it is responsible, it is 1, otherwise it is 0; and The meaning is the opposite, indicating that the j-th anchor box of the i-th grid is not responsible for the object.
[0057]
[0058] Category error loss cls The formula also uses the binary cross entropy calculation method. From the formula, we can see that only when The subsequent losses will be calculated only when it is equal to 1. is the true value; P i j is the predicted value; class represents all categories.
[0059] The GIoU and other ideas should be added to the YOLO v3 objective function to become the constraints of the original objective function; the new objective loss function Loss new As shown below, Loss YOLO v3It is the original objective function of YOLOv3.
[0060] Loss new =Loss YOLOv3 +Loss G (1.6)
[0061] Loss G Consider adding the GIoU calculation method as follows:
[0062]
[0063] The designed calculation method ensures that there will be no abnormalities in the area calculation and avoids the erroneous calculation of multiplying two negative numbers into a positive number; C Area The area of the smallest rectangle containing the target real box and the predicted box; AB Area It is the area of the intersection of the target prediction box and the target real box; the calculation formula is as follows:
[0064]
[0065] Where x i and i Indicates the relative coordinates of the center point of the real target frame; and Indicates the relative coordinates of the center point of the prediction box; w i and h i Indicates the width and height of the real target box; and Represents the width and height of the prediction box; the units of the symbols are all pixel values.
[0066] From the above formula, we can find that LossG pays more attention to the influence of overlapping areas and non-overlapping areas on the objective function, which is very suitable for calculating and correcting the sum of squared errors in the original objective function so as to make Loss new To achieve the true optimum.
[0067] 4) Improved SE-YOLO v3 algorithm model training
[0068] In order to verify the feasibility and effectiveness of the improved SE-YOLOv3 algorithm in the helmet wearing detection task, this section verifies the model by example. Since there is no public helmet dataset yet, the helmet wearing dataset established above is used to train and optimize the improved SE-YOLOv3 helmet wearing detection model. To ensure the end-to-end user experience of the deployed model, the input of the neural network is the original image to be detected, and the output is the predicted image with predicted classification, predicted box and confidence. First, define the initialization of the Darknet-53 network, input the labeled and preprocessed image data, and set the hyperparameters of the training network such as learning rate, number of training rounds, single training data batch size, loss function, optimization function, etc. After completing the entire number of training rounds, test and evaluate the trained model. The model with good test and evaluation results saves the parameters for Web deployment. Its model parameters can be saved to a local file or a database.
[0069] 5) Web-side deployment model
[0070] The advantages of choosing to deploy the model on the Web are as follows: there is no difficulty in cross-platform requirements like APP applications; there is no problem of large transmission delays in cloud computing; mature Web deployment frameworks do not require complex deployment operations; model updates and prediction outputs do not interfere with each other; and the user population is not restricted.
[0071] Example
[0072] See attached Figure 1 , a helmet wearing detection method based on squeeze excitation residual network to improve YOLOv3 is provided, comprising the following steps:
[0073] 1) Collection and production of helmet dataset
[0074] The python web crawler toolkit is used to obtain images of helmets and screen effective information. Secondly, cameras and video cameras are used in the laboratory to shoot people wearing helmets in all directions, angles, and postures. At the same time, video frames of effective samples are captured from the surveillance videos of the construction site. The images obtained from these three aspects constitute the initial helmet data set for pre-training of the model. The integrity of the data set directly determines the final detection results and generalization ability of the model. To ensure the accuracy of the experimental conclusions, the production of the data set needs to meet two conditions: ① The images in the data set must cover images of different climates, different scenes, different postures, different shooting distances, or targets with different degrees of occlusion to ensure the comprehensiveness of the algorithm training results; ② Ensure the number of images and the number of detection targets in the data set.
[0075] 2) Image annotation and data preprocessing
[0076] LabelImg is a visual image calibration tool. Before using this tool, you need to configure the environment python+lxml. The datasets required by target detection networks such as Faster R-CNN, YOLO, and SSD all require this tool to calibrate the targets in the image. The generated XML file follows the format of PASCAL VOC. After configuring the environment, run LabelImg to enter the safety helmet image dataset folder, select images one by one, and mark them with box classification. Save them one by one to generate an xml file, which contains the information of the target in the entire image, which serves as the main input data for the later training model.
[0077] 3) SE-YOLO v3 algorithm model training
[0078] The operating system environment used in the embodiment of the present invention is Windows 10 Professional Edition. Considering the subsequent deployment of the model, the neural network construction uses the Tensorflow 2.0 framework, and the language version is python 3.8. First, the above-mentioned labeled data set is divided into a training set, a test set, and a validation set in proportion. The training set is mainly used for parameter training of the SE-YOLO v3 neural network, and the test set is mainly used to test the prediction effect of the trained neural network. Secondly, after setting the hyperparameters of the training model, migration training can be carried out, and the model weight optimization scheme selects the adam optimization scheme. After waiting for the training to be completed, use the test set and the validation set to test the model. When the test results achieve the expected effect, save the model weight parameters for deployment.
[0079] 4) Web-side deployment model
[0080] In the embodiment of the present invention, the neural network model built with the Tensorflow framework is used, and Tensorflow provides the TensorFlow Serving component for the Web deployment model. Therefore, the Web-side deployment is implemented by using TensorFlow Serving + Docker to deploy the above-trained YOLOv3 neural network model. TensorFlow Serving supports calling the model deployed with TensorFlow Serving with gRPC and RESTful API.
[0081] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A helmet wearing detection method based on squeeze excitation residual network to improve YOLOv3, characterized in that: The following steps are involved: Step 1: Collection and production of helmet dataset: obtain images and valid information of helmets, images of people wearing helmets, and capture video frames of valid samples from surveillance videos of construction sites; Step 2 Image annotation and data preprocessing: Data preprocessing of the collected original data set includes: screening valid images and removing images that do not meet the training conditions; dimensionality reduction and compression of images with too large pixels; adjusting the image size accordingly, selecting images one by one by running Label Img and performing box classification annotation to form an XML file; Step 3: Improve SE-YOLO v3 algorithm: Improve the network structure of helmet wearing detection feature extraction and improve the YOLOv3 loss function based on GIoU; Step 4: Model training: Define and initialize the Darknet-53 network using the helmet wearing dataset established above, input labeled and preprocessed image data, set the hyperparameters of the training network, and train and optimize the improved SE-YOLOv3 helmet wearing detection model based on this. Step 5: Deploy the model on the Web: Choose to deploy the model on the Web. The improvement of the network structure of feature extraction for helmet wearing detection is as follows: on the one hand, by introducing a squeeze excitation network, the residual network of the feature extraction network Darknet53 in the YOLOv3 algorithm is improved accordingly, and the weight of useful channels in the feature channel is increased; on the other hand, on the basis of the original three-scale detection, upsampling is performed to increase a detection scale; the former can obtain the importance of each channel during feature extraction by introducing the SE network structure, and according to this importance, useful features are enhanced and feature channels that are not very useful for the current task are suppressed, thereby improving the feature extraction capability; the latter can increase the feature scale to improve the utilization rate of the extracted features; The improved YOLOv3 loss function based on GIoU: the GIoU idea is added to the YOLOv3 objective function, which becomes the constraint of the original objective function. The square error is still used to calculate the center point error and width and height coordinate error of the prediction box, and the binary cross entropy is used to calculate the confidence error and category error of the box. YOLOv3 The function is as follows: Loss YOLOv3 =loss xy +loss wh +loss conf +loss cls In the formula, the YOLOv3 loss function is mainly composed of four items: center coordinate error loss xy , width and height coordinate error loss wh , confidence error loss conf And category error loss cls ; The above formula uses the error square sum calculation method to calculate the center position error and width and height coordinate error of the prediction box, where λ coord represents the weight parameter; S 2 represents the total number of grids that the YOLOv3 algorithm divides the image into; B represents the number of anchor boxes, which is 12; Is a Boolean value indicating whether the j-th anchor box of the ith grid is responsible for the object. Otherwise 0; x i and i Indicates the relative coordinates of the center point of the predicted target box; and Indicates the relative coordinates of the center point of the real frame; w i and h i Indicates the width and height of the predicted target box; and Indicates the width and height of the real box; Confidence error loss conf The formula uses binary cross entropy calculation method, where S 2 , B and The meaning is the same as the target frame position calculation formula; and It is divided into true value and predicted value, indicating whether the j-th anchor box of the i-th grid is responsible for the object. If it is responsible, it is 1, otherwise it is 0; and The meaning is the opposite, indicating that the j-th anchor box of the i-th grid is not responsible for the object; Category error loss cls The formula also uses the binary cross entropy calculation method. From the formula, we can see that only when When it is equal to 1, the subsequent losses will be calculated. is the true value; P i j is the predicted value; class represents all categories; The GIoU idea is added to the YOLO v3 objective function and becomes a constraint of the original objective function; the new objective loss function Loss new As shown below, Loss YOLOv3 is the original objective function of YOLO v3; Loss new =Loss YOLOv3 +Loss G Loss G Consider adding the GIoU calculation method as follows: The designed calculation method ensures that there will be no abnormalities in the area calculation and avoids the erroneous calculation of multiplying two negative numbers into a positive number; C Area The area of the smallest rectangle containing the target real box and the predicted box; AB Area It is the area of the intersection of the target prediction box and the target real box; the calculation formula is as follows: Where x i and i Indicates the relative coordinates of the center point of the real target frame; and Indicates the relative coordinates of the center point of the prediction box; w i and h i Indicates the width and height of the real target box; and Represents the width and height of the prediction box; the units of the symbols are all pixel values.
2. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 1 is characterized in that: The methods for collecting the helmet dataset in step 1 are as follows: using a python web crawler toolkit to obtain images of helmets and screen effective information; using cameras and video camera tools in the laboratory to shoot people wearing helmets in all directions, at various angles, and in multiple postures; and capturing video frames of effective samples from surveillance videos of construction sites.
3. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 2 is characterized in that: The screening and production of the helmet dataset includes the following two conditions: ① The images in the dataset must cover images of different climates, different scenes, different postures, different shooting distances, or targets with different degrees of occlusion to ensure the comprehensiveness of the algorithm training results; ② Ensure the number of images and the number of detection targets in the dataset.
4. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 3 is characterized in that: In step 2, the annotations in the data set are divided into five categories: people wearing red, yellow, white, and blue helmets and people not wearing helmets.
5. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 1 is characterized in that: The hyperparameters of the training network set in step 4 include learning rate, number of training rounds, batch size of single training data, loss function, and optimization function.
6. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 5 is characterized in that: In step 4, after completing the entire number of training rounds, the trained model is tested and evaluated, and the parameters of the model with good test and evaluation results are saved.
7. The helmet wearing detection method based on squeeze excitation residual network improved YOLOv3 according to claim 1 is characterized in that: The method used to implement the Web-side deployment model is TensorFlow Serving+Docker to deploy the above-trained YOLO v3 neural network model.
