Logistics park safety helmet wearing detection and segmentation method and system and medium

By constructing the GridAtten-Net semantic segmentation network model and using the ResNet-101 expanded residual network and convolutional attention mechanism, the problems of slow training process and low accuracy in the helmet-wearing segmentation method in the logistics park are solved, and more efficient semantics are achieved. Split effect.

CN118609054AInactive Publication Date: 2024-09-06ZHENGZHOU UNIVERSITY OF AERONAUTICS
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410761215.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the segmentation method of helmet wearing in logistics parks cannot meet the requirements of rapid convergence of the training process, the recognition accuracy is low, and there is a problem of missed detection in dense scenes.

Method used

A GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure is constructed, using the ResNet-101 expanded residual network as the backbone extraction network, and combining the convolutional attention mechanism and the image feature gridding module to improve the accuracy of feature extraction and semantic segmentation.

Benefits of technology

It accelerates the convergence speed of the network model, improves the accuracy of image semantic segmentation, solves the problem of missed detection, and improves the accuracy of helmet wearing detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609054A
    Figure CN118609054A
Patent Text Reader

Abstract

The invention discloses a logistics park safety helmet wearing detection and segmentation method and system and a medium, and relates to the technical field of computer vision. On the basis of a DeepLabV3 + network model structure, a GridAttene-Net semantic segmentation network model is constructed, and the model comprises an expansion convolution residual network feature extraction module, a convolution attention mechanism fusion module and an image feature gridding module. A ResNet-101 expansion residual feature extraction network is adopted as a backbone extraction network, so that the calculation amount is reduced, and the model convergence speed of the network is increased. A convolution attention mechanism fusion module is introduced in a coding stage, the characterization capability of a feature region is effectively enhanced, and the precision of image semantic segmentation is further improved. And meanwhile, the image feature gridding module can obtain small target feature information of a local area in a complex scene of a logistics park, so that the problem of missing detection existing in current safety helmet segmentation is solved, and the recognition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a method, system and medium for detecting and segmenting safety helmet wearing in a logistics park. Background Art

[0003] The rapid development of smart logistics and industrial Internet of Things has provided new ideas for the safety management of logistics parks. Generally, there are three ways to detect helmets: one is to embed the sensing device into the helmet; the second is to perform detection based on artificial design features such as shape and color; the last method is to combine deep learning algorithms for intelligent detection. Because the operation process of the first two detection methods is relatively complicated and the detection speed is relatively slow. The neural network algorithm based on deep learning has strong adaptability to complex environments and higher detection efficiency. Therefore, recognition technology based on deep neural network learning has become an important method for detecting and supervising the wearing of helmets.

[0004] The image segmentation detection of helmets based on deep learning actually belongs to the category of semantic segmentation. The core of semantic segmentation is to classify images at the pixel level. QIF et al. proposed a Faster R-CNN algorithm for detection. Compared with the traditional helmet detection method, this method has the characteristics of high accuracy and high speed, but its real-time performance is poorer than other one-stage target detection algorithms. Bilin et al. first preprocessed the images sampled in the video, and conducted experimental comparisons by designing different convolutional neural networks. This method used more fully connected layers, which ultimately led to a significant increase in model size and inference speed. WUJX et al. integrated the reverse progressive attention mechanism into the SSD single-stage detection algorithm, which improved the accuracy of helmet detection and could confirm whether the color was correct. However, the algorithm had low recognition accuracy for small-scale targets and could not achieve good recognition effects in dense scenes. The above are all helmet wearing detection algorithms based on prior frames. Since the setting of the initial prior frame will affect the recognition effect of the model, there is a lot of uncertainty, which makes the training model not applicable to complex environments. In addition, most algorithms only mark the helmets with boxes, and do not semantically segment the helmet wearing effects.

[0005] It can be seen that in the existing technology, the safety helmet wearing segmentation method in the logistics park cannot meet the rapid convergence of the training process, and there are problems such as low recognition accuracy and missed detection in dense scenes. Summary of the invention

[0006] Based on this, it is necessary to provide a logistics park helmet wearing detection and segmentation method, system and medium to address the above technical problems.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a logistics park helmet wearing detection and segmentation method, including:

[0009] Obtain the original image dataset of the logistics park scene, annotate the image dataset with and without safety helmet features, and perform data enhancement preprocessing on the image dataset;

[0010] Construct a GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure, including: dilated convolution residual network feature extraction module, convolutional attention mechanism fusion module, and image feature gridding module; among them, the dilated convolution residual network feature extraction module uses the ResNet-101 dilated residual network as the backbone extraction network, and uses dilated convolution to downsample the feature map;

[0011] The image dataset is input into the ResNet-101 dilated residual backbone extraction network to extract features of different dimensions to obtain feature maps; and the extracted feature maps are subjected to dilated convolution and downsampling operations to generate the last layer of logistics park scene feature maps and the penultimate layer of logistics park scene feature maps;

[0012] The last layer of the logistics park scene feature map is applied to the convolutional attention mechanism fusion module to generate important weights of different channels and different areas to obtain the weighted logistics park scene feature map;

[0013] The image feature gridding module is used to grid-segment the penultimate layer of the generated logistics park scene feature map, and grid feature extraction and downsampling operations are performed on each small grid image after segmentation to generate a gridded logistics park scene feature map;

[0014] The weighted logistics park scene feature map is fused with the gridded logistics park scene feature map, and the fused feature map is input into the decoder module for convolution and downsampling operations to obtain the semantic segmentation effect map of safety helmet wearing in the logistics park.

[0015] Preferably, the ResNet-101 expanded residual network uses a skip connection structure to alleviate the gradient vanishing problem that occurs in an overly deep neural network structure and prevent model overfitting.

[0016] Preferably, the ResNet-101 dilated residual network has multiple convolution stages, and a downsampling operation is performed on each stage to reduce the image feature map to half of the previous stage.

[0017] Preferably, the dilated convolution is used to downsample the feature map, and specifically, the dilated convolution with dilation factors of 2, 2, 2, 3 and 6 respectively is used.

[0018] Preferably, the convolutional attention mechanism fusion module includes: a channel attention module and a spatial attention module.

[0019] Preferably, the construction of the GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure specifically includes:

[0020] Use the preprocessed logistics park image dataset to train the constructed GridAtten-Net semantic segmentation network model, and output the trained GridAtten-Net semantic segmentation network model;

[0021] The trained GridAtten-Net semantic segmentation network model is used to perform helmet wearing detection and segmentation on the logistics park scene images to be detected.

[0022] Preferably, the feature fusion of the weighted logistics park scene feature map and the gridded logistics park scene feature map comprises the following steps:

[0023] The weighted logistics park scene feature maps are respectively subjected to dilated convolution and average pooling operations to generate different logistics park scene feature maps, the generated logistics park scene feature maps are merged, and 1*1 convolution is used to extract and generate new weighted logistics park scene feature maps;

[0024] Perform a downsampling operation on the generated new weighted logistics park scene feature map to obtain a feature map with the same resolution as the gridded logistics park scene feature map;

[0025] The weighted logistics park scene feature map is fused with the gridded logistics park scene feature map.

[0026] Preferably, the step of applying the last layer of the logistics park scene feature map to the convolutional attention mechanism fusion module specifically includes:

[0027] The last layer of logistics park scene feature map is input into the channel attention mechanism module, and the maximum pooling and average pooling operations are performed to generate a new feature map;

[0028] Perform a full connection operation on the generated new feature map to generate a feature map for each channel;

[0029] Then apply the feature map of each channel to the Sigmoid activation function to obtain the attention weight vectors of different channels;

[0030] The feature map of each channel is input into the spatial attention module. The feature map information of each channel is extracted through average pooling and maximum pooling operations, and then merged after a 5*5 convolution operation to generate the feature map of each space.

[0031] Apply the Sigmoid activation function to the feature map of each space to obtain the attention weight vectors of different spaces;

[0032] Multiply the calculated channel attention weight and spatial attention weight to get the final attention weight;

[0033] The feature map of each channel is weighted and summed according to the calculated attention weight to obtain the logistics park scene feature map weighted by the convolutional attention mechanism.

[0034] This specification provides a logistics park helmet wearing detection and segmentation system, including:

[0035] The dilated convolution residual network feature extraction module is used to extract features of different dimensions of image data, reduce the amount of calculation, and speed up the convergence of the network model;

[0036] Convolutional attention mechanism fusion module is used to enhance the representation capability of feature regions and effectively improve the accuracy of image semantic segmentation;

[0037] The image feature gridding module is used to averagely divide the low-resolution image and capture the feature information of small targets in the local area.

[0038] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned logistics park safety helmet wearing detection and segmentation method is implemented.

[0039] This description provides a method for detecting and segmenting safety helmets in a logistics park. Compared with the prior art, its beneficial effects are as follows:

[0040] The present invention performs semantic segmentation on the wearing of safety helmets in logistics parks by constructing a GridAtten-Net semantic segmentation network model. The GridAtten-Net semantic segmentation network model is an improved model based on the DeepLabV3+ network model. It uses the ResNet-101 dilated residual feature extraction network instead of the Xception network as the backbone extraction network, which solves the problem of the number of deep layers of the network structure, improves the accuracy of feature extraction by increasing the depth, and reduces the amount of calculation at the same time, speeding up the convergence speed of the network model;

[0041] The introduction of the convolutional attention mechanism fusion module in the encoding stage effectively enhances the representation ability of the feature area and further improves the accuracy of image semantic segmentation. At the same time, the image feature gridding module can better obtain the feature information of small targets in local areas of complex scenes in logistics parks, solves the current missed detection problem in safety helmet segmentation, and improves the recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 A flow chart of a method for detecting and segmenting safety helmets in a logistics park provided in this specification;

[0044] Figure 2 This is a dilated convolution effect diagram of a logistics park helmet wearing detection and segmentation method provided in this specification;

[0045] Figure 3 This is an improved residual graph of a logistics park helmet wearing detection and segmentation method provided in this specification;

[0046] Figure 4 A convolutional attention mechanism fusion module diagram for a logistics park helmet wearing detection and segmentation method provided in this specification;

[0047] Figure 5 This is an image feature grid design diagram of a logistics park helmet wearing detection and segmentation method provided in this specification;

[0048] Figure 6 It is a grid feature extraction module diagram of an embodiment;

[0049] Figure 7 This is a comparison diagram of the segmentation of each segmentation model in the embodiment on the SHWD dataset. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] In view of the problem that the original DeepLabV3+ network model cannot meet the fast convergence of the training process and has low classification accuracy, this manual proposes a fast helmet semantic segmentation algorithm GridAtten-Net based on the improved DeepLabv3+. The main technical problems solved by this algorithm are as follows:

[0052] 1) The DeepLabV3+ backbone network uses the Xception model, which has the problem of too many layers of network structure. The present invention replaces the Xception network with the dilated residual feature extraction network RenNet-101 to reduce the amount of calculation and speed up the model convergence of the network, which also helps to extract high-dimensional features of the image.

[0053] 2) In order to more effectively focus on the prominent positions of the logistics park image and ignore irrelevant background information, the channel attention mechanism and spatial attention mechanism modules are placed in the encoding stage. This helps to improve the representation ability of feature regions and effectively improve the accuracy of image semantic segmentation.

[0054] 3) In order to effectively capture the feature information of small targets in logistics park images, the network model introduces an image feature gridding module to evenly divide the low-resolution images to better capture the feature information of small targets in local areas.

[0055] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0056] Figure 1 This is a flow chart of a method for detecting and segmenting helmet wearing in a logistics park in this specification, which specifically includes the following steps:

[0057] S101: Obtain the original image dataset of the logistics park, annotate the image dataset with and without safety helmet features, and perform data enhancement preprocessing on the image dataset.

[0058] The Lableme software was used to annotate the image dataset with and without helmets, and the dataset was divided into training set, validation set, and test set. In order to improve the generalization performance of the algorithm, the image dataset was subjected to image enhancement processing operations such as rotation, flipping, color adjustment, and Gaussian noise.

[0059] S102: Construct a GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure, including: dilated convolution residual network feature extraction module, convolutional attention mechanism fusion module, and image feature gridding module;

[0060] Among them, the dilated convolution residual network feature extraction module uses the ResNet-101 dilated residual network as the backbone extraction network based on the original DeepLabV3+ structure. In view of the phenomenon of overfitting and low accuracy in the training network, the present invention improves the residual network mapping method. If the input feature is x, and the residual function is expressed as F(x), then the constructed mapping function H(x) is:

[0061] H(x)=x+F(x) (1)

[0062] The dilated residual network can improve the accuracy of feature extraction by increasing the depth, and its main feature is that it is easy to optimize. Figure 3 As shown in the figure, the internal jump connection structure of the dilated residual network effectively alleviates the gradient vanishing problem in the overly deep neural network structure and prevents the model from overfitting to a certain extent. There are multiple convolution stages in the ResNet-101 feature extraction network. Downsampling operations are performed on these stages to reduce the image feature map. Usually, each stage reduces the feature map to half of the previous stage.

[0063] The residual dilation network can expand the receptive field of the convolution kernel without increasing the number of parameters, which is helpful for extracting deep semantic information. However, it does not pay enough attention to small objects in the logistics park scene image. In view of the above reasons, dilated convolutions with dilation factors of 2, 2, 2, 3 and 6 are used instead of traditional convolutions for downsampling operations, which can expand the receptive field of each stage. Figure 2 As shown in the figure, the dilated convolution effectively expands the range of the receptive field by adding an interval factor (dilation factor) to the convolution kernel, which can retain detail information without increasing the number of parameters and obtain more refined prediction results.

[0064] Compared with ordinary convolution, dilated convolution adds a dilation rate parameter. The calculation formula of ordinary convolution is:

[0065]

[0066] Where P(m,n) represents the pixel value at point (m,n) on the image, and Q(m,n) represents the convolution kernel multiplied by it. h and w represent the height and width of the image resolution, respectively. The calculation formula for the dilated convolution is as follows:

[0067]

[0068] Among them, u represents the expansion rate parameter of the dilated convolution, and Q'(m,n) represents the dilated convolution kernel multiplied by it. h and w represent the height and width of the image resolution respectively. Dilated convolution can expand the receptive field of the filter and retain the pixel information of the original image. By adjusting the size of the expansion rate parameter to control the distance between the convolution kernel pixels, it is possible to capture a wider range of contextual information and thus extract richer spatial semantic information.

[0069] Furthermore, without increasing the number of network model parameters, the convolutional attention mechanism fusion module is integrated into the convolutional neural network, which helps to reduce the interference of the background area, assist the network model to fuse important feature information, and generate important weights for different channels and different areas, such as Figure 4As shown in Figure 2, the improved network architecture integrates two types of attention modules in the encoding stage: channel attention module (CA) and spatial attention module (SA).

[0070] S103: Input the image data into the ResNet-101 dilated residual backbone extraction network to extract features of different dimensions; and perform dilated convolution and downsampling operations on the extracted feature maps to generate the last layer of logistics park scene feature maps and the penultimate layer of logistics park scene feature maps.

[0071] S104: Apply the last layer of the logistics park scene feature map to the convolutional attention mechanism fusion module to generate important weights of different channels and different areas to obtain a weighted logistics park scene feature map;

[0072] The last layer of the logistics park scene image feature map generated by the dilated convolution residual network is extracted through the channel attention module to obtain the one-dimensional channel attention feature, and the one-dimensional channel attention feature is recorded as A a ∈R C×1×1 , and its corresponding two-dimensional spatial attention feature is calculated by the spatial attention module and recorded as A b ∈R C×H×W , the specific calculation formula is as follows:

[0073]

[0074] Represents the multiplication of corresponding elements of the logistics park scene image.

[0075] The channel attention mechanism aggregates the spatial information of the image through two pooling operations: MaxPool and AveragePool. In the semantic segmentation task of logistics park scene images, this operation helps to quickly identify the key parts of the image and effectively improve the representation ability of the feature area.

[0076]

[0077] In the formula, A represents the input feature map, S is the abbreviation of Sigmoid, which represents the activation function, ω0, ω1 represent shared parameters, c represents the number of feature channels, and A a (A) is the channel attention module parameter matrix.

[0078] The channel attention mechanism first performs MaxPool (average pooling) and AvgPool (maximum pooling) operations on the last layer of feature maps extracted by the convolutional residual network, and then performs a full connection operation to output the generated feature map. The parameter sharing strategy is adopted in the full connection stage. Finally, the feature map of each channel is generated; then the feature map of each channel is applied to the Sigmoid activation function to obtain the attention weight vectors of different channels.

[0079] The spatial attention module combines the AvgPool operation and the MaxPool operation through a convolutional layer to generate a spatial attention map.

[0080]

[0081] In the formula, A represents the input feature map, S represents the activation function Sigmoid, and f 5×5 A represents a convolution kernel with a size of 5*5. b (A) Represents the parameter matrix of the spatial attention module.

[0082] The spatial attention mechanism module extracts the feature map information of each channel through average pooling and maximum pooling operations, and then merges them through a 5*5 convolution operation. Finally, each spatial attention feature map is generated, and the feature map of each space is applied to the Sigmoid activation function to obtain the attention weight vectors of different spaces.

[0083] Multiply the calculated channel attention weight and spatial attention weight to obtain the final attention weight; weight the feature map of each channel according to the calculated attention weight to obtain the feature map weighted by the convolutional attention mechanism.

[0084] S105: The penultimate layer of the generated logistics park scene feature map is grid-segmented through the image feature gridding module, and grid feature extraction and downsampling operations are performed on each small grid image after segmentation to generate a gridded logistics park scene feature map.

[0085] In the process of extracting the image features of the logistics park scene by using the dilated convolution residual network, the image resolution is a process of gradual decrease. Therefore, the GridAtten-Net model introduces an image feature grid extraction module, such as Figure 5 , Figure 6As shown. When the resolution drops to 1 / 32 of the original image, the image is gridded and averagely segmented to help obtain small target information in the local area. Of course, grid segmentation can also be performed when the resolution drops to other ratios such as 1 / 8 or 1 / 16 of the original image, but too few segments are not enough to focus on small targets, and too large segments will quickly increase the number of model parameters. After repeated experiments, the present invention performs image feature grid segmentation when the image resolution drops to 1 / 32.

[0086] The variable s is used as the segmentation ratio to perform grid segmentation on the image. The value of s can be 1, 2, 3, 4, etc. After segmentation, the image in the small grid contains the spatial feature information of each position. For each small grid image, it is restored to its original size through downsampling operation, so as to further enlarge the small objects in the image, which helps to improve the accuracy of semantic segmentation and further capture the small object information.

[0087] S106: Fusing the weighted logistics park scene feature map with the gridded logistics park scene feature map, and inputting the fused feature map into the decoder module for convolution and downsampling operations to obtain a semantic segmentation effect map of the safety helmet wearing in the logistics park.

[0088] The present invention introduces dilated convolution in the dilated residual feature extraction network to obtain multi-scale feature information of the logistics park scene image respectively. The dilated residual feature extraction network performs image feature extraction in two steps. On the one hand, a filter with a convolution kernel size of 1*1 is used to reduce the number of channels of the feature map through convolution operation. On the other hand, two dilated convolutions are connected in series to further expand the receptive field of the network model while ensuring the size of the image resolution. Finally, the two-step operation is merged into a new feature map, and a global pooling operation is performed. Through this operation, the intermediate layer information can be effectively extracted, and the features of small targets in the graphics can be effectively extracted, which improves the accuracy of image semantic segmentation as a whole.

[0089] Furthermore, the dilated convolution residual module is also used to use the intermediate representation of the trunk residual network as its input to guide the aggregation process of semantic content, and then connect these features to the trunk residual network. At the same time, four layers of connection are added between the trunk residual network and the boundary network so that low-level feature information and high-level semantic information can flow in the branch network, so that low-level details and high-level semantic information can be effectively combined and fully utilized.

[0090] Example

[0091] This example uses the open source dataset SHWD (Safety Helmet (Hardhat) Wearing Detect Dataset) to verify the effectiveness of the semantic segmentation method for safety helmets in logistics parks. The SHWD dataset has a total of 7581 images. Labelme is used to annotate the dataset with and without safety helmets, and it is divided into a training set, a validation set, and a test set, with 6000 images in the training set, 581 images in the validation set, and 1000 images in the test set.

[0092] In order to improve the generalization performance of the algorithm, some image enhancement operations such as rotation, flipping, color adjustment, Gaussian noise, etc. were used in data preprocessing. To avoid problems caused by hardware resource limitations, the images were cropped into 640*640 tiles.

[0093] This embodiment uses three evaluation indicators, namely, recall rate (Recall), mean Intersection over Union (mIoU), and pixel accuracy PA (Pixel Accuracy), to measure the performance of the improved model.

[0094] TP: Prediction is correct, true positive, the model predicts it is a positive example, and it is actually a positive example

[0095] FP: Prediction error, false positive example, the model predicts a positive example, but it is actually a negative example

[0096] FN: Prediction error, false negative example, the model predicts a negative example, but it is actually a positive example

[0097] TN: Correct prediction, true counterexample, the model predicts it to be a counterexample, but it is actually a counterexample

[0098] Recall refers to the ratio of the number of samples predicted to be true values ​​and whose labels are also true values ​​to the number of samples predicted to be true values. Recall can be calculated as follows:

[0099]

[0100] The mean intersection over union (mIoU) is the average intersection over union of all segmentation label objects except the background. The mIoU calculation formula is as follows:

[0101]

[0102] Pixel accuracy (PA) refers to the ratio of the number of pixels with the correct predicted category to the total number of pixels. The confusion matrix is ​​calculated as the sum of the diagonal elements divided by the sum of all elements in the matrix. The calculation formula is as follows:

[0103]

[0104] In order to verify the effectiveness of the GridAtten-Net semantic segmentation network model, ablation experiments were carried out on the three improved modules respectively, and the DeepLabv3+ network was selected as the benchmark model. The ablation experiment uses MIou as the evaluation index, and the evaluation results of the ablation experiment in the SHWD dataset are shown in Table 1. From the data in Table 1, it can be seen that the mIou index data on the SHWD dataset is 67.28 using the DeepLabv3+ basic semantic segmentation model. The network model GridAtten-Net proposed in the present invention improves the mIou index by 0.83 percentage points when only the dilated residual network is used. When the dilated residual network and the convolutional attention mechanism fusion module are used for optimization at the same time, the mIou can reach 69.26, and the mIou index is improved by 1.98 percentage points. When the grid feature extraction module strategy is added, the mIou reaches 71.21, and the mIou index is improved by 3.93 percentage points. The experimental results show that the segmentation effect of the semantic segmentation algorithm GridAtten-Net on the SHWD dataset is significantly improved.

[0105] Table 1 Comparison of quantitative experimental results of model ablation experiment (unit %)

[0106]

[0107] Combined with the above table, it can be seen that the GridAtten-Net semantic segmentation model has significantly improved indicators compared with other classic segmentation algorithms such as PSPNet and Unet. Table 2 shows the quantitative evaluation indicator data comparison of different semantic segmentation algorithms on the SHWD dataset. From the results analysis of Table 2, it can be seen that Grid-Deeplabv3+ achieves the best results in both PA and mIoU, which are 89.23% and 71.21% respectively. The visualization effect is as follows Figure 7 As shown, the effect is consistent with the quantitative analysis results.

[0108] Table 2 Comparison of experimental results of classic semantic segmentation models (unit %)

[0109]

[0110] The research on the safety helmet segmentation algorithm under complex scenes in logistics parks is of great significance to ensure the safe operation of logistics parks. In view of the problems of low model recognition accuracy and missed detection and false detection in the current safety helmet segmentation, the present invention proposes a GridAtten-Net semantic segmentation network model. The network improves the DeepLabV3+ network model and adopts the ResNet-101 dilated residual feature extraction network in the backbone network. Compared with the original Xception unit network, the network reduces the amount of calculation and accelerates the convergence speed of the network model; the convolutional attention mechanism fusion module is introduced in the encoding stage to effectively enhance the feature area representation ability and further improve the accuracy of image semantic segmentation; in order to better obtain the feature information of small targets in local areas in complex scenes in logistics parks, the network model averages the low-resolution image and constructs an image feature gridding module.

[0111] Compared with the original Deeplabv3+ model, the GridAtten-Net segmentation network model proposed in this paper has a PA index of 89.23% on the SHWD dataset and an mIou index improved by 3.4%. Experiments show that this algorithm works well in the segmentation detection of safety helmets in logistics parks, and provides a new reference for the detection and segmentation of complex scene images in logistics parks.

[0112] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for detecting and segmenting helmet wearing in a logistics park, characterized in that: include: Obtain the original image dataset of the logistics park scene, annotate the image dataset with and without safety helmet features, and perform data enhancement preprocessing on the image dataset; Construct a GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure, including: dilated convolution residual network feature extraction module, convolutional attention mechanism fusion module, and image feature gridding module; among them, the dilated convolution residual network feature extraction module uses the ResNet-101 dilated residual network as the backbone extraction network, and uses dilated convolution to downsample the feature map; The image dataset is input into the ResNet-101 dilated residual backbone extraction network to extract features of different dimensions to obtain feature maps; and the extracted feature maps are subjected to dilated convolution and downsampling operations to generate the last layer of logistics park scene feature maps and the penultimate layer of logistics park scene feature maps; The last layer of the logistics park scene feature map is applied to the convolutional attention mechanism fusion module to generate important weights of different channels and different areas to obtain the weighted logistics park scene feature map; The image feature gridding module is used to grid-segment the penultimate layer of the generated logistics park scene feature map, and grid feature extraction and downsampling operations are performed on each small grid image after segmentation to generate a gridded logistics park scene feature map; The weighted logistics park scene feature map is fused with the gridded logistics park scene feature map, and the fused feature map is input into the decoder module for convolution and downsampling operations to obtain the semantic segmentation effect map of safety helmet wearing in the logistics park.

2. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The ResNet-101 expanded residual network uses a skip connection structure to alleviate the gradient vanishing problem that occurs in an overly deep neural network structure and prevent the model from overfitting.

3. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The ResNet-101 dilated residual network has multiple convolution stages, and a downsampling operation is performed on each stage to reduce the image feature map to half of the previous stage.

4. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The dilated convolution is used to downsample the feature map, and specifically the dilated convolutions with dilation factors of 2, 2, 2, 3 and 6 are used.

5. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The convolutional attention mechanism fusion module includes: a channel attention module and a spatial attention module.

6. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The construction of the GridAtten-Net semantic segmentation network model based on the DeepLabV3+ structure specifically includes: Use the preprocessed logistics park image dataset to train the constructed GridAtten-Net semantic segmentation network model, and output the trained GridAtten-Net semantic segmentation network model; The trained GridAtten-Net semantic segmentation network model is used to perform helmet wearing detection and segmentation on the logistics park scene images to be detected.

7. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The step of fusing the weighted logistics park scene feature map with the gridded logistics park scene feature map comprises the following steps: The weighted logistics park scene feature maps are respectively subjected to dilated convolution and average pooling operations to generate different logistics park scene feature maps, the generated logistics park scene feature maps are merged, and 1*1 convolution is used to extract and generate new weighted logistics park scene feature maps; Perform a downsampling operation on the generated new weighted logistics park scene feature map to obtain a feature map with the same resolution as the gridded logistics park scene feature map; The weighted logistics park scene feature map is fused with the gridded logistics park scene feature map.

8. A method for detecting and segmenting helmet wearing in a logistics park according to claim 1, characterized in that: The last layer of the logistics park scene feature map is applied to the convolutional attention mechanism fusion module, specifically including: The last layer of logistics park scene feature map is input into the channel attention mechanism module, and the maximum pooling and average pooling operations are performed to generate a new feature map; Perform a full connection operation on the generated new feature map to generate a feature map for each channel; Then apply the feature map of each channel to the Sigmoid activation function to obtain the attention weight vectors of different channels; The feature map of each channel is input into the spatial attention module. The feature map information of each channel is extracted through average pooling and maximum pooling operations, and then merged after a 5*5 convolution operation to generate the feature map of each space. Apply the Sigmoid activation function to the feature map of each space to obtain the attention weight vectors of different spaces; Multiply the calculated channel attention weight and spatial attention weight to get the final attention weight; The feature map of each channel is weighted and summed according to the calculated attention weight to obtain the logistics park scene feature map weighted by the convolutional attention mechanism.

9. A logistics park helmet wearing detection and segmentation system, characterized in that: include: The dilated convolution residual network feature extraction module is used to extract features of different dimensions of image data, reduce the amount of calculation, and speed up the convergence of the network model; Convolutional attention mechanism fusion module is used to enhance the representation capability of feature regions and effectively improve the accuracy of image semantic segmentation; The image feature gridding module is used to averagely divide the low-resolution image and capture the feature information of small targets in the local area.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Remote sensing image target segmentation method and network based on expansion multi-scale fusion

    CN119992100A

  • A remote sensing image target segmentation method and network based on dilation multi-scale fusion

    CN119992100B