Methods, systems, devices, and storage media for improving detection of rule violations wear accuracy

CN117542074BActive Publication Date: 2026-10-27SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311333604.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2026-10-27
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

即使神经网络在实验室的测试效果越来越好,但是在实际应用场景中,高精准度和高鲁棒性的目标识别网络也会受到噪声等外界因素的影响导致预测结果不稳定

Benefits of technology

[0059]本发明提供的提高检测违规穿戴准确性的方法、系统、计算机设备及计算机可读存储介质,通过获取用于在电力生产中检测违规穿戴的目标识别数据集,所述目标识别数据集中的每个样本图像包含至少一个人物,部分样本图像中标注有各大类的预测框及其类别;利用标注有类别的样本图像对目标识别网络进行初步训练;利用初步训练后的目标识别网络对未标注类别的样本图像进行标注,标注后的样本图像和标注有类别的样本图像构成样本数据集;利用样本数据集对初步训练后的目标识别网络进行训练,得到训练好的目标识别网络;根据标注有类别的样本图像得到安全带分类数据集,利用安全带分类数据集对图像分类网络进行训练,得到训练好的图像分类网络;在生产现场实时获取视频,对视频流逐帧图像利用训练好的目标识别网络和训练好的图像分类网络进行实时在线检测,得到预测结果;通过对邻近M帧图像的检测结果进行统计以判断违规穿戴情况,从而提高检测违规穿戴的准确性。本发明采用的目标识别网络和图像分类网络通过大量不同的样本图像进行训练从中学习到目标本质的特征,对于识别图像环境光照的变化、一定程度的位移、缩放以及其他形式的扭曲变形具有一定的鲁棒性;通过对邻近M帧图像的检测结果进行统计以判断违规穿戴情况,可以通过历史记录纠正当前帧的类别判断,避免误判,使输出具有连续性,改善跳闪现象,提高检测的准确性和稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117542074B_ABST
    Figure CN117542074B_ABST
Patent Text Reader

Abstract

The application discloses a method, system, device and storage medium for improving the accuracy of detecting illegal wearing, the method comprising: obtaining a target recognition dataset for detecting illegal wearing in power production; using samples labeled with categories in the target recognition dataset to preliminarily train a target recognition network; using the preliminarily trained target recognition network to label samples without categories; using all labeled samples to form a sample dataset, and then training the preliminarily trained target recognition network; obtaining a safety belt classification dataset according to the target recognition dataset, and then training an image classification network; obtaining a video in real time, using the trained target recognition network and image classification network to detect the video stream frame by frame, and obtaining a prediction result; and statistically analyzing the detection results of adjacent M frames of images to determine the illegal wearing condition. The application can improve the accuracy of detecting illegal wearing by statistically analyzing the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of online image detection technology, and in particular to a method, system, computer device, and computer-readable storage medium for improving the accuracy of detecting unauthorized clothing. Background Technology

[0002] As a vital component of industrial development and people's lives, the power industry faces increasing demands from higher power generation and consumption. Regular maintenance and timely elimination of potential grid faults are crucial for ensuring the normal operation of the power grid, requiring the hard work of power workers. However, ensuring the personal safety of these workers is even more critical than ensuring the grid's normal operation. Manual monitoring through video surveillance systems for timely detection and elimination of safety hazards is prohibitively expensive. In recent years, significant advancements in computer vision, particularly in object detection technology, have made its practical application possible. Object detection has evolved through two main stages: manual feature extraction and neural network-based methods. Neural network-based object detection technology is becoming increasingly mature. Even though neural networks are performing well in laboratory tests, in real-world applications, even highly accurate and robust object recognition networks can be affected by external factors such as noise, leading to unstable predictions. Therefore, in actual deployment, it is necessary to filter and correct the network's predictions to avoid false alarms. Summary of the Invention

[0003] To address the shortcomings of the prior art, this invention provides a method, apparatus, computer device, and computer-readable storage medium for improving the accuracy of detecting unauthorized clothing. By statistically analyzing the detection results of adjacent M-frame images, the real-time recognition results can be corrected based on historical recognition results, thereby improving the accuracy and stability of the recognition results.

[0004] The first objective of this invention is to provide a method for improving the accuracy of detecting unauthorized clothing.

[0005] The second objective of this invention is to provide a system for improving the accuracy of detecting unauthorized clothing.

[0006] A third objective of this invention is to provide a computer device.

[0007] A fourth objective of this invention is to provide a computer-readable storage medium.

[0008] The first objective of this invention can be achieved by adopting the following technical solution:

[0009] A method for improving the accuracy of detecting unauthorized clothing use, the method comprising:

[0010] A target recognition dataset for detecting unauthorized clothing in power production was obtained. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories.

[0011] The target recognition network is initially trained using labeled sample images; the initially trained target recognition network is then used to label unlabeled sample images, and the labeled sample images and labeled sample images together constitute a sample dataset; the initially trained target recognition network is then trained using the sample dataset to obtain a trained target recognition network.

[0012] A seat belt classification dataset is obtained from sample images labeled with categories. The image classification network is trained using the seat belt classification dataset to obtain a trained image classification network.

[0013] Real-time video is acquired at the production site, and the trained target recognition network and trained image classification network are used to perform real-time online detection on each frame of the video stream to obtain prediction results;

[0014] By statistically analyzing the detection results of neighboring M frames, the accuracy of detecting illegal clothing can be improved; where M is a multiple of the frame rate.

[0015] Furthermore, the step of determining the violation of clothing regulations by statistically analyzing the detection results of neighboring M frames includes:

[0016] A target recognition algorithm is used to track all predicted bounding boxes in M ​​neighboring frames. When tracking the target, only the predicted bounding boxes are tracked without considering changes in their categories. The target recognition algorithm is SORT or DeepSORT.

[0017] Record the category information of each target in the M neighboring frames, and take the category that is recorded most frequently as the final output category of the corresponding target;

[0018] If the final output category is an exception, then there is a violation of the dress code.

[0019] Furthermore, the step of determining the violation of clothing regulations by statistically analyzing the detection results of neighboring M frames includes:

[0020] Divide the frame image into several blocks;

[0021] Within each block, the number of anomalies in each major category is counted, and the block is determined as an anomalous block based on the number of anomalies. If there are overlapping areas among the anomalous blocks, the anomalous blocks are merged and the result is the final anomalous block.

[0022] If an abnormal block is identified, then there is a violation of the wearing rules.

[0023] The step of statistically analyzing the abnormality rate of each major category within each block, and determining whether a block is an abnormal block based on the abnormality rate, includes:

[0024] Let H be the number of anomalies of class c in a certain block of the image in frame t. t,c =αH t-1,c +(1-α)K t,c Where α is the balance coefficient, K t,c This represents the category detection result for category c in the current block. If a category containing category c in the block is an anomaly, then K... t,c =1, otherwise K t,c =-1; where major category c is any major category;

[0025] If H t,c If the value is greater than 0, then the block is an abnormal block, and the major category of the abnormality is c.

[0026] Furthermore, during training, channel pruning is used to prune the network model to make it lightweight; wherein, the network model is an object recognition network or an image classification network.

[0027] Furthermore, the method of pruning the network model using channel pruning includes:

[0028] Perform basic training on the network model, and use the trained network model as the original model;

[0029] Channel pruning is performed on each convolutional layer in the original model according to the pruning strategy;

[0030] The original pruned model was evaluated using a validation set, with the average accuracy across all classes as the evaluation criterion.

[0031] If the evaluation performance of the original model after this pruning is better than that of the optimal network model, then the original model after this pruning is recorded as the optimal network model, and the original model after the first pruning is the initial optimal network model.

[0032] Return to the original model and perform channel pruning on each convolutional layer according to the pruning strategy, and continue to perform subsequent operations until the preset number of iterations is reached;

[0033] The optimal network model is fine-tuned, and the fine-tuned network model is the trained network model.

[0034] The pruning strategy specifically includes:

[0035] For each convolutional layer in the original model, a pruning ratio is generated. The pruning ratio is generated using at least one method, including but not limited to random generation, clustering, and optimization calculation.

[0036] Furthermore, the step of performing real-time online detection on each frame of the video stream using a trained target recognition network and image classification network to obtain prediction results includes:

[0037] The trained target recognition network is used to annotate the frame images, and the predicted boxes of major categories and their categories are annotated.

[0038] If the production site involves high-altitude operations, then images of the torso category are extracted from the frame images, and the extracted images are input into the trained image classification network to output the classification results.

[0039] If the classification result is "wearing a seatbelt", then the category of the torso in the corresponding frame image will be replaced with "wearing a seatbelt".

[0040] Furthermore, based on the statistical results, if the safety device is worn in violation of regulations, an alarm will be issued and the abnormal information will be uploaded to the production safety device database.

[0041] Furthermore, the major categories include head, hands, torso, and feet. The categories corresponding to the head are safety helmets and not wearing a safety helmet; the categories corresponding to the hands are insulated gloves and not wearing insulated gloves; the categories corresponding to the torso are work clothes, reflective clothing, and regular clothing; and the categories corresponding to the feet are insulated shoes and ordinary shoes.

[0042] Within the head category, not wearing a helmet is considered an abnormal situation;

[0043] Within the category of hands, not wearing insulating gloves is considered an abnormality.

[0044] Within the torso category, if the work is not at height, then regular clothing is classified as abnormal; if the work is at height, then regular clothing, work clothes, and reflective vests are all classified as abnormal.

[0045] Within the footwear category, regular shoes are classified as an exception.

[0046] Furthermore, the target recognition dataset includes a dataset related to production safety wearables obtained from the internet, as well as a self-built dataset composed of images extracted from videos of wearables taken at production sites and in simulated work scenarios.

[0047] The second objective of this invention can be achieved by adopting the following technical solution:

[0048] A system for improving the accuracy of detecting unauthorized wearable devices, the system comprising:

[0049] The acquisition module is used to acquire a target recognition dataset for detecting illegal wearing in power production. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories.

[0050] The first training module is used to perform preliminary training on the target recognition network using sample images labeled with categories; the pre-trained target recognition network is used to label unlabeled sample images, and the labeled sample images and the labeled sample images constitute a sample dataset; the pre-trained target recognition network is trained using the sample dataset to obtain a trained target recognition network.

[0051] The second training module is used to obtain a seat belt classification dataset based on sample images labeled with categories, and to train the image classification network using the seat belt classification dataset to obtain a trained image classification network.

[0052] The prediction module is used to acquire video in real time at the production site, and to perform real-time online detection on each frame of the video stream using a trained target recognition network and a trained image classification network to obtain prediction results;

[0053] The statistics module is used to determine the situation of illegal clothing by statistically analyzing the detection results of neighboring M frames, thereby improving the accuracy of detecting illegal clothing; where M is a multiple of the frame rate.

[0054] The third objective of this invention can be achieved by adopting the following technical solution:

[0055] A computer device includes a processor and a memory for storing a processor-executable program, wherein the processor implements the method described above when executing the program stored in the memory.

[0056] The fourth objective of this invention can be achieved by adopting the following technical solution:

[0057] A computer-readable storage medium storing a program that, when executed by a processor, implements the above-described method.

[0058] The present invention has the following advantages over the prior art:

[0059] This invention provides a method, system, computer device, and computer-readable storage medium for improving the accuracy of detecting improper clothing use. The method involves acquiring a target recognition dataset for detecting improper clothing use in power production. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes for various categories and their classifications. The target recognition network is initially trained using the labeled sample images. The initially trained target recognition network is then used to label unlabeled sample images, and the labeled sample images and the labeled sample images constitute a sample dataset. The initially trained target recognition network is then trained again using the sample dataset to obtain a trained target recognition network. A seatbelt classification dataset is obtained based on the labeled sample images, and an image classification network is trained using the seatbelt classification dataset to obtain a trained image classification network. Real-time video is acquired at the production site, and the trained target recognition network and the trained image classification network are used to perform real-time online detection frame by frame of the video stream to obtain prediction results. The detection results of the adjacent M frames are statistically analyzed to determine the situation of improper clothing use, thereby improving the accuracy of detecting improper clothing use. The target recognition network and image classification network used in this invention are trained on a large number of different sample images to learn the essential features of the target. They are robust to changes in ambient lighting, displacement, scaling and other forms of distortion in the image. By statistically analyzing the detection results of the neighboring M frames, the illegal clothing situation can be judged. The classification judgment of the current frame can be corrected by historical records to avoid misjudgment, make the output continuous, improve the flickering phenomenon and improve the accuracy and stability of detection. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0061] Figure 1 This is a simplified flowchart of the method for improving the accuracy of detecting improper clothing according to Embodiment 1 of the present invention;

[0062] Figure 2 This is a detailed flowchart of the method for improving the accuracy of detecting unauthorized clothing according to Embodiment 1 of the present invention;

[0063] Figure 3 This is a schematic diagram of the publicly available dataset in Embodiment 1 of the present invention;

[0064] Figure 4 This is a schematic diagram of a self-built dataset in Embodiment 1 of the present invention;

[0065] Figure 5 This is a schematic diagram of a positive sample of wearing a seat belt according to Embodiment 1 of the present invention;

[0066] Figure 6 This is a schematic diagram of a negative sample of an embodiment 1 of the present invention where a seatbelt is not being worn;

[0067] Figure 7 This is a flowchart of neural network training and lightweighting in Embodiment 1 of the present invention;

[0068] Figure 8 This is a schematic diagram of the prediction results in Embodiment 1 of the present invention;

[0069] Figure 9 This is a schematic diagram of block division in Embodiment 1 of the present invention;

[0070] Figure 10 This is a schematic diagram of overlapping abnormal block fusion in Embodiment 1 of the present invention;

[0071] Figure 11 This is a structural block diagram of the system for improving the accuracy of detecting unauthorized clothing, according to Embodiment 2 of the present invention.

[0072] Figure 12 This is a structural block diagram of the computer device according to Embodiment 3 of the present invention. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be understood that the specific embodiments described are merely used to explain this application and are not intended to limit this application.

[0074] Example 1:

[0075] like Figure 1 , 2 As shown, the method for improving the accuracy of detecting unauthorized wearable devices provided in this embodiment includes two parts: offline training and online detection. The offline training part provides a network target recognition network to the online part, and the online detection part uses the network target recognition network trained in the offline part to conduct continuous online security wearable detection. Specifically, it includes the following steps:

[0076] S101. Obtain a target recognition dataset for detecting unauthorized clothing in power production.

[0077] Furthermore, step S101 specifically includes:

[0078] (1) Obtain publicly available online datasets related to safety wearables in production, including safety helmet detection datasets, reflective vest detection datasets, and power construction site datasets. (Refer to...) Figure 3 ;

[0079] (2) By shooting videos of on-site and simulated work scenarios, images are periodically extracted from the videos to obtain preliminary sample images, forming a self-built dataset, which can be referenced. Figure 4 ;

[0080] (3) Combine all sample images from publicly available online datasets and self-built datasets, preprocess the sample images, and obtain the target recognition dataset.

[0081] The sample images were manually screened, and only images containing at least one person were retained.

[0082] A subset of the filtered sample images were manually labeled, with four main categories—head, hands, torso, and feet—marked with rectangles. For the head, positive samples were labeled as "safety helmet" and negative samples as "not wearing a safety helmet"; for the hands, positive samples were labeled as "insulating gloves" and negative samples as "not wearing insulating gloves"; for the torso, positive samples were labeled as "work clothes and reflective vests" and negative samples as "regular clothes"; and for the feet, positive samples were labeled as "insulating shoes" and negative samples as "ordinary shoes".

[0083] After filtering, all labeled sample images and all unlabeled sample images constitute the target recognition dataset.

[0084] S102. Use the labeled sample images in the target recognition dataset to perform preliminary training on the target recognition network; use the pre-trained target recognition network to label the unlabeled sample images in the target recognition dataset to obtain the sample dataset.

[0085] The target recognition network used in this embodiment is DPNet.

[0086] The target recognition network is initially trained using the labeled sample images from the production safety wearable target recognition dataset, resulting in a pre-trained target recognition network. This pre-trained network is then used to automatically label the remaining samples in the production safety wearable target recognition dataset. The network automatically identifies various targets in the sample images and outputs their bounding boxes and category information. After manual review, these are used as new samples. These new samples, along with the labeled sample images from the target recognition dataset, constitute the sample dataset, serving as the complete sample dataset for training the target recognition network.

[0087] The sample images in the sample dataset are randomly divided into training set, validation set and test set according to a certain ratio.

[0088] In this embodiment, the sample dataset is divided into a training set, a validation set, and a test set in a ratio of 6:2:2, with each class of samples having at least 10,000 samples.

[0089] S103. Use the sample dataset to train the initially trained target recognition network to obtain a trained target recognition network.

[0090] Furthermore, step S103 specifically includes:

[0091] (1) To ensure that targets of the same category are mutually exclusive, i.e., the prediction results of the same target location cannot be multiple category prediction boxes under the same category, a cross-category nonmaximum suppression method is adopted. When the same target is identified as multiple category prediction boxes, only the category prediction box with the highest confidence is retained for the same category, and the identification results between different categories are independent of each other;

[0092] (2) In order to further reduce the weight of the target recognition network, channel pruning technology is used to prune the target recognition network during training.

[0093] like Figure 5 As shown, step (2) specifically includes:

[0094] (2-1) Initialize the relevant parameters and perform basic training.

[0095] In this embodiment, the total number of basic training iterations is 200, the training batch size is 64, and the sample image input size is 640×640 pixels.

[0096] The target recognition network obtained through basic training is called the original target recognition network.

[0097] (2-2) Generate pruning strategies.

[0098] Generate a pruning rate p for each convolutional layer in the network. i That is, for a total number of N convolution kernels i Prune N from convolutional layer i i p i One convolutional kernel (i.e., one channel). Pruning rate set P = {p i}, pruning rate p i It can be generated using one or more methods such as random generation, clustering, and optimization calculation. In this embodiment, ecological distribution random generation is used.

[0099] This embodiment improves the reliability of the pruning rate set P by designing a pruning strategy, thereby finding the optimal pruning rate set P in fewer preset iterations.

[0100] (2-3) Perform channel pruning on each layer according to the pruning strategy.

[0101] For convolutional layer i, select the N with the smallest L1 norm. i p i Each convolutional kernel is pruned, and the number of input and output channels of the layers before and after it is reduced accordingly.

[0102] (2-4) The pruned network is evaluated using the validation set, with the mean accuracy mAP of all classes as the evaluation criterion.

[0103] (2-5) If the target recognition network of this pruning is better than the previously recorded best target recognition network, then the target recognition network of this pruning is recorded as the best target recognition network, and the target recognition network after the first pruning is the initial best target recognition network.

[0104] (2-6) Reread the original target recognition network and repeat steps (2-2) to (2-5) until the preset number of iterations is reached.

[0105] The preset number of times in this embodiment is 500.

[0106] (2-7) Save the optimal target recognition network and output it as the result of this pruning.

[0107] (2-8) Fine-tune the optimal target recognition network.

[0108] Fine-tuning involves retraining the optimal target recognition network using the sample dataset, with the parameters the same as in step (2-1).

[0109] The fine-tuned network is a trained target recognition network, which is a model suitable for detecting safety wearables in production.

[0110] This embodiment uses channel pruning technology to reduce the number of convolutional kernels (channels) in the network, thereby reducing the number of network parameters and computational load. After pruning in step (2), the network reduces the number of parameters by 34.4% and the computational load by 29.9% while maintaining the same average accuracy (mAP).

[0111] S104. Obtain the seat belt classification dataset based on the target recognition dataset, and use the seat belt classification dataset to train the image classification network.

[0112] Furthermore, step S104 specifically includes:

[0113] (1) Based on the manual annotation results, extract the images containing the torso from the sample images of the target recognition dataset and scale them to 640×640 pixels.

[0114] (2) All images were manually classified into two categories: those wearing seatbelts (positive samples) and those not wearing seatbelts (negative samples), forming a seatbelt classification dataset. This dataset was then further divided into training, validation, and test sets according to a specific ratio. Positive and negative samples can be referenced... Figure 6 , 7 .

[0115] In this embodiment, the seat belt classification dataset is divided into a training set, a validation set, and a test set in a ratio of 6:2:2.

[0116] (3) The image classification network is trained using the seat belt classification dataset and then lightweighted using channel pruning technology. The steps are the same as in S103(2), and the trained image classification network is finally obtained.

[0117] In this embodiment, the image classification network used is MobileNet v2.

[0118] The target recognition network and image classification network used in this embodiment are both lightweight networks, characterized by small parameters and high speed (due to the designed pruning strategy). They are also lightweighted by channel pruning, making them easy to deploy.

[0119] S105. Acquire video in real time at the production site, and use a trained target recognition network and image classification network to detect the wearing status of safety devices in real time on each frame of the video stream to obtain prediction results.

[0120] Furthermore, step S105 specifically includes:

[0121] (1) Real-time acquisition of on-site operation video, and online detection of target boxes and categories through target recognition network.

[0122] In this embodiment, the frame rate of the camera video is 10 frames per second.

[0123] (2) If the on-site operation type is high-altitude operation, the target image of the torso category predicted by the target recognition network is cropped and the classification result of whether the safety belt is worn is obtained through the image classification network.

[0124] (3) Combine and display the prediction and classification results of the two networks in real time, such as Figure 8 .

[0125] In this embodiment, to ensure mutual exclusion within a category, if the torso target is classified as wearing a seat belt, then the label of the torso category is replaced with "wearing a seat belt".

[0126] S106. Statistically analyze the detection results of neighboring M-frame images to determine the situation of improper clothing.

[0127] Furthermore, step S106 specifically includes the following two methods (only one of them is used):

[0128] (1) Use a target tracking algorithm to track the target and collect the category information of its most recent M frames.

[0129] Further, step (1) includes:

[0130] (1-1) Use the target recognition algorithm to track all predicted boxes. This step only tracks the predicted boxes and does not consider changes in their categories.

[0131] In this embodiment, the target recognition algorithm is SORT or DeepSORT.

[0132] (1-2) Record the predicted category information of each target in the most recent M frames, and take the category that is predicted the most times in the most recent M frames as the final output category.

[0133] In this embodiment, M is 1.5 times the frame rate, i.e., 15.

[0134] (2) Use the partition block category statistics method.

[0135] Further, step (2) includes:

[0136] (2-1) Divide the frame image into several statistical blocks.

[0137] like Figure 9 The frame image is divided into several blocks of width w and height h from left to right and top to bottom. The horizontal overlap ratio of adjacent blocks is wc (0 ≤ wc < 1), meaning that adjacent blocks in the horizontal direction have an overlapping area of ​​w × wc × h. The vertical overlap ratio of adjacent blocks is hc (0 ≤ hc < 1), meaning that adjacent blocks in the vertical direction have an overlapping area of ​​w × h × hc.

[0138] If the width of the last block at the far right in the horizontal direction is less than w, it will be divided according to the actual remaining width. If the height of the last block at the far bottom in the vertical direction is less than h, it will be divided according to the actual remaining height.

[0139] In this embodiment, the block width w = 60, the block height h = 40, and the overlap ratio wc = hc = 0.5.

[0140] (2-2) Count the number of anomalies in each major category within each block.

[0141] The abnormal category is the category of not wearing safety clothing, that is, not wearing a safety helmet, not wearing insulated gloves, and not wearing insulated shoes. When not working at heights, only wearing regular clothes in the torso category is considered abnormal. However, when working at heights, all other categories in the torso category except wearing a safety belt (regular clothes, work clothes, reflective clothing) are considered abnormal.

[0142] The anomaly statistics H of class c in a certain block of the image in frame t are defined. t,c =αH t-1,c +(1-α)K t,c Where α is the balance coefficient, K t,c To determine whether there is an anomaly prediction result for category c in the current block, if the target recognition network predicts that the block contains an anomaly of category c, then K... t,c =1, otherwise K t,c =-1. H t,c If the value is greater than 0, it indicates that category c within this block has resulted in a situation where safety devices are not worn.

[0143] In this embodiment, the balance coefficient α = 0.7, and the initial statistic H at time zero... 0,c =-1.

[0144] (2-3) Define the abnormal areas on the image and merge overlapping abnormal areas.

[0145] When an abnormal block appears in step (2-2), the abnormal block is outlined with a rectangle in the displayed image. For example... Figure 10 When multiple abnormal blocks have overlapping areas, they are merged, and only the outer rectangles of all overlapping blocks are marked.

[0146] S107. If any violation of the wearing regulations is detected, a warning alarm will be issued.

[0147] If an abnormal class occurs in step S106(1) or an abnormal block occurs in step S106(2), a signal is sent to the warning device on site to issue a reminder alarm, and at the same time the abnormal information is uploaded to the production safety wearable database.

[0148] The abnormal information in this embodiment mainly includes the time when the alarm occurred, the location of the construction site, the type of abnormality, and the corresponding image.

[0149] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium.

[0150] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the order of execution of the described steps may be changed. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0151] Example 2:

[0152] like Figure 11 As shown, this embodiment provides a system for improving the accuracy of detecting unauthorized clothing. The system includes an acquisition module 1101, a first training module 1102, a second training module 1103, a prediction module 1104, and a statistics module 1105, wherein:

[0153] The acquisition module 1101 is used to acquire a target recognition dataset for detecting illegal wearing in power production. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories.

[0154] The first training module 1102 is used to perform preliminary training on the target recognition network using sample images labeled with categories; to label unlabeled sample images using the pre-trained target recognition network, and the labeled sample images and the labeled sample images constitute a sample dataset; and to train the pre-trained target recognition network using the sample dataset to obtain a trained target recognition network.

[0155] The second training module 1103 is used to obtain a seat belt classification dataset based on sample images labeled with categories, and to train the image classification network using the seat belt classification dataset to obtain a trained image classification network.

[0156] The prediction module 1104 is used to acquire video in real time at the production site, and to perform real-time online detection on each frame of the video stream using a trained target recognition network and a trained image classification network to obtain prediction results.

[0157] The statistics module 1105 is used to judge the situation of illegal clothing by statistically analyzing the detection results of neighboring M frames, thereby improving the accuracy of detecting illegal clothing; where M is a multiple of the frame rate.

[0158] The specific implementation of each module in this embodiment can be found in Embodiment 1 above, and will not be repeated here. It should be noted that the system provided in this embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above.

[0159] Example 3:

[0160] This embodiment provides a computer device, which can be a computer, such as... Figure 12 As shown, the processor 1202, memory, input device 1203, display 1204, and network interface 1205 are connected via system bus 1201. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium 1206 and internal memory 1207. The non-volatile storage medium 1206 stores the operating system, computer programs, and database. The internal memory 1207 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. When the processor 1202 executes the computer programs stored in the memory, it implements the method for improving the accuracy of detecting unauthorized clothing as described in Embodiment 1, as follows:

[0161] A target recognition dataset for detecting unauthorized clothing in power production was obtained. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories.

[0162] The target recognition network is initially trained using labeled sample images; the initially trained target recognition network is then used to label unlabeled sample images, and the labeled sample images and labeled sample images together constitute a sample dataset; the initially trained target recognition network is then trained using the sample dataset to obtain a trained target recognition network.

[0163] A seat belt classification dataset is obtained from sample images labeled with categories. The image classification network is trained using the seat belt classification dataset to obtain a trained image classification network.

[0164] Real-time video is acquired at the production site, and the trained target recognition network and trained image classification network are used to perform real-time online detection on each frame of the video stream to obtain prediction results;

[0165] By statistically analyzing the detection results of neighboring M frames, the accuracy of detecting illegal clothing can be improved; where M is a multiple of the frame rate.

[0166] Example 4:

[0167] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method for improving the accuracy of detecting unauthorized clothing as described in Embodiment 1 above, as follows:

[0168] A target recognition dataset for detecting unauthorized clothing in power production was obtained. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories.

[0169] The target recognition network is initially trained using labeled sample images; the initially trained target recognition network is then used to label unlabeled sample images, and the labeled sample images and labeled sample images together constitute a sample dataset; the initially trained target recognition network is then trained using the sample dataset to obtain a trained target recognition network.

[0170] A seat belt classification dataset is obtained from sample images labeled with categories. The image classification network is trained using the seat belt classification dataset to obtain a trained image classification network.

[0171] Real-time video is acquired at the production site, and the trained target recognition network and trained image classification network are used to perform real-time online detection on each frame of the video stream to obtain prediction results;

[0172] By statistically analyzing the detection results of neighboring M frames, the accuracy of detecting illegal clothing can be improved; where M is a multiple of the frame rate.

[0173] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0174] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. A method for improving the accuracy of detecting improper clothing use, characterized in that, The method includes: A target recognition dataset for detecting unauthorized clothing in power production was obtained. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories. The target recognition network is initially trained using labeled sample images; the initially trained target recognition network is then used to label unlabeled sample images, and the labeled sample images and labeled sample images together constitute a sample dataset; the initially trained target recognition network is then trained using the sample dataset to obtain a trained target recognition network. A seat belt classification dataset is obtained from sample images labeled with categories. The image classification network is trained using the seat belt classification dataset to obtain a trained image classification network. Real-time video is acquired at the production site, and the trained target recognition network and trained image classification network are used to perform real-time online detection on each frame of the video stream to obtain prediction results; By statistically analyzing the detection results of neighboring M frames, the accuracy of detecting illegal clothing can be improved; where M is a multiple of the frame rate. The step of determining the violation of clothing rules by statistically analyzing the detection results of neighboring M frames includes: Divide the frame image into several blocks; Within each block, the number of anomalies in each major category is counted, and the block is determined as an anomalous block based on the number of anomalies. If there are overlapping areas among the anomalous blocks, the anomalous blocks are merged and the result is the final anomalous block. If an abnormal block is identified, then there is a violation of the wearing rules. The step of statistically analyzing the abnormality rate of each major category within each block, and determining whether a block is an abnormal block based on the abnormality rate, includes: Let the anomaly quantity of class c in a certain block of the image in frame t be . ,in, For balance coefficient, The category detection result for category c in the current block: If the block contains category c, and the category is an anomaly, then... ,otherwise ; like If so, then the block is an abnormal block, and the major category of the abnormality is c.

2. The method according to claim 1, characterized in that, The method of determining improper attire by statistically analyzing the detection results of neighboring M frames includes: A target recognition algorithm is used to track all predicted bounding boxes in the M neighboring frames. When tracking the target, only the predicted bounding boxes are tracked, and changes in their categories are not considered. The target recognition algorithm is SORT or DeepSORT. Record the category information of each target in the M neighboring frames, and take the category that is recorded most frequently as the final output category of the corresponding target; If the final output category is an exception, then there is a violation of the dress code.

3. The method according to claim 1, characterized in that, During training, channel pruning is used to prune the network model to make it lightweight; wherein, the network model is an object recognition network or an image classification network.

4. The method according to claim 3, characterized in that, The method of pruning the network model using channel pruning includes: Perform basic training on the network model, and use the trained network model as the original model; Channel pruning is performed on each convolutional layer in the original model according to the pruning strategy; The original pruned model was evaluated using a validation set, with the average accuracy across all classes as the evaluation criterion. If the original model after this pruning is better than the optimal network model, then the original model after this pruning is recorded as the optimal network model, and the original model after the first pruning is the initial optimal network model. Return to the original model and perform channel pruning on each convolutional layer according to the pruning strategy, and continue to perform subsequent operations until the preset number of iterations is reached; The optimal network model is fine-tuned, and the fine-tuned network model is the trained network model. The pruning strategy specifically includes: For each convolutional layer in the original model, a pruning ratio is generated. The pruning ratio is generated using at least one method, including but not limited to random generation, clustering, and optimization calculation.

5. The method according to claim 1, characterized in that, The process of performing real-time online detection on each frame of the video stream using a trained target recognition network and image classification network to obtain prediction results includes: The trained target recognition network is used to annotate the frame images, and the predicted boxes of major categories and their categories are annotated. If the production site involves high-altitude operations, then images of the torso category are extracted from the frame images, and the extracted images are input into the trained image classification network to output the classification results. If the classification result is "wearing a seatbelt", then the category of the torso in the corresponding frame image will be replaced with "wearing a seatbelt".

6. The method according to claim 1, characterized in that, According to the statistical results, if the safety wear is worn in violation of regulations, an alarm will be issued and the abnormal information will be uploaded to the production safety wear database.

7. The method according to any one of claims 1 to 6, characterized in that, The major categories include head, hands, torso, and feet. The categories corresponding to the head are safety helmets and not wearing a safety helmet; the categories corresponding to the hands are insulated gloves and not wearing insulated gloves; the categories corresponding to the torso are work clothes, reflective clothing, and regular clothing; and the categories corresponding to the feet are insulated shoes and ordinary shoes. Within the head category, not wearing a helmet is considered an abnormal situation; Within the category of hands, not wearing insulating gloves is considered an abnormality. Within the torso category, if the work is not at height, then regular clothing is classified as abnormal; if the work is at height, then regular clothing, work clothes, and reflective vests are all classified as abnormal. Within the footwear category, regular shoes are classified as an exception.

8. The method according to any one of claims 1 to 6, characterized in that, The target recognition dataset includes a dataset related to production safety wearables obtained from the internet, and a self-built dataset composed of images extracted from videos of wearables taken at production sites and in simulated work scenarios.

9. A system for improving the accuracy of detecting unauthorized clothing, characterized in that, The system includes: The acquisition module is used to acquire a target recognition dataset for detecting illegal wearing in power production. Each sample image in the target recognition dataset contains at least one person, and some sample images are labeled with prediction boxes of major categories and their categories. The first training module is used to perform preliminary training on the target recognition network using sample images labeled with categories; then, the pre-trained target recognition network is used to label unlabeled sample images, and the labeled sample images and the labeled sample images constitute a sample dataset; finally, the pre-trained target recognition network is trained using the sample dataset to obtain a trained target recognition network. The second training module is used to obtain a seat belt classification dataset based on sample images labeled with categories, and to train the image classification network using the seat belt classification dataset to obtain a trained image classification network. The prediction module is used to acquire video in real time at the production site, and to perform real-time online detection on each frame of the video stream using a trained target recognition network and a trained image classification network to obtain prediction results. The statistics module is used to determine the situation of illegal clothing by statistically analyzing the detection results of neighboring M frames, thereby improving the accuracy of illegal clothing detection; where M is a multiple of the frame rate; The step of determining the violation of clothing rules by statistically analyzing the detection results of neighboring M frames includes: Divide the frame image into several blocks; Within each block, the number of anomalies in each major category is counted, and the block is determined as an anomalous block based on the number of anomalies. If there are overlapping areas among the anomalous blocks, the anomalous blocks are merged and the result is the final anomalous block. If an abnormal block is identified, then there is a violation of the wearing rules. The step of statistically analyzing the abnormality rate of each major category within each block, and determining whether a block is an abnormal block based on the abnormality rate, includes: Let the anomaly quantity of class c in a certain block of the image in frame t be . ,in, For balance coefficient, The category detection result for category c in the current block: If the block contains category c, and the category is an anomaly, then... ,otherwise ; like If so, then the block is an abnormal block, and the major category of the abnormality is c.

Citation Information

Patent Citations

  • Illegal flag identification method and system for content community

    CN114463585A

  • Apple detection positioning method and system based on deep convolutional neural network

    CN115880477A