A method and system for detecting falling risks at the edge opening of a major project
Through the improved yolov8, Fast R-CNN and ST-GCN models, combined with multi-head self-attention and optimization algorithm, multi-source information fusion warning for safety equipment and dangerous behaviors is achieved, solving the accuracy and real-time problems of fall monitoring methods in the existing technology, and improving the safety management level of construction sites.
Patent Information
- Application Number
- CN202510742583.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-05
AI Technical Summary
The existing fall monitoring methods have single considerations and low early warning accuracy. They cannot monitor in real time and take timely measures to reduce potential safety risks and hidden dangers at the edge.
The improved yolov8 model, Fast R-CNN model and ST-GCN model are adopted, and combined with the multi-head self-attention mechanism, SGD algorithm, L2 regularization and Dropout technology, security equipment, protective devices and hazardous behavior identification models are built, and real-time monitoring and early warning are achieved through the early warning rules and methods of multi-class and multi-source information fusion.
It improves the accuracy and speed of safety equipment detection, enhances the accuracy of hazardous behavior identification and generalization capabilities of the model, achieves more accurate and timely early warning feedback, reduces hardware requirements, and improves the intelligent level of safety management at the construction site.
Smart Images

Figure CN120279492B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a fall safety monitoring method, and in particular to a fall risk detection method and system for an edge opening of a major project. Background Art
[0002] Managing safety risks at construction project edge openings is a crucial aspect of accident prevention. Construction project edge openings vary in type, and safety precautions primarily rely on hardware such as guardrails and protective covers. However, the dynamic nature of construction and varying risk awareness among construction workers can lead to unsafe behaviors during construction. This, combined with the failure of edge opening protection measures (such as damaged, missing, or insufficiently high guardrails), can easily lead to accidents such as falls or impacts from high-rise edge openings.
[0003] Chinese patent CN114863349A discloses a foundation pit safety monitoring method and system, comprising: collecting and preprocessing data to obtain first identifiable data; performing feature recognition on the first identifiable data against a guardrail feature library to obtain a guardrail type; performing anomaly recognition on the first identifiable data against an anomaly library corresponding to the guardrail type based on the guardrail type to obtain second anomaly data; performing an exclusion comparison on the second anomaly data against an anomaly exclusion library corresponding to the guardrail type based on the guardrail type to obtain third anomaly conclusion data; and generating information based on the third anomaly conclusion data. By comprehensively utilizing the collected image data of the foundation pit, the image data is analyzed and judged from multiple perspectives, including feature recognition, anomaly recognition, and anomaly exclusion of the guardrails surrounding the foundation pit, to form a final anomaly conclusion and generate an alarm and / or prompt information. This significantly reduces misjudgments and achieves efficient monitoring. However, this method, which monitors foundation pit safety based solely on guardrail information, has a single influencing factor and fails to consider the impact of safety equipment and dangerous human behavior on the warning results, which can easily lead to inaccurate warning results. Summary of the Invention
[0004] Purpose of the Invention: The purpose of the present invention is to provide a method for detecting the risk of falling from the edge of a major project, addressing the problems of existing fall monitoring methods, which have limited considerations and low warning accuracy. Another purpose of the present invention is to propose a system for detecting the risk of falling from the edge of a major project, addressing the problem of how to achieve real-time monitoring, calculation, and early warning, and promptly identify and take measures to reduce potential safety risks at the edge.
[0005] Technical solution: The method for detecting the risk of falling from an opening adjacent to an edge of a major project according to the present invention comprises the following steps:
[0006] defining hazard information, wherein the hazard information includes safety equipment information, protective device information, and dangerous behavior information;
[0007] Collect public construction worker monitoring datasets, intercept video datasets corresponding to dangerous information from the Internet, frame and annotate the videos, and obtain safety equipment datasets, protective device datasets, and dangerous behavior datasets;
[0008] A self-attention mechanism is added to the Yolov8 model to establish an improved Yolov8 model. The improved Yolov8 model is trained using a security device dataset and optimized using the SGD algorithm to obtain a security device detection model.
[0009] Establish a Fast R-CNN model and use the protective device dataset to train the Fast R-CNN model to obtain a protective device detection model;
[0010] The OpenPose model is used to extract skeletal joint information from the dangerous behavior dataset;
[0011] L2 regularization and Dropout were added to the ST-GCN model to establish an improved ST-GCN model. Skeletal joint information was used to train the improved ST-GCN model. The hyperparameters of the improved ST-GCN model were optimized using the TPE algorithm to obtain a dangerous behavior recognition model.
[0012] Based on the safety equipment detection model, protective device detection model and dangerous behavior recognition model, the detection of building edge hazards is completed. After the danger result is determined, the early warning alarm is triggered based on the early warning rule method of multi-category and multi-source information fusion and the results are visualized.
[0013] Preferably, the safety equipment information includes wearing a safety helmet and a safety rope; the protective device information includes railing settings, railing safety height and railing placement norms; and the dangerous behavior information includes getting too close to the railing, crossing the railing and running next to the railing.
[0014] Preferably, the adding of the self-attention mechanism into the yolov8 model includes:
[0015] We choose to use a multi-head self-attention mechanism to assign weights by calculating the similarity between the query, key, and value vectors, and then perform a weighted summation of the value vectors to obtain the output, capturing the dependencies between different positions.
[0016] For each head i , input feature map X Obtain the query matrix through linear transformation Q i , bond matrix K i , value matrix V i , the specific formula is as follows;
[0017]
[0018] in It is a learnable weight matrix, which is initialized randomly and has a shape determined by the number of channels in the input feature map and the dimensions of the key, query, and value in the attention mechanism;
[0019] Calculate the attention weight matrix A i , the formula is as follows:
[0020]
[0021] in is the key vector Dimensions, Used for scaling to avoid the vanishing gradient problem;
[0022] Computing attention output O i :
[0023]
[0024] The outputs of all heads are concatenated and linearly transformed to obtain the final output. The formula is as follows:
[0025]
[0026] in h is the number of heads, W O is the output projection matrix;
[0027] In the YOLOv8 backbone network, multi-head self-attention modules are added between residual blocks and the model structure is adjusted to adapt to the newly added modules to enhance feature representation, help better identify multiple, long-range helmets and safety ropes to improve detection accuracy, and complete the improvement of the YOLOv8 model.
[0028] Preferably, the yolov8 model optimized and improved by the SGD algorithm includes:
[0029] Assuming model parameters , the training data set is , loss function L, where is the input image, is the corresponding label;
[0030] Use SGD optimizer and set the learning rate , the momentum is ;
[0031] Each epoch, for each mini-batch : Calculate the predicted output through forward propagation , calculate the loss L( , use backpropagation to calculate the gradient of the loss function with respect to the model parameters , and update the weight. The weight calculation formula is as follows:
[0032]
[0033]
[0034] in, is the momentum term, and its initial value is usually set to 0;
[0035] Through continuous training cycles, the model can better fit the training data, and finally obtain a safety device detection model.
[0036] Preferably, the establishing of the Fast R-CNN model includes:
[0037] For the railing setup detection, all processed images are fed into the VGG16 network, the training hyperparameters such as learning rate and batch size are set, multiple training cycles are run, and the network structure and training strategy are adjusted to optimize the detection performance;
[0038] For railing height detection, the actual height of a section of the yellow and black height label on the edge warning railing in the project is known. This section is used as a reference. The Fast R-CNN model is used to detect the reference object's position and obtain its bounding box. The coordinates of the reference object's top and bottom are obtained from the bounding box to calculate its height in the image. The actual size of the reference object is compared with the image size, and the scale formula is used to calculate the actual height of the railing and determine whether it meets the requirements.
[0039] The standardization of railings can be determined by training the model with public monitoring data to determine whether the railings are damaged and the extent of the damage.
[0040] Preferably, extracting skeletal joint information from a dangerous behavior dataset using an OpenPose model includes:
[0041] Image preprocessing: input the image into the network, and make the image data suitable for the input requirements of the neural network through multi-scale processing and normalization;
[0042] Feature extraction: capturing details in the image through a deep convolutional neural network and converting it into high-level feature representations to extract features from the image;
[0043] Joint point detection and post-processing, through a multi-stage network, generates multiple sets of heat maps and vector fields, and finds local maxima in the heat maps and analyzes the vector fields to obtain the most likely key point locations and associate them with key points;
[0044] The result output is that for each detected key point, its coordinate position (x, y) in the image and a score representing the confidence are output, and finally the joint structure of each individual is output to form a complete human body posture.
[0045] Preferably, the step of adding L2 regularization and Dropout to the ST-GCN model to establish an improved ST-GCN model includes:
[0046] Define the original loss function , are all the weight parameters of the model, is the regularization coefficient. In addition to the original loss function, an L2 regularized loss function is also required. , the formula is:
[0047]
[0048] in is the sum of the squares of all weight parameters;
[0049] By adding a Dropout layer after the output of each layer, the output of some neurons can be randomly turned off during training. During training, some neurons are randomly selected at the Dropout rate and their output is set to 0; the output of the remaining neurons will be scaled up proportionally to keep the output scale of the entire layer unchanged. The formula is described as:
[0050]
[0051] in is the input of the neuron, is the output after Dropout, is the probability of discarding;
[0052] Calculate the new loss function containing the L2 regularization term for each weight parameter The gradient of , and update the weight parameters according to the gradient;
[0053] Repeat the above steps until the training is completed.
[0054] Preferably, the hyperparameters in the improved ST-GCN model optimized by the TPE algorithm include:
[0055] (1) Determine the learning rate, L2 regularization coefficient, and Dropout rate range to be optimized, select a portion of the hyperparameter configuration for preliminary evaluation as the basis for subsequent optimization, and define a configuration file or dictionary to store the search range of the hyperparameters;
[0056] (2) Use the evaluated configurations and their corresponding accuracy to build two probability models: a probability model for a good parameter configuration and a probability model for a bad parameter configuration, using Gaussian kernel density estimation;
[0057] (3) Select the next hyperparameter configuration to be evaluated based on the ratio of the two probability models, select those configurations that are expected to improve accuracy, train the ST-GCN model using the selected hyperparameter configuration, and evaluate its accuracy on the validation set. Write a training script to receive the hyperparameters and return the evaluation results.
[0058] Repeat steps (2) and (3), continuously update the probability model and select new hyperparameter configurations for evaluation until the preset maximum number of iterations is reached or other stopping conditions are met. The best performing configuration is selected from all evaluated configurations as the final hyperparameter setting. The optimal hyperparameter configuration is completed to maximize the accuracy and obtain a dangerous behavior recognition model.
[0059] Preferably, the early warning rule method for multi-category and multi-source information fusion is:
[0060] The multi-category multi-source information includes three types of information, namely safety equipment information, protective device information and dangerous behavior information; set the trigger of the danger warning to 1 and the non-trigger to 0, and set the parameter s and t is 0, dangerous behavior information is x , protective device information is y , safety equipment information is z , press xyz Arrange in sequence and convert to decimal and assign to s In particular, when two or more situations are triggered in the protective device information or dangerous behavior information, t is 1; finally s Need to add t Value, if s If it is 0, the green light is on. s If it is 1 or 2, the yellow light will be on. s If it is 3 or 4, the orange light will be on. s If it is greater than or equal to 5, the red light will be on. The importance of different types of source information can be adjusted according to the actual project, and the formula for constructing the multi-category and multi-source fusion warning rule method is as follows:
[0061]
[0062] Example: Dangerous behavior is not triggered, the guardrail height is not enough, and the safety device is not triggered, then x=0, y=1, z=0, t=0, and s=2 from the formula, and the yellow light is on;
[0063] In a dangerous behavior, the worker gets too close to the guardrail and crosses it. The protective device is not triggered and the safety equipment is not wearing a hard hat. Then x=1, y=0, z=1. Since the dangerous behavior information triggers two types, t=1. From the formula, s=6, and the red light is on.
[0064] The second aspect of the present invention discloses a system for detecting falling risks at an edge opening of a major project, comprising:
[0065] The video image acquisition and preprocessing module is used to collect dangerous video data from high places on construction sites, including network cameras monitoring workers, based on the dangerous characteristics of construction workers' edges, to build and annotate dangerous data sets;
[0066] The safety equipment detection module is used to train an improved Yolov8 model using safety equipment data and optimize the hyperparameters in the model using the SGD algorithm to quickly detect protective equipment setting information; the improved Yolov8 model is to add a self-attention mechanism to the Yolov8 model;
[0067] The protective device detection module is used to build a Fast R-CNN model and train the Fast R-CNN model using the protective device dataset to obtain a protective device detection model;
[0068] The dangerous behavior recognition module is used to extract skeletal joint information from the dangerous behavior dataset using the OpenPose model. The improved ST-GCN model is trained using the skeletal joint information and optimized using the TPE algorithm to obtain a dangerous behavior recognition model. The improved ST-GCN model is the ST-GCN model that adds L2 regularization and Dropout.
[0069] The detection result display and alarm module is used to complete the building edge risk detection through the trained safety equipment detection model, protective device detection model and dangerous behavior recognition model. Once it is determined to be a dangerous result, the result will be displayed and the alarm light will be triggered according to the danger warning rules.
[0070] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0071] (1) The introduction of a multi-head self-attention mechanism in the yolov8 model can detect the wearing of helmets and safety ropes by multiple people in different positions, thereby improving the accuracy of detecting small and multi-scale targets; optimizing hyperparameters through the SGD algorithm can improve the detection speed of the safety equipment model; the improved yolov8 model has higher accuracy, faster speed and better robustness, and is more suitable for preventing workers from falling near the edge of the hole.
[0072] (2) Adding L2 regularization and Dropput regularization techniques to the ST-GCN model can improve the generalization ability of the model and enhance the recognition accuracy of the dangerous behavior model;
[0073] (3) Triggering the alarm light based on the early warning rule method of the three types of information fusion can provide rapid feedback when the danger is identified, thereby improving the efficiency and accuracy of emergency response.
[0074] (4) The present invention involves multiple aspects of safety equipment, protective devices and dangerous behaviors of personnel, and can provide more extensive safety inspections for construction sites, with more accurate monitoring and early warning results;
[0075] (5) The present invention involves comprehensive safety management object elements for construction site adjacent openings, more advanced algorithm models, more timely warnings, and stronger anti-interference capabilities. The hardware requirements of the entire risk detection system are low. This method system can effectively detect unsafe behaviors and hidden risks at construction site adjacent openings, making the safety management of construction site adjacent openings more intelligent, effectively preventing accidents, and protecting the personal safety of workers at the construction site. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 This is a flow chart of the fall risk detection system for edge openings;
[0077] Figure 2 This is a site diagram of the fall risk detection system for edge openings. It includes: 1. Surveillance camera; 2. Safety helmet; 3. Guardrail; 4. Yellow and black height label on warning railing; 5. Safety distance; 6. Construction worker; 7. Safety rope; 8. Warning light; 9. Edge opening; 10. Remote computer.
[0078] Figure 3 This is a classification diagram of three types of information in the risk detection system. DETAILED DESCRIPTION
[0079] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0080] A major project side opening fall risk detection system, such as Figure 2As shown, the system includes a video image acquisition and preprocessing module, a building edge risk detection model, and a result display and alarm module. The building edge risk detection model is divided into a safety equipment detection module, a protective device detection module, and a dangerous behavior recognition module. The video image acquisition and preprocessing module consists of a surveillance camera 1; the safety equipment detection module detects whether construction workers 6 are wearing hard hats 2 and safety ropes 7; the protective device detection module uses the known yellow and black height label 4 of the warning railing 40cm as a reference to detect the height of the guardrail 3; the dangerous behavior recognition module uses the safety distance 5 and the behavior of construction workers 6 to make judgments; and the result display and alarm module triggers the warning light 8 based on the recognition results through information fusion risk warning rules, and displays the results and issues an alarm through a remote computer 10.
[0081] A method for detecting falling risks at the edge opening of a major project, such as Figure 1 The specific steps include:
[0082] Step 1: Hazard information definition, such as Figure 3 The information displayed is divided into safety equipment information, protective device information and dangerous behavior information; safety equipment information includes wearing a safety helmet and safety rope; protective device information includes railing settings, railing safety height and railing placement standardization; dangerous behavior information includes getting too close to the railing, crossing the railing and running near the railing;
[0083] Step 2: Collect a public construction worker monitoring dataset, extract the corresponding video dataset from the Internet, frame the video, and annotate it;
[0084] Step 3: Establish an improved yolov8 model. The improved yolov8 model is to add a self-attention mechanism to the model, specifically:
[0085] (1) For the self-attention mechanism, we choose to use the Multi-Head Self-Attention (MHA) mechanism. We assign weights by calculating the similarity between the query, key, and value vectors, and then perform weighted summation on the value vector to obtain the output. This can capture the dependencies between different positions.
[0086] (2) For each head i, the input feature map X is linearly transformed to obtain the query matrix Q i , bond matrix K i , value matrix V i , the specific formula is as follows;
[0087]
[0088] in , , It is a learnable weight matrix, which is initialized randomly and has a shape determined by the number of channels in the input feature map and the dimensions of the key, query, and value in the attention mechanism;
[0089] (3) Calculate the attention weight matrix A i , the formula is as follows:
[0090]
[0091] in is the key vector Dimensions, Used for scaling to avoid the vanishing gradient problem;
[0092] (4) Calculate attention output O i :
[0093]
[0094] (5) The outputs of all heads are concatenated and linearly transformed to obtain the final output. The formula is as follows:
[0095]
[0096] where h is the number of heads, W O is the output projection matrix;
[0097] (6) In the YOLOv8 backbone network, a multi-head self-attention module is added between the residual blocks and the model structure is adjusted to adapt to the newly added module to enhance feature representation, help better identify multiple, long-distance helmets and safety ropes to improve detection accuracy, and complete the improvement of the YOLOv8 model.
[0098] Step 4: Put the safety device data obtained in step 3 into the improved yolov8 model training, and use the SGD algorithm to optimize the improved yolov8 model so that the model can better fit the training data, improve the model performance, and obtain the safety device detection model. The specific method is as follows:
[0099] (1) Assuming model parameters , the training data set is , loss function L, where is the input image, is the corresponding label;
[0100] (2) Use the SGD optimizer and set the learning rate (lr) to , momentum is ;
[0101] (3) Each epoch, for each mini-batch : Calculate the predicted output through forward propagation , calculate the loss L( , use backpropagation to calculate the gradient of the loss function with respect to the model parameters , and update the weight. The weight calculation formula is as follows:
[0102]
[0103]
[0104] in, is the momentum term, and its initial value is usually set to 0;
[0105] (4) Through continuous training cycles, the model can better fit the training data, and finally obtain a safety equipment detection model.
[0106] Step 5: Build a Fast R-CNN model and train the protective device dataset to obtain a protective device detection model. The specific method is as follows:
[0107] (1) Railing setting detection: all processed images are fed into the VGG16 network, the training hyperparameters such as learning rate and batch size are set, multiple training cycles are run, and the network structure and training strategy are adjusted to optimize the detection performance;
[0108] (2) Railing height detection: The actual height of a section of the yellow and black height label of the warning railing is known to be 40 cm. It is used as a reference object. The Fast R-CNN model is used to detect the position of the reference object and obtain its bounding box. The coordinates of the top and bottom of the reference object are obtained from the bounding box to calculate its height in the image. The actual size of the reference object is compared with the image size, and the scale formula is used to calculate the actual height of the railing and determine whether it is qualified.
[0109] (3) Railing standardization: by training the model with public monitoring data, we can determine whether the railing is damaged and the damage status;
[0110] Step 6: Use the OpenPose model to extract skeletal joint information from the dangerous behavior dataset using the following method:
[0111] (1) Image preprocessing: input the image into the network, and make the image data suitable for the input requirements of the neural network through multi-scale processing and normalization;
[0112] (2) Feature extraction: capturing details in the image through deep convolutional neural networks and converting them into high-level feature representations to extract features from the image;
[0113] (3) Joint point detection and post-processing: Through a multi-stage network, multiple sets of heat maps and vector fields are generated, and local maxima are found in the heat maps and vector fields are analyzed to obtain the most likely key point locations and associate them with key points;
[0114] (4) Result output: For each detected key point, its coordinate position (x, y) in the image and a score representing the confidence are output, and finally the joint structure of each individual is output to form a complete human posture.
[0115] Step 7: Build an improved ST-GCN model. The improved ST-GCN model adds L2 regularization and Dropout to ST-GCN to make the model simpler and more generalizable. The specific method is as follows:
[0116] (1) Define the original loss function , are all the weight parameters of the model, is the regularization coefficient. In addition to the original loss function, an L2 regularized loss function is also required. , the formula is:
[0117]
[0118] in is the sum of the squares of all weight parameters;
[0119] (2) By adding a Dropout layer after the output of each layer, the output of some neurons can be randomly turned off during training. During training, some neurons are randomly selected with a certain probability (usually called the Dropout rate) and their outputs are set to 0; the outputs of the remaining neurons are scaled up proportionally to keep the output scale of the entire layer unchanged. The formula is described as:
[0120]
[0121] in is the input of the neuron, is the output after Dropout, is the probability of discarding;
[0122] (3) Calculate the new loss function including L2 regularization term for each weight parameter The gradient of , and update the weight parameters according to the gradient.
[0123] (4) Repeat the above steps until the training is completed.
[0124] Step 8: Feed the skeletal joint information obtained in step 5 into the improved ST-GCN model for training and optimize it using the TPE algorithm to optimize the hyperparameters in the model to obtain a dangerous behavior recognition model. The specific method is as follows:
[0125] (1) Determine the learning rate, weight decay (L2 regularization coefficient), and dropout rate range to be optimized, select a portion of the hyperparameter configuration for preliminary evaluation as the basis for subsequent optimization, and define a configuration file or dictionary to store the search range of the hyperparameters;
[0126] (2) Use the evaluated configurations and their corresponding accuracy to build two probability models: a probability model for a good parameter configuration and a probability model for a bad parameter configuration, using Gaussian kernel density estimation (Parzen window);
[0127] (3) Select the next hyperparameter configuration to be evaluated based on the ratio of the two probability models. Select those configurations that are expected to improve accuracy, train the ST-GCN model using the selected hyperparameter configuration, and evaluate its accuracy on the validation set. Write a training script that receives the hyperparameters and returns the evaluation results.
[0128] (4) Repeat steps (2) to (3), continuously update the probability model and select new hyperparameter configurations for evaluation until the preset maximum number of iterations is reached or other stopping conditions are met. The best performing configuration is selected from all evaluated configurations as the final hyperparameter setting. The optimal hyperparameter configuration is completed to maximize the accuracy and obtain the dangerous behavior recognition model;
[0129] Step 9: Complete the detection of building edge hazards through the safety equipment detection model, protective device detection model and dangerous behavior recognition model established in steps 4-7. After determining that it is a dangerous result, the result is displayed and the alarm light is triggered according to the risk warning rule method based on the fusion of three types of information.
[0130] like Figure 3 As shown, the three types of information are safety equipment information, protective device information, and dangerous behavior information. The hazard warning rule method sets the hazard warning trigger to 1 and the untriggered to 0. Set the parameters s and t to 0, the dangerous behavior information to x, the protective device information to y, and the safety equipment information to z. Arrange them in xyz order and convert them to decimal and assign them to s. In particular, when two or more conditions are triggered within the protective device information or dangerous behavior information, t is 1. Finally, s needs to be added with the t value. If s is 0, the green light is on; if s is 1 or 2, the yellow light is on; if s is 3 or 4, the orange light is on; and if s is greater than or equal to 5, the red light is on. The importance of different types of source information can be adjusted according to the actual project. The formula for constructing a multi-category, multi-source fusion warning rule method is as follows:
[0131]
[0132] Example: Dangerous behavior is not triggered, the guardrail height is not enough, and the safety device is not triggered, then x=0, y=1, z=0, t=0, and s=2 from the formula, and the yellow light is on;
[0133] In a dangerous behavior, a worker gets too close to the guardrail and crosses it, the protective device is not triggered, and the safety equipment is not wearing a hard hat, then x=1, y=0, z=1, because the dangerous behavior information triggers two types, so t=1, and s=6 from the formula, the red light is on; then a visual prompt warning and alarm are issued through the system control center.
Claims
1. A method for detecting the risk of falling from an opening adjacent to an edge of a major project, characterized in that: The steps include: defining hazard information, wherein the hazard information includes safety equipment information, protective device information, and dangerous behavior information; Collect public construction worker monitoring datasets, intercept video datasets corresponding to dangerous information from the Internet, frame and annotate the videos, and obtain safety equipment datasets, protective device datasets, and dangerous behavior datasets; A self-attention mechanism is added to the Yolov8 model to establish an improved Yolov8 model. The improved Yolov8 model is trained using a security device dataset and optimized using the SGD algorithm to obtain a security device detection model. Establish a Fast R-CNN model and use the protective device dataset to train the Fast R-CNN model to obtain a protective device detection model; The OpenPose model is used to extract skeletal joint information from the dangerous behavior dataset; L2 regularization and Dropout were added to the ST-GCN model to establish an improved ST-GCN model. Skeletal joint information was used to train the improved ST-GCN model. The hyperparameters of the improved ST-GCN model were optimized using the TPE algorithm to obtain a dangerous behavior recognition model. Based on the safety equipment detection model, protective device detection model and dangerous behavior recognition model, the system detects building edge hazards. After determining the hazard results, it triggers early warning alarms based on the early warning rule method of multi-category and multi-source information fusion and displays the results visually. The self-attention mechanism added to the yolov8 model includes: We choose to use a multi-head self-attention mechanism to assign weights by calculating the similarity between the query, key, and value vectors, and then perform a weighted summation of the value vectors to obtain the output, capturing the dependencies between different positions. For each head i , input feature map X Obtain the query matrix through linear transformation Q i , bond matrix K i , value matrix V i , the specific formula is as follows; in It is a learnable weight matrix, which is initialized randomly and has a shape determined by the number of channels in the input feature map and the dimensions of the key, query, and value in the attention mechanism; Calculate the attention weight matrix A i , the formula is as follows: in is the key vector Dimensions, Used for scaling to avoid the vanishing gradient problem; Computing attention output O i : The outputs of all heads are concatenated and linearly transformed to obtain the final output. The formula is as follows: in h is the number of heads, W O is the output projection matrix; In the YOLOv8 backbone network, a multi-head self-attention module was added between residual blocks and the model structure was adjusted to accommodate the newly added module to enhance feature representation. This helps better identify multiple, distant helmets and safety ropes, improving detection accuracy and completing the improvement of the YOLOv8 model. The yolov8 model optimized and improved by the SGD algorithm includes: Assuming model parameters , the training data set is , loss function L, where is the input image, is the corresponding label; Use SGD optimizer and set the learning rate , the momentum is ; Each epoch , for each : Calculate the predicted output through forward propagation , calculate the loss , use backpropagation to calculate the gradient of the loss function with respect to the model parameters , and update the weight. The weight calculation formula is as follows: in, is the momentum term, and its initial value is usually set to 0; Through continuous training cycles, the model can better fit the training data, and finally obtain a safety device detection model.
2. The method for detecting the risk of falling from an edge opening of a major project according to claim 1 is characterized in that: The safety equipment information includes wearing a safety helmet and a safety rope; the protective device information includes the setting of the railing, the safe height of the railing and the standardization of the placement of the railing; the dangerous behavior information includes getting too close to the railing, crossing the railing and running next to the railing.
3. The method for detecting falling risks at the edge opening of a major project according to claim 1 is characterized in that: The Fast R-CNN model is established as follows: For the railing setup detection, all processed images are fed into the VGG16 network, the training hyperparameters such as learning rate and batch size are set, multiple training cycles are run, and the network structure and training strategy are adjusted to optimize the detection performance; For railing height detection, the actual height of a section of the yellow and black height label on the edge warning railing in the project is known. This section is used as a reference. The Fast R-CNN model is used to detect the reference object's position and obtain its bounding box. The coordinates of the reference object's top and bottom are obtained from the bounding box to calculate its height in the image. The actual size of the reference object is compared with the image size, and the scale formula is used to calculate the actual height of the railing and determine whether it meets the requirements. The standardization of railings can be determined by training the model with public monitoring data to determine whether the railings are damaged and the extent of the damage.
4. The method for detecting falling risks at the edge opening of a major project according to claim 1 is characterized in that: The method of extracting skeletal joint information from the dangerous behavior dataset using the OpenPose model includes: Image preprocessing: input the image into the network, and make the image data suitable for the input requirements of the neural network through multi-scale processing and normalization; Feature extraction: capturing details in the image through a deep convolutional neural network and converting it into high-level feature representations to extract features from the image; Joint point detection and post-processing, through a multi-stage network, generates multiple sets of heat maps and vector fields, and finds local maxima in the heat maps and analyzes the vector fields to obtain the most likely key point locations and associate them with key points; The result output is that for each detected key point, its coordinate position (x, y) in the image and a score indicating the confidence are output, and finally the joint structure of each individual is output to form a complete human body posture.
5. The method for detecting falling risks at the edge opening of a major project according to claim 1 is characterized in that: The improved ST-GCN model is established by adding L2 regularization and Dropout to the ST-GCN model, including: Define the original loss function are all the weight parameters of the model, is the regularization coefficient. In addition to the original loss function, an L2 regularized loss function is also required. , the formula is: in is the sum of the squares of all weight parameters; By adding a Dropout layer after the output of each layer, the output of some neurons can be randomly turned off during training. During training, some neurons are randomly selected at the Dropout rate and their output is set to 0; the output of the remaining neurons will be scaled up proportionally to keep the output scale of the entire layer unchanged. The formula is described as: in is the input to the neuron, is the output after Dropout, is the probability of discarding; Calculate the new loss function containing the L2 regularization term for each weight parameter The gradient of , and update the weight parameters according to the gradient; Repeat the above steps until the training is completed.
6. The method for detecting falling risks at the edge opening of a major project according to claim 1 is characterized in that: The hyperparameters in the improved ST-GCN model optimized by the TPE algorithm include: (1) Determine the learning rate, L2 regularization coefficient, and Dropout rate range to be optimized, select a portion of the hyperparameter configuration for preliminary evaluation as the basis for subsequent optimization, and define a configuration file or dictionary to store the search range of the hyperparameters; (2) Use the evaluated configurations and their corresponding accuracy to build two probability models: a probability model for a good parameter configuration and a probability model for a bad parameter configuration, using Gaussian kernel density estimation; (3) Select the next hyperparameter configuration to be evaluated based on the ratio of the two probability models, select those configurations that are expected to improve accuracy, train the ST-GCN model using the selected hyperparameter configuration, and evaluate its accuracy on the validation set. Write a training script to receive the hyperparameters and return the evaluation results. Repeat steps (2) and (3), continuously update the probability model and select new hyperparameter configurations for evaluation until the preset maximum number of iterations is reached or other stopping conditions are met. The best performing configuration is selected from all evaluated configurations as the final hyperparameter setting. The optimal hyperparameter configuration is completed to maximize the accuracy and obtain a dangerous behavior recognition model.
7. The method for detecting falling risks near an opening in a major project according to claim 1 is characterized in that: The early warning rule method of multi-category and multi-source information fusion is: The multi-category multi-source information includes three types of information, namely safety equipment information, protective device information and dangerous behavior information; set the trigger of the danger warning to 1 and the non-trigger to 0, and set the parameter s and t is 0, dangerous behavior information is x , protective device information is y , safety equipment information is z , press xyz Arrange in sequence and convert to decimal and assign to s In particular, when two or more situations are triggered in the protective device information or dangerous behavior information, t is 1; finally s Need to add t Value, if s If it is 0, the green light is on. s If it is 1 or 2, the yellow light will be on. s If it is 3 or 4, the orange light will be on. s If it is greater than or equal to 5, the red light will be on. The importance of different types of source information can be adjusted according to the actual project, and the formula for constructing the multi-category and multi-source fusion warning rule method is as follows: Example: Dangerous behavior is not triggered, the guardrail height is not enough, and the safety device is not triggered, then x=0, y=1, z=0, t=0, and s=2 from the formula, and the yellow light is on; In a dangerous behavior, the worker gets too close to the guardrail and crosses it. The protective device is not triggered and the safety equipment is not wearing a hard hat. Then x=1, y=0, z=1. Since the dangerous behavior information triggers two types, t=1. From the formula, s=6, and the red light is on.
8. A system for executing the method for detecting falling risks near openings in major projects as claimed in claim 1, characterized in that: include: The video image acquisition and preprocessing module is used to collect dangerous video data from high places on construction sites, including network cameras monitoring workers, based on the dangerous characteristics of construction workers' edges, to build and annotate dangerous data sets; The safety equipment detection module is used to train an improved Yolov8 model using safety equipment data and optimize the hyperparameters in the model using the SGD algorithm to quickly detect protective equipment setting information; the improved Yolov8 model is to add a self-attention mechanism to the Yolov8 model; The protective device detection module is used to build a Fast R-CNN model and train the Fast R-CNN model using the protective device dataset to obtain a protective device detection model; The dangerous behavior recognition module is used to extract skeletal joint information from the dangerous behavior dataset using the OpenPose model. The improved ST-GCN model is trained using the skeletal joint information and optimized using the TPE algorithm to obtain a dangerous behavior recognition model. The improved ST-GCN model is the ST-GCN model that adds L2 regularization and Dropout. The detection result display and alarm module is used to complete the building edge risk detection through the trained safety equipment detection model, protective device detection model and dangerous behavior recognition model. Once it is determined to be a dangerous result, the result will be displayed and the alarm light will be triggered according to the danger warning rules.
Citation Information
Patent Citations
Foundation pit safety protection monitoring method and system
CN114863349A
Underground coal mine driver abnormal behavior detection method based on IAT and YOLOv8-Pose
CN118587688A
Home human body tumble detection method based on YOLOv8 improvement
CN119763184A