Method for intelligent safety belt detection in a cement plant
By using the BiseNet neural network and FocalLoss loss function, combined with image preprocessing and multi-person clustering algorithms, efficient and accurate detection of safety belts of construction workers in cement plants was achieved. This solved the detection difficulties of traditional methods in occluded and multi-person scenarios, and improved detection speed and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAXIN CEMENT TECH MANAGEMENT (WUHAN) CO LTD
- Filing Date
- 2022-04-22
- Publication Date
- 2026-05-22
Smart Images

Figure CN114782867B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence recognition technology, and more specifically, to a method for detecting intelligent safety belts in cement plants. Background Technology
[0002] Safety belts are essential safety protection equipment for workers on construction sites. Wearing safety belts according to regulations is a guarantee of workers' own safety and a direct reflection of standardized project management. The correct use of personal protective equipment plays a crucial role in on-site safety work; on a construction site, a safety belt can save a life.
[0003] Traditional seatbelt detection methods generally fall into two categories. The first uses object detection methods, such as YOLO and SSD, which directly detect the presence of a seatbelt. This method cannot distinguish between people and seatbelts with fine granularity, nor can it accurately determine the spatial relationship between the person and the seatbelt. Therefore, it cannot accurately determine whether the person is wearing the seatbelt correctly, and it suffers from serious false alarms in conditions such as blurriness, low light, or occlusion. The second method uses large segmentation networks like PSPNET. This type of network detection has high GPU performance requirements, making it unable to meet practical needs in terms of detection speed. It also has strict scene requirements, requiring only one person in the scene to be correctly detected, making it impossible to match multiple people and multiple ropes.
[0004] Therefore, a reliable and efficient seat belt detection method is needed to solve technical problems such as occlusion, poor image quality, and detection in multi-person scenes. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide an intelligent safety belt detection method for cement plants, which can solve technical problems such as occlusion, poor image quality, and detection of multiple people in the scene through end-to-end network, and has improved a lot in terms of speed and accuracy compared with traditional algorithms, thus meeting the current needs of the safety belt detection field.
[0006] The technical solution adopted by this invention to solve its technical problem is: to construct an intelligent safety belt detection method for cement plants, comprising the following steps:
[0007] S1. Acquire images from the video stream and perform image preprocessing;
[0008] S2. The preprocessed image is fed into the BiseNet neural network, and then features are extracted through the Encode layer of the neural network.
[0009] S3. The encoded feature map then goes through a Decode layer to remap the features back to the original image size, resulting in a semantically segmented mask image.
[0010] S4. Perform image binarization logic processing on the segmented mask image to distinguish the segmented target;
[0011] S5. Perform erosion, dilation, median filtering, and connected component detection on the binarized image to obtain the outlines of the person and the seat belt;
[0012] S6. Fit the contour of the seat belt using linear and quadratic functions;
[0013] S7. Determine whether a seatbelt is being worn by checking if there are any intersections between the fitted curve and the outline of a person.
[0014] S8. Determine whether the seat belt is in a high-mounted, low-used state by using the boundingBox coordinates of the person and the seat belt.
[0015] According to the above scheme, in step S1, the preprocessing method includes image normalization and judgment of image color cast, blur and dark light abnormalities, which are used to filter images with poor image quality.
[0016] According to the above scheme, in step S2, the Encode layer includes a max pooling layer, which is used to expand the receptive field of the feature map encoded by the encoding layer.
[0017] According to the above scheme, in step S3, the Decode layer includes an upsampling layer, which is used to restore the size of the feature map output by the previous decoding layer to obtain a feature map with the same size as the feature map output by the corresponding encoding layer.
[0018] According to the above scheme, in step S4, the binarization logic processing is to first obtain all the point sets of the seat belt by setting the binarization threshold to 1, then set all the pixels with a value of 2 in the grayscale image to 0, and then use the binarization operation to obtain all the classification point sets of the person by setting the threshold to 0.
[0019] According to the above scheme, step S5 also includes anomaly processing of the detected contours, which includes filtering out unqualified contours by the area of the human detection box, the aspect ratio of the human detection box, and the proportion of the human detection box on the image.
[0020] According to the above scheme, after anomaly processing of the detected contours, clustering of seat belt point sets is performed based on the number of people detected, thereby achieving matching and detection of multiple people and multiple seat belts.
[0021] According to the above scheme, in step S5, after obtaining the outlines of the person and the seat belt, the center point coordinates of the person and the seat belt are calculated respectively, and the person and the seat belt are correctly matched by calculating the Euclidean distance between the center points of the person and the seat belt.
[0022] According to the above scheme, in step S7, the X-axis direction of the human contour is projected onto the fitted first and second quadratic functions. The coordinate set of the human region on the fitted function is obtained by projection. By calculating whether these coordinates are inside the human contour region, it is determined whether the human and the seat belt have an intersection point, thereby determining whether the seat belt is worn.
[0023] The intelligent safety belt detection method for cement plants according to the present invention has the following beneficial effects:
[0024] This invention is primarily applied to safety belt detection systems, enabling automatic identification and end-to-end detection of safety belts. This surpasses traditional, complex algorithm models and delivers superior performance. Furthermore, this invention effectively addresses the safety hazards posed to construction workers and businesses due to insufficient safety awareness and failure to wear safety belts. Attached Figure Description
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0026] Figure 1 This is a flowchart illustrating a method for detecting intelligent safety belts in a cement plant, as described in one embodiment.
[0027] Figure 2 This is a schematic diagram of the network structure of a seatbelt detection model in one embodiment. Detailed Implementation
[0028] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0029] In one embodiment, such as Figure 1 As shown, a method for detecting intelligent safety belts in a cement plant is provided, including the following steps:
[0030] Images are acquired from video streams and preprocessed, including image normalization and the identification of color cast, blurring, and dark light anomalies, to filter out images of poor quality.
[0031] Specifically, the pixels are normalized, for example, the pixel value of [0,255] is normalized to [0,1]; the RGB image is converted to LAB space, and statistical analysis is used to determine whether there is a color cast problem, such as detecting whether it is reddish, greenish, or bluish; after the image is converted to grayscale, its Laplacian variance is calculated to determine whether the image is blurry; after the image is converted to grayscale, the pixel value of the statistical region is used to determine whether there is dark light in the image; and the image quality is further filtered out by quality detection to ensure the accuracy of subsequent segmentation.
[0032] The preprocessed image is fed into the BiseNet neural network, and then features are extracted through the network's Encode layer. Specifically, combined with... Figure 2 As shown, Figure 2 This is a schematic diagram of the network structure of a seatbelt detection model in one embodiment.
[0033] like Figure 2 As shown, each encoding layer consists of a convolutional layer - a Bayesian network - an activation function layer - a convolutional layer - a Bayesian network - an activation function layer, and a MaxPooling layer is also added to the corresponding encoding layers, such as in layers 4, 8, 12, and 16. The role of the MaxPooling layer is to downsample the feature map output by the Encode layer to reduce the size of the feature map, thereby expanding the receptive field and extracting more information.
[0034] See also Figure 2 The encoded feature map then passes through a decoder layer to remap the features back to the original image size, resulting in a semantically segmented mask image. Each decoder layer consists of a convolutional layer-Bayesian network-activation function layer-convolutional layer-Bayesian network-activation function layer, with upsampling layers added in the corresponding layers, such as layers 3, 5, 7, and 9. The purpose of the upsampling layers is to restore the size of the decoded feature map, ensuring it matches the size of the other inputs to the corresponding concat layer.
[0035] In the BiseNet neural network, to address the imbalance problem, the FocalLoss loss function is introduced for parameter updates. The loss function is defined as: Loss = -(1-p) / ... t ) γ log(p t ), where γ is an adjustable factor, p t This reflects the difficulty level of classification, p t The larger the value, the higher the confidence level of the classification, indicating that the sample is easier to classify; p t The smaller the value, the lower the classification confidence, indicating that the sample is more difficult to classify. Therefore, FocalLoss essentially increases the weight of difficult-to-classify samples in the loss function, causing the loss function to favor difficult-to-classify samples, which helps improve the accuracy of difficult-to-classify samples. Based on the effect after parameter tuning, the classification effect of people and seat belts is best when the adjustable factor of γ is set to 4.5.
[0036] The segmented mask image is subjected to image binarization to distinguish the segmented targets. In the data annotation, the label for people is set to 1 and the label for seat belts is set to 2. During the binarization process, firstly, all points of the seat belt are obtained by setting the binarization threshold to 1. Then, all pixels with a value of 2 in the grayscale image are set to 0, and then the binarization operation is performed again, setting the threshold to 0 to obtain all classification points of people.
[0037] The specific binarization function is as follows:
[0038] In this context, maxVal is set to 255, thresh is set to 1 when processing seat belt point sets and 0 when processing human point sets, and the binarization threshold type is set to THRESH_BINARY, meaning that the value exceeding the threshold is maxVal, and the other values are 0.
[0039] After obtaining the binarized image, it is necessary to perform erosion, dilation, and median filtering on the binarized image to filter out some interfering noise. Finally, the outlines of the person and the seat belt are obtained through connected component detection.
[0040] After obtaining the outlines of the person and the seat belt, the outlines need to be processed again. By using some key factors, such as the area of the person's detection box, the aspect ratio of the person's detection box, and the proportion of the person's detection box on the image, some noise can be further filtered out.
[0041] After secondary contour processing, a clustering operation of the seatbelt point set is required based on the number of people detected to achieve matching and detection of multiple people and multiple seatbelts. The seatbelt clustering algorithm adopts K-means, with clusters divided into (C1, C2, ..., Ck), where K is the number of people detected, and the objective is to minimize the squared error E. Where μ i It is cluster C i The mean vector, sometimes called the centroid, is expressed as:
[0042] After obtaining the clustered safety belts, the center point coordinates of the person and the safety belt are calculated separately. The Euclidean distance between the center point of the person and the safety belt is calculated to determine which person the safety belt belongs to, so as to accurately match multiple people and multiple ropes.
[0043] After obtaining the matched person and seat belt, it is necessary to determine whether the person is wearing the seat belt correctly. This requires fitting the clustered seat belt point set with a linear and a quadratic function. The linear function is described as y = ax + b, and the quadratic function is described as y = ax + b. 2The function +bx+c uses the set of points on the seatbelt to solve for the parameters a, b, and c of the first and second quadratic functions, thus obtaining a fitted function. After obtaining the fitted function, the minimum and maximum values of the person's contour along the X-axis are sampled at 1-pixel intervals to obtain a set of fitted functions along the X-axis. The fitted function can then be used to solve for the Y-value. The obtained (x, y) coordinates are substituted into the polygonal contour of the person to solve for whether the point is within the polygonal region. If the point is within the polygonal region, it can be determined that the person is wearing the seatbelt correctly; otherwise, the person is not wearing the seatbelt correctly.
[0044] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for detecting intelligent safety belts in cement plants, characterized in that, Includes the following steps: S1. Acquire images from the video stream and perform image preprocessing; S2. The preprocessed image is fed into the BiseNet neural network, and then features are extracted through the Encode layer of the neural network. S3. The encoded feature map then goes through a Decode layer to remap the features back to the original image size, resulting in a semantically segmented mask image. S4. Perform image binarization logic processing on the segmented mask image to distinguish the segmented target; S5. Perform erosion, dilation, median filtering, and connected component detection on the binarized image to obtain the outlines of the person and the seat belt; S6. Fit the contour of the seat belt using linear and quadratic functions; S7. Determine whether a seatbelt is being worn by checking if there are any intersections between the fitted curve and the outline of a person. S8. Determine whether the seat belt is in a high-mounted, low-used state by using the boundingBox coordinates of the person and the seat belt; In step S4, the label of "person" is set to 1 and the label of "seat belt" is set to 2 in the data annotation. During the binarization process, the binarization threshold is first set to 1 to obtain all the point sets of the seat belt. Then, all the pixels with a value of 2 in the grayscale image are set to 0. Then, the binarization operation is used to obtain all the classification point sets of the person by setting the threshold to 0. The specific binarization function is: Among them, maxVal is set to 255, thresh is set to 1 when processing seat belt point sets and 0 when processing human point sets, and the binarization threshold type is set to THRESH_BINARY, that is, the value that exceeds the threshold is maxVal, and the other values are 0. After obtaining the binarized image, it is necessary to perform erosion, dilation and median filtering on the binarized image to filter out some interfering noise. Finally, the outlines of the person and the seat belt are obtained through connected component detection. After obtaining the outlines of the person and the seat belt, the outlines need to be processed again. Unqualified outlines are filtered out by the area of the person's detection box, the aspect ratio of the person's detection box, and the proportion of the person's detection box on the image. After secondary contour processing, a clustering operation of the seatbelt point set is required based on the number of people detected to achieve matching and detection of multiple people and multiple seatbelts. The seatbelt clustering algorithm adopts K-means, with clusters divided into (C1, C2, ..., Ck), where K is the number of people detected, and the objective is to minimize the squared error E. ,in It is a cluster The mean vector is expressed as: ; After obtaining the clustered safety belts, the center point coordinates of the person and the safety belt are calculated separately. The Euclidean distance between the center point of the person and the safety belt is calculated to determine which person the safety belt belongs to, so as to accurately match multiple people and multiple ropes. After obtaining the matched person and seat belt, it is necessary to determine whether the person is wearing the seat belt correctly. This requires fitting the clustered seat belt point set with linear and quadratic functions. The linear function is described as follows: The quadratic function is described as follows: The parameters a, b, and c of the first and second quadratic functions are solved by using the point set of the seat belt, thus obtaining a fitted function. After obtaining the fitted function, the minimum and maximum values of the human contour along the X-axis are sampled at 1-pixel intervals to obtain a set of fitted functions along the X-axis. The Y-value can be further solved using the fitted function. The obtained (x, y) coordinate values are substituted into the polygonal contour of the human to solve for whether the point is within the polygonal region. If the point is within the polygonal region, it can be determined that the person is wearing the seat belt correctly; otherwise, the person is not wearing the seat belt correctly.
2. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, In step S1, the preprocessing method includes image normalization and judgment of color cast, blurring and dark light abnormalities in the image, which are used to filter images with poor image quality.
3. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, In step S2, the Encode layer includes a max pooling layer for expanding the receptive field of the feature map encoded by the encoding layer.
4. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, In step S3, the Decode layer includes an upsampling layer, which is used to restore the size of the feature map output by the previous decoder layer to obtain a feature map with the same size as the feature map output by the corresponding encoder layer.
5. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, After secondary processing of the detected contours, clustering of seat belt point sets is performed based on the number of people detected, thereby achieving matching and detection of multiple people and multiple seat belts.
6. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, In step S5, after obtaining the outlines of the person and the seat belt, the center point coordinates of the person and the seat belt are calculated respectively. The person and the seat belt are correctly matched by calculating the Euclidean distance between the center points of the person and the seat belt.
7. The intelligent safety belt detection method for cement plants according to claim 1, characterized in that, In step S7, the X-axis direction of the human contour is projected onto the fitted first and second quadratic functions. The coordinate set of the human region on the fitted function is obtained by projection. By calculating whether these coordinates are inside the human contour region, it is determined whether the human and the seat belt have an intersection point, thereby determining whether the seat belt is being worn.