High-rise building construction safety monitoring method and system based on multiple deep learning
Through StyleGAN-T and the improved YOLOv7 deep neural network, high-precision, real-time monitoring and early warning of the wearing status of employees' helmets and seat belts at high-rise building construction sites are achieved, solving the problems of traditional manual supervision being difficult to achieve full-time coverage and information delays. , improving the safety management level and work efficiency of the construction site.
Patent Information
- Application Number
- CN202411028492.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-29
AI Technical Summary
There are great safety risks during the construction of high-rise buildings. It is difficult for traditional manual supervision to achieve full-time and all-round coverage, and there are delays in information transmission and processing, making it difficult to achieve real-time warning and prevention.
StyleGAN-T generative adversarial network and improved YOLOv7 deep neural network are used to achieve high-precision, real-time monitoring and early warning of the wearing status of employees' helmets and safety belts at construction sites by generating high-quality virtual data sets and target detection algorithms.
It improves the safety management level of the construction site, reduces labor supervision costs, improves work efficiency, ensures employee safety, and reduces the incidence of work-related injuries.
Smart Images

Figure CN118865253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of workplace safety management and computer vision technology, and in particular to a high-rise building construction safety monitoring method and system based on multiple deep learning methods. Background Art
[0002] The construction process of high-rise buildings is difficult, time-consuming, and accompanied by greater safety risks. Especially when working at height or operating heavy machinery in complex environments, the importance of safety management of personnel and equipment becomes more prominent. Therefore, it is crucial to ensure the safety of employees in the working environment, such as wearing helmets and safety belts correctly. Traditional manual supervision relies on the experience and vigilance of on-site safety personnel, but human resources are limited and it is difficult to achieve full-time and all-round coverage, especially in vast and complex construction sites. In addition, after the traditional method discovers safety hazards, there may be delays in information transmission and processing, which delays the implementation of emergency measures. Relying on post-event analysis and response, it is difficult to achieve real-time early warning and prevention of potential risks.
[0003] With the advancement of technology, computer vision has become a key technology to improve construction safety, reduce accidents and improve efficiency. Computer vision can not only significantly improve the safety level of construction sites, but also improve construction efficiency and quality, bringing significant economic and social benefits to construction companies. However, traditional computer vision technology has poor generalization performance and is greatly affected by environmental factors, which is not enough to be applied to the complex environment of construction sites. Safety recognition technology based on deep learning provides an efficient and automated solution. It can identify and evaluate safety risks on construction sites in real time, thereby greatly improving the overall safety management level and adapting to various complex construction environments. However, the successful training of deep learning models is highly dependent on a large amount of high-quality, accurately labeled training data. In the field of construction safety, obtaining sufficient labeled data is a major challenge, which makes a monitoring system with high accuracy, fast detection rate and a large number of training data samples very urgent. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an intelligent, efficient, high-precision, deep learning-based high-rise building construction safety monitoring method and system with automatic learning function. The method adopts StyleGAN-YOLO, and uses StyleGAN-T to continuously generate a higher-quality data set to realize the automatic learning function. Combined with the improved YOLOv7 deep neural network, it realizes high-precision and rapid monitoring of the wearing of helmets and safety belts in the workplace, and can accurately and efficiently identify employees who do not wear safety equipment correctly, realize real-time monitoring and early warning, and provide an effective means to improve the safety of the workplace.
[0005] To achieve the above object, the technical solution of the present invention is:
[0006] In a first aspect, the present invention provides a high-rise building construction safety monitoring method based on multiple deep learning, the monitoring method comprising the following contents:
[0007] Obtain images of employees wearing helmets and safety belts in the workplace and build a dataset;
[0008] StyleGAN-T is used to enhance the data set:
[0009] The StyleGAN-T includes a generator and a discriminator. First, a random latent code z is input into the generator. Then, it passes through two fully connected modules in the generator in sequence, and then the text feature vector C generated by inputting it into the CLIP text encoder module with the text prompt module text Through the splicing function module, they are spliced together to generate the intermediate latent code w; then, w is spliced with the Fourier feature module and output through the 8×8 generator module to generate an 8×8 image. At the same time, the 8×8 image is spliced with w and output through the 16×16 generator module to generate a 16×16 image. At the same time, the 16×16 image is spliced with w and output into the 32×32 generator module. After continuous iteration, the 512×512 image is spliced with w and output through the 1024×1024 generator module to generate a 1024×1024 high-quality image.
[0010] After the 1024×1024 image is generated and output, the image feature vector C is output by random 64×64 cropping, upsampling, and CLIP image encoder. image The text feature vector C generated by embedding the text prompt into the CLIP text encoder text At the same time, splicing is performed in CLIP guidance;
[0011] At the same time, the generated 1024×1024 high-quality image will be output through the enhancement and cropping modules, and then enter the DINO encoder through the tokenization module and five series-connected transformation neural network modules ×3 for output. In the tokenization module and the five transformation neural network modules ×3, the output result of each module will not only be input into the next module, but also enter the six discriminator heads of the discriminator and the text feature vector C text After processing, the six discriminator heads output scores and feed them back to the generator, so that the generator can continuously generate more accurate pictures;
[0012] First, StyleGAN-T is trained using the acquired images and evaluated using the Fid evaluation indicator. When Fid reaches above 90, the training is terminated. The trained StyleGAN-T is used to obtain the target number of virtual images and generate virtual data.
[0013] Use the acquired images and virtual data to build a target dataset for training the improved YOLOv7 deep neural network;
[0014] The improved YOLOv7 deep neural network includes a backbone network Backbone and a head structure Head. An input image is input into the backbone network Backbone. In the backbone network Backbone, the image is sequentially passed through a composite convolution module CGL1, a composite convolution module CGL2, a composite convolution module CGL1, a composite convolution module CGL2, a first extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, a second extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, a third extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, and a fourth extended efficient layer aggregation network ELAN, and then outputs a spatial pyramid pooling and cross-stage partial network module SPPCSPC connected to the Head network. The spatial pyramid pooling and cross-stage partial network module SPPCSPC are passed through a composite convolution module CGL3 and an up-sampling output result A.
[0015] The output of the third extended efficient layer aggregation network ELAN of the backbone network Backbone is simultaneously concatenated with the result A through a composite convolution module CGL3. The concatenated result is then concatenated through the first improved extended efficient layer aggregation network ELAN-W, the composite convolution module CGL3, and the up-sampled output result B.
[0016] The output of the second extended efficient layer aggregation network ELAN of the backbone network Backbone is simultaneously concatenated with the result B through a composite convolution module CGL3. The concatenated result is connected to the composite global average pooling module GP-2 and the composite repeated convolution module REP through the second improved extended efficient layer aggregation network ELAN-W. The output of the composite global average pooling module GP-2 is concatenated with the output of the result A after being processed by the first improved extended efficient layer aggregation network ELAN-W. The concatenated output is processed by the third improved extended efficient layer aggregation network ELAN-W, and then concatenated with the output of the spatial pyramid pooling and the cross-stage partial network SPPCSPC through a composite global average pooling module GP-2, and finally processed by the fourth improved extended efficient layer aggregation network ELAN-W.
[0017] The outputs of the second improved extended efficient layer aggregation network ELAN-W, the third improved extended efficient layer aggregation network ELAN-W, and the fourth improved extended efficient layer aggregation network ELAN-W are respectively connected to a CGT module through a composite repeated convolution module REP, and the outputs of the three CGT modules are connected to each other to output a large pixel feature map as the output image of the final network;
[0018] The target dataset is used to train an improved YOLOv7 deep neural network for safety monitoring of the wearing of safety equipment in the workplace, including the wearing of helmets and seat belts.
[0019] Furthermore, the composite convolution modules CGL1, CGL2 and CGL3 have the same structure, including a convolution layer, a GN layer and a LeakyReLU activation function, and the step sizes and convolution kernel sizes of the three are different, CGL1: k=3, s=1; CGL2: k=3, s=2; CGS3: k=1, s=1, where k is the convolution kernel size and s is the step size;
[0020] The composite repeated convolution module REP is composed of a convolution layer and a GN layer connected in series to form a branch. Two such identical branches are connected in parallel and then connected in parallel with a branch composed of a GN layer. The outputs of the three branches are superimposed to obtain the output of the composite repeated convolution module REP.
[0021] The composite global average pooling module GP-1 and the composite global average pooling module GP-2 have the same structure, both of which include two branches, one branch is composed of a global average pooling layer and a composite convolution module CGL3, and the other branch is composed of a composite convolution module CGL3 and a composite convolution module CGL2 connected in series. The outputs of the two branches are spliced to obtain the output of the composite global average pooling module GP-1 or the composite global average pooling module GP-2, wherein the number of hidden layers of the composite global average pooling module GP-1 is i / 2, and the number of hidden layers of the composite global average pooling module GP-2 is i, where i represents the number of input nodes;
[0022] The structure of the spatial pyramid pooling and cross-stage partial network module SPPCSPC is as follows: the data passes through the first composite convolution module CGL3, the composite convolution module CGL1, and the second composite convolution module CGL3 once, and then undergoes three parallel global average pooling processes. The results of the three global average pooling processes are spliced with the data of the first composite convolution module CGL3, the composite convolution module CGL1, and the second composite convolution module CGL3. After that, the data passes through the third composite convolution module CGL3 and then directly spliced with the input of the spatial pyramid pooling and cross-stage partial network module SPPCSPC and the output processed by the fourth composite convolution module CGL3. Finally, the output of the spatial pyramid pooling and cross-stage partial network module SPPCSPC is obtained after the fifth composite convolution module CGL3.
[0023] The input of the extended efficient layer aggregation network ELAN passes through a global average pooling layer and a compound convolution module CGL3 to output the result E. The input of the extended efficient layer aggregation network ELAN passes through the compound convolution module CGL3 and three series-connected compound convolution modules CGL1 at the same time to output the result F. Then, the input of the extended efficient layer aggregation network ELAN only passes through the compound convolution module CGL3 to output the result G, and only passes through the compound convolution module CGL3 and two series-connected compound convolution modules CGL1 to obtain the result H. Then, E, F, G, and H are concatenated together, and finally the output of the extended efficient layer aggregation network module ELAN is obtained through a compound convolution module CGL3.
[0024] The improved extended efficient layer aggregation network ELAN-W has a similar structure to the extended efficient layer aggregation network ELAN, except that there are four composite convolution modules CGL1 in series on the result F branch. The outputs of the first three composite convolution modules CGL1 in series are used to obtain the results H, I, and J respectively. E, F, G, H, I, and J are concatenated together, and finally the output of the extended efficient layer aggregation network ELAN-W is obtained through a composite convolution module CGL3.
[0025] The CGT module consists of a convolutional layer, a GN layer and a tanh activation function.
[0026] Furthermore, in StyleGAN-T, the structure of the generator module is upsampling, convolutional blocks and five residual blocks connected in sequence. The generated data enters the generator module of the lower layer with higher pixels on the one hand, and the generated data accumulates the image features into the next layer through the ToRGB module on the other hand, and is combined with the features of the next layer;
[0027] The structure of the residual block is that the data is output through the convolution layer module, the layer normalization module, and the convolution layer module, and then scaled through the layer scaling module, and then added element-wise with the data output by the convolution layer module and output to achieve feature fusion and transmission.
[0028] The structure of the convolution block is that the intermediate latent code w is divided into three vectors S1, S2, and S3 after being output by the affine transformation module and the data segmentation module. The dot product of the S1 and S2 vectors converts the affine transformation into a second-order polynomial network, and is added to the S3 output by the data segmentation module to generate s. S is dot-multiplied with the up-sampled output and output through the 3×3 convolution layer module. The output of the 3×3 convolution layer module is processed by weights and s is processed by the demodulation module before being output. The output of the demodulation module is dot-multiplied with the output of the 3×3 convolution layer module, and then output through the bias and noise module and the PReLU activation function module to obtain the output of the convolution block.
[0029] The structure of the discriminator head is that the one-dimensional tag sequence from the DINO encoder is output through the convolutional layer module, batch normalization module, PReLU activation function module, convolutional layer module, batch normalization module, PReLU activation function module, and then added with the output of the PReLU activation function module and output through the convolutional layer module, and at the same time combined with the text feature vector C text The data output by the affine transformation module is normalized by the loss function.
[0030] In a second aspect, the present invention provides a high-rise building construction safety monitoring system based on multiple deep learning methods, the system comprising:
[0031] A workplace safety monitoring system based on multiple deep learning methods, specifically designed to monitor the wearing of helmets and safety belts, including the following modules:
[0032] The image collection and processing module uses an industrial camera to collect images of the work area, obtains multiple frames of images including employee head and body position information, and pre-processes the images.
[0033] The data annotation module is used to annotate the preprocessed images, annotate the positions of the employees’ heads and bodies in the preprocessed images, and distinguish whether they are wearing helmets and safety belts;
[0034] The data augmentation module is connected to the data annotation module and uses the annotated images to train StyleGAN-T, so as to generate a target number of virtual images with the trained StyleGAN-T.
[0035] The target detection module is connected with the data annotation module and the data enhancement module to obtain the annotated images and the generated virtual images, so as to train the improved YOLOv7 deep neural network to detect whether the workers in the high-rise building construction site are wearing the helmets and safety belts correctly;
[0036] The early warning processing module is connected to the target detection module. The target detection module detects the wearing of safety helmets and safety belts in the construction input image, and promptly feeds back the information of not wearing safety helmets and safety belts to the background system. The background system automatically issues an alarm and prompts relevant personnel to take measures.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The monitoring method of the present invention uses the improved StyleGAN-T generative adversarial network to process the original data set, generate high-quality images, enhance the data set, enrich the number of samples close to the real ones, and obtain the target data set with clearer images. The target data set is used to train the improved YOLOv7 neural network to monitor the wearing of helmets and safety belts, and output the target recognition results.
[0039] The StyleGAN-TStyleGAN-T of the present invention can generate images with a resolution of 1024×1024, and the pixel value of the image is greatly improved, which helps to improve the accuracy of later target detection. By generating highly simulated virtual data that is different from the original data, the problem of small amount of algorithm data in traditional civil engineering is solved, especially the problem of small amount of data on the safety status of some personnel and special machinery is improved, and the generalization performance is improved.
[0040] The safety monitoring system of the present invention is highly customizable, and can adjust the monitoring method according to different working environments and types of safety risks, and provide real-time feedback to the staff so that safety measures can be adjusted in time. This system has wide applicability and practicality, and can be used for safety monitoring in a variety of working environments, including high-risk workplaces such as construction sites, factories, and mining areas. In practical applications, the present invention provides a new idea and solution for workplace safety monitoring, and at the same time provides strong support and guarantee for improving workplace safety. By using this deep learning-based monitoring system, not only can the cost of manual supervision be significantly reduced and work efficiency be improved, but the safety of employees can also be ensured, thereby reducing the incidence of work-related accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a structural schematic diagram of a high-rise building construction safety monitoring system based on multiple deep learning methods according to an embodiment of the present invention.
[0042] Figure 2It is a flow chart of the high-rise building construction safety monitoring method based on multiple deep learning methods of the present invention.
[0043] Figure 3 It is a schematic diagram of the structure of the improved YOLOv7 deep neural network according to an embodiment of the present invention.
[0044] Figure 4(a) is a schematic diagram of the structure of the spatial pyramid pooling and cross-stage partial network module SPPCSPC in the improved YOLOv7 deep neural network.
[0045] Figure 4(b) is a schematic diagram of the structure of the composite convolution module in the improved YOLOv7 deep neural network.
[0046] Figure 4(c) is a schematic diagram of the structure of the composite repeated convolution module in the improved YOLOv7 deep neural network.
[0047] Figure 4(d) is a schematic diagram of the structure of the composite global average pooling module in the improved YOLOv7 deep neural network.
[0048] Figure 4(e) is a schematic diagram of the structure of the CGT module in the improved YOLOv7 deep neural network.
[0049] Figure 5 It is a structural diagram of the improved extended efficient layer aggregation network and the extended efficient layer aggregation network in the improved YOLOv7 deep neural network.
[0050] Figure 6 It is a schematic diagram of the structure of the StyleGAN-T generative adversarial network improved by an embodiment of the present invention.
[0051] Figure 7(a) is a schematic diagram of the structure of the generator module in StyleGAN-T.
[0052] Figure 7(b) is a schematic diagram of the structure of the discriminator head in StyleGAN-T.
[0053] Figure 7(c) is a schematic diagram of the structure of the convolution block of the generator module in StyleGAN-T.
[0054] Figure 7(d) is a schematic diagram of the structure of the residual block of the generator module in StyleGAN-T. DETAILED DESCRIPTION
[0055] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is described in detail below in conjunction with the accompanying drawings and embodiments. It should be noted that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0056] The present invention relates to a safety monitoring system for high-rise building construction sites, in particular to a system that uses sensors and deep learning technology to identify whether workers are wearing helmets and safety belts correctly. With the strengthening of safety regulations in the construction industry, the demand for on-site safety supervision is growing. The traditional manual supervision method has problems such as low efficiency and monitoring blind spots. To this end, the present invention provides an automated and intelligent monitoring solution to improve the safety management efficiency and response speed of the construction site.
[0057] In actual application scenarios, the system includes multiple high-definition cameras fixed in key areas of the construction site, such as entrances, heavy machinery operation areas, and high-risk work areas. These cameras capture real-time image data of the construction site and analyze the workers' equipment status through a preset deep learning model. The deep learning model used by the system is based on an improved YOLOv7 algorithm, which has been specially trained to accurately identify personal protective equipment such as helmets and safety belts in images.
[0058] Once the system identifies a worker who is not wearing a helmet or safety belt as required, it automatically sends a real-time alert to the on-site monitoring center. The alert information includes the location, time, and image evidence of the worker who is not wearing safety equipment, ensuring that on-site managers can respond quickly and take necessary safety measures.
[0059] In addition, the system also includes a user-friendly control panel for security managers to monitor real-time data streams, view historical event records, and adjust system settings. In this way, the invention greatly reduces the pressure on human resources, improves the safety assurance capabilities of the construction site, and is an ideal choice for efficiently dealing with risks in high-rise building construction.
[0060] Through this innovative technical application, the present invention not only optimizes the safety management process of construction, but also provides a reliable safety assurance technology for the construction industry, which has broad market application prospects and social value.
[0061] Example 1
[0062] This embodiment is based on a high-rise building construction safety monitoring method based on multiple deep learning, and the steps of the monitoring method are:
[0063] Get images of employees wearing hard hats and safety belts in the workplace;
[0064] StyleGAN-T is used to enhance the data set:
[0065] First, use pictures to train StyleGAN-T, and use the Fid evaluation indicator to evaluate it. When Fid reaches 90 or above, the training is terminated. After training, StyleGAN-T can generate the desired number of pictures (thousands or even tens of thousands), thereby achieving the effect of data enhancement. With StyleGAN-T, the generated images are clearer and the enhancement effect is better. The photos generated by StyleGAN-T can also improve the generalization performance of the model by generating virtual data. StyleGAN-T can generate 1024×1024 pictures, and the picture pixel value is greatly improved. MAP has increased by 15 points from the traditional 83% to an astonishing 98%.
[0066] The specific process is as follows: first, a random latent code z is input into the generator, and then it is sequentially passed through the fully connected layer 1 (Fully-connected1) module and the fully connected layer 2 (Fully-connected2) module in the generator. At the same time, the text feature vector (Ctext) generated by the text prompt (Text prompt) module and the CLIP text encoder (CLIP text encoder) module are concatenated together through the concatenation function (Concat) module to generate the intermediate latent code w.
[0067] After that, w is spliced with the Fourier features module and then outputted through the 8×8 generator block to generate an 8×8 image. The 8×8 image is spliced with w and then outputted through the 16×16 generator block to generate a 16×16 image. The 16×16 image is spliced with w and then outputted through the 32×32 generator block. The process is repeated over and over again. Finally, the 512×512 image is spliced with w and then outputted through the 1024×1024 generator block to generate a 1024×1024 high-quality image, which is a clearer and higher-quality image. The output of each layer of the generator module is also spliced with noise and passed into the next layer of the generator module to control the feature changes of the image, making the generated image more realistic.
[0068] After the 1024×1024 image is generated, the image feature vector (Cimage) output by random 64×64 cropping, upsampling, and CLIP image encoder is concatenated with the text feature vector (Ctext) generated by the text prompt module embedded in the CLIP text encoder module under CLIP guidance.
[0069] At the same time, the generated 1024×1024 high-quality image will be output through the enhancement and cropping module (Augment&crop), and then enter the DINO encoder (DINO encoder) through the tokenization module (Tokenize), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), and transform neural network module × 3 (Transformer×3) for output, which can improve the speed of model training and reasoning. Among the modules including tokenization module (Tokenize), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), and transform neural network module × 3 (Transformer×3), the output results of each module, in addition to being input into the next module, will also enter the discriminator (Discriminator) and be spliced with the text feature vector (Ctext), and then output scores respectively through six discriminator heads. The six discriminator heads correspond to the above six outputs (the outputs of the six modules including tokenization module (Tokenize), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), transform neural network module × 3 (Transformer×3), and transform neural network module × 3 (Transformer×3)), which can enable the discriminator to identify images more accurately and thus give a more realistic score.
[0070] Some improvements have been made in the generator block, specifically, a residual block has been applied to prevent the neural network from degenerating.
[0071] The structure of the generator block (see Figure 7(a)) is that after the data is output through upsampling (Upsample), convolution block (ModConv) and five residual blocks (Residual block), the generated image enters the generator block of the lower layer with higher pixels. On the other hand, the data will accumulate image features through the ToRGB module and enter the next layer to be combined with the features of the next layer. This process is repeated to finally obtain a high-quality image.
[0072] As shown in Figure 7(d), the structure of the residual block is that the data is output through the convolution layer module, the layer normalization (GroupNorm) module, and the convolution layer module, and then scaled through the layer scaling (Loyer scale) module, and then added to the data output by the first convolution layer module at the element level and output to achieve feature fusion and transmission, which has a better effect in preventing neural network degradation.
[0073] As shown in Figure 7(c), the structure of the convolution block (Modulated convolution) is that the intermediate latent code w is divided into three vectors S1, S2, and S3 after being output by the affine transformation (Affine) module and the data segmentation (split) module, wherein the dot product of the S1 and S2 vectors converts the affine transformation into a second-order polynomial network, and is added with the S3 output by the data segmentation (Spilt) module to generate s, s is dot-multiplied with the up-sampled output and output through the 3×3 convolution layer module, and the output of the 3×3 convolution layer module is processed by the weight (Weight) and s is processed by the demodulation module (Demod) and then output, the output result of the demodulation module is dot-multiplied with the output result of the 3×3 convolution layer module, and then output through the bias and noise (Bias & noise) module and the PReLU activation function module to obtain the output of the convolution block. The use of the PReLU activation function module can improve the computational efficiency and the efficiency of solving multiple categories of problems, and can be used in combination with the gradient-based optimization algorithm.
[0074] As shown in Figure 7(c), the discriminator head includes: three convolutional layer modules, an affine transformation module, two batch normalization modules, and two PReLU activation function modules. The 1D sequence of tokens from the DINO encoder or the output of the transformation neural network module ×3 is processed by the convolutional layer module, batch normalization module (BatchNorm), PReLU activation function module, convolutional layer module (Conv), batch normalization (BatchNorm), PReLU activation function module to output the result M, which is then added to the output of the first PReLU activation function module and output through the convolutional layer module, and at the same time combined with the text feature vector (C text ) After the output data is processed by the affine transformation module, the Per-token hinge loss function is calculated to achieve normalization. The six discriminator heads output scores and feed them back to the generator, so that the generator can continuously generate more accurate pictures.
[0075] The six discriminator heads provided in the present invention enhance the model's ability to capture image features. The five Transformer×3 modules are used in the DINO encoder, which enables the discriminator to more accurately identify the authenticity of the image, more fully capture the features and structural information in the image, and more comprehensively analyze the subtle features of the seat belts and helmets in the image, thereby improving the recognition accuracy and robustness of the seat belts and helmets, and being able to better understand and analyze the seat belts and helmets in complex scenes, thereby achieving more reliable and efficient recognition results in practical applications, and being more flexible and powerful in processing seat belt and helmet recognition tasks in complex scenes and different environments.
[0076] The StyleGAN-T includes a generator architecture and a discriminator architecture. The generator architecture can produce 1024×1024 images. Compared with the 512×512 images produced by the highest 512×512 generator module (512×512Generatorblock) in the traditional StyleGAN generator architecture, the images are clearer and of higher quality.
[0077] The PReLU activation function is used in the convolution block to replace the Leaky ReLU activation function. It is adjusted to adapt to the data during training and has better performance. In addition, since the parameters of the PreLU activation function are learnable, PReLU can provide better generalization ability than Leaky ReLU.
[0078] In this method, the images obtained from the workplace surveillance video are first preprocessed and the wearing conditions of key safety equipment are annotated, such as whether a helmet or seat belt is worn. The StyleGAN-T is first trained using the acquired images and evaluated using the Fid evaluation indicator. The training is terminated when Fid reaches above 90. The trained StyleGAN-T is used to obtain the target number of virtual images and generate virtual data.
[0079] The acquired images and virtual data are used to construct a target dataset for training the improved YOLOv7 deep neural network; the target dataset is divided into a training set and a test set to prepare for subsequent model training and verification.
[0080] The improved YOLOv7 deep neural network is a target detection algorithm responsible for identifying whether a person in an image is wearing safety equipment.
[0081] By using the training set to train the target detection algorithm, it is possible to accurately identify whether a person is wearing safety equipment, obtain images of people who are not wearing safety equipment correctly, and issue warnings, thereby effectively improving the accuracy and efficiency of workplace safety monitoring.
[0082] The trained improved YOLOv7 deep neural network is used to detect the wearing of helmets and seat belts in the video images to be identified. The detection results are compared with the preset threshold to determine whether to issue a safety alarm. Continuous monitoring is carried out and corresponding measures are taken based on the alarm information to ensure that safety regulations are complied with.
[0083] The improved YOLOv7 deep neural network (see Figure 3) includes a backbone network Backbone and a head structure Head. The input image is input into the backbone network Backbone. In the backbone network Backbone, it passes through the composite convolution module CGL1, the composite convolution module CGL2, the composite convolution module CGL1, the composite convolution module CGL2, the first extended efficient layer aggregation network ELAN, the composite global average pooling module GP-1, the second extended efficient layer aggregation network ELAN, the composite global average pooling module GP-1, the third extended efficient layer aggregation network ELAN, the composite global average pooling module GP-1, the fourth extended efficient layer aggregation network ELAN, and then outputs the spatial pyramid pooling and cross-stage partial network module SPPCSPC connected to the Head network. The spatial pyramid pooling and cross-stage partial network module (SPPCSPC) passes through a composite convolution module CGL3 and upsamples UPsample to output the result A. The output of the third extended efficient layer aggregation network ELAN is simultaneously The concatenated result is concatted with the result A through a composite convolution module CGL3, and the concatenated result passes through the first improved extended efficient layer aggregation network ELAN-W, the composite convolution module CGL3, and the upsampling UPsample to output the result B; the output of the second extended efficient layer aggregation network ELAN is concatted with the result B through a composite convolution module CGL3, and the concatenated result passes through the second improved extended efficient layer aggregation network ELAN-W and is simultaneously connected to the composite global average pooling module GP-2, the output of the composite global average pooling module GP-2 is concatted with the output of the result A processed by the first improved extended efficient layer aggregation network ELAN-W, the concatenated output is processed by the third improved extended efficient layer aggregation network ELAN-W, and then concatinated with the output of the spatial pyramid pooling and the cross-stage partial network SPPCSPC through a composite global average pooling module GP-2, and finally processed by the fourth improved extended efficient layer aggregation network ELAN-W.
[0084] The outputs of the second improved extended efficient layer aggregation network ELAN-W, the third improved extended efficient layer aggregation network ELAN-W, and the fourth improved extended efficient layer aggregation network ELAN-W are all connected to the CGT module through the composite repeated convolution module REP, and the outputs of the three CGT modules are connected to each other to output a large pixel feature map as the output image of the final network.
[0085] As shown in Figure 4(a), the structure of the spatial pyramid pooling and cross-stage partial network module (SPPCSPC) is as follows: the data passes through the first composite convolution module CGL3, the composite convolution module CGL1, and the second composite convolution module CGL3 once, and then undergoes three global average pooling processes. The results of the three global average pooling processes are concatenated with the output of the second composite convolution module CGL3, and then processed by the third composite convolution module CGL3. The data is then directly concatenated with the input of the spatial pyramid pooling and cross-stage partial network module (SPPCSPC) and the output of the fourth composite convolution module CGL3, and finally, the data passes through the fifth composite convolution module CGL3 to obtain the output of the spatial pyramid pooling and cross-stage partial network module SPPCSPC.
[0086] The structures of the composite convolution module (CGL1), composite convolution module (CGL2) and composite convolution module (CGL3) are the same, as shown in Figure 4(b), and they all include a convolution layer, a GN layer and a LeakyReLU activation function, CGL1: k=3, s=1; CGL2: k=3, s=2; CGS3: k=1, s=1, where k is the convolution kernel size and s is the step size.
[0087] As shown in Figure 4(c), the composite repeated convolution module (REP) consists of a convolution layer and a GN layer connected in series to form a branch. Two such identical branches are connected in parallel and then in parallel with a branch consisting of a LN layer. The outputs of the three branches are added to obtain the output of the composite repeated convolution module (REP).
[0088] As shown in Figure 4(d), the composite global average pooling module (GP-1) and the composite global average pooling module (GP-2) have the same structure, both of which include two branches, one branch is composed of the global average pooling layer and the composite convolution module (CGL3), and the other branch is composed of the composite convolution module (CGL3) and the composite convolution module (CGL2). The outputs of the two branches are concatenated to obtain the output of the composite global average pooling module (GP-1) or the composite global average pooling module (GP-2), where the number of hidden layers of the composite global average pooling module (GP-1) is i / 2, and the number of hidden layers of the composite global average pooling module (GP-2) is i, where i represents the number of input nodes.
[0089] As shown in Figure 4(e), the CGT module is composed of a convolutional layer, a GN layer, and a tanh activation function. The tanh activation function is used in the CGT module, which is less likely to cause gradient disappearance and solves the non-zero mean problem of the sigmoid activation function.
[0090] like Figure 5The input of the extended efficient layer aggregation network (ELAN) passes through a global average pooling layer (GlobalAverage Pooling) and a compound convolution module (CGL3) to output a result E. The input of the extended efficient layer aggregation network (ELAN) simultaneously passes through the compound convolution module (CGL3), the compound convolution module (CGL1), the compound convolution module (CGL1), and the compound convolution module (CGL1) to output a result F, and then passes through only the compound convolution module (CGL3), the compound convolution module (CGL3) and the two compound convolution modules (CGL1) to obtain the results G and H, and then E, F, G, and H are concatenated together, and finally pass through a compound convolution module (CGL3) to obtain the output of the extended efficient layer aggregation network module (ELAN).
[0091] like Figure 5 The improved extended efficient layer aggregation network (ELAN-W) has a similar structure to the extended efficient layer aggregation network (ELAN), except that there are four compound convolution modules (CGL1) on the result F branch. The input of the extended efficient layer aggregation network (ELAN) passes through the compound convolution module (CGL3), compound convolution module (CGL1), compound convolution module (CGL1), compound convolution module (CGL1), and compound convolution module (CGL1) to output the result F, and then only passes through the compound convolution module (CLL3), the compound convolution module (CLL3) and the compound convolution module (CGL1), the compound convolution module (CGL3) and two compound convolution modules (CGL1), and the compound convolution module (CGL3) and three compound convolution modules (CGL1) to obtain the results G, H, I, and J, and then E, F, G, H, I, and J are concatenated together, and finally the output of the extended efficient layer aggregation network (ELAN-W) is obtained through a compound convolution module (CGL3).
[0092] In the present invention, the GN (Group Normalization) layer is used in the REP module, the CGT module, and the CGL, and the LeakyReLU (Leaky Rectified Linear Unit) activation function is used in the CGL, which is not prone to gradient vanishing and gradient explosion problems, shortens the network training time, ensures the existence of negative axis information, and solves the problem of some neuron death. It is independent of the batch size, suitable for small and large batches, and suitable for varying input sizes, such as sequences of different lengths. The behavior is consistent during training and reasoning, and no additional adjustments are required.
[0093] In the improved YOLOv7 deep neural network, 300 epochs of training were performed, and a converged model was obtained when the average accuracy mAP50 reached 98%; mAP50 is an important performance indicator in neural networks, used to measure the accuracy of the model. The full name of mAP50 is "meanAverage Precision at 50%IOU", which is the average accuracy at 50% intersection-over-union ratio.
[0094] The improved YOLOv7 deep neural network uses a global average pooling module, which greatly reduces network parameters, reduces overfitting, gives meaning to each channel category of the output feature map, and eliminates the fully connected black box operation.
[0095] Example 2
[0096] This embodiment is based on a high-rise building construction safety monitoring method based on multiple deep learning methods. Figure 2 As shown, the following steps are included:
[0097] (1) Use the image collection and processing module to obtain images of employees in the workplace, focusing on capturing the positions of their heads and bodies to monitor the wearing of helmets and safety belts.
[0098] (2) Annotate the preprocessed images, identify employees who are not wearing helmets or safety belts, and build a convergent model for target detection, namely the improved YOLOv7 deep neural network.
[0099] (3) Inputting the video image to be identified into the obtained convergence model to detect the wearing of the employee's helmet and safety belt to determine whether the employee wears the helmet and safety belt correctly;
[0100] (4) Determine whether an alarm is needed based on target recognition comparison. If it is detected that a helmet or safety belt is not worn or is worn incorrectly, issue an early warning in a timely manner and prompt relevant personnel to take measures to ensure workplace safety;
[0101] The images acquired in step (1) specifically include: images of various conditions of wearing safety helmets and safety belts of employees in the workplace; images of employees not wearing safety helmets and safety belts; images of employees not wearing safety helmets and safety belts properly, etc.
[0102] The step (1) is specifically as follows:
[0103] (1.1) Using the image collection and processing module, images of employees in the workplace are obtained, including images of employees not wearing helmets; images of employees wearing helmets improperly; images of employees not wearing seat belts; and images of employees wearing seat belts improperly.
[0104] (1.2) Convert the collected image format into the standard format 1280*1280 to obtain a standard format image;
[0105] (1.3) low-pass filtering the acquired standard format image using a Gaussian function to obtain a filtered image;
[0106] (1.4) Convert the acquired standard format image and the filtered image into the logarithmic domain and perform a difference (i.e., subtract the low-frequency components in the image) to obtain a reflection image in the logarithmic domain;
[0107] (1.5) Perform image summation on the pixel level on the logarithmic domain reflection image to obtain the result;
[0108] (1.6) Color restoration:
[0109] (1.6.1) At the channel level, for each channel, add the pixel values of the channel in the original image to get the sum of the channel, calculate the maximum value of the sum of all channels, and use it as the denominator of the normalization factor. For the sum of each channel, divide it by the denominator of the normalization factor to get the normalization factor;
[0110] (1.6.2) Normalize the weight matrix (the weight matrix is set manually according to different applications. Here, a uniform weight matrix is used, that is, the weight of each channel is equal), convert it to the logarithmic domain, then multiply it by the nonlinear factor of color restoration (here taken as 2.0), and then divide it by the normalization factor to obtain the image color gain result.
[0111] (1.6.3) Recombine (multiply) the result obtained in (1.5) according to the weight matrix and the result of the image color gain to obtain the image result after color restoration;
[0112] (1.7) Image restoration: Multiply the color restored image result obtained in (1.6.3) by the gain of the image pixel value change range, and add the offset of the image pixel value change range to obtain the final result.
[0113] The gain of the image pixel value change range is a multiplication factor used to adjust the brightness and contrast of the image. It is applied to each pixel value of the image result after color restoration. The offset of the image pixel value change range is a constant value used to shift the image after the multiplication factor. It is added to each pixel value of the image result after color restoration. The final image restoration result is obtained by multiplying the multiplication factor by the image result after color restoration and adding the offset to the multiplication result.
[0114] The step (2) is specifically as follows:
[0115] (2.1) The areas where employees who do not wear helmets or safety belts correctly are located in the preprocessed workplace images are marked, including images of employees not wearing helmets, images of employees wearing helmets improperly, images of employees not wearing safety belts, and images of employees wearing safety belts incorrectly.
[0116] (2.2) The annotated images are divided into training set and test set in a ratio of 7:3;
[0117] (2.3) The labeled training set is read into the improved YOLOv7 deep neural network (target detection algorithm), and the target detection algorithm is trained for 300 epochs until the model converges. That is, when the model training gradient is close to 0, the training is stopped.
[0118] The step (3) is specifically as follows:
[0119] (3.1) Input the test set into the trained object detection algorithm to obtain the pixel width of the prediction box;
[0120] The step (4) is specifically as follows:
[0121] (4.1) Input the workplace image to be identified into the improved YOLOv7 deep neural network, identify the images of employees who are not wearing helmets and safety belts, and obtain the prediction frame of the images of employees who are not wearing safety equipment;
[0122] The step (5) is specifically as follows:
[0123] (5.1) The system receives images for security detection;
[0124] (5.2) If the image is identified as an employee not wearing a helmet or safety belt, the image will be identified again. If it is determined that the employee is wearing the safety equipment properly, no alarm will be issued and no mark will be made; if it exceeds the threshold, proceed to step (5.4);
[0125] (5.3) If the image is identified as another security risk image, proceed to step (5.4);
[0126] (5.4) triggering the early warning module and passing the information of employees who are not wearing safety equipment to the prompt processing module;
[0127] (5.5) The prompt processing module receives the information transmitted by the early warning module, then displays the security risk information and feeds it back to the back-end system;
[0128] (5.6) The back-end system takes corresponding measures based on security risk information;
[0129] (5.7) If the image is not identified as a safety risk or an employee not wearing safety equipment, the employee is deemed to be wearing safety equipment properly and no alarm or mark is issued.
[0130] If the early warning module is triggered in step (5.4), the system will follow the following sub-processes:
[0131] 1) The prompt processing module transmits the information that the helmet and safety belt are not worn or are worn incorrectly to the back-end system;
[0132] 2) The back-end system analyzes the received information and determines the severity level of not wearing safety equipment. For example, if the image of an employee is not wearing a helmet or safety belt, it is considered a serious safety risk; if the employee wears a helmet or safety belt but does not meet the specifications, it is a minor safety risk.
[0133] 3) The back-end system automatically adjusts workplace safety management measures according to the severity of safety risks and sends warning notifications to relevant personnel.
[0134] 4) Relevant personnel conduct further inspections on the safety risk information received and, if necessary, take appropriate measures to resolve the problem, such as reminding employees to wear helmets and safety belts correctly, or stopping operations when necessary.
[0135] 5) The workplace will resume normal operations only after the safety issues have been resolved and it has been confirmed that the workplace meets safety standards. Ensure that the workplace remains in compliance with safety requirements during the subsequent work process.
[0136] The backend system includes the following components:
[0137] Processor: As the core component of the present invention, the processor is responsible for controlling and managing the operation of the entire system, including data acquisition, data processing, image recognition, alarm and other functions, and needs to have sufficient computing power and parallel processing capabilities to meet real-time requirements. The processor can be in different forms such as single-chip microcomputers, microprocessors, computers, etc. to meet the needs of different application scenarios;
[0138] Memory: Memory can be used to store collected data and historical data for subsequent processing and analysis. It has the characteristics of high speed, high reliability and scalability to meet the needs of long-term stable operation of the system;
[0139] Database: The back-end system needs to use a database to store and manage collected data, historical data, analysis results and other information;
[0140] Network interface: The back-end system needs to use a network interface to exchange and communicate data with the front-end system and other external systems. It has the characteristics of high speed, high stability and high security to ensure the reliability and security of data transmission.
[0141] The processor of the computer backend system is configured to execute computer executable instructions, which, when executed, implement various steps of workplace safety monitoring.
[0142] A computer program is stored in the memory of the computer backend system, and the program can be executed by a processor to implement various steps of the workplace safety monitoring method.
[0143] The database of the computer backend system is configured to store and manage data related to security monitoring, including various data types and structures.
[0144] The main feature of the computer back-end system network interface is to realize communication and data transmission between computers. The network interface can provide various communication protocols and data transmission methods to meet the communication and data transmission needs of different application scenarios and different needs, and is applied to each step of the above-mentioned high-rise building construction safety monitoring method based on multiple deep learning.
[0145] Example 3
[0146] Model training phase:
[0147] 1) Install sensors on the construction platform to obtain video of the workplace to monitor whether employees are wearing helmets and safety belts correctly;
[0148] 2) Obtain workplace images frame by frame from a specified location in the video to identify images of employees who are not wearing a helmet, wearing a helmet improperly, not wearing a seat belt, or wearing a seat belt incorrectly;
[0149] 3) Obtain images frame by frame from workplace videos and annotate them to identify employees who are not wearing or wearing helmets and safety belts incorrectly. Use StyleGAN-T to enhance the dataset, then obtain the target dataset and divide the images in the target dataset into a training set and a test set. Input the images in the training set into the improved YOLOv7 deep neural network (target detection algorithm) for 300 epochs of training until the model training gradient is close to 0 and stop training.
[0150] Implementation phase:
[0151] 1) Receive and process images for safety monitoring;
[0152] 2) Input the image to be identified into the convergence model, use the target detection algorithm to obtain the length and width pixel values of the image prediction box, and convert it to obtain the actual size range of the incorrectly worn safety equipment;
[0153] 3) If the image is identified as a problem image, check whether the person in the image is wearing a safety belt and a helmet, and determine whether to trigger the warning module;
[0154] 4) If the image is identified as an employee not wearing a helmet or a safety belt, the warning module is directly triggered and the relevant information is passed to the prompt processing module. The information passed includes the type of safety equipment not worn, such as not wearing a helmet or a safety belt;
[0155] 5) The processing module receives the security risk information transmitted by the early warning module and displays it. Subsequently, the information is fed back to the back-end system to take further security measures, such as suspending operations in the relevant work area;
[0156] 6) The back-end system takes appropriate measures based on the safety risk information received, such as reminding relevant personnel, strengthening on-site monitoring or suspending operations to ensure employee safety;
[0157] 7) If the image is not identified as a security risk, no alarm is given and normal operation continues;
[0158] 8) Operations in the relevant work area will only resume after the workplace is confirmed to be safe.
[0159] The StyleGAN-T can process the data set and generate high-quality images, which can enhance the data set, such as Figure 6 As shown, the generated image is clearer and the enhancement effect is better. First, StyleGAN-T is trained using the processed pictures, and the Fid evaluation indicator is used to evaluate it. When Fid reaches more than 90, the training is terminated. StyleGAN-T can generate pictures with a resolution of 1024×1024. Use the trained StyleGAN-T to generate the desired number of pictures (several thousand or even tens of thousands), obtain the target data set, and then distribute it into training set and test set according to the ratio of 9:1. In this embodiment, the number of original images for training StyleGAN-T is 500-800. The size of the virtual image generated by StyleGAN-T is 1280*1280.
[0160] In order to verify the effectiveness of the security monitoring of the model of this application, the detection results of StyleGAN-T and the improved YOLOv7 deep neural network referred to as StyleGAN-YOLO, YOLO7, YOLO8-X, YOLOV5-X, and Faster-RCNN-resnet101 in the present invention are compared under the same target data set:
[0161] The experimental results show that the virtual data generated by StyleGAN-T can significantly improve the generalization performance of the model, greatly improve the pixel value of the image, and the MAP of the improved YOLOv7 deep neural network is improved by at least 12 points compared with YOLO7. The MAP50 is about 98%, and the mAP50-95 is not less than 66%. At the same time, its FPS screen transmits no less than 55 frames per second. The MAP50 of target detection algorithms such as YOLOv7 and YOLOv8 is not higher than 92%, the mAP50-95 is not higher than 52%, and the FPS is not higher than 50 frames.
[0162] The present invention uses the improved YOLOv7 to train and test on relatively large-sized images, and the mAP50 index is significantly improved, which significantly improves the safety management efficiency and accuracy of high-rise building construction sites. The present invention focuses on automatically detecting whether construction workers are wearing helmets and safety belts correctly, reducing the reliance on manual inspections, reducing the risk of safety accidents, and ensuring the overall safety of construction sites.
[0163] Example 4
[0164] A workplace safety monitoring system based on multiple deep learning methods, specifically designed to monitor the wearing of helmets and safety belts, including the following modules:
[0165] The image collection and processing module uses an industrial camera to collect images of the work area, obtains multiple frames of images including employee head and body position information, and pre-processes the images.
[0166] The data annotation module is used to annotate the preprocessed images, annotate the positions of the employees’ heads and bodies in the preprocessed images, and distinguish whether they are wearing helmets and safety belts;
[0167] The data augmentation module is connected to the data annotation module and uses the annotated images to train StyleGAN-T, so as to generate a target number of virtual images with the trained StyleGAN-T.
[0168] The target detection module is connected with the data annotation module and the data enhancement module to obtain the annotated images and the generated virtual images, so as to train the improved YOLOv7 deep neural network to detect whether the workers in the high-rise building construction site are wearing the helmets and safety belts correctly;
[0169] The early warning processing module is connected to the target detection module. The target detection module detects the wearing of safety helmets and safety belts in the construction input image, and promptly feeds back the information of not wearing safety helmets and safety belts to the background system. The background system automatically issues an alarm and prompts relevant personnel to take measures. The early warning processing module includes an early warning module and a prompt processing module.
[0170] The lens pixels of industrial cameras are different from the actual observation range size. A function is set up to convert the pixels of the prediction frame with the actual observation range, so as to efficiently and quickly obtain the correct position and size parameters of employees who are not wearing helmets or safety belts. This method can accurately identify safety risks in the workplace and provide necessary data support.
[0171] In workplace safety monitoring, it is crucial to ensure that employees wear helmets and safety belts correctly. As an important part of personal protective equipment, these safety equipment need to meet very high requirements in terms of safety, applicability, comfort, etc. Personalized safety equipment manufactured using 3D printing technology can be quickly customized to meet the needs of different employees and ensure that its performance meets safety standards.
[0172] The real-time monitoring system can provide accurate and real-time data analysis, thus helping managers and safety engineers to promptly identify any factors that may affect workplace safety, especially monitoring whether employees are wearing helmets and safety belts correctly. Through these data analysis, timely measures can be taken to ensure that workplace safety meets requirements.
[0173] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
[0174] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0175] The present invention faces the problem that current workplace safety monitoring relies heavily on manual patrols. This method consumes a lot of manpower and economic costs, and is prone to omissions or misjudgments. Especially in high-risk working environments, manual monitoring cannot cover all aspects, and potential safety risks may not be identified and handled in a timely manner. These problems may lead to safety accidents, causing significant economic losses and safety risks. Once the system of the present invention identifies a safety risk, such as not wearing a safety helmet or a safety belt, it will immediately trigger an automatic alarm and automatically adjust safety management measures accordingly. The method of the present invention has high detection accuracy and real-time performance, which can not only significantly reduce the cost of manual safety monitoring and improve efficiency, but also support larger-scale safety management implementation by ensuring workplace safety. Compared with the prior art, the present invention has important practical significance and broad application prospects, especially in improving the safety level of the workplace.
[0176] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the principles and spirit of the present invention are included in the protection scope of the present invention.
[0177] Any matters not described in the present invention are applicable to the prior art.
Claims
1. A high-rise building construction safety monitoring method based on multiple deep learning, characterized in that: The monitoring method includes the following contents: Obtain images of employees wearing helmets and safety belts in the workplace and build a dataset; StyleGAN-T is used to enhance the data set: The StyleGAN-T includes a generator and a discriminator. First, a random latent code z is input into the generator. Then, it passes through two fully connected modules in the generator in sequence, and then the text feature vector C generated by inputting it into the CLIP text encoder module with the text prompt module text Through the splicing function module, they are spliced together to generate the intermediate latent code w; then, w is spliced with the Fourier feature module and output through the 8×8 generator module to generate an 8×8 image. At the same time, the 8×8 image is spliced with w and output through the 16×16 generator module to generate a 16×16 image. At the same time, the 16×16 image is spliced with w and output into the 32×32 generator module. After continuous iteration, the 512×512 image is spliced with w and output through the 1024×1024 generator module to generate a 1024×1024 high-quality image. After the 1024×1024 image is generated and output, the image feature vector C is output by random 64×64 cropping, upsampling, and CLIP image encoder. image The text feature vector C generated by embedding the text prompt into the CLIP text encoder text At the same time, splicing is performed in CLIP guidance; At the same time, the generated 1024×1024 high-quality image will be output through the enhancement and cropping modules, and then enter the DINO encoder through the tokenization module and five series-connected transformation neural network modules ×3 for output. In the tokenization module and the five transformation neural network modules ×3, the output result of each module will not only be input into the next module, but also enter the six discriminator heads of the discriminator and the text feature vector C text After processing, the six discriminator heads output scores and feed them back to the generator, so that the generator can continuously generate more accurate pictures; First, StyleGAN-T is trained using the acquired images and evaluated using the Fid evaluation indicator. When Fid reaches above 90, the training is terminated. The trained StyleGAN-T is used to obtain the target number of virtual images and generate virtual data. Use the acquired images and virtual data to build a target dataset for training the improved YOLOv7 deep neural network; The improved YOLOv7 deep neural network includes a backbone network Backbone and a head structure Head. An input image is input into the backbone network Backbone. In the backbone network Backbone, the image is sequentially passed through a composite convolution module CGL1, a composite convolution module CGL2, a composite convolution module CGL1, a composite convolution module CGL2, a first extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, a second extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, a third extended efficient layer aggregation network ELAN, a composite global average pooling module GP-1, and a fourth extended efficient layer aggregation network ELAN, and then outputs a spatial pyramid pooling and cross-stage partial network module SPPCSPC connected to the Head network. The spatial pyramid pooling and cross-stage partial network module SPPCSPC are passed through a composite convolution module CGL3 and an up-sampling output result A. The output of the third extended efficient layer aggregation network ELAN of the backbone network Backbone is simultaneously concatenated with the result A through a composite convolution module CGL3. The concatenated result is then concatenated through the first improved extended efficient layer aggregation network ELAN-W, the composite convolution module CGL3, and the up-sampled output result B. The output of the second extended efficient layer aggregation network ELAN of the backbone network Backbone is simultaneously concatenated with the result B through a composite convolution module CGL3. The concatenated result is connected to the composite global average pooling module GP-2 and the composite repeated convolution module REP through the second improved extended efficient layer aggregation network ELAN-W. The output of the composite global average pooling module GP-2 is concatenated with the output of the result A after being processed by the first improved extended efficient layer aggregation network ELAN-W. The concatenated output is processed by the third improved extended efficient layer aggregation network ELAN-W, and then concatenated with the output of the spatial pyramid pooling and the cross-stage partial network SPPCSPC through a composite global average pooling module GP-2, and finally processed by the fourth improved extended efficient layer aggregation network ELAN-W. The outputs of the second improved extended efficient layer aggregation network ELAN-W, the third improved extended efficient layer aggregation network ELAN-W, and the fourth improved extended efficient layer aggregation network ELAN-W are respectively connected to a CGT module through a composite repeated convolution module REP, and the outputs of the three CGT modules are connected to each other to output a large pixel feature map as the output image of the final network; The target dataset is used to train an improved YOLOv7 deep neural network for safety monitoring of the wearing of safety equipment in the workplace, including the wearing of helmets and seat belts.
2. The monitoring method according to claim 1, characterized in that: The composite convolution modules CGL1, CGL2 and CGL3 have the same structure, including a convolution layer, a GN layer and a LeakyReLU activation function, and the step sizes and convolution kernel sizes of the three are different: CGL1: k=3, s=1; CGL2: k=3, s=2; CGS3: k=1, s=1, where k is the convolution kernel size and s is the step size; The composite repeated convolution module REP is composed of a convolution layer and a GN layer connected in series to form a branch. Two such identical branches are connected in parallel and then connected in parallel with a branch composed of a GN layer. The outputs of the three branches are superimposed to obtain the output of the composite repeated convolution module REP. The composite global average pooling module GP-1 and the composite global average pooling module GP-2 have the same structure, both of which include two branches, one branch is composed of a global average pooling layer and a composite convolution module CGL3, and the other branch is composed of a composite convolution module CGL3 and a composite convolution module CGL2 connected in series. The outputs of the two branches are spliced to obtain the output of the composite global average pooling module GP-1 or the composite global average pooling module GP-2, wherein the number of hidden layers of the composite global average pooling module GP-1 is i / 2, and the number of hidden layers of the composite global average pooling module GP-2 is i, where i represents the number of input nodes; The structure of the spatial pyramid pooling and cross-stage partial network module SPPCSPC is as follows: the data passes through the first composite convolution module CGL3, the composite convolution module CGL1, and the second composite convolution module CGL3 once, and then undergoes three parallel global average pooling processes. The results of the three global average pooling processes are spliced with the data of the first composite convolution module CGL3, the composite convolution module CGL1, and the second composite convolution module CGL3. After that, the data passes through the third composite convolution module CGL3 and then directly spliced with the input of the spatial pyramid pooling and cross-stage partial network module SPPCSPC and the output processed by the fourth composite convolution module CGL3. Finally, the output of the spatial pyramid pooling and cross-stage partial network module SPPCSPC is obtained after the fifth composite convolution module CGL3. The input of the extended efficient layer aggregation network ELAN passes through a global average pooling layer and a compound convolution module CGL3 to output the result E. The input of the extended efficient layer aggregation network ELAN passes through the compound convolution module CGL3 and three series-connected compound convolution modules CGL1 at the same time to output the result F. Then, the input of the extended efficient layer aggregation network ELAN only passes through the compound convolution module CGL3 to output the result G, and only passes through the compound convolution module CGL3 and two series-connected compound convolution modules CGL1 to obtain the result H. Then, E, F, G, and H are concatenated together, and finally the output of the extended efficient layer aggregation network module ELAN is obtained through a compound convolution module CGL3. The improved extended efficient layer aggregation network ELAN-W has a similar structure to the extended efficient layer aggregation network ELAN, except that there are four composite convolution modules CGL1 in series on the result F branch. The outputs of the first three composite convolution modules CGL1 in series are used to obtain the results H, I, and J respectively. E, F, G, H, I, and J are concatenated together, and finally the output of the extended efficient layer aggregation network ELAN-W is obtained through a composite convolution module CGL3. The CGT module consists of a convolutional layer, a GN layer and a tanh activation function.
3. The monitoring method according to claim 1, characterized in that: In StyleGAN-T, the structure of the generator module is upsampling, convolution blocks and five residual blocks connected in sequence. The generated data enters the generator module of the lower layer with higher pixels on the one hand, and the generated data accumulates the image features into the next layer through the ToRGB module and combines with the features of the next layer on the other hand. The structure of the residual block is that the data is output through the convolution layer module, the layer normalization module, and the convolution layer module, and then scaled through the layer scaling module, and then added element-wise with the data output by the convolution layer module and output to achieve feature fusion and transmission. The structure of the convolution block is that the intermediate latent code w is divided into three vectors S1, S2, and S3 after being output by the affine transformation module and the data segmentation module. The dot product of the S1 and S2 vectors converts the affine transformation into a second-order polynomial network, and is added to the S3 output by the data segmentation module to generate s. S is dot-multiplied with the up-sampled output and output through the 3×3 convolution layer module. The output of the 3×3 convolution layer module is processed by weights and s is processed by the demodulation module before being output. The output of the demodulation module is dot-multiplied with the output of the 3×3 convolution layer module, and then output through the bias and noise module and the PReLU activation function module to obtain the output of the convolution block. The structure of the discriminator head is that the one-dimensional tag sequence from the DINO encoder is output through the convolutional layer module, batch normalization module, PReLU activation function module, convolutional layer module, batch normalization module, PReLU activation function module, and then added with the output of the PReLU activation function module and output through the convolutional layer module, and at the same time combined with the text feature vector C text The data output by the affine transformation module is normalized by the loss function.
4. A high-rise building construction safety monitoring system based on multiple deep learning, characterized in that: The system comprises: A workplace safety monitoring system based on multiple deep learning methods, specifically designed to monitor the wearing of helmets and safety belts, including the following modules: The image collection and processing module uses an industrial camera to collect images of the work area, obtains multiple frames of images including employee head and body position information, and pre-processes the images. The data annotation module is used to annotate the preprocessed images, annotate the positions of the employees’ heads and bodies in the preprocessed images, and distinguish whether they are wearing helmets and safety belts; The data augmentation module is connected to the data annotation module and uses the annotated images to train StyleGAN-T, so as to generate a target number of virtual images with the trained StyleGAN-T. The target detection module is connected with the data annotation module and the data enhancement module to obtain the annotated images and the generated virtual images, so as to train the improved YOLOv7 deep neural network to detect whether the workers in the high-rise building construction site are wearing the helmets and safety belts correctly; The early warning processing module is connected to the target detection module. The target detection module detects the wearing of safety helmets and safety belts in the construction input image, and promptly feeds back the information of not wearing safety helmets and safety belts to the background system. The background system automatically issues an alarm and prompts relevant personnel to take measures.
Citation Information
Cited By
Road inspection robot obstacle avoidance method and system based on instance segmentation
CN119672330A
Passenger car passenger safety monitoring method and system
CN119693926A
Building construction potential safety hazard real-time monitoring system based on AI visual identification
CN121415323A
Action-oriented artificial intelligence industrial safety monitoring system and methods
TWI912039B
