A safety harness identification method, device, equipment and storage medium
By combining a safety harness feature extraction module with a traditional classification network, and employing adaptive learning parameters and the Sobel operator to extract edge gradient features and optimize the loss function, the accuracy problem of the safety harness wearing recognition model under occlusion and non-standard wearing conditions is solved, achieving higher recognition accuracy and lower false alarm rate.
Patent Information
- Application Number
- CN202310855387.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-07-12
AI Technical Summary
The existing seat belt wearing recognition model has low feature recognition accuracy and a high probability of false positives when the seat belt is partially blocked or the wearing method is not standard.
A safety harness feature extraction module is constructed and combined with a traditional classification network. The loss value is weighted by adaptive learning parameters. A prior feature extraction module and Sobel operator are introduced to extract edge gradient features. The weight of feature branches is dynamically adjusted and the loss function is optimized to improve recognition accuracy.
This improved the recognition accuracy of the safety harness identification model in complex scenarios, reduced the false alarm rate, and enhanced the model's focus on and adaptability to the features of safety harnesses.
Smart Images

Figure CN117058440B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of deep learning, in particular to a safety harness recognition method and device, equipment and a storage medium. BACKGROUND
[0002] The safety harness is a lifesaving belt for protecting the life safety of workers in construction sites and other scenarios requiring high-altitude operations. In order to prevent workers from falling during work and protect the personal safety of workers, it is necessary to identify whether the on-site high-altitude worker wears a safety harness. In the safety harness classification and identification task, it is necessary to alarm the target without wearing a safety harness in the construction site scene. The conventional safety harness classification relies on real-time monitoring and subjective judgment of workers, resulting in low efficiency of identifying whether the safety harness is worn. Therefore, using deep learning technology to finely and automatically classify and identify the safety harness has become a key to efficiently evaluate the safety of the construction site.
[0003] In the safety harness classification model, the false alarm problem is a key difficulty that needs to be solved. Since the safety harness itself has fewer identifiable features and data acquisition is difficult, in order to achieve good recognition effect, in addition to certain limitations on the use scene, it is necessary to conduct in-depth exploration in safety harness wearing feature extraction. With the development of deep learning and computer vision field, technical personnel realize automatic classification and identification through convolutional neural network, assist in supervising whether the on-site personnel operate in a standard manner, and greatly improve the work efficiency and safety protection level.
[0004] On this basis, some solutions appear, such as using a detection model to locate the on-site personnel, then performing image post-processing through traditional feature extraction and straight line detection method, and then deciding whether the safety belt exists and reporting. This method has high requirements for image quality, and when the image background is chaotic, the judgment accuracy is poor, and the dependence on post-processing method is strong, and the feature extraction result is unreliable. For example, after traditional feature extraction, the features are spliced, and the safety belt is classified by using the SVM machine learning method. This method has poor adaptability to large-scale data and is sensitive to parameter selection, has strong artificial intervention, and has lower robustness than deep learning methods.
[0005] However, in a complex work scene, if there is partial occlusion or non-standard wearing method, etc., the traditional image preprocessing method used in the above method cannot improve the expression of safety harness wearing features in the training materials, and the extraction of similar safety harness geometric features without distinction will interfere with the model, increase the probability of false alarm, and threaten the life safety of workers. SUMMARY
[0006] Embodiments of the present application provide a safety harness recognition method, device, equipment and storage medium, to solve the following technical problem: the existing safety harness wearing recognition model has low feature recognition accuracy and high false positive probability in the case that the safety harness is partially blocked or not worn in a standard manner.
[0007] Embodiments of the present application adopt the following technical solutions:
[0008] In one aspect, the present application provides a safety harness recognition method, which comprises: constructing a safety harness feature extraction module, combining the safety harness feature extraction module with a traditional classification network, and obtaining a safety harness recognition model;
[0009] According to the adaptive learning parameters, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted and calculated to obtain a total loss function of the safety harness recognition model;
[0010] The safety harness recognition model is trained, and the safety harness feature extraction module and the traditional classification network are compensated for features through the total loss function.
[0011] The safety harness wearing feature in the field construction image is recognized through the trained safety harness recognition model.
[0012] In one possible implementation, the safety harness recognition model is trained, specifically including:
[0013] The safety harness prior features of part of the training images in the training data set are extracted through a prior feature extraction module, wherein the safety harness prior features at least include edge gradient features of the safety harness;
[0014] The safety harness prior features are superimposed on the corresponding original training images to obtain prior feature training images;
[0015] The prior feature training images and other training images in the training data set are input into the safety harness recognition model to train the safety harness recognition model.
[0016] In one possible implementation, the safety harness feature extraction module is constructed, specifically including:
[0017] An asymmetric convolution kernel, an X-shaped convolution kernel and a full connection layer are respectively constructed, wherein the asymmetric convolution kernel is used to extract longitudinal depth features of an original feature map, and the X-shaped convolution kernel is used to extract X-shaped depth features of the original feature map;
[0018] After the full connection layer, a cross-entropy loss function is accessed to calculate a loss value of an output feature map of the safety harness feature extraction module.
[0019] In a feasible implementation, the safety harness feature extraction module is combined with a traditional classification network to obtain a safety harness recognition model, and specifically includes:
[0020] The safety harness feature extraction module is connected after a preset feature layer in the traditional classification network.
[0021] An output end of the safety harness feature extraction module is connected with a full connection layer of the traditional classification network, so that the safety harness feature extraction module and the cross-entropy loss function form a branch of the traditional classification network, and the safety harness recognition model is obtained.
[0022] In a feasible implementation, according to an adaptive learning parameter, a loss value of the safety harness feature extraction module and a loss value of the traditional classification network are weighted to obtain a total loss function of the safety harness recognition model, and specifically includes:
[0023] The cross-entropy loss function is used to calculate a loss value Loss A of an original feature map Feature map A and a loss value Loss B of an output feature map Feature map B of the safety harness feature extraction module, respectively.
[0024] The Euclidean distance between the original feature map Feature map A and the output feature map Feature map B is determined.
[0025] The Euclidean distance is normalized to a (0, 1) interval to obtain an adaptive learning parameter.
[0026] According to Loss=(1-)Loss A +αLoss B , the loss value Loss A and the loss value Loss B are weighted to obtain a total loss function of the safety harness recognition model; wherein, a is the adaptive learning parameter.
[0027] In a feasible implementation, before the safety harness recognition model is trained, the method further includes:
[0028] constructing a prior feature extraction module, and defining three preset sobel operators in the longitudinal direction and the positive and negative 45° directions in the prior feature extraction module, respectively used for extracting edge gradient features of the training image in the longitudinal direction and the positive and negative 45° directions;
[0029] defining a sobel operator triggering probability in the prior feature extraction module.
[0030] In an available implementation, the total loss function is used to compensate features of the safety harness feature extraction module and the traditional classification network, specifically including:
[0031] During the model training process, the proportion of branch features extracted by the safety harness feature extraction module is dynamically adjusted according to the total loss function, so as to optimize the feature compensation of the safety harness recognition model.
[0032] In a second aspect, the embodiments of the present application further provide a safety harness recognition device, the device comprising:
[0033] a model construction module, configured to construct a safety harness feature extraction module, combine the safety harness feature extraction module with a traditional classification network, and obtain a safety harness recognition model; and perform weighted calculation on loss values of the safety harness feature extraction module and the traditional classification network according to adaptive learning parameters, and obtain a total loss function of the safety harness recognition model;
[0034] a model training module, configured to train the safety harness recognition model, and compensate features of the safety harness feature extraction module and the traditional classification network through the total loss function;
[0035] a feature recognition module, configured to recognize safety harness wearing features in a field construction image through the trained safety harness recognition model.
[0036] In a third aspect, the embodiments of the present application further provide a safety harness recognition device, the device comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, so that the at least one processor can execute the safety harness recognition method of any of the above-mentioned embodiments.
[0037] In a fourth aspect, the embodiments of the present application further provide a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are set to execute the safety harness recognition method of any of the above-mentioned embodiments.
[0038] The application provides a safety harness recognition method, device, equipment and storage medium, and mainly has the following beneficial effects.
[0039] 1、The application firstly extracts the traditional geometric features of the safety harness in the training data through different direction sobel operators on the basis of the common deep learning image preprocessing mode, trains the model through the processed training data, and improves the fitting capability of the model on the safety harness image features.
[0040] 2、The application adds the loss of the feature branch and the adaptive learning parameter in the loss function, the parameter can be adaptively adjusted according to the difference between the original branch and the feature branch, when the difference between the features learned by the feature branch and the original features is large, it is considered that the features have compensatory, the adaptive learning parameter can improve the loss weight of the feature branch, and the purpose of feature compensation learning is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative labor under the premise of the drawings. In the drawings:
[0042] Figure 1 A safety harness recognition method flow chart is provided for the embodiments of the present application.
[0043] Figure 2 A safety harness recognition model structure schematic diagram is provided for the embodiments of the present application.
[0044] Figure 3 A safety harness recognition device structure schematic diagram is provided for the embodiments of the present application.
[0045] Figure 4 A safety harness recognition equipment structure schematic diagram is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0046] In order for those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0047] The embodiments of the present application provide a safety harness recognition method, as shown in the following table: Figure 1 The safety harness recognition method specifically comprises steps S101-S105:
[0048] S101, construct a safety harness feature extraction module, and combine the safety harness feature extraction module with a traditional classification network to obtain a safety harness recognition model.
[0049] Specifically, first, construct a safety harness feature extraction module: construct an asymmetric convolution kernel, an X-type convolution kernel and a full connection layer respectively to form the safety harness feature extraction module; wherein the asymmetric convolution kernel is used to extract the longitudinal depth feature of the original feature map, and the X-type convolution kernel is used to extract the X-type depth feature of the original feature map.
[0050] Further, after the full connection layer, a cross-entropy loss function is connected to calculate the loss value of the output feature map of the safety harness feature extraction module; wherein the cross-entropy loss function is used to calculate the loss value between the output feature map of the safety harness feature extraction module and the original feature map.
[0051] The cross-entropy loss function is: Wherein M represents the number of categories, and c represents category c; y ic represents a symbol function, which takes 1 if the true category of the observation sample i is equal to c, and 0 otherwise; p ic represents the predicted probability that the observation sample i belongs to category c.
[0052] As a feasible implementation, the safety harness feature extraction module extracts features by an asymmetric convolution layer of 1*w and an X-type convolution kernel of 3*3, compresses a single channel through a global average pooling layer to generate a channel descriptor of 1*1*C dimension, and then generates feature output through a full connection layer and a nonlinear layer. Wherein w represents the height of the input feature map, and C represents the number of output channels. The asymmetric convolution kernel first extracts the longitudinal depth feature of the feature map, and the X-type convolution kernel then extracts the X-type depth feature of the feature map.
[0053] In one embodiment, the safety harness feature extraction module extracts features by an asymmetric convolution kernel of 1*16 and an X-type convolution kernel of 3*3.
[0054] Further, the safety harness feature extraction module is connected after the preset feature layer in the traditional classification network; then the output end of the safety harness feature extraction module is connected with the full connection layer of the traditional classification network, so that the safety harness feature extraction module forms a branch of the traditional classification network with the cross-entropy loss function, and a safety harness recognition model is obtained.
[0055] As a feasible implementation manner, the asymmetric convolution has a better feature extraction effect on the feature map output between the 12*12 feature extraction layer and the 20*20 feature extraction layer, so the safety harness feature extraction module is introduced on the output feature map of the 16*16 feature extraction layer in the interval. Figure 2 A safety harness recognition model structure diagram provided by the embodiment of the application is shown in Figure 2 The feature extraction branch is connected after the 16*16 feature extraction layer of the classification network, and then the output end of the safety harness feature extraction module is connected with the full connection layer of the classification network, so that the feature extraction branch is introduced after the feature extraction layer, and the change of the classification network is small, and the complexity and the calculation amount of the model improvement are reduced.
[0056] After the asymmetric convolution operation, the features of the original feature map of the 16*16 feature extraction layer are compressed in the spatial longitudinal dimension, so that the model pays more attention to the specific region. After the X-type convolution operation, the spatial features in the positive and negative 45-degree directions of the original feature map are obtained, and the weights of each channel in the two directions are obtained, and finally the spatial features in the two directions are weighted and learned, so that the attention degree of the model to the edge features in the longitudinal direction and the positive and negative 45-degree directions of the image is improved.
[0057] S102, according to the adaptive learning parameter, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted and calculated to obtain the total loss function of the safety harness recognition model.
[0058] Specifically, the loss values of the original feature map Feature map A and the output feature map Feature map B of the safety harness feature extraction module are calculated respectively by the cross-entropy loss function. A B Then the Euclidean distance between the original feature map Feature map A and the output feature map Feature map B is determined. The Euclidean distance is standardized to the interval (0, 1) to obtain the adaptive learning parameter.
[0059] Furthermore, according to Loss = (1-α)Loss A +αLoss B , for the loss value Loss A and loss value Loss B Perform weighted calculation to obtain the total loss function of the safety harness recognition model; where α is the adaptive learning parameter.
[0060] As a feasible implementation method, Figure 2 As shown, in the safety harness recognition model, the classification network of the backbone will output an original feature map Feature map A The added feature extraction branch will also output a new feature map Feature map B The present invention uses Feature map A and Feature map B The Euclidean distance is normalized to the interval (0,1) to obtain an adaptive learning parameter α. Then α is used as the feature map B The weight of (1-α) is the feature map A The weight of the two feature maps is used to perform weighted calculation on the cross loss to obtain the total loss of the entire safety belt recognition model.
[0061] As a feasible implementation method,
[0062] α=Normalize(Distance Euclidean (Feature map A ,Feature map B )). Where x Ai ,x Bi Represents Feature map A , Feature map B The i-th pixel value, n represents the number of pixels.
[0063] S103. Extracting safety harness prior features of some training images in the training data set through a prior feature extraction module; superimposing the safety harness prior features with the corresponding original training images to obtain prior feature training images.
[0064] Specifically, training deep learning models requires a large number of diverse samples. Under limited data acquisition conditions, the present invention first uses a series of basic digital image processing operation groups to perform image transformation processing on the original images in the collected training data to generate samples that are more complex and diverse than the original images.
[0065] As a feasible implementation, the present application uses human upper body images as training data, and the basic digital image processing operation group is any one or a random combination of multiple processing methods such as random cropping, random scaling, random image transparency change, random image contrast change, random image saturation change, random image chroma change, and image standardization processing.
[0066] Further, the present application constructs a prior feature extraction module, and defines three preset sobel operators in the longitudinal direction and the positive and negative 45° directions in the prior feature extraction module, respectively for extracting the edge gradient features of the training images in the longitudinal direction and the positive and negative 45° directions. The sobel operator triggering probability is also defined in the prior feature extraction module.
[0067] Further, the safety harness prior features of part of the training images in the training data set are extracted through the constructed prior feature extraction module, specifically including: reading the picture label of each training image in the training data set through the prior feature extraction module. If the picture label is “wearing safety harness”, then based on the sobel operator triggering probability, the edge gradient features of the corresponding training image in the longitudinal direction and the positive and negative 45° directions are extracted through the three preset sobel operators to obtain the prior features of the training image. The safety harness prior features at least include edge gradient features.
[0068] Further, the safety harness prior features are superimposed with the corresponding original training images to obtain prior feature training images.
[0069] As a feasible implementation, the prior feature extraction module reads the training data set and judges the picture label. If the picture label is “wearing safety harness”, there is a certain probability to trigger the three preset sobel operators to perform sobel feature extraction, the extracted prior features are superimposed with the original image, and then are sent into the model together with other training images for training.
[0070] In one embodiment, the triggering probability of the sobel operator is set to 0.4, and the sobel operator only takes effect when the picture label is “wearing safety harness”. This ensures that the sobel operator does not interfere with the image features of the images without wearing safety harness, but only enhances the edge features of the safety harness in the images with safety harness. Finally, the edge gradient image obtained after the sobel operator processing is superimposed with the corresponding original human upper body image, and is input into the safety harness recognition model in the form of an RGB image for model training. The specific process is as follows:
[0071] First, define the sobel operator templates in three directions:
[0072]
[0073] The input picture is processed into a size of 224*224, and then a sobel operator template in three directions is used as a convolution kernel to perform convolution operation on the 224*224 pixel matrix, and the approximate value of the brightness difference in each sobel operator direction can be obtained. Since the safety harness has two wearing modes, which are wearing at an angle of 45 degrees or fixed on the upper body of the human body in the shape of "H", the edge features of the safety harness are most obvious in the longitudinal and 45-degree directions. The application performs convolution operation on the input image by using the sobel operator defined above to extract the edge features in the longitudinal and positive and negative 45-degree directions of the image, adapt to the X-shaped and H-shaped safety harness, and give the prior features of the safety harness from the perspective of training data without increasing the complexity of the model, thereby improving the recognition ability of the model to the traditional features of the safety harness.
[0074] The image edge is a place where the image pixel value jumps, and is one of the significant features of the image, which plays an important role in image recognition. The first derivative of the image is calculated as Δ=f(x)-f(x-1), and the larger the value of Δ, the greater the change of the pixel in the x direction, and the stronger the edge signal. The Solel operator is a discrete differential operator used to calculate the approximate gradient of the image grayscale. The operator combines Gaussian blur and differential derivation, and can obtain the gradient images in the X and Y directions by deriving in the horizontal and vertical directions. For the image classification task, the main purpose of preprocessing is to eliminate irrelevant information in the image, recover useful real information, enhance the detectability of relevant information, and simplify the data to the maximum extent, thereby increasing the reliability of the model. According to the X-shaped and H-shaped characteristics of the safety harness, the edge features of the sobel operator in the positive and negative 45-degree directions and the Y direction are extracted, and finally the original image and the obtained gradient image are mixed to extract the X-shaped and H-shaped features.
[0075] S104, input the prior feature training image and other training images in the training data set into the safety harness recognition model to train the safety harness recognition model; and through the total loss function, the safety harness feature extraction module and the traditional classification network are compensated for features.
[0076] Specifically, the prior feature training image and other training images in the training data set are processed into RGB images and input into the safety harness recognition model to train the safety harness recognition model. During the training process, according to the total loss function, the proportion of branch features extracted by the safety harness feature extraction module is dynamically adjusted to optimize the feature compensation of the safety harness recognition model.
[0077] The principle is: the greater the Euclidean distance between the two feature maps (i.e. the greater the alpha), the more the feature extraction branch extracts the feature that is less similar to the original feature. At this time, the proportion of the loss of the feature extraction branch extracted feature in the total loss function alpha will be improved. On the basis of learning the original feature, the model will pay more attention to the feature learning of the branch extraction, so as to achieve the effect of feature compensation.
[0078] Further, whether the trained safety harness identification model converges is judged by the total loss function. After the model converges, the training stops.
[0079] S105, identifying the safety harness wearing feature in the field construction image through the trained safety harness identification model.
[0080] Specifically, the field construction image to be classified is input into the trained safety harness identification model, and whether the safety harness is worn in the field construction image is determined according to the model identification result. The field construction image is obtained by a monitoring device or a monitoring device installed on the construction site, mainly shooting the upper body image of the construction personnel.
[0081] As a feasible implementation manner, if it is detected that the construction personnel in the field construction image does not wear a safety harness, a prompt information is sent to the relevant person in charge, and a safety alarm device on the construction personnel is triggered to remind the construction personnel to wear a safety harness.
[0082] In addition, the embodiment of the present application also provides a safety harness identification device, as shown in Figure 3 The safety harness identification device 300 comprises:
[0083] The model construction module 310 is configured to construct a safety harness feature extraction module, combine the safety harness feature extraction module with a traditional classification network to obtain a safety harness identification model, and perform weighted calculation on the loss value of the safety harness feature extraction module and the loss value of the traditional classification network according to adaptive learning parameters to obtain a total loss function of the safety harness identification model.
[0084] The model training module 320 is configured to input the prior feature training image and other training images in the training data set into the safety harness identification model to train the safety harness identification model, and perform feature compensation on the safety harness feature extraction module and the traditional classification network through the total loss function.
[0085] The feature recognition module 330 is configured to identify the safety harness wearing feature in the field construction image through the trained safety harness identification model.
[0086] In addition, the embodiment of the present application also provides a safety harness identification device, as shown inFigure 4 As shown, the safety harness recognition device specifically comprises:
[0087] at least one processor; and a memory connected to the at least one processor in communication; wherein,
[0088] The memory stores instructions executable by the at least one processor to enable the at least one processor to perform:
[0089] constructing a safety harness feature extraction module, and combining the safety harness feature extraction module with a traditional classification network to obtain a safety harness recognition model;
[0090] According to the adaptive learning parameter, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted and calculated to obtain a total loss function of the safety harness recognition model;
[0091] training the safety harness recognition model; and through the total loss function, the safety harness feature extraction module and the traditional classification network are compensated for features;
[0092] Through the trained safety harness recognition model, the safety harness wearing feature in the field construction image is recognized.
[0093] In addition, the embodiment of the present application also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are set to execute:
[0094] constructing a safety harness feature extraction module, and combining the safety harness feature extraction module with a traditional classification network to obtain a safety harness recognition model;
[0095] According to the adaptive learning parameter, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted and calculated to obtain a total loss function of the safety harness recognition model;
[0096] training the safety harness recognition model; and through the total loss function, the safety harness feature extraction module and the traditional classification network are compensated for features;
[0097] Through the trained safety harness recognition model, the safety harness wearing feature in the field construction image is recognized.
[0098] In order to improve the safety harness classification task in the working scene, the partial occlusion or non-standard wearing mode causes the difficulty in safety harness recognition, the image preprocessing scheme based on the sobel edge feature and the adaptive feature fusion training method are proposed, the safety harness classification task is improved in two aspects, on the one hand, the sobel edge feature preprocessing method is added before training, the model is given the prior feature of the safety harness without increasing the complexity of the model, on the other hand, the asymmetric feature extraction module is introduced, the 16*16 size feature is re-extracted, the feature is measured with the original feature extraction module, the loss proportion of the feature branch output is controlled through the parameter alpha, the purpose of feature compensation is achieved, and the safety harness recognition model can be more suitable for the specific geometric features of the safety harness.
[0099] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer. Specifically, the computer may, for example, be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0100] For the convenience of description, the above apparatus is described as various units respectively by function. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in the implementation of the present specification.
[0101] Those skilled in the art should understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] Each of the embodiments in the present application is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0103] The above-described embodiments of the application have several aspects, no single one of which is solely responsible for the application's desirable attributes. Without limiting the scope of this application, various aspects of the embodiments of the application are described in the following numbered clauses:
[0104] The above descriptions are only the specific implementation of the present application. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the present application.
Claims
1. A safety harness identification method, characterized by, The method comprises: constructing a safety harness feature extraction module and combining the safety harness feature extraction module with a traditional classification network to obtain a safety harness recognition model; According to the adaptive learning parameter, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted calculated to obtain the total loss function of the safety harness recognition model; Training the safety harness recognition model, specifically including: extracting safety harness prior features of part of training images in the training data set through the prior feature extraction module; wherein the safety harness prior features at least include edge gradient features of the safety harness; superimpose the safety harness prior features and the corresponding original training images to obtain prior feature training images; input the prior feature training images and other training images in the training data set into the safety harness recognition model to train the safety harness recognition model; Compensate the features of the safety harness feature extraction module and the traditional classification network through the total loss function; Identify the safety harness wearing features in the field construction image through the trained safety harness recognition model.
2. The safety harness identification method of claim 1, wherein, The construction of the safety harness feature extraction module specifically includes: respectively constructing an asymmetric convolution kernel, an X-type convolution kernel and a full connection layer; wherein the asymmetric convolution kernel is used to extract the longitudinal depth features of the original feature map, and the X-type convolution kernel is used to extract the X-type depth features of the original feature map; After the full connection layer, a cross-entropy loss function is connected to calculate the loss value of the output feature map of the safety harness feature extraction module.
3. The method of claim 2, wherein the step of identifying the safety harness comprises: Combining the safety harness feature extraction module with the traditional classification network to obtain a safety harness recognition model, specifically including: connecting the safety harness feature extraction module after the preset feature layer in the traditional classification network; connecting the output end of the safety harness feature extraction module and the full connection layer of the traditional classification network to make the safety harness feature extraction module and the cross-entropy loss function form a branch of the traditional classification network, and obtain the safety harness recognition model.
4. The safety harness identification system of claim 1, wherein, According to the adaptive learning parameter, the loss value of the safety harness feature extraction module and the loss value of the traditional classification network are weighted calculated to obtain the total loss function of the safety harness recognition model, specifically including: The loss value Loss of the original feature map Feature map A and the loss value Loss of the output feature map Feature map B of the safety harness feature extraction module are calculated respectively through a cross-entropy loss function A B ; determining the Euclidean distance between the original feature map Feature map A and the output feature map Feature map B standardize the Euclidean distance to (0, 1) interval to obtain an adaptive learning parameter; According to Loss = (1 - a) Loss A + a Loss B , the loss value Loss A is weighted and calculated with the loss value Loss B to obtain the total loss function of the safety harness identification model; wherein a is the adaptive learning parameter.
5. The method of claim 1, wherein, Before training the safety harness recognition model, the method further comprises: constructing a prior feature extraction module and defining three preset sobel operators in the prior feature extraction module in the longitudinal and positive and negative 45° directions, respectively, for extracting edge gradient features of training images in the longitudinal and positive and negative 45° directions; define the sobel operator trigger probability in the prior feature extraction module.
6. The method of claim 1, wherein, Compensate the features of the safety harness feature extraction module and the traditional classification network through the total loss function, specifically including: During the model training process, according to the total loss function, the proportion of branch features extracted by the safety harness feature extraction module is dynamically adjusted to perform feature compensation optimization on the safety harness recognition model.
7. A safety harness identification device, characterized by The device comprises: a model construction module, configured to construct a safety harness feature extraction module, combine the safety harness feature extraction module with a traditional classification network to obtain a safety harness recognition model, and perform weighted calculation on a loss value of the safety harness feature extraction module and a loss value of the traditional classification network according to adaptive learning parameters to obtain a total loss function of the safety harness recognition model; a model training module, configured to train the safety harness recognition model, and specifically comprising: extracting safety harness prior features of part of training images in a training data set through a prior feature extraction module; wherein the safety harness prior features at least include edge gradient features of the safety harness; superimposing the safety harness prior features and corresponding original training images to obtain prior feature training images; inputting the prior feature training images and other training images in the training data set into the safety harness recognition model to train the safety harness recognition model; and performing feature compensation on the safety harness feature extraction module and the traditional classification network through the total loss function; a feature recognition module, configured to recognize safety harness wearing features in a field construction image through the trained safety harness recognition model.
8. A safety harness identification device, characterized by The device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a safety harness recognition method according to any one of claims 1-6.
9. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions comprising instructions for: receiving a request to access a file; determining whether the file is stored in a cache; and in response to determining that the file is stored in the cache, providing access to the file from the cache. The computer executable instructions are configured to perform a safety harness recognition method according to any one of claims 1-6. The computer executable instructions are configured to perform a safety harness recognition method according to any one of claims 1-6.
Citation Information
Patent Citations
Face recognition model training method, device and equipment and storage medium
CN111898547A
Safety helmet wearing identification model training method, identification method and storage medium
CN115035472A