ST-GCN-based edge portal operation unsafe behavior detection method and device
By using ST-GCN-based unsafe behavior detection method for work near openings and edges, and employing improved YOLOv5 and OpenPose algorithms to identify unsafe behaviors of construction workers, this method solves the problems of untimely early warning and high cost of unsafe behavior at construction sites, thereby improving construction safety and management efficiency.
Patent Information
- Application Number
- CN202410923282.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-29
AI Technical Summary
Existing technologies cannot provide timely warnings of unsafe behaviors by construction workers when working near openings or edges on construction sites. They are also costly, rely on manual monitoring which is inefficient and prone to omissions or misjudgments.
An ST-GCN-based method for detecting unsafe behaviors during work near openings and edges is adopted. By acquiring labeled video datasets, the video data is processed using an improved YOLOv5 algorithm and OpenPose algorithm to construct and train an ST-GCN neural network model to identify unsafe behaviors of construction workers.
It enables effective identification and early warning of hazardous behaviors at construction sites, improves construction safety and the accuracy of behavior identification, reduces accidents, and enhances safety management efficiency.
Smart Images

Figure CN119049119A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual recognition technology, and in particular to a method and device for detecting unsafe behaviors in operations near edge openings based on ST-GCN. Background Art
[0002] With the rapid development of modern construction industry, the safety issues of construction sites have become more prominent. Most of the high-fall accidents occurred when construction workers were working at the edge or opening. The traditional method of monitoring the actions of construction workers mainly relied on manual monitoring and subjective judgment, which had slow response speed, could not give early warning in time, and had high labor costs and was easy to miss or misjudge. Therefore, how to effectively and cost-effectively monitor and identify unsafe behaviors in construction work at the edge or opening, give early warning in time and take corresponding measures has become an important issue in building safety management. Summary of the invention
[0003] In order to solve the technical problems of untimely warning and high cost in the prior art, the embodiment of the present invention provides a method and device for detecting unsafe behaviors in side tunnel operations based on ST-GCN. The technical solution is as follows:
[0004] On the one hand, a method for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN is provided. The method is implemented by an unsafe behavior detection device for operations near tunnel openings based on ST-GCN. The method comprises:
[0005] S1. Obtain a labeled video dataset of construction workers’ working actions near the edge of the hole;
[0006] S2. Using the improved YOLOv5 algorithm and the OpenPose algorithm to process the labeled video dataset, and obtain a skeleton node dataset of the edge hole operation action;
[0007] S3, build the initial ST-GCN neural network model;
[0008] S4. According to the skeleton node data set, the initial ST-GCN neural network is trained to obtain a trained ST-GCN neural network model;
[0009] S5, obtaining video data of the construction personnel's working actions near the edge of the hole to be identified;
[0010] S6. Input the video data of the construction workers' working actions near the edge of the tunnel to be identified into the trained ST-GCN neural network model for identification, and obtain the identification results of the unsafe behaviors of the construction workers working near the edge of the tunnel.
[0011] Optionally, the construction worker's working actions at the edge of the tunnel in S1 include: unsafe behaviors of working at the edge and unsafe behaviors of working at the tunnel;
[0012] Among them, unsafe behaviors when working at the edge include: working with your back to the edge, running fast, bending over to pick up objects, leaning out, and multiple people working at the same time;
[0013] Among them, unsafe behaviors in cave operations include: crossing the cave, squatting on the edge of the cave, sitting on the edge of the cave, standing up too suddenly, and leaning on the edge of the cave.
[0014] Optionally, the step of obtaining a labeled video dataset of construction workers' working actions near an opening in S1 includes:
[0015] S11. Use crawler technology to obtain a video dataset of construction workers working near the edge of the hole to be labeled;
[0016] S12. Use the VATIC tool to annotate the video dataset to be annotated, and obtain an annotated video dataset of construction workers' working actions near the edge opening.
[0017] Optionally, the S2 uses an improved YOLOv5 algorithm and an OpenPose algorithm to process the labeled video dataset to obtain a skeleton node dataset of the edge hole operation action, including:
[0018] S21, using an improved YOLOv5 algorithm to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas;
[0019] S22. According to the high-risk areas near the edge and the high-risk areas at the opening, the skeleton node data of the construction workers are extracted using the OpenPose algorithm to obtain the skeleton node data set of the working actions near the edge and the opening.
[0020] Optionally, the S21 uses an improved YOLOv5 algorithm to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas, including:
[0021] S211, dividing the input video data into a plurality of grids, wherein each grid unit predicts a plurality of bounding boxes and a confidence level and a classification probability of each bounding box;
[0022] S212, using a sigmoid function to normalize the confidence and classification probability of each bounding box to obtain a normalized result;
[0023] S213, according to the result of the normalization processing, using the loss function to perform prediction to obtain a prediction result; wherein the loss function includes: bounding box regression loss, classification loss, confidence loss and total loss;
[0024] S214. According to the prediction results, the overlapping areas are removed by non-maximum suppression, and the area with the highest confidence is retained as the final recognition result; wherein the recognition result is the high-risk area at the edge and the high-risk area at the cave entrance.
[0025] Optionally, the process of improving the YOLOv5 algorithm includes:
[0026] Add a convolution block attention module, wherein the convolution block attention module includes: a channel attention module and a spatial attention module; wherein the channel attention module is used to assign different weights to each channel to generate a channel attention map; wherein the spatial attention module is used to assign different weights to each position to generate a spatial attention map;
[0027] An output feature map with a size of 160x160x255 is added to process high-resolution features and improve the granularity and accuracy of detection.
[0028] Optionally, the step S4 of training the initial ST-GCN neural network according to the skeleton node data set to obtain a trained ST-GCN neural network model includes:
[0029] S41, constructing a graph structure according to the skeleton node data set;
[0030] S42. According to the graph structure, a graph convolution operation is used to integrate the local information of the joint points, and the feature representation of each node in the spatial dimension and the temporal dimension is updated to obtain the joint point features;
[0031] S43, input the joint point features into the fully connected layer, use the classifier to perform action recognition, and obtain the predicted action recognition result; train the initial ST-GCN neural network according to the predicted action recognition result and the loss function to obtain the trained ST-GCN neural network model.
[0032] On the other hand, a device for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN is provided, and the device is applied to a method for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN. The device comprises:
[0033] The first acquisition unit is used to acquire a labeled video dataset of construction workers' working actions near the edge of the hole;
[0034] A processing unit, used to process the labeled video data set using an improved YOLOv5 algorithm and an OpenPose algorithm to obtain a skeleton node data set of the edge hole operation action;
[0035] Construction unit, used to build the initial ST-GCN neural network model;
[0036] A training unit, used to train the initial ST-GCN neural network according to the skeleton node data set to obtain a trained ST-GCN neural network model;
[0037] The second acquisition unit is used to acquire video data of the construction personnel's working actions near the edge of the hole to be identified;
[0038] The prediction and recognition unit is used to input the video data of the construction workers' working actions near the edge of the tunnel to be recognized into the trained ST-GCN neural network model for recognition, so as to obtain the recognition results of the unsafe behaviors of the construction workers working near the edge of the tunnel.
[0039] Optionally, the construction worker's working actions at the edge of the tunnel include: unsafe behaviors of working at the edge and unsafe behaviors of working at the tunnel;
[0040] Among them, unsafe behaviors when working at the edge include: working with your back to the edge, running fast, bending over to pick up objects, leaning out, and multiple people working at the same time;
[0041] Among them, unsafe behaviors in cave operations include: crossing the cave, squatting on the edge of the cave, sitting on the edge of the cave, standing up too suddenly, and leaning on the edge of the cave.
[0042] Optionally, the first acquiring unit is used to:
[0043] Use crawler technology to obtain a video dataset of construction workers working near tunnel openings.
[0044] The VATIC tool is used to annotate the video dataset to be annotated, so as to obtain an annotated video dataset of construction workers' working actions near the edge opening.
[0045] Optionally, the processing unit is used to:
[0046] The improved YOLOv5 algorithm is used to preliminarily process the labeled video data set to identify high-risk areas along the edge and high-risk areas at the cave entrance;
[0047] According to the high-risk areas near the edge and the high-risk areas at the opening, the OpenPose algorithm is used to extract the skeleton node data of the construction workers, and the skeleton node dataset of the working actions near the edge and the opening is obtained.
[0048] Optionally, the improved YOLOv5 algorithm is used to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas, including:
[0049] The input video data is divided into multiple grids, where each grid unit predicts multiple bounding boxes and the confidence and classification probability of each bounding box;
[0050] The sigmoid function is used to normalize the confidence and classification probability of each bounding box to obtain the normalized result;
[0051] According to the result of normalization, a loss function is used to make predictions to obtain prediction results; the loss functions include: bounding box regression loss, classification loss, confidence loss and total loss;
[0052] According to the prediction results, the overlapping areas are removed by non-maximum suppression, and the area with the highest confidence is retained as the final recognition result; among them, the recognition results are the high-risk areas on the edges and the high-risk areas at the openings.
[0053] Optionally, the process of improving the YOLOv5 algorithm includes:
[0054] Add a convolution block attention module, wherein the convolution block attention module includes: a channel attention module and a spatial attention module; wherein the channel attention module is used to assign different weights to each channel to generate a channel attention map; wherein the spatial attention module is used to assign different weights to each position to generate a spatial attention map;
[0055] An output feature map with a size of 160x160x255 is added to process high-resolution features and improve the granularity and accuracy of detection.
[0056] Optionally, the training unit is used to:
[0057] Constructing a graph structure according to the skeleton node data set;
[0058] According to the graph structure, the graph convolution operation is used to integrate the local information of the joint points, update the feature representation of each node in the spatial dimension and the temporal dimension, and obtain the joint point features;
[0059] The joint point features are input into the fully connected layer, and the classifier is used for action recognition to obtain the predicted action recognition results; the initial ST-GCN neural network is trained according to the predicted action recognition results and the loss function to obtain the trained ST-GCN neural network model.
[0060] On the other hand, a device for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN is provided, and the device for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN comprises: a processor; and a memory, wherein computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned methods for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN is implemented.
[0061] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned ST-GCN-based methods for detecting unsafe behaviors in side tunnel operations.
[0062] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0063] According to an embodiment of the present invention, a labeled video dataset of construction workers' working actions near an edge hole is first obtained; an improved YOLOv5 algorithm and an OpenPose algorithm are used to process the labeled video dataset to obtain a skeleton node dataset of the working actions near an edge hole; secondly, an initial ST-GCN neural network model is constructed; the initial ST-GCN neural network is trained according to the skeleton node dataset to obtain a trained ST-GCN neural network model; video data of construction workers' working actions near an edge hole to be identified are obtained; finally, the video data of construction workers' working actions near an edge hole to be identified are input into the trained ST-GCN neural network model for identification, so as to obtain an identification result of unsafe behaviors of construction workers working near an edge hole.
[0064] The embodiment of the present invention adopts the ST-GCN neural network and the OpenPose algorithm to perform action recognition and unsafe behavior detection on construction workers, which can effectively identify and warn of dangerous behaviors on the construction site and improve construction safety. The embodiment of the present invention can improve the accuracy and robustness of construction worker behavior recognition. The embodiment of the present invention can improve the work efficiency of construction site safety management personnel and effectively reduce the occurrence of construction site accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1It is an overall workflow diagram of a method for detecting unsafe behaviors in side opening operations based on ST-GCN provided by an embodiment of the present invention;
[0067] Figure 2 It is a flow chart of a method for detecting unsafe behaviors in side opening operations based on ST-GCN provided by an embodiment of the present invention;
[0068] Figure 3 It is an original structure diagram and an improved structure diagram of the YOLOv5 algorithm provided in an embodiment of the present invention;
[0069] Figure 4 It is a schematic diagram of detection results using the OpenPose algorithm and the improved YOLOv5 algorithm provided in an embodiment of the present invention;
[0070] Figure 5 is a structural diagram of a neural network of ST-GCN provided in an embodiment of the present invention;
[0071] Figure 6 is a schematic diagram of action recognition based on ST-GCN neural network provided by an embodiment of the present invention;
[0072] Figure 7 It is a block diagram of an unsafe behavior detection device for edge opening operation based on ST-GCN provided by an embodiment of the present invention;
[0073] Figure 8 It is a structural schematic diagram of an unsafe behavior detection device for working at an edge tunnel opening based on ST-GCN provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0075] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0076] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0077] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0078] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0079] The embodiment of the present invention provides a method for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN. The method can be implemented by a device for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN. The device for detecting unsafe behaviors of operations near tunnel openings based on ST-GCN can be a terminal or a server. Figure 1 The overall workflow diagram of the unsafe behavior detection method for edge or opening operations based on ST-GCN is shown; in a feasible implementation method, the system captures images or video data of the construction site in real time through a camera; the video data is input into the system for processing, and the improved YOLOv5 algorithm is used for detection to identify the edge or opening operation area in the image; the system determines whether there is edge or opening operation in the current detection result; if there is no edge or opening operation, continue the detection in the previous step; if there is edge or opening operation, the OpenPose algorithm is used to extract the skeleton information of the person in the edge or opening operation area; the trained ST-GCN model is used to identify the extracted skeleton information to obtain the recognition result; according to the recognition result, it is determined whether the person's behavior is a safe behavior; if it is a safe behavior, return to the previous step to continue detection; if it is not a safe behavior, an alarm is issued to notify the safety management personnel; wherein the alarm methods include: sound alarm, SMS notification and automatic video recording; the system sets an interface module for the transmission of video data and skeleton data between modules; the system provides a user operation interface for managers to view real-time monitoring results and historical records; when unsafe behavior is detected, the video data is recorded and uploaded to the server.
[0080] like Figure 2 The flowchart of the unsafe behavior detection method for edge opening operation based on ST-GCN is shown. The processing flow of the method may include the following steps:
[0081] S1. Obtain a labeled video dataset of construction workers’ working actions near the edge of the hole.
[0082] Optionally, the construction worker's operation actions at the edge of the tunnel in S1 include: unsafe behaviors of working at the edge and unsafe behaviors of working at the tunnel;
[0083] Among them, edge work refers to the act of working in an activity area where the falling height from the edge of the ground or platform to the bottom is greater than 2 meters when working at height.
[0084] Among them, unsafe behaviors when working at the edge include: working with your back to the edge, running fast, bending over to pick up objects, leaning out, and multiple people working at the same time;
[0085] Among them, hole operations refer to high-altitude operations on the edges of pile holes, manholes, trenches and pipeline holes with a depth of 2 meters or more.
[0086] Among them, unsafe behaviors in cave operations include: crossing the cave, squatting on the edge of the cave, sitting on the edge of the cave, standing up too suddenly, and leaning on the edge of the cave.
[0087] Optionally, the specific implementation process of S1 may include S11-S12:
[0088] S11. Use crawler technology to obtain a video dataset of construction workers working near the edge of the hole to be labeled;
[0089] In a feasible implementation, all the acquired video data sets to be annotated of the construction workers' working actions near the edge of the hole are converted into mp.4 format.
[0090] S12. Use the VATIC tool to annotate the video dataset to be annotated, and obtain an annotated video dataset of construction workers' working actions near the edge opening.
[0091] In a feasible implementation, each video data is annotated using the VATIC tool to obtain a corresponding .txt label file, the content of which includes the position of each annotated object in each frame and other information including: timestamp, action label, object category and other related information.
[0092] S2. Use the improved YOLOv5 algorithm and OpenPose algorithm to process the labeled video dataset to obtain the skeleton node dataset of the edge hole operation action.
[0093] The skeleton refers to a skeleton structure composed of a group of key points of the human body including nose, eyes, shoulders, etc. and their interconnected relationships.
[0094] Among them, the YOLOv5 algorithm is a deep learning model for real-time object detection.
[0095] in, Figure 3The original structure diagram and the improved structure diagram of the YOLOv5 algorithm provided by the embodiment of the present invention are shown in FIG. 1 ; a convolutional block attention module is added to the original structure of the YOLOv5 algorithm; the original YOLOv5 algorithm structure does not include a convolutional block attention module; in the improved YOLOv5 algorithm structure, a convolutional block attention module is added to the backbone network, and the network is helped to focus on important features by applying the attention mechanism, thereby enhancing feature representation and improving detection performance; the output layer is enhanced in the original structure of the YOLOv5 algorithm; the original YOLOv5 algorithm structure outputs feature maps of sizes 20x20x255, 40x40x255 and 80x80x255; in the improved YOLOv5 algorithm structure, An additional layer of output feature map with a size of 160x160x255 is added, so that the network can process higher-resolution features, thereby improving the granularity and accuracy of detection; improvements to specific modules in the original structure of the YOLOv5 algorithm; basic C3 and CBS modules are used in the original structure of the original YOLOv5 algorithm; improved CBS modules are used in some locations in the improved YOLOv5 algorithm structure; the feature extraction capability and computational efficiency of the network can be optimized.
[0096] Optionally, the process of improving the YOLOv5 algorithm includes:
[0097] Add a convolution block attention module, wherein the convolution block attention module includes: a channel attention module and a spatial attention module; wherein the channel attention module is used to assign different weights to each channel to generate a channel attention map; wherein the spatial attention module is used to assign different weights to each position to generate a spatial attention map;
[0098] Among them, the channel attention module can improve the network's attention to key features by weighting the feature map in the channel dimension; the channel attention module includes: global average pooling layer, global maximum pooling layer, fully connected layer and activation function.
[0099] Among them, the spatial attention module is used to weight the spatial dimension of the feature map to enhance the model's attention to key areas.
[0100] In a feasible implementation, the specific process of implementing the channel attention module may include:
[0101] (1) Perform global average pooling on the input feature map to obtain a first feature vector describing global information. The specific process of obtaining the first feature vector describing global information can be expressed by the following formula (1):
[0102] (1)
[0103] in, Represents the input feature map; H represents the height of the input feature map; W represents the width of the input feature map; C represents the number of channels of the input feature map; R represents the set of input feature maps; Represents the first eigenvector describing the global information of the cth channel in the input feature map; Indicates that the cth channel in the input feature map is at position The value of .
[0104] (2) Perform global average pooling on the input feature map to obtain a second feature vector describing global information. The specific process of obtaining the second feature vector describing global information can be expressed by the following formula (2):
[0105] (2)
[0106] in, Represents the second eigenvector describing the global information.
[0107] (3) The first eigenvector describing the global information and the second eigenvector describing the global information are input into the fully connected layer with shared weights, and a channel attention map is generated through the Sigmoid activation function; the specific process of generating the channel attention map can be expressed by the following formula (3):
[0108] (3)
[0109] in, represents the channel attention map; represents a fully connected layer; Represents the Sigmoid function; Represents the maximum pooling value of each channel in the input feature map; Represents the average pooling value of each channel in the input feature map.
[0110] In a feasible implementation, the input feature map is element-wise multiplied with the channel attention map to obtain a weighted feature map. The specific implementation process of obtaining the weighted feature map can be expressed by the following formula (4):
[0111] (4)
[0112] in, Represents the input feature map; Represents a weighted feature map.
[0113] In a feasible implementation, the specific process of the spatial attention module may include:
[0114] (1) Perform maximum pooling on the input feature map to obtain the first feature vector describing the global information. The specific process of obtaining the first feature vector describing the spatial information can be expressed by the following formula (5):
[0115] (5)
[0116] in, Represents the first eigenvector describing spatial information; Represents the value of the 𝑘th channel in the input feature map.
[0117] (2) Perform average pooling on the input feature map to obtain a second feature vector describing global information. The specific process of obtaining the second feature vector describing spatial information can be expressed by the following formula (6):
[0118] (6)
[0119] in, The second eigenvector describing the spatial information.
[0120] (3) Connect the first eigenvector describing the spatial information and the second eigenvector describing the spatial information along the channel dimension through a The convolutional layer generates a spatial attention map. The specific process of generating the spatial attention map can be expressed by the following formula (7):
[0121] (7)
[0122] in, represents the spatial attention map; Represents a join operation.
[0123] In a feasible implementation, the input feature map is element-wise multiplied with the spatial attention map to generate a final weighted feature map. The specific implementation process of generating the final weighted feature map can be expressed by the following formula (8):
[0124] (8)
[0125] in, Represents the input feature map.
[0126] Among them, the feature representation ability of the network can be improved by adding channel attention modules and spatial attention modules.
[0127] Add a layer of output feature map, where the size of the output feature map is , used to process high-resolution features and improve the granularity and accuracy of detection.
[0128] in, Figure 4 1 is a schematic diagram of detection using the OpenPose algorithm and the improved YOLOv5 algorithm provided by an embodiment of the present invention. The word "cave" in the figure is a cave detected by the improved YOLOv5 algorithm; the nodes and edges on the construction workers around the cave are skeletons extracted by the OpenPose algorithm.
[0129] Optionally, the specific implementation process of S2 may include S21-S22:
[0130] S21, using an improved YOLOv5 algorithm to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas;
[0131] Optionally, the specific implementation process of S21 may include S211-S214:
[0132] S211, dividing the input video data into a plurality of grids, wherein each grid unit predicts a plurality of bounding boxes and a confidence level and a classification probability of each bounding box;
[0133] Among them, each bounding box is represented by four parameters representing the center coordinates, wherein the four parameters include: the horizontal coordinate of the center of the bounding box, the vertical coordinate of the center of the bounding box, the width of the bounding box, and the height of the bounding box; the predicted values of the four parameters can be expressed by the following formula (9):
[0134] (9)
[0135] in, represents the offset of the grid cell, Indicates the offset of the horizontal coordinate of the grid cell, Indicates the offset of the vertical coordinate of the grid cell; Indicates the horizontal coordinate offset of the center of the bounding box output by the model; Indicates the vertical coordinate offset; Indicates the bounding box width adjustment value; Indicates the bounding box height adjustment value; Indicates the width of the anchor box; Indicates the height of the anchor box; Represents the sigmoid function; Indicates the width of the bounding box; Indicates the height of the bounding box; The horizontal coordinate of the center of the bounding box; The ordinate of the center of the bounding box.
[0136] S212, using a sigmoid function to normalize the confidence and classification probability of each bounding box to obtain a normalized result;
[0137] Each bounding box predicts both confidence and classification probability; the confidence represents the probability that the bounding box contains an object; the classification probability represents the probability that the object belongs to a certain category.
[0138] In a feasible implementation, the specific process of normalization processing can be expressed by the following formula (10):
[0139] (10)
[0140] in, Represents the original confidence value of the model output; Represents the original value of the category probability output by the model; Indicates confidence level; Represents the classification probability.
[0141] S213. According to the result of the normalization processing, a loss function is used to perform prediction to obtain a prediction result; wherein the loss function includes: bounding box regression loss, classification loss, confidence loss and total loss.
[0142] Among them, the bounding box regression loss can be expressed by the following formula (11):
[0143] (11)
[0144] in, represents the bounding box regression loss; A represents the predicted bounding box; B represents the true bounding box; The function represents the ratio of the intersection area to the union area.
[0145] Among them, the classification loss can be expressed by the following formula (12):
[0146] (12)
[0147] in, Represents classification loss; C represents the total number of categories, that is, the number of all possible categories in the target classification problem; Represents the true category label; Represents the probability of the i-th category predicted by the model.
[0148] Among them, the confidence loss can be expressed by the following formula (13):
[0149] (13)
[0150] in, represents the confidence loss; y represents the true confidence label; Represents the confidence of the model prediction, that is, the probability that the model predicts that the bounding box contains the object.
[0151] The total loss function can be expressed by the following formula (14):
[0152] (14)
[0153] in, Represents the total loss function.
[0154] S214. According to the prediction results, the overlapping areas are removed by non-maximum suppression, and the area with the highest confidence is retained as the final recognition result; wherein the recognition result is the high-risk area at the edge and the high-risk area at the cave entrance.
[0155] In a feasible implementation, the non-maximum suppression process can be expressed by the following formula (15):
[0156] (15)
[0157] Among them, B represents the bounding box set; cores represents the bounding box confidence; thr represents the confidence threshold, represents the IoU threshold; Represents a candidate bounding box.
[0158] Among them, the present invention improves the original framework of YOLOv5, and the improved YOLOv5 algorithm can improve the performance in complex scenes and multi-scale target detection tasks.
[0159] S22. According to the high-risk areas near the edge and the high-risk areas at the opening, the skeleton node data of the construction workers are extracted using the OpenPose algorithm to obtain the skeleton node data set of the working actions near the edge and the opening.
[0160] In a feasible implementation, the OpenPose algorithm uses two parallel network branches to detect joint point heatmaps and PAFs; the heatmap of each joint point is obtained by generating a Gaussian distribution at the joint point position, and the specific formula for generating the joint point heatmap can be expressed by the following formula (16):
[0161] (16)
[0162] in, Represents the joint point heat map; Indicates the position of the jth joint point; Represents the standard deviation, which controls the width of the Gaussian distribution.
[0163] In a feasible implementation, each detected joint point is processed using the OpenPose algorithm to output the coordinates and confidence level of the joint point.
[0164] The coordinates of the extracted joint points can be expressed by the following formula (17):
[0165] (17)
[0166] The confidence can be expressed by the following formula (18):
[0167] (18)
[0168] in, Represents the confidence value, which is used to represent the heat map value at position j.
[0169] In a feasible implementation, the position of the detected joint point in the heat map value is , the corresponding confidence value is , the joint point information output by OpenPose is a triplet .
[0170] S3, build the initial ST-GCN neural network model;
[0171] Figure 5 It is a structural diagram of the ST-GCN neural network provided in an embodiment of the present invention; wherein, the ST-GCN neural network model includes: an input layer, a batch normalization layer, a spatiotemporal convolution module, a pooling layer, a fully connected layer and an output layer.
[0172] Among them, the batch normalization layer is a commonly used technology in the neural network training process to accelerate training and improve the performance of the model; it normalizes the input of each layer so that the mean and variance of the input data remain stable, thereby reducing the internal deviation phenomenon.
[0173] In one possible implementation, for mini-batches of input data , the specific implementation steps of batch normalization may include:
[0174] (1) Calculate the mean of the input data of the mini-batch, which can be expressed by the following formula (19):
[0175] (19)
[0176] where 𝑚 represents the number of samples in a mini-batch, represents the input value of the 𝑖th sample; Represents the mean of the input data for the mini-batch.
[0177] (2) Calculate the variance of the input data of the mini batch, which can be expressed by the following formula (20):
[0178] (20)
[0179] in, Represents the variance of the input data for the mini-batch.
[0180] (3) The input data is normalized according to the mean and variance to obtain the standardized data, which can be expressed by the following formula (21):
[0181] (twenty one)
[0182] in, Represents the standardized data; Represents a small constant used to prevent division by zero errors.
[0183] (4) Set the first trainable parameter Used to scale the normalized data; set the second trainable parameter , which is used to translate the normalized data, can be expressed by the following formula (22):
[0184] (twenty two)
[0185] in, represents the scaling parameter, represents the translation parameter, Indicates the output result.
[0186] Among them, the spatiotemporal convolution module includes: temporal convolution layer and graph convolution layer; the temporal convolution layer is used to capture the temporal relationship, that is, the changes of joint points in the time dimension.
[0187] The pooling layer is used to perform average pooling on the entire input feature map, taking the average of all elements of each channel and outputting a single value. The specific calculation process can be expressed by the following formula (23):
[0188] (twenty three)
[0189] Among them, x represents the input feature map, Represents the value of the output feature map on channel 𝑐, H represents the height of the input feature map; W represents the width of the input feature map; i represents the row index of the pixel in the image; j represents the column index of the pixel in the image; c represents the channel index.
[0190] Among them, the fully connected layer is used to splice all input nodes with each output node for linear transformation and nonlinear activation of features; the fully connected layer is used to map high-dimensional features to output categories. The specific formula can be expressed by the following formula (24):
[0191] (twenty four)
[0192] Among them, x is the input feature vector, the dimension is n; W represents the weight matrix, the dimension is ; b represents the bias vector with a dimension of m; y is the output feature vector with a dimension of m, and f represents the activation function.
[0193] S4. According to the skeleton node data set, the initial ST-GCN neural network is trained to obtain a trained ST-GCN neural network model.
[0194] Optionally, the specific implementation process of S4 may include S41-S43:
[0195] S41, constructing a graph structure according to the skeleton node data set;
[0196] The graph structure can be expressed by the following formula (25):
[0197] (25)
[0198] in, Represents a set of joint points; E represents the connecting edges between joint points, which are divided into single-frame human joint natural structure edges The same joint connection edge in the two frames before and after the time stage .
[0199] S42. According to the graph structure, a graph convolution operation is used to integrate the local information of the joint points, and the feature representation of each node in the spatial dimension and the temporal dimension is updated to obtain the joint point features;
[0200] The specific process of updating the feature representation of each node in the spatial dimension can be expressed by the following formula (26):
[0201] (26)
[0202] Among them, A represents the adjacency matrix, which is used to represent the joint point graph of each frame; represents the feature matrix of the lth layer, represents a nonlinear activation function, represents the weight matrix of graph convolution, represents the normalized degree matrix.
[0203] The specific process of updating the feature representation of each node in the time dimension can be expressed by the following formula (27):
[0204] (27)
[0205] in, Represents the temporal feature matrix of the lth layer; represents the weight matrix of temporal convolution, Represents a convolution operation.
[0206] S43, input the joint point features into the fully connected layer, use the classifier to perform action recognition, and obtain the predicted action recognition result; train the initial ST-GCN neural network according to the predicted action recognition result and the loss function to obtain the trained ST-GCN neural network model.
[0207] In a feasible implementation, the joint point features are input into the fully connected layer and processed by the softmax function. The predicted action category probability can be expressed by the following formula (28):
[0208] (28)
[0209] in, represents the weight of the fully connected layer; represents the bias of the fully connected layer; y represents the predicted action category probability.
[0210] S5. Obtain video data of the construction worker's working action at the edge of the hole to be identified.
[0211] S6. Input the video data of the construction workers' working actions near the edge of the tunnel to be identified into the trained ST-GCN neural network model for identification, and obtain the identification results of the unsafe behaviors of the construction workers working near the edge of the tunnel.
[0212] in, Figure 6: is a schematic diagram of action recognition based on the ST-GCN neural network provided by an embodiment of the present invention; wherein, in the upper left corner: the original video frame, showing a worker working at a height, which may have potentially dangerous behaviors; the box selected is the edge information detected by the improved YOLOv5; in the upper right corner: the input of the ST-GCN neural network model, the worker's skeleton nodes extracted by the OpenPose algorithm; the skeleton nodes are connected with white lines, showing the posture of the worker; in the lower left corner: the result after processing by the ST-GCN neural network model, showing the action characteristics of the worker; the white aperture represents important skeleton nodes or joints, reflecting the key parts that ST-GCN pays attention to when analyzing actions; in the lower right corner: the effect diagram of the processing result superimposed on the original video frame, showing the specific position and posture of the unsafe behavior identified by ST-GCN through the network model, and superimposing the skeleton nodes and the original video to make the detection result more intuitive.
[0213] According to an embodiment of the present invention, a labeled video dataset of construction workers' working actions near an edge hole is first obtained; an improved YOLOv5 algorithm and an OpenPose algorithm are used to process the labeled video dataset to obtain a skeleton node dataset of the working actions near an edge hole; secondly, an initial ST-GCN neural network model is constructed; the initial ST-GCN neural network is trained according to the skeleton node dataset to obtain a trained ST-GCN neural network model; video data of construction workers' working actions near an edge hole to be identified are obtained; finally, the video data of construction workers' working actions near an edge hole to be identified are input into the trained ST-GCN neural network model for identification, so as to obtain an identification result of unsafe behaviors of construction workers working near an edge hole.
[0214] The embodiment of the present invention adopts the ST-GCN neural network and the OpenPose algorithm to perform action recognition and unsafe behavior detection on construction workers, which can effectively identify and warn of dangerous behaviors on the construction site and improve construction safety. The embodiment of the present invention can improve the accuracy and robustness of construction worker behavior recognition. The embodiment of the present invention can improve the work efficiency of construction site safety management personnel and effectively reduce the occurrence of construction site accidents.
[0215] Figure 7 The block diagram of a device for detecting unsafe behaviors in side tunnel operations based on ST-GCN according to an exemplary embodiment is shown. The device is used in a method for detecting unsafe behaviors in side tunnel operations based on ST-GCN. Figure 7 The device includes a first acquisition unit 310, a processing unit 320, a construction unit 330, a training unit 340, a second acquisition unit 350 and a prediction and recognition unit 360. Wherein:
[0216] The first acquisition unit 310 is used to acquire a labeled video dataset of construction workers' working actions near the edge of the hole;
[0217] The processing unit 320 is used to process the labeled video data set by using the improved YOLOv5 algorithm and the OpenPose algorithm to obtain a skeleton node data set of the edge hole operation action;
[0218] A construction unit 330, used to construct an initial ST-GCN neural network model;
[0219] The training unit 340 is used to train the initial ST-GCN neural network according to the skeleton node data set to obtain a trained ST-GCN neural network model.
[0220] The second acquisition unit 350 is used to acquire video data of the construction personnel's working actions near the edge of the hole to be identified;
[0221] The prediction and recognition unit 360 is used to input the video data of the construction workers' working actions near the edge of the tunnel to be recognized into the trained ST-GCN neural network model for recognition, so as to obtain the recognition result of the unsafe behavior of the construction workers working near the edge of the tunnel.
[0222] Optionally, the construction worker's working actions at the edge of the tunnel include: unsafe behaviors of working at the edge and unsafe behaviors of working at the tunnel;
[0223] Among them, unsafe behaviors when working at the edge include: working with your back to the edge, running fast, bending over to pick up objects, leaning out, and multiple people working at the same time;
[0224] Among them, unsafe behaviors in cave operations include: crossing the cave, squatting on the edge of the cave, sitting on the edge of the cave, standing up too suddenly, and leaning on the edge of the cave.
[0225] Optionally, the first acquiring unit 310 is configured to:
[0226] Use crawler technology to obtain a video dataset of construction workers working near tunnel openings.
[0227] The VATIC tool is used to annotate the video dataset to be annotated, so as to obtain an annotated video dataset of construction workers' working actions near the edge opening.
[0228] Optionally, the processing unit 320 is configured to:
[0229] The improved YOLOv5 algorithm is used to preliminarily process the labeled video data set to identify high-risk areas along the edge and high-risk areas at the cave entrance;
[0230] According to the high-risk areas near the edge and the high-risk areas at the opening, the OpenPose algorithm is used to extract the skeleton node data of the construction workers, and the skeleton node dataset of the working actions near the edge and the opening is obtained.
[0231] Optionally, the improved YOLOv5 algorithm is used to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas, including:
[0232] The input video data is divided into multiple grids, where each grid unit predicts multiple bounding boxes and the confidence and classification probability of each bounding box;
[0233] The sigmoid function is used to normalize the confidence and classification probability of each bounding box to obtain the normalized result;
[0234] According to the result of normalization processing, the loss function is used for prediction to obtain the prediction result; the loss function includes: bounding box regression loss, classification loss, confidence loss and total loss.
[0235] According to the prediction results, the overlapping areas are removed by non-maximum suppression, and the area with the highest confidence is retained as the final recognition result; among them, the recognition results are the high-risk areas on the edges and the high-risk areas at the openings.
[0236] Optionally, the process of improving the YOLOv5 algorithm includes:
[0237] Add a convolution block attention module, wherein the convolution block attention module includes: a channel attention module and a spatial attention module; wherein the channel attention module is used to assign different weights to each channel to generate a channel attention map; wherein the spatial attention module is used to assign different weights to each position to generate a spatial attention map;
[0238] An output feature map with a size of 160x160x255 is added to process high-resolution features and improve the granularity and accuracy of detection.
[0239] Optionally, the training unit 340 is used to:
[0240] Constructing a graph structure according to the skeleton node data set;
[0241] According to the graph structure, the graph convolution operation is used to integrate the local information of the joint points, update the feature representation of each node in the spatial dimension and the temporal dimension, and obtain the joint point features;
[0242] The joint point features are input into the fully connected layer, and the classifier is used for action recognition to obtain the predicted action recognition results; the initial ST-GCN neural network is trained according to the predicted action recognition results and the loss function to obtain the trained ST-GCN neural network model.
[0243] According to an embodiment of the present invention, a labeled video dataset of construction workers' working actions near an edge hole is first obtained; an improved YOLOv5 algorithm and an OpenPose algorithm are used to process the labeled video dataset to obtain a skeleton node dataset of the working actions near an edge hole; secondly, an initial ST-GCN neural network model is constructed; the initial ST-GCN neural network is trained according to the skeleton node dataset to obtain a trained ST-GCN neural network model; video data of construction workers' working actions near an edge hole to be identified are obtained; finally, the video data of construction workers' working actions near an edge hole to be identified are input into the trained ST-GCN neural network model for identification, so as to obtain an identification result of unsafe behaviors of construction workers working near an edge hole.
[0244] The embodiment of the present invention adopts the ST-GCN neural network and the OpenPose algorithm to perform action recognition and unsafe behavior detection on construction workers, which can effectively identify and warn of dangerous behaviors on the construction site and improve construction safety. The embodiment of the present invention can improve the accuracy and robustness of construction worker behavior recognition. The embodiment of the present invention can improve the work efficiency of construction site safety management personnel and effectively reduce the occurrence of construction site accidents.
[0245] Figure 8 is a schematic diagram of a structure of an unsafe behavior detection device for edge opening operations based on ST-GCN provided by an embodiment of the present invention, such as Figure 8 As shown, the unsafe behavior detection device for edge hole operation based on ST-GCN may include the above Figure 7 The unsafe behavior detection device for working near an opening of a tunnel based on ST-GCN is shown. Optionally, the unsafe behavior detection device for working near an opening of a tunnel based on ST-GCN 410 may include a first processor 2001 .
[0246] Optionally, the ST-GCN-based unsafe behavior detection device 410 for operations near edge openings may also include a memory 2002 and a transceiver 2003 .
[0247] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0248] Combine the following Figure 8 The components of the unsafe behavior detection device 410 for edge opening operations based on ST-GCN are introduced in detail:
[0249] The first processor 2001 is the control center of the unsafe behavior detection device 410 for edge tunnel operation based on ST-GCN, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention, such as one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA).
[0250] Optionally, the first processor 2001 can perform various functions of the ST-GCN-based edge hole operation unsafe behavior detection device 410 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.
[0251] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 8 CPU0 and CPU1 are shown in FIG.
[0252] In a specific implementation, as an embodiment, the unsafe behavior detection device 410 for edge opening operation based on ST-GCN may also include multiple processors, such as Figure 8 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0253] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0254] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be connected to the memory 2002 through the interface circuit ( Figure 8 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0255] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0256] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 8 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0257] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and may be detected by the interface circuit ( Figure 8 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0258] It should be noted that Figure 8 The structure of the ST-GCN-based unsafe behavior detection device 410 for edge hole operations shown in the figure does not constitute a limitation on the router. The actual knowledge structure identification device may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0259] In addition, the technical effects of the unsafe behavior detection device 410 for working near tunnel openings based on ST-GCN can refer to the technical effects of the unsafe behavior detection method for working near tunnel openings based on ST-GCN described in the above method embodiment, and will not be repeated here.
[0260] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0261] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0262] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0263] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0264] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0265] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0266] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0267] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0268] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0269] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0270] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0271] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0272] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for detecting unsafe behaviors in tunnel operations near edges based on ST-GCN, characterized in that: The method comprises: S1. Obtain a labeled video dataset of construction workers’ working actions near the edge of the hole; S2. Using the improved YOLOv5 algorithm and the OpenPose algorithm to process the labeled video dataset, and obtain a skeleton node dataset of the edge hole operation action; S3, build the initial ST-GCN neural network model; S4. According to the skeleton node data set, the initial ST-GCN neural network is trained to obtain a trained ST-GCN neural network model; S5, obtaining video data of the construction personnel's working actions near the edge of the hole to be identified; S6. Input the video data of the construction workers' working actions near the edge of the tunnel to be identified into the trained ST-GCN neural network model for identification, and obtain the identification results of the unsafe behaviors of the construction workers working near the edge of the tunnel.
2. The unsafe behavior detection method for edge opening operation based on ST-GCN according to claim 1 is characterized in that: The construction workers' working actions at the edge of the tunnel in S1 include: unsafe behaviors at the edge and unsafe behaviors at the tunnel; Among them, unsafe behaviors when working at the edge include: working with your back to the edge, running fast, bending over to pick up objects, leaning out, and multiple people working at the same time; Among them, unsafe behaviors in cave operations include: crossing the cave, squatting on the edge of the cave, sitting on the edge of the cave, standing up too suddenly, and leaning on the edge of the cave.
3. The unsafe behavior detection method for edge opening operation based on ST-GCN according to claim 1 is characterized in that: The step S1 of obtaining a labeled video dataset of construction workers' working actions near an opening includes: S11. Use crawler technology to obtain a video dataset of construction workers working near the edge of the hole to be labeled; S12. Use the VATIC tool to annotate the video dataset to be annotated, and obtain an annotated video dataset of construction workers' working actions near the edge opening.
4. The method for detecting unsafe behaviors in side opening operations based on ST-GCN according to claim 3 is characterized in that: The S2 uses the improved YOLOv5 algorithm and the OpenPose algorithm to process the labeled video data set to obtain a skeleton node data set of the edge hole operation action, including: S21, using an improved YOLOv5 algorithm to preliminarily process the labeled video data set to identify edge high-risk areas and cave entrance high-risk areas; S22. According to the high-risk areas near the edge and the high-risk areas at the opening, the skeleton node data of the construction workers are extracted using the OpenPose algorithm to obtain the skeleton node data set of the working actions near the edge and the opening.
5. The method for detecting unsafe behaviors in side opening operations based on ST-GCN according to claim 4 is characterized in that: The S21 uses the improved YOLOv5 algorithm to preliminarily process the labeled video data set to identify high-risk areas along the edge and high-risk areas at the cave entrance, including: S211, dividing the input video data into a plurality of grids, wherein each grid unit predicts a plurality of bounding boxes and a confidence level and a classification probability of each bounding box; S212, using a sigmoid function to normalize the confidence and classification probability of each bounding box to obtain a normalized result; S213, according to the result of the normalization processing, using the loss function to perform prediction to obtain a prediction result; wherein the loss function includes: bounding box regression loss, classification loss, confidence loss and total loss; S214. According to the prediction results, the overlapping areas are removed by non-maximum suppression, and the area with the highest confidence is retained as the final recognition result; wherein the recognition result is the high-risk area at the edge and the high-risk area at the cave entrance.
6. The method for detecting unsafe behaviors in side opening operations based on ST-GCN according to claim 4 is characterized in that: The process of improving the YOLOv5 algorithm includes: Add a convolution block attention module, wherein the convolution block attention module includes: a channel attention module and a spatial attention module; wherein the channel attention module is used to assign different weights to each channel to generate a channel attention map; wherein the spatial attention module is used to assign different weights to each position to generate a spatial attention map; An output feature map with a size of 160x160x255 is added to process high-resolution features and improve the granularity and accuracy of detection.
7. The method for detecting unsafe behaviors in side opening operations based on ST-GCN according to claim 1 is characterized in that: The step S4 of training the initial ST-GCN neural network according to the skeleton node data set to obtain a trained ST-GCN neural network model includes: S41, constructing a graph structure according to the skeleton node data set; S42. According to the graph structure, a graph convolution operation is used to integrate the local information of the joint points, and the feature representation of each node in the spatial dimension and the temporal dimension is updated to obtain the joint point features; S43, input the joint point features into the fully connected layer, use the classifier to perform action recognition, and obtain the predicted action recognition result; train the initial ST-GCN neural network according to the predicted action recognition result and the loss function to obtain the trained ST-GCN neural network model.
8. A device for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN, the device for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN is used to implement the method for detecting unsafe behaviors in operations near tunnel openings based on ST-GCN as claimed in any one of claims 1 to 7, characterized in that: The device comprises: The first acquisition unit is used to acquire a labeled video dataset of construction workers' working actions near the edge of the hole; A processing unit, used to process the labeled video data set using an improved YOLOv5 algorithm and an OpenPose algorithm to obtain a skeleton node data set of the edge hole operation action; Construction unit, used to build the initial ST-GCN neural network model; A training unit, used to train the initial ST-GCN neural network according to the skeleton node data set to obtain a trained ST-GCN neural network model; The second acquisition unit is used to acquire video data of the construction personnel's working actions near the edge of the hole to be identified; The prediction and recognition unit is used to input the video data of the construction workers' working actions near the edge of the tunnel to be recognized into the trained ST-GCN neural network model for recognition, so as to obtain the recognition results of the unsafe behaviors of the construction workers working near the edge of the tunnel.
9. A device for detecting unsafe behaviors in side tunnel operations based on ST-GCN, characterized in that: The unsafe behavior detection device for edge opening operation based on ST-GCN includes: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Construction safety early warning method and device based on attention mechanism neural network
CN115690557A
Abnormal behavior recognition method based on space-time diagram convolutional neural network
CN116959099A
Training ground monitoring method, equipment, storage medium and device
CN117058767A
Cited By
Construction site worker behavior intelligent identification and early warning system
CN120932302A
Construction fence detection method and system based on graph convolutional network
CN121280871A
Construction fence detection method and system based on graph convolution network
CN121280871B
Operation area detection method and device, equipment and storage medium
CN121505374A
Work area detection method, device, apparatus, and storage medium
CN121505374B
