Construction site intrusion detection method, computer equipment and storage medium
By improving the YOLOV9 network structure, combining GhostInceptionV2 and bidirectional weighted feature pyramid, and introducing the SimAM attention mechanism, the problem of missed detection and wrong detection in construction site intrusion detection is solved, and fast and accurate detection results are achieved, which is suitable for real-time monitoring needs in complex environments. .
Patent Information
- Application Number
- CN202410992793.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-09-13
AI Technical Summary
Existing construction site personnel intrusion detection technology has problems of missed detection and false detection in complex environments. The second-stage target detection algorithm is slow, the first-stage algorithm has low accuracy, and the model parameters are large and the equipment cost is high, making it difficult to meet the needs of real-time detection. .
The improved construction site intrusion detection method based on YOLOV9 optimizes the network structure, reduces model parameters, and improves detection speed and accuracy by introducing auxiliary branches, GhostInceptionV2 module, bidirectional weighted feature pyramid structure and parameter-free SimAM attention mechanism.
It achieves fast and accurate detection with fewer model parameters. It has wide applicability and strong generalization ability, and is suitable for real-time monitoring needs on construction sites.
Smart Images

Figure CN118644760A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of construction site personnel intrusion detection, and in particular relates to a construction site intrusion detection method, computer equipment and storage medium. Background Art
[0002] Traditional methods of detecting intrusion by construction site personnel, such as manual inspections and video surveillance, generally have problems such as low detection efficiency, easy missed detections, and false detections. They are highly dependent on experienced on-site management personnel and require real-time observation and inspection of construction site personnel, which is time-consuming and laborious, and difficult to meet the needs of modern construction management. Therefore, in recent years, target detection algorithms based on deep learning have gradually become an effective way to solve this problem and have achieved rapid development.
[0003] However, when general target detection technology is used in construction sites, it is difficult to quickly and accurately identify targets due to the complex background environment of the site, the dense distribution of personnel, occlusion, and the small size of the personnel targets captured by the camera, which may cause missed detection or false detection. On the basis of the existing construction site personnel intrusion detection technology, higher requirements are also put forward for the accuracy of detection. The challenges currently faced by construction site personnel detection technology are: occlusion and overlap between construction personnel, dense distribution and large number of personnel to be detected, complex construction site environment, scale changes caused by the distance between the target to be detected and the camera, and the image resolution captured by the camera is too low. The above reasons cause the model output to lose the detection box of some targets and false detection, affecting the final detection effect.
[0004] Currently, commonly used target detection algorithms are divided into two categories: one is a two-stage algorithm, the most representative of which is R-CNN and its improved algorithms Faster R-CNN, Mask R-CNN, etc. This type of algorithm is generally divided into two steps. First, some candidate regions are generated, and then these candidate regions are classified and regressed. The advantages of this algorithm are obvious. The accuracy of target detection is very high, but the speed is very slow and a large number of candidate regions need to be generated, which increases the complexity of calculation and time.
[0005] The other type is the one-stage target detection algorithm, represented by the YOLO series, SSD, RetinaNet, etc. This type of algorithm can solve the problem of target detection through a regression. It directly sends the image to the convolutional neural network to extract features and generate feature maps. The algorithm generates a series of anchor points on the feature map, and then obtains the category label and bounding box regression value of each anchor point, completing the regression and classification tasks at the same time. This type of algorithm has a faster speed and lower computational complexity, and is suitable for scenarios with high real-time requirements. However, compared with the two-stage target detection algorithm, this type of algorithm has a lower accuracy and the detection effect is not as good as the former. The existing improvement combines the one-stage target detection algorithm with the Transformer encoder to improve the accuracy of the detection algorithm, but the Transformer's self-attention mechanism model has large parameters and requires a large amount of data for training. Large-scale image data requires high computing power and the required equipment cost is high, which is limited in actual application deployment.
[0006] In summary, although the second-stage detection algorithm has high accuracy, its detection speed is low, so it is not suitable for actual construction site applications. The first-stage detection algorithm meets the actual application requirements in terms of speed, but there is still room and necessity for improvement in the parameter size of the model and the detection effect. Summary of the invention
[0007] The purpose of the present invention is to propose a construction site intrusion detection method, which is based on the improved YOLOV9 for construction site intrusion detection, and can enable the model to perform fast and accurate detection with fewer parameters.
[0008] In order to achieve the above object, the present invention adopts the following technical scheme: A construction site intrusion detection method comprises the following steps: Step 1. Build a construction site intrusion detection model based on the improved YOLOV9 network structure; the improved YOLOV9 network structure includes a main branch, an auxiliary branch, and a raw data repeated loading module Silence, wherein the main branch includes a backbone network, a feature fusion network, and a detection head. The network structure is improved on the basis of the original YOLOV9 network structure as follows: replace the original feature extraction module RepNCSPELAN4 in the backbone network with a GhostInceptionV2 module; replace the original feature pyramid structure fusion module with a weighted feature fusion module with a bidirectional weighted feature pyramid structure; introduce a parameter-free attention mechanism SimAM module before each detection head of the main branch; Step 2. Use the training data set to train the construction site intrusion detection model based on the improved YOLOV9 network structure built in step 1, and remove the auxiliary branch after the training is completed; Step 3. Use the trained construction site intrusion detection model to monitor the marked dangerous areas of the construction site in real time, and issue an alarm when it is detected that the coordinates of a person fall into the dangerous area.
[0009] In addition, based on the above-mentioned construction site safety helmet detection method, the present invention also proposes a computer device, which includes a memory and one or more processors. An executable code is stored in the memory. When the processor executes the executable code, the steps of the construction site intrusion detection method are implemented.
[0010] In addition, based on the above-mentioned construction site safety helmet detection method, the present invention also proposes a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, it is used to implement the steps of the construction site intrusion detection method.
[0011] The present invention has the following advantages: As described above, the present invention relates to a construction site intrusion detection method. The YOLO algorithm is fast, accurate, interpretable, widely applicable, and has strong generalization ability. The present invention is improved based on the YOLOV9 network structure. Compared with the previous version of the YOLO model, YOLOV9 proposes the idea of programmable gradients, and introduces an auxiliary branch for training. A back propagation path is added to directly connect to the shallow features of the network, enriching the back propagation information to make up for the information lost due to the use of only a single main branch, so that the model training effect is better, and the auxiliary branch is not used in the reasoning stage of the model, which will not bring additional calculations. In addition, based on the original YOLOV9 network structure, the present invention replaces the original feature extraction module RepNCSPELAN4 in the backbone network with the GhostInceptionV2 module, combines the advantages of the ghost convolution GhostConv with less calculation and no performance impact and the InceptionV2 structure with rich feature information, and reduces the number of model parameters while ensuring the detection effect. In addition, the present invention replaces the original feature fusion module based on PAN and FPN in the YOLOV9 model with a weighted feature fusion module with a bidirectional weighted feature pyramid structure. The weighted feature fusion mechanism is used to combine features of different levels. The fusion weights are learned during the training process to ensure the best feature integration. The bidirectional connection in the weighted feature fusion module helps to better obtain features at different scales and improve the network's ability to handle objects of different sizes and complexities. In addition, the present invention introduces a parameter-free attention mechanism SimAM module before each detection head of the main branch. The attention mechanism does not need to add any parameters to the network, but infers the 3D (channel and space) attention weights of the feature map in one layer. By introducing the SimAM attention mechanism, the accuracy and overall performance of the model can be improved without increasing parameters. Through the above improvements, the construction site intrusion detection model based on the improved YOLOV9 network structure can perform fast and accurate detection with fewer model parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Flow chart of the construction site intrusion detection method improved based on YOLOV9 in an embodiment of the present invention; Figure 2 A simplified model architecture diagram of the improved YOLOV9 network structure in an embodiment of the present invention; Figure 3 A network structure diagram of a backbone network in an embodiment of the present invention; Figure 4 It is a network structure diagram of a feature fusion network and a detection head in an embodiment of the present invention; Figure 5A network structure diagram of an auxiliary branch in an embodiment of the present invention; Figure 6 This is a network structure diagram of GhostInceptionV2a in an embodiment of the present invention; Figure 7 This is a network structure diagram of GhostInceptionV2b in an embodiment of the present invention; Figure 8 This is a network structure diagram of GhostInceptionV2c in an embodiment of the present invention; Fig. 9 Schematic diagram of a simple principle of ghost convolution GhostConv in an embodiment of the present invention; Fig.10 A network structure diagram of SPPELAN in an embodiment of the present invention; Fig.11 A network structure diagram of RepNCSPELAN4 in an embodiment of the present invention; Fig.12 A network structure diagram of RepNCSP in an embodiment of the present invention; Fig.13 This is a network structure diagram of RepNBottleneck in an embodiment of the present invention; Fig.14 Schematic diagram of a simple principle of a weighted fusion module in an embodiment of the present invention; Fig.15 ADown network structure diagram in an embodiment of the present invention; Fig.16 This is a network structure diagram of CBLinear in an embodiment of the present invention; Fig.17 4 is a network structure diagram of CBFuse in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1 This embodiment describes a construction site intrusion detection method, which is an improved construction site personnel intrusion detection algorithm based on the improved YOLOV9 (full name: You only look once version 9) network structure. The general process includes the following parts: data collection, which is used to collect image data of the construction site; a data set preparation part, which is used to annotate the collected data and then divide it into a training set, a verification set, and a test set; and an image detection part, which is used to send the collected data to a pre-trained improved model for detection to obtain a detection result.
[0014] Compared with the previous YOLO model, in the process of back propagation optimization parameters, as the depth of back propagation increases, some gradient information will inevitably be lost, which will in turn affect the training optimization parameters. YOLOV9 proposes the idea of programmable gradients, and introduces an auxiliary branch for training, adding a back propagation path directly connected to the shallow features of the network. It enriches the information of back propagation, makes up for the information lost due to the use of only a single main branch, makes the model training more effective, and does not use auxiliary branches in the inference stage of the model, so it does not bring additional calculations.
[0015] like Figure 1 As shown, the construction site intrusion detection method improved based on YOLOV9 in this embodiment includes the following steps: Step 1. Build a construction site intrusion detection model based on the improved YOLOV9 network structure; The improved YOLOV9 network structure includes a main branch, an auxiliary branch, and a raw data repeated loading module Silence, such as Figure 2 As shown in the figure, the main branch includes the backbone network, feature fusion network and detection head. The backbone network mainly extracts features, the feature fusion network performs feature fusion, and the detection head classifies and regresses the feature map to output the detection results. There are three detection heads in the main branch. The size of the detection head corresponds to the size of the feature map. The large detection head is used to detect small target objects.
[0016] The improved YOLOV9 is based on the original YOLOV9 network structure and is improved as follows: the original feature extraction module RepNCSPELAN4 in the backbone network is replaced with the GhostInceptionV2 module. The GhostInceptionV2 module combines the advantages of GhostConv, which has low computational complexity and does not affect performance, and the initial module Inception structure, which has rich feature information, to reduce the number of model parameters while ensuring the detection effect; the feature fusion module of the original feature pyramid structure constructed based on PAN and FPN is replaced with a weighted feature fusion module with a bidirectional weighted feature pyramid structure, which improves the network's ability to handle objects of different sizes and complexities; the parameter-free attention mechanism SimAM module is introduced before each detection head of the main branch to improve the accuracy and overall performance of the model without increasing parameters. The improvement optimizes the number of parameters and calculation speed of the original model, and also improves the detection effect of targets of different sizes.
[0017] like Figure 3As shown, the backbone network includes two convolutional normalization modules, four feature extraction GhostInceptionV2 modules that combine the GhostConv module with InceptionV2, three downsampling ADown modules and a layer aggregation pyramid pooling structure SPPELAN module; among them, the four GhostInceptionV2 modules include two GhostInceptionV2a modules, one GhostInceptionV2b module and one GhostInceptionV2c module.
[0018] In the backbone network, the two convolutional normalization modules CBS are defined as CBS-1 (i.e., convolutional normalization module-1) and CBS-2 (i.e., convolutional normalization module-2) modules, the two GhostInceptionV2a modules are defined as GhostInceptionV2a-3 and GhostInceptionV2a-9 modules, the GhostInceptionV2b module is defined as GhostInceptionV2b-5, the GhostInceptionV2c module is defined as GhostInceptionV2c-7, and the three downsampling ADown modules are defined as ADown-4 (i.e., adaptive downsampling-4), ADown-6 (i.e., adaptive downsampling-6) and ADown-8 (i.e., adaptive downsampling-8) modules.
[0019] The signal processing flow in the backbone network is as follows: The input image first passes through the Silence module without any processing, only saving the original input data for auxiliary branch calls, and then passes through the CBS-1 and CBS-2 modules for feature extraction to reduce the size of the feature map, making the size of the feature map become 1 / 4 of the original size, and then passes through the GhostInceptionV2a-3 module to use different convolutions to extract features in parallel, enrich the extracted feature information, and the size of the feature map does not change. Then, the ADown-4 module is used to downsample the feature map to retain important features and reduce the redundancy of information. Then, the GhostInceptionV2b-5 module is used to further enrich the extracted feature information, and then the ADown-6 module is used to downsample the feature map, and then the GhostInceptionV2c-7 module is used to enrich the extracted feature information. The result is input into the ADown-8 module to downsample the feature map, and then sent to the GhostInceptionV2a-9 module to enrich the extracted feature information. Finally, the SPPELAN module uses pooling of different scales to generate multi-scale feature maps, which are then fused to enhance the expression ability of the feature map.
[0020] like Figure 4As shown, the feature fusion network includes five weighted feature fusion modules, two upsampling Unsample modules, five RepNCSPELAN4 modules for enhancing feature information, two downsampling ADown modules and three parameter-free attention mechanism SimAM modules; There are three detection heads in the main branch, which output the coordinates and categories of the target. Since the present invention detects people, there is only one category of detection. The detection heads of the three main branches are defined as Detect-1 (i.e. detection head-1), Detect-2 (i.e. detection head-2) and Detect-3 (i.e. detection head-3).
[0021] The signal processing flow in the feature fusion network is as follows: the input of the feature fusion network is the output of the backbone network, that is, the output of the SPPELAN module. First, the feature map is upsampled through an Unsample module to enlarge the size of the feature map, and then a weighted feature fusion module is used to dynamically weight the upsampling result and the output of the GhostInceptionV2c-7 module in the backbone network. The result is sent to a RepNCSPELAN4 module (that is, the first RepNCSPELAN4 module) to enhance the information representation ability of the feature map, and then an upsampling Upsample module is used to perform weighted fusion on the feature map. The size of the feature map is enlarged by upsampling, and then sent to a weighted feature fusion module, which is dynamically weighted and merged with the output of the GhostInceptionV2b-5 module in the backbone network, and then sent to a RepNCSPELAN4 module (i.e., the second RepNCSPELAN4 module) to enhance the information representation ability of the feature map. The result is input into a weighted feature fusion module, merged with the output of the GhostInceptionV2b-5 module in the backbone network and the result of the downsampling output of the ADown-4 module in the backbone network, and then input into a RepNCSPEL The information representation capability of the feature map is enhanced in the AN4 module (i.e., the third RepNCSPELAN4 module), and then a SimAM module is used to strengthen the focus on relevant feature information, and a result is output by the Detect-1 detection head. Then, an ADown module is used to downsample and reduce the size of the feature map, and it is input into a weighted feature fusion module, and the result of the output of the first RepNCSPELAN4 module in the feature fusion network and the output of the GhostInceptionV2c-7 module in the backbone network are merged and input into a RepNCSPELAN4 module (i.e., the fourth RepNCSPEL AN4 module) to enhance the information representation capability of the feature map, and then pass through a SimAM module to strengthen the focus on relevant feature information. The Detect-2 detection head outputs a result, and then uses an ADown module to downsample and reduce the size of the feature map, and uses a weighted feature fusion module to dynamically weight the output and the output of the backbone network. Merge it, input it into a RepNCSPELAN4 module (i.e., the fifth RepNCSPELAN4 module) to enhance the information representation capability of the feature map, and then pass through a SimAM module to strengthen the focus on relevant feature information, and send it to the Detect-3 detection head to finally output a result.
[0022] like Figure 5As shown in the figure, the auxiliary branch includes five convolution normalization modules, four RepNCSPELAN4 modules, three channel segmentation modules, three channel fusion CBFuse modules and three detection heads. The auxiliary branch is the biggest innovation of the YOLOV9 model. By introducing an auxiliary branch for simultaneous training and back propagation, the gradient information loss caused by the deepening of the back propagation layer when only one branch is trained for back propagation is alleviated, the training effect is optimized, and the overall performance of the model is improved. Removing the auxiliary branch during actual reasoning does not affect the use effect.
[0023] In the auxiliary branches, the convolutional standardization modules of the five branches are respectively defined as the first CBS (i.e. the first convolutional standardization module), the second CBS (i.e. the second convolutional standardization module), the third CBS (i.e. the third convolutional standardization module), the fourth CBS (i.e. the fourth convolutional standardization module) and the fifth CBS module (i.e. the fifth convolutional standardization module), the three channel segmentation modules are respectively defined as the first CBlinear (i.e. the first channel segmentation module), the second CBlinear (i.e. the second channel segmentation module) and the third CBlinear module (i.e. the third channel segmentation module), the three channel fusion CBFuse modules are respectively defined as the first CBFuse (i.e. the first channel fusion module), the second CBFuse (i.e. the second channel fusion module) and the third CBFuse module (i.e. the third channel fusion module), and the detection heads of the three auxiliary branches are respectively defined as the first detection head, the second detection head and the third detection head.
[0024] The signal processing flow in the auxiliary branch is as follows: the input of the auxiliary branch is the output of the Silence module, that is, the original input image saved by the Silence module. First, the first CBS module and the second CBS module are used to extract features to reduce the size of the feature map, and the size of the feature map becomes 1 / 4 of the original image. Then, a RepNCSPELAN4 module is used to enhance the expression ability of the feature map, and then it is sent to the third CBS module for convolution extraction of features and reduction of the size of the feature map, so that the size of the feature map is further reduced by half, and the output result of the third CBS module is sent to the first CBFuse module; the first CBlinear module is used to separate the output of the GhostInceptionV2c-7 module in the backbone network by the channel dimension, and the output result of the first CBlinear module is sent to the first CBFuse module; the second CBlinear module is used to separate the output of the GhostInceptionV2b-5 in the backbone network by the channel dimension, and the output result of the second CBlinear module is sent to the first CBFuse module; the third CBlinear module is used to separate the GhostInceptionV2b-5 in the backbone network by the channel dimension, and the output result of the second CBlinear module is sent to the first CBFuse module; The output of ptionV2a-9 is separated by the channel dimension, and the output result of the third CBlinear module is sent to the first CBFuse module; the outputs of the first CBlinear module, the second CBlinear module, the third CBlinear module and the third CBS module are merged through the first CBFuse module, and then the expression ability of the feature map is enhanced through a RepNCSPELAN4 module, and a result is output using the first detection head. The fourth CBS module is convolutionally extracted and the size of the feature map is reduced. The outputs of the second CBlinear module, the third CBlinear module and the fourth CBS module are sent to the second CBFuse module for merging, and then a RepNCSPELAN4 module is passed through to enhance the expression ability of the feature map, and a result is output using the second detection head. The fifth CBS module is convolutionally extracted and the size of the feature map is reduced. The outputs of the third CBlinear module and the fifth CBS module are sent to the third CBFuse module for merging, and then a RepNCSPELAN4 module is passed through to enhance the expression ability of the feature map, and a result is output using the third detection head.
[0025] The functions of the two CBLinearCBFuse and CBFuse modules unique to the auxiliary branch are as follows: like Fig.16As shown in the figure, CBLinear contains a convolution module. After a convolution, the result is divided into tuples containing n elements after channel segmentation through the split module, which is convenient for further fusion using the CBFuse module. The CBLinear module introduces the features extracted from the main branch into the auxiliary branch for fusion.
[0026] like Fig.17 As shown in the figure, the previous level input of CBFuse is the output of CBLinear, part of which is aggregated and stacked and added to the features extracted by the auxiliary branch to enrich the feature information of the auxiliary branch. X[1] to X[n] represent the feature maps of the first to nth channels respectively.
[0027] The auxiliary branch will also have the detection head output results, so the loss function can be calculated and back propagated based on this. When the main branch is back propagating, the information transmitted will cause the gradient information to be lost as the depth of back propagation increases. When the information flows through the shallow structure of the model, all the gradient information is not enough to fully optimize the parameters of the structure. In this model, with auxiliary branches, the auxiliary branches and the main branches have the transmission bridges of GhostInceptionV2a-9, GhostInceptionV2b-7 and GhostInceptionV2c-5. The auxiliary branches can transmit the gradient information to the shallow structure of GhostInceptionV2 at a shorter distance and faster speed. The distance between the auxiliary branch detection head and the shallow features of the main branch model is about half of that between the main branch detection head and the shallow features of the main branch model. Introducing the shallow feature information of the main branch transmitted by the auxiliary branch into the main branch makes up for the problem of gradient information loss caused by back propagation in a single route. Improve the training effect. And in actual reasoning, removing the auxiliary branch does not affect the detection effect, ensuring the size of the model.
[0028] The convolution module Conv is composed of Conv-BatchNormalization (i.e. batch normalization)-Silu in sequence, which preliminarily extracts the features of the image and increases the number of input channels. Silu is an activation function: .
[0029] GhostInceptionV2 is improved from the original InceptionV2, and GhostConv is introduced to replace the original standard convolution. The specific structure of GhostInceptionV2 will be different with the number of network layers. In this embodiment, the GhostInceptionV2 module is divided into three different structures: GhostInceptionV2a, GhostInceptionV2b, and GhostInceptionV2c. The GhostInceptionV2b-5 module and the GhostInceptionV2c-7 module have the same function as the GhostInceptionV2a-3 module and the GhostInceptionV2a-9 module, except that the convolution kernel size used is different and the number of branches used is different.
[0030] like Figure 6 As shown in the figure, the GhostInceptionV2a-3 module and the GhostInceptionV2a-9 module are GhostInceptionV2a modules with the same structure. The GhostInceptionV2a module consists of four branches. The first branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1. The second branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1 and a GhostConv module with a convolution kernel of 3×3 and a stride of 1. The third branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1 and two GhostConv modules with convolution kernels of 3×3 and a stride of 1. The fourth branch consists of a maximum pooling layer with a maximum pooling kernel of 3×3 and a GhostConv module with a convolution kernel of 1×1 and a stride of 1.
[0031] The signal processing flow in the GhostInceptionV2a module is as follows: The feature map in the first branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the second branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and then through a GhostConv module with a convolution kernel of 3×3 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the third branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1 and two GhostConv modules with convolution kernels of 3×3 and a step size of 1, and then the output result is sent to the tensor merging module; the feature map in the fourth branch is input through a maximum pooling layer with a maximum pooling kernel of 3×3 and a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and the output result is sent to the tensor merging module; the tensor merging module adds the outputs of the first branch, the second branch, the third branch and the fourth branch in the channel dimension to obtain the output of the GhostInceptionV2a module.
[0032] like Figure 7 As shown in the figure, the GhostInceptionV2b-5 module consists of 4 branches. The first branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, the second branch consists of a maximum pooling layer with a maximum pooling kernel of 3×3 and a stride of 1 and a GhostConv module with a convolution kernel of 1×1, the third branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, a GhostConv module with a convolution kernel of 1×3 and a stride of 1, and a GhostConv module with a convolution kernel of 3×1 and a stride of 1. The fourth branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, two GhostConv modules with convolution kernels of 1×3 and a stride of 1, and two GhostConv modules with convolution kernels of 3×1 and a stride of 1.
[0033] The signal processing flow in the GhostInceptionV2b module is as follows: The feature map in the first input branch passes through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the second input branch passes through a maximum pooling layer with a maximum pooling kernel of 3×3 and a step size of 1 and a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the third input branch passes through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a step size of 1 and a GhostConv module with a convolution kernel of 3×1 and a step size of 1 for asymmetric convolution, and then the output result of the GhostConv module with a convolution kernel of 3×1 and a step size of 1 is sent to the tensor merging module; the feature map in the fourth input branch passes through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a step size of 1. Asymmetric convolution is performed on a GhostConv module with a convolution kernel of 1×3 and a stride of 1 and a GhostConv module with a convolution kernel of 3×1 and a stride of 1, and then a GhostConv module with a convolution kernel of 1×3 and a stride of 1 and a GhostConv module with a convolution kernel of 3×1 and a stride of 1 are used to further improve the richness of feature extraction. The output result is sent to the tensor merging module; the output of the GhostInceptionV2b module is the result of adding the outputs of the first branch, the second branch, the third branch and the fourth branch in the tensor merging module in the channel dimension.
[0034] like Figure 8 As shown in the figure, the GhostInceptionV2c-7 module consists of 4 branches. The first branch consists of a GhostConv module with a convolution kernel of 1×1, the second branch consists of a maximum pooling layer Max_Pool and a GhostConv module with a convolution kernel of 1×1, the third branch consists of a GhostConv module with a convolution kernel of 1×1, a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1, and the fourth branch consists of a GhostConv module with a convolution kernel of 1×1, a GhostConv module with a convolution kernel of 3×3, a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1. The output of the GhostInceptionV2c-7 module is the sum of the outputs of the 4 branches in the channel dimension.
[0035] The signal processing flow in the GhostInceptionV2c module is as follows: The feature map in the first branch is fed into a GhostConv module with a convolution kernel of 1×1, and the output result is sent to the tensor merging module; the feature map in the second branch is fed into a maximum pooling layer and a GhostConv with a convolution kernel of 1×1. The module output result is sent to the tensor merging module; the feature map input into the third branch first passes through a GhostConv module with a convolution kernel of 1×1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1 in the third branch for asymmetric convolution, and then merges and sends it to the tensor merging module; the feature map input into the fourth branch passes through a GhostConv module with a convolution kernel of 1×1, and then passes through a GhostConv module with a convolution kernel of 3×3, and then passes through a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1 in the fourth branch to increase the feature combination capability, and then merges and sends it to the tensor merging module; the tensor merging module adds the outputs of the first branch, the second branch, the third branch and the fourth branch in the channel dimension to obtain the output of the GhostInceptionV2c module.
[0036] The feature extraction module of this embodiment is improved from the InceptionV2 structure. In InceptionV2, a BatchNormalization layer is added after the convolution for the first time, which helps to solve the problem of vanishing gradients in the network and speed up the training and convergence speeds. Because the information correlation in the same channel of low-dimensional features is high, dimensionality reduction at the channel level does not have much adverse effect. Using more 3×3 convolutions to replace large convolution kernels and first using 1×1 dimensionality reduction before ordinary convolution can speed up the training speed, and further decomposing the 3×3 convolution into asymmetric convolutions with convolution kernel sizes of 3×1 and 1×3 to reduce the amount of calculation.
[0037] Compared with GhostInceptionV2b, GhostInceptionV2c has disassembled several branches. The reason why GhostInceptionV2a and GhostInceptionV2b did not disassemble the branches is that for the shallow layer in the front, all the extracted features are detailed features. If they are disassembled, the effect will be poor. GhostInceptionV2c is disassembled because the features extracted later are highly abstract features. After disassembly, it can not only reduce the amount of calculation, but also increase the ability to combine features.
[0038] like Fig. 9As shown in the figure, the GhostConv module first performs conventional convolution to compress the number of channels of the input feature map, uses the result of conventional convolution to perform linear transformation to regenerate the Ghost map, and then uses deep convolution (DepthwiseConvolution is also called deep convolution, in which one convolution kernel is responsible for one channel and one channel is convolved by only one convolution kernel) to obtain more feature maps, and finally splices the results of conventional convolution and deep convolution in the channel dimension and outputs them. The advantages of the GhostConv module are threefold: by using linear transformation to generate more feature maps from existing feature maps, the amount of computation required is greatly reduced compared to relying on additional convolution layers; it maximizes the use of available computing and memory resources, which is particularly suitable for embedded systems with limited resources; because the modular design of GhostConv can be seamlessly integrated into the existing convolutional neural network architecture, it becomes a general solution to improve efficiency.
[0039] like Fig.10 As shown in the figure, the efficient layer aggregation pyramid pooling structure SPPELAN consists of a convolution of size 1×1 and stride 1 and three maximum pooling layers of size 5×5, stride 1 and padding 2. SPPELAN is improved based on the spatial pyramid pooling layer SPP. SPP can process input images of different sizes, making the network scale-invariant and no longer limited to fixed-size inputs. It pools feature maps of different sizes through pyramid-shaped grid units, retaining the spatial information of the input image, enriching the feature information, and improving the network's receptive field and feature representation capabilities, thereby improving network performance and training efficiency. SPPELAN combines SPP with the efficient layer aggregation network ELAN to more effectively extract and fuse local features, improving detection accuracy and robustness.
[0040] like Fig.11 As shown in Figure 1, the reparameterizable and efficient cross-stage local network RepNCSPELAN4 consists of four Convs and two RepNCSPs, a channel segmentation and a tensor merging module. Among them, the RepNCSP module consists of three Convs, multiple RepNBottlenecks and a tensor merging module, as shown in Figure 1. Fig.12 As shown in Figure 2. RepNBottleneck is a basic module with a residual structure, which consists of a Conv of size 1×1 and multiple RepConv modules, as shown in Figure 2. Fig.13 The RepConv module uses a model reparameterization technology. There are several computing modules during training. It can fuse multiple computing modules into one during the inference phase to improve the efficiency and performance of the model.
[0041] Ordinary convolution is expressed as ,in represents the weight, Indicates bias; The BN layer is represented as ,in represents a learnable scaling parameter, represents the mean, represents the variance, Learnable bias coefficients; during inference, Conv combined with BN is expressed as: in is the weight of the convolution after fusion, is the bias of the convolution after fusion.
[0042] like Fig.14 As shown in , the bidirectional weighted feature pyramid introduces a bidirectional structure based on the feature pyramid network, that is, in the process of information transmission, in addition to the top-down transmission, the bottom-up transmission is also introduced, so that the features can be perceived more comprehensively. The bidirectional weighted feature pyramid introduces learnable weights to learn the importance of different input features during feature fusion, which helps the model identify input features of different resolutions that contribute unequally to the output features. In addition, the bidirectional weighted feature pyramid optimizes cross-scale connections and enhances feature fusion by removing nodes with only a single input edge, adding additional edges from the original input to the output node (if they are at the same level), and treating each bidirectional path as a feature network layer. As shown in Fig.14 The figure shows multiple feature maps to be weighted fused, including feature Figure 1 ,feature Figure 2 ,…, feature map n, the weights corresponding to these feature maps are , , …, .
[0043] The attention mechanism originated from the study of human vision and is reflected in cognitive science. Due to the bottleneck of information processing, humans selectively focus on part of all information while ignoring other visible information. This mechanism is called the attention mechanism. In neural network learning, the attention mechanism plays an important role, such as solving the problem of information overload, dynamically adjusting the weight of input content, improving the interpretability of neural networks, and overcoming the performance degradation caused by the increase of input in recurrent networks. The simple attention mechanism module SimAM is a lightweight, parameter-free convolutional neural network attention mechanism that generates attention weights by calculating the local self-similarity of feature maps. SimAM does not require the introduction of any additional parameters and can effectively improve the performance of convolutional networks.
[0044] The SimAM attention mechanism is based on the energy function: and come; in represents the weight of the target neuron, represents the bias coefficient, for and ,when for When 1 is indicated, when for represents 0, Represents the number of neurons.
[0045] , , Represents trainable weights.
[0046] Minimizing the energy function formula is equivalent to training the linear separability between neuron t and other neurons in the same channel; using binary labels and adding regularization terms, the final energy function is defined as follows: , the analytical solution of the above formula is: , ; in is the regularization term, , ; Since all neurons on each channel follow the same distribution, the mean and variance of the input features are first calculated in two dimensions: length H and width W to avoid repeated calculations: in represents the energy function value, , ; The whole process is expressed as ,in represents the input feature map, represents the output feature map, represents the energy function value, Represents the inverse value of the energy function value transformed using the activation function.
[0047] like Fig.15 As shown in the figure, the downsampling ADown module consists of an average pooling layer with a pooling kernel size of 2 and a stride of 1, a maximum pooling layer with a pooling kernel size of 3 and a stride of 2, a convolution with a convolution kernel size of 1×1, a stride of 1 and a convolution kernel size of 3×3, a stride of 2 and a padding of 1, a channel segmentation module, and a tensor merging module.
[0048] The functions of the sampling ADown module are as follows: First, the downsampling module reduces the size of the feature map by performing a pooling operation on the input feature map, thereby reducing the number of parameters and the amount of calculation that need to be processed by the subsequent layers, which helps to improve the training speed and efficiency of the model; second, the downsampling module can reduce the size and dimension of the feature map and the number of parameters of the model, thereby reducing the risk of overfitting. By reducing the size of the feature map, the model becomes simpler and easier to generalize to new data; third, the pooling operation can retain key feature information while reducing the size of the feature map. The most common pooling operations are Max Pooling and Average Pooling, which can help the model focus on the most significant features; fourth, by downsampling the feature map, the pooling operation can make the model more robust to translation in the input data. Even if the input data is translated to a certain extent, the model can still recognize important features; fifth, in some cases, reducing the spatial resolution of the feature map can effectively reduce the dimension of the input data and reduce the amount of information that the model needs to process, thereby improving the efficiency and overall performance of the model.
[0049] Step 2. Use the training data set to train the constructed construction site intrusion detection model, and remove the auxiliary branch after the training is completed; Before training the model, let’s first introduce the process of building the training data set, as follows: First, we collected data from the actual construction site, and used LabelImg (a labeling tool software) to frame the people in the collected pictures with rectangular frames and labeled them as "person". We then merged the data with the public dataset and converted it into the label format commonly used by YOLO (with coordinates and categories).
[0050] After production is completed, it is divided into the training set, validation set and test set required by the model in a ratio of 8:1:1.
[0051] The training set and validation set data are sent to the model for training and validation. The validation machine set is used for validation in each round of training. The model weights obtained after a certain number of training rounds are tested, and the parameters of the model are adjusted and optimized until the loss function of the model converges to obtain the final weights. If the test indicators meet the requirements, the auxiliary training branches in the model weights are removed to further make the model lightweight.
[0052] Step 3. Divide the dangerous area in the scene according to the actual site requirements (marked with a box), mark the coordinate range of the dangerous area on the construction site according to the actual situation of the construction site, deploy the model with the optimal parameters, and use the trained construction site intrusion detection model to monitor the marked dangerous area in real time. When the midpoint of the bottom of the pedestrian target detection box falls into the divided area, an intrusion alarm is issued, otherwise no alarm is issued.
[0053] The construction site intrusion detection model based on the improved YOLOV9 network structure built in this embodiment has 44143330 parameters, an average accuracy of 0.881 when the iou threshold is 0.5, and an average accuracy of 0.628 when the iou threshold is 0.5-0.95, which can perform fast and accurate detection with fewer model parameters.
[0054] Compared with the personnel detection algorithms based on YOLOV8 and Transformer, although Transformer can better understand the context with the ordinary self-attention mechanism, the amount of calculation and parameters required are more than the lightweight parameter-free attention of SimAM in this model. This construction site intrusion detection model combines GhostConv and InceptionV2 to form a feature extraction module with few parameters, high efficiency, and the ability to extract rich feature information. GhostConv is generally divided into two steps. First, it uses the ordinary convolution kernel with the required general number of channels for convolution. The output result of the previous step is used as input, and another part of the feature map is generated through a series of linear operations. Finally, the two parts are superimposed, which greatly reduces the number of parameters without affecting the effect. The InceptionV2 structure uses different branches and different convolution kernels to extract different features to enrich the extracted feature information. Two 3×3 convolution kernels are used instead of a 5×5 convolution kernel. Further, asymmetric convolution 3×1 followed by 1×3 convolution is used to replace 3×3 convolution, which not only enriches the feature information but also reduces the amount of calculation. This model extracts features of different scales and uses a weighted feature fusion module for efficient feature fusion, and outputs the results through three detection heads of different sizes. Compared with the model that uses Transformer and YOLO combined with only one detection head, this model has broader requirements for the size of the detected target. In addition, YOLOV9 introduces the concept of programmable gradient information Programmable GradientInformation, introduces an additional branch into the network model to predict the results, and also performs back propagation and connects to the shallow layer of the main branch to optimize the model parameters of the main branch model. When ordinary network models are trained for back propagation, as the number of back propagation layers becomes deeper and deeper, more and more information will be lost, resulting in insufficient optimization of the shallow model parameter training of the model. The introduction of auxiliary branches effectively alleviates this problem.
[0055] Example 2 This embodiment 2 describes a computer device, which includes a memory and one or more processors. The memory stores executable code. When the processor executes the executable code, it is used to implement the steps of the construction site intrusion detection method in the above embodiment 1.
[0056] In this embodiment, the computer device is any device or apparatus with data processing capability, which will not be described in detail here.
[0057] Example 3 This embodiment 3 describes a computer-readable storage medium on which a program is stored. When the program is executed by a processor, it is used to implement the steps of the construction site intrusion detection method in the above-mentioned embodiment 1.
[0058] The computer-readable storage medium may be an internal storage unit of any device or apparatus with data processing capabilities, such as a hard disk or memory, or an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc., equipped on the device.
[0059] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.
Claims
1. A construction site intrusion detection method, characterized in that: The steps include: Step 1. Build a construction site intrusion detection model based on the improved YOLOV9 network structure; The improved YOLOV9 network structure includes a main branch, an auxiliary branch, and a raw data repeated loading module Silence. The main branch includes a backbone network, a feature fusion network, and a detection head. The network structure is improved on the basis of the original YOLOV9 network structure by: replacing the original feature extraction module RepNCSPELAN4 in the backbone network with a GhostInceptionV2 module; replacing the original feature pyramid structure fusion module with a weighted feature fusion module with a bidirectional weighted feature pyramid structure; Introduce the attention mechanism SimAM module before each detection head of the main branch; Step 2. Use the training data set to train the construction site intrusion detection model based on the improved YOLOV9 network structure built in step 1, and remove the auxiliary branch after the training is completed; Step 3. Use the trained construction site intrusion detection model to monitor the marked dangerous areas of the construction site in real time, and issue an alarm when it is detected that the coordinates of a person fall into the dangerous area.
2. The construction site intrusion detection method according to claim 1, characterized in that: The backbone network includes two convolutional standardization modules CBS, four feature extraction GhostInceptionV2 modules that combine ghost convolution modules GhostConv and initial modules InceptionV2, three downsampling ADown modules and a layer aggregation pyramid pooling structure SPPELAN module; wherein the four GhostInceptionV2 modules include two GhostInceptionV2a modules, one GhostInceptionV2b module and one GhostInceptionV2c module; In the backbone network, two convolutional normalization modules CBS are defined as CBS-1 and CBS-2 modules, two GhostInceptionV2a modules are defined as GhostInceptionV2a-3 and GhostInceptionV2a-9 modules, a GhostInceptionV2b module is defined as GhostInceptionV2b-5, a GhostInceptionV2c module is defined as GhostInceptionV2c-7, and three downsampling ADown modules are defined as ADown-4, ADown-6 and ADown-8 modules; The signal processing flow in the backbone network is as follows: the input image first passes through the Silence module to save the original input data for auxiliary branch calls, and then passes through the CBS-1 and CBS-2 modules for feature extraction, and then passes through the GhostInceptionV2a-3 module to enrich the extracted feature information, and then uses the ADown-4 module to downsample the feature map, and then passes through the GhostInceptionV2b-5 module to further enrich the extracted feature information, and then uses the ADown-6 module to downsample the feature map, and then passes through the GhostInceptionV2c-7 module, and the result is input into the ADown-8 module to downsample the feature map, and then sent to the GhostInceptionV2a-9 module, and finally passes through the SPPELAN module to generate multi-scale feature maps using pooling of different scales for fusion.
3. The construction site intrusion detection method according to claim 2, characterized in that: The feature fusion network includes five weighted feature fusion modules, two upsampling Unsample modules, five RepNCSPELAN4 modules, two downsampling ADown modules and three attention mechanism SimAM modules; The main branch has three detection heads, which are defined as Detect-1, Detect-2 and Detect-3; The signal processing flow in the feature fusion network is as follows: the input of the feature fusion network is the output of the backbone network, that is, the output of the SPPELAN module. First, the feature map is upsampled through an Unsample module, and then a weighted feature fusion module is used to dynamically weight the upsampled result and the output of the GhostInceptionV2c-7 module in the backbone network. The result is sent to the first RepNCSPELAN4 module to enhance the information representation ability of the feature map, and then an upsample Upsample module is used to upsample the feature map, and then sent to a weighted feature fusion module, and dynamically weighted merged with the output of the GhostInceptionV2b-5 module in the backbone network, and then sent to a RepNCSPELAN4 module, and its result is input into a weighted feature fusion module, and merged with the output of the GhostInceptionV2b-5 module in the backbone network and the result of the downsampling output of the ADown-4 module. The result is then input into a RepNCSPELAN4 module, and then passed through a SimAM module to strengthen the focus on relevant feature information, and the Detect-1 detection head is used to output a result. It is then downsampled through an ADown module and input into a weighted feature fusion module and merged with the result of the output of the first RepNCSPELAN4 module in the feature fusion network and the output of the GhostInceptionV2c-7 module in the backbone network into a RepNCSPELAN4 module. It is then downsampled through a SimAM module to strengthen the focus on relevant feature information, and the Detect-2 detection head is used to output a result. An ADown module is used to downsample and reduce the size of the feature map, and the output is dynamically weighted and merged with the output of the backbone network using a weighted feature fusion module, and input into a RepNCSPELAN4 module. It is then passed through a SimAM module to strengthen the focus on relevant feature information, and sent to the Detect-3 detection head to output a result.
4. The construction site intrusion detection method according to claim 2 or 3, characterized in that: The auxiliary branch includes five convolution normalization modules CBS, four RepNCSPELAN4 modules, three channel segmentation modules CBlinear, three channel fusion modules CBFuse and three detection heads; In the auxiliary branch, the convolution normalization modules of the five branches are respectively defined as the first CBS, the second CBS, the third CBS, the fourth CBS and the fifth CBS modules, the three channel segmentation modules are respectively defined as the first CBlinear, the second CBlinear and the third CBlinear modules, the three channel fusion CBFuse modules are respectively defined as the first CBFuse, the second CBFuse and the third CBFuse modules, and the detection heads of the three auxiliary branches are respectively defined as the first detection head, the second detection head and the third detection head; The signal processing flow in the auxiliary branch is as follows: the input of the auxiliary branch is the output of the Silence module, that is, the original input image saved by the Silence module. First, feature extraction is performed through the first CBS module and the second CBS module, and then the expression ability of the feature map is enhanced through a RepNCSPELAN4 module. Then, it is sent to the third CBS module for convolution extraction, and the output result of the third CBS module is sent to the first CBFuse module; the first CBlinear module is used to separate the output of the GhostInceptionV2c-7 module in the backbone network by the channel dimension, and the output result of the first CBlinear module is sent to the first CBFuse module; the second CBlinear module is used to separate the output of the GhostInceptionV2b-5 in the backbone network by the channel dimension, and the output result of the second CBlinear module is sent to the first CBFuse module; the third CBlinear module is used to separate the GhostInception The output of V2a-9 is separated by channel dimension, and the output result of the third CBlinear module is sent to the first CBFuse module; the outputs of the first CBlinear module, the second CBlinear module, the third CBlinear module and the third CBS module are merged through the first CBFuse module, and then pass through a RepNCSPELAN4 module to enhance the expression ability of the feature map, use the first detection head to output a result, and then pass through the fourth CBS module for convolution to extract features, and send the outputs of the second CBlinear module, the third CBlinear module and the fourth CBS module to the second CBFuse module for merging, and then pass through a RepNCSPELAN4 module, use the second detection head to output a result, and then pass through the fifth CBS module for convolution to extract features, and send the outputs of the third CBlinear module and the fifth CBS module to the third CBFuse module for merging, and then pass through a RepNCSPELAN4 module, and use the third detection head to output a result.
5. The construction site intrusion detection method according to claim 2, characterized in that: The GhostInceptionV2a module consists of four branches, the first branch consists of a GhostConv module with a convolution kernel of 1×1 and a step size of 1, the second branch consists of a GhostConv module with a convolution kernel of 1×1 and a step size of 1 and a GhostConv module with a convolution kernel of 3×3 and a step size of 1, the third branch consists of a GhostConv module with a convolution kernel of 1×1 and a step size of 1 and two GhostConv modules with convolution kernels of 3×3 and a step size of 1, and the fourth branch consists of a maximum pooling layer with a maximum pooling kernel of 3×3 and a GhostConv module with a convolution kernel of 1×1 and a step size of 1; The signal processing flow in the GhostInceptionV2a module is as follows: The feature map in the first branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the second branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and then through a GhostConv module with a convolution kernel of 3×3 and a step size of 1, and the output result is sent to the tensor merging module; the feature map in the third branch is input through a GhostConv module with a convolution kernel of 1×1 and a step size of 1 and two GhostConv modules with convolution kernels of 3×3 and a step size of 1, and then the output result is sent to the tensor merging module; The feature map in the fourth branch is inputted, and then passes through a maximum pooling layer with a maximum pooling kernel of 3×3 and a GhostConv module with a convolution kernel of 1×1 and a stride of 1. The output result is sent to the tensor merging module. The tensor merging module adds the outputs of the first branch, the second branch, the third branch, and the fourth branch in the channel dimension to obtain the output of the GhostInceptionV2a module.
6. The construction site intrusion detection method according to claim 2, characterized in that: The GhostInceptionV2b module consists of 4 branches; the first branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, the second branch consists of a maximum pooling layer with a maximum pooling kernel of 3×3 and a stride of 1 and a GhostConv module with a convolution kernel of 1×1, the third branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, a GhostConv module with a convolution kernel of 1×3 and a stride of 1, and a GhostConv module with a convolution kernel of 3×1 and a stride of 1, the fourth branch consists of a GhostConv module with a convolution kernel of 1×1 and a stride of 1, two GhostConv modules with convolution kernels of 1×3 and a stride of 1, and two GhostConv modules with convolution kernels of 3×1 and a stride of 1; the signal processing flow in the GhostInceptionV2b module is as follows: The feature map in the first branch is fed into the tensor merging module through a GhostConv module with a convolution kernel of 1×1 and a stride of 1. The feature map in the second branch is fed into the tensor merging module through a maximum pooling layer with a maximum pooling kernel of 3×3 and a stride of 1 and a GhostConv module with a convolution kernel of 1×1 and a stride of 1. The feature map input into the third branch passes through a GhostConv module with a convolution kernel of 1×1 and a stride of 1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a stride of 1 and a GhostConv module with a convolution kernel of 3×1 and a stride of 1 for asymmetric convolution. The output result of the GhostConv module with a convolution kernel of 3×1 and a stride of 1 is then sent to the tensor merging module. The feature map input into the fourth branch passes through a GhostConv module with a convolution kernel of 1×1 and a step size of 1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a step size of 1 and a GhostConv module with a convolution kernel of 3×1 and a step size of 1 for asymmetric convolution, and then passes through a GhostConv module with a convolution kernel of 1×3 and a step size of 1 and a GhostConv module with a convolution kernel of 3×1 and a step size of 1 to further improve the richness of feature extraction, and its output result is sent to the tensor merging module; the output of the GhostInceptionV2b module is the result of adding the outputs of the first branch, the second branch, the third branch and the fourth branch in the tensor merging module in the channel dimension.
7. The construction site intrusion detection method according to claim 2, characterized in that: The GhostInceptionV2c module consists of 4 branches; The first branch consists of a GhostConv module with a convolution kernel of 1×1, the second branch consists of a maximum pooling layer Max_Pool and a GhostConv module with a convolution kernel of 1×1, the third branch consists of a GhostConv module with a convolution kernel of 1×1, a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1, and the fourth branch consists of a GhostConv module with a convolution kernel of 1×1, a GhostConv module with a convolution kernel of 3×3, a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1; the signal processing flow in the GhostInceptionV2c module is as follows: The feature map in the first branch is fed into a GhostConv module with a convolution kernel of 1×1, and the output result is sent to the tensor merging module; the feature map in the second branch is fed into a maximum pooling layer and a GhostConv with a convolution kernel of 1×1. The module output result is sent to the tensor merging module; the feature map input in the third branch first passes through a GhostConv module with a convolution kernel of 1×1, and then passes through a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1 in the third branch for asymmetric convolution and then merged and sent to the tensor merging module; the feature map input in the fourth branch passes through a GhostConv module with a convolution kernel of 1×1, and then passes through a GhostConv module with a convolution kernel of 3×3, and then passes through a GhostConv module with a convolution kernel of 1×3 and a GhostConv module with a convolution kernel of 3×1 in the fourth branch to increase the feature combination capability, and the output results are merged and sent to the tensor merging module; the tensor merging module adds the outputs of the first branch, the second branch, the third branch and the fourth branch in the channel dimension to obtain the output of the GhostInceptionV2c module.
8. The construction site intrusion detection method according to claim 1, characterized in that: SimAM attention mechanism is based on the energy function and come; in represents the weight of the target neuron, represents the bias coefficient, express and ,when for When y is When 0 is indicated, represents the number of neurons; , , represents trainable weights; Minimizing the energy function formula is equivalent to training neurons in the same channel Linear separability from other neurons; using binary labels and adding regularization terms, the final energy function is defined as follows: ; The analytical solution of the above formula is: , ; in is the regularization term, , ; Since all neurons on each channel follow the same distribution, the mean and variance of the input features are first calculated in two dimensions: length H and width W to avoid repeated calculations. ; in represents the energy function value, , ; The whole process is expressed as ; in represents the input feature map, represents the output feature map, Represents the energy function value.
9. A computer device comprising a memory and one or more processors; an executable code is stored in the memory; characterized in that: When the processor executes the executable code, it is used to implement the steps of the construction site intrusion detection method described in any one of claims 1 to 8 above.
10. A computer-readable storage medium having a program stored thereon; characterized in that: When the program is executed by a processor, it is used to implement the steps of the construction site intrusion detection method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Construction worker dangerous area intrusion detection method based on improved Yolov5 model
CN114997279A
Unmanned ship target detection system and method in complex environment
CN117173522A
Multi-type document element detection and content extraction method and system, medium and equipment
CN117237973A
Cited By
Steel surface defect identification method and device, computer equipment and storage medium
CN120164082A
Intelligent detection algorithm, system and equipment for vehicle bottom inspection robot and memory
CN121147711A
Construction site personnel intrusion detection method based on improved YOLO model
CN122244805A
A construction site personnel intrusion detection method based on an improved YOLO model
CN122244805B
