Method for detecting human body in image
By combining geometric and contextual coding modules, global semantic enhancement feature pyramid network and other techniques, the problem of the difficulty in accurately determining worker movements in human body detection methods in images has been solved, and efficient and accurate detection of human body parts in images has been achieved.
Patent Information
- Application Number
- CN202411264183.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-11-26
AI Technical Summary
Current methods for human detection in imaging are holistic, which makes it difficult to accurately determine the worker's movements, and they also consume a lot of resources and take a long time to detect.
By employing geometric and contextual coding modules, a global semantic enhancement feature pyramid network, a parsing re-scoring network with high-resolution features and large-capacity network branches, and combining the Parsing R-CNN network with ASPP and non-local methods, along with the GCE module, the accuracy and efficiency of human body part detection are improved.
It enables independent analysis and determination of each part in the image, improving detection accuracy, reducing computational resource consumption and time, and improving detection efficiency.
Smart Images

Figure CN119028023A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting human bodies in images. Background Art
[0002] In many industries, due to the specificity of the working environment, workers in the working environment need to be effectively monitored, so that the actions of each worker need to be effectively analyzed and judged, so as to achieve effective warnings and records. The existing human body detection method in images is generally a holistic detection, that is, each individual in the image is judged, which is difficult to judge the workers' actions, greatly affecting the accuracy of subsequent judgments. At the same time, the overall convolution detection process takes up more resources and takes a long time.
[0003] Therefore, it is necessary to design a method for human detection in images. Summary of the invention
[0004] The purpose of the present invention is to provide a method for detecting human body in an image to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] A method for detecting human bodies in images includes a geometry and context encoding module, a global semantic enhancement feature pyramid network, a parsing re-scoring network, and a high-resolution feature and large-capacity network branch. The geometry and context encoding module combines an ASPP method and a Non-local method through a ParsingR-CNN network, and has a built-in GCE module. The global semantic enhancement feature pyramid network is based on an FPN network fused with a GSE database. The parsing re-scoring network predicts an accurate score for an output human body parsing result and can be flexibly integrated into a parsing branch. The high-resolution feature and large-capacity network branch is based on a ParsingR-CNN extension branch, and the RoI resolution in each branch is improved to detect different parts of the human body. The method includes the following steps:
[0007] S100, importing the image into the geometry and context coding module for convolution processing;
[0008] S200, enhancing the image features of the image after the convolution processing in S100, so as to segment the human body parts in the image;
[0009] S300, scoring each part of the human body part feature image segmented in S200, and then importing it into each analysis branch based on the score;
[0010] S400, the body part images imported into each branch are analyzed and calculated at a high RoI resolution to improve accuracy.
[0011] According to the above technical solution, the specific method of S100 is as follows:
[0012] Based on the GCE module in the geometry and context encoding module, the geometry and context information are encoded to effectively distinguish different parts of the human body, and then convolution processing is performed through the ASPP part, which contains 1 1×1 convolution and 3 3×3 convolutions with sampling rates of (6, 12, 18). After the image-level features are generated by global average pooling, 1×1 convolution is performed, and then the features are bilinearly upsampled to the original 32×32 spatial dimensions. Finally, the Non-local part adopts an embedded Gaussian model, and a group normalization layer is added to the last convolution layer.
[0013] According to the above technical solution, the specific processing method of S200 is as follows:
[0014] The multi-scale features generated by FPN are upsampled to the same scale and fused. The global human part segmentation results are used to supervise and generate global semantic features. The global semantic features are then fused with the FPN features at the corresponding scale. At the same time, the global semantic supervision is directly applied to the feature pyramid to enhance the global semantic information of the multi-scale features. The global semantic information enhanced features are passed to the parsing branch through the RoIAlign operation to ensure that each independent human instance can still perceive the global semantic information, thereby improving the parsing performance of small objects, human contours and easily confused categories.
[0015] According to the above technical solution, the specific processing method of S300 is:
[0016] The parsing rescoring network receives two inputs, one is a parsing feature map of N×512×32×32 dimensions, and the other is a segmentation probability map of N×C×128×128 dimensions, where N is the number of RoIs and C is the number of categories. Then, a maximum pooling layer with a stride of 4 and a convolution kernel of 4 is used to make the probability map and the parsing feature map have the same spatial size. After that, the downsampled probability map and the parsing feature map are concatenated together, followed by two 128-dimensional 3×3 convolutional layers, and finally through a global average pooling layer and two 256-dimensional fully connected layers to regress the mIoU between the predicted parsing map and the annotated parsing map.
[0017] According to the above technical solution, the specific processing method of S400 is:
[0018] A 32×32 size RoI is used in the parsing branch. At the same time, the batch size of the human parsing task is separated from the detection task and set to a fixed value, thereby ensuring the training speed without losing accuracy.
[0019] According to the above technical solution, the group normalization is to divide the samples into several groups and perform standardization processing on each group.
[0020] According to the above technical solution, the global semantic supervision is a learning supervision method based on DeepLab, which captures more contextual information through the dilated convolution operation of a large-scale convolution kernel, and then uses the captured contextual information to better preserve and correct the feature images in the feature pyramid.
[0021] According to the above technical solution, the global average pooling layer extracts feature values from each input feature map, and then collects and integrates all feature values and passes them all to the 256-dimensional fully connected layer.
[0022] According to the above technical solution, the parameters set for the relative nodes of the two 256-dimensional fully connected layers are the same, that is, by setting the same parameters, the overall features are parameter-weighted, which can reduce the memory and calculation required for subsequent regression prediction analysis and labeling analysis.
[0023] According to the above technical solution, the human body parsing task is based on the CE2P framework fused with ASPP, and uses parallel hole convolution layers with different rates to combine multi-scale contexts.
[0024] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0025] Through four steps, the human body parts in the image are effectively analyzed, so that each part can be analyzed and judged independently, the accuracy of each position is improved, the efficiency of convolution detection is improved, the occupation of computing resources is reduced, and the overall accuracy is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] like Figure 1As shown, the present invention provides a technical solution: a method for detecting human bodies in images, comprising a geometry and context coding module, a global semantic enhancement feature pyramid network, a parsing re-scoring network, and high-resolution features and a large-capacity network branch. The geometry and context coding module combines the ASPP method and the Non-local method through the ParsingR-CNN network, and has a built-in GCE module. The global semantic enhancement feature pyramid network is based on the FPN network fused with the GSE database. The parsing re-scoring network predicts an accurate score for the output human body parsing result and can be flexibly integrated into the parsing branch. The high-resolution features and large-capacity network branch are based on the ParsingR-CNN extension branch, and the RoI resolution in each branch is improved to detect different parts of the human body. It contains the following steps:
[0029] S100, importing the image into the geometry and context coding module for convolution processing;
[0030] S200, enhancing the image features of the image after the convolution processing in S100, so as to segment the human body parts in the image;
[0031] S300, scoring each part of the human body part feature image segmented in S200, and then importing it into each analysis branch based on the score;
[0032] S400, the body part images imported into each branch are analyzed and calculated at a high RoI resolution to improve accuracy.
[0033] Specifically, the specific methods of S100 are as follows:
[0034] Based on the GCE module in the geometry and context encoding module, the geometry and context information are encoded to effectively distinguish different parts of the human body, and then convolution processing is performed through the ASPP part, which contains 1 1×1 convolution and 3 3×3 convolutions with sampling rates of (6, 12, 18). After the image-level features are generated by global average pooling, 1×1 convolution is performed, and then the features are bilinearly upsampled to the original 32×32 spatial dimensions. Finally, the Non-local part adopts an embedded Gaussian model, and a group normalization layer is added to the last convolution layer.
[0035] Specifically, the specific processing method of S200 is as follows:
[0036] The multi-scale features generated by FPN are upsampled to the same scale and fused. The global human part segmentation results are used to supervise and generate global semantic features. The global semantic features are then fused with the FPN features at the corresponding scale. At the same time, the global semantic supervision is directly applied to the feature pyramid to enhance the global semantic information of the multi-scale features. The global semantic information enhanced features are passed to the parsing branch through the RoIAlign operation to ensure that each independent human instance can still perceive the global semantic information, thereby improving the parsing performance of small objects, human contours and easily confused categories.
[0037] Specifically, the specific processing method of S300 is:
[0038] The parsing rescoring network receives two inputs, one is a parsing feature map of N×512×32×32 dimensions, and the other is a segmentation probability map of N×C×128×128 dimensions, where N is the number of RoIs and C is the number of categories. Then, a maximum pooling layer with a stride of 4 and a convolution kernel of 4 is used to make the probability map and the parsing feature map have the same spatial size. After that, the downsampled probability map and the parsing feature map are concatenated together, followed by two 128-dimensional 3×3 convolutional layers, and finally through a global average pooling layer and two 256-dimensional fully connected layers to regress the mIoU between the predicted parsing map and the annotated parsing map.
[0039] Specifically, the specific processing method of S400 is:
[0040] A 32×32 size RoI is used in the parsing branch. At the same time, the batch size of the human parsing task is separated from the detection task and set to a fixed value, thereby ensuring the training speed without losing accuracy.
[0041] Specifically, the group normalization is to divide the samples into several groups and perform standardization processing on each group.
[0042] Specifically, the global semantic supervision is a learning supervision method based on DeepLab, which captures more contextual information through the dilated convolution operation of large-scale convolution kernels, and then uses the captured contextual information to better preserve and correct the feature images in the feature pyramid.
[0043] Specifically, the global average pooling layer extracts feature values from each input feature map, and then collects and integrates all feature values and passes them all to the 256-dimensional fully connected layer.
[0044] Specifically, the parameters set for the relative nodes of the two 256-dimensional fully connected layers are the same, that is, by setting the same parameters, the overall features are parameter-weighted, which can reduce the memory and computing required for subsequent regression prediction analysis and labeling analysis.
[0045] Specifically, the human body parsing task is based on the CE2P framework fused with ASPP, and uses parallel hole convolutional layers with different rates to combine multi-scale contexts.
[0046] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0047] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting human bodies in images, including a geometry and context encoding module, a global semantic enhancement feature pyramid network, a parsing re-scoring network with high-resolution features and a large-capacity network branch, It is characterized in that The geometry and context encoding module combines the ASPP method and the Non-local method through the ParsingR-CNN network, and has a built-in GCE module. The global semantic enhancement feature pyramid network is based on the FPN network fused with the GSE database. The parsing re-scoring network predicts accurate scores for the output human body parsing results and can be flexibly integrated into the parsing branch. The high-resolution feature and large-capacity network branch is based on the ParsingR-CNN extension branch, and the RoI resolution in each branch is improved to detect different parts of the human body. It contains the following steps: S100, importing the image into the geometry and context coding module for convolution processing; S200, enhancing the image features of the image after the convolution processing in S100, so as to segment the human body parts in the image; S300, scoring each part of the human body part feature image segmented in S200, and then importing it into each analysis branch based on the score; S400, the body part images imported into each branch are analyzed and calculated at a high RoI resolution to improve accuracy.
2. A method for detecting human body in an image according to claim 1, It is characterized in that The specific method of S100 is as follows: Based on the GCE module in the geometry and context encoding module, the geometry and context information are encoded to effectively distinguish different parts of the human body, and then convolution processing is performed through the ASPP part, which contains 1 1×1 convolution and 3 3×3 convolutions with sampling rates of (6, 12, 18). After the image-level features are generated by global average pooling, 1×1 convolution is performed, and then the features are bilinearly upsampled to the original 32×32 spatial dimensions. Finally, the Non-local part adopts an embedded Gaussian model, and a group normalization layer is added to the last convolution layer.
3. The method for detecting human body in an image according to claim 1, It is characterized in that The specific processing method of S200 is as follows: The multi-scale features generated by FPN are upsampled to the same scale and fused. The global human part segmentation results are used to supervise and generate global semantic features. The global semantic features are then fused with the FPN features at the corresponding scale. At the same time, the global semantic supervision is directly applied to the feature pyramid to enhance the global semantic information of the multi-scale features. The global semantic information enhanced features are passed to the parsing branch through the RoIAlign operation to ensure that each independent human instance can still perceive the global semantic information, thereby improving the parsing performance of small objects, human contours and easily confused categories.
4. The method for detecting human body in an image according to claim 1, It is characterized in that The specific processing method of S300 is: The parsing rescoring network receives two inputs, one is the parsing feature map of N×512×32×32 dimensions, and the other is the segmentation probability map of N×C×128×128 dimensions, where N is the number of RoIs and C is the number of categories. Then, a maximum pooling layer with a stride of 4 and a convolution kernel of 4 is used to make the probability map and the parsing feature map have the same spatial size. After that, the downsampled probability map and the parsing feature map are concatenated together, followed by two 128-dimensional 3×3 convolutional layers, and finally through a global average pooling layer and two 256-dimensional fully connected layers to regress the mIoU between the predicted parsing map and the labeled parsing map.
5. The method for detecting human body in an image according to claim 1, It is characterized in that The specific processing method of S400 is: A 32×32 RoI size is used in the parsing branch. At the same time, the batch size of the human parsing task is separated from the detection task and set to a fixed value, thereby ensuring the training speed without losing accuracy.
6. A method for detecting human body in an image according to claim 2, It is characterized in that The group normalization is to divide the samples into several groups and perform standardization processing on each group.
7. A method for detecting human body in an image according to claim 3, It is characterized in that The global semantic supervision is a learning supervision method based on DeepLab, which captures more contextual information through the dilated convolution operation of large-scale convolution kernels, and then uses the captured contextual information to better preserve and correct the feature images in the feature pyramid.
8. A method for detecting human body in an image according to claim 4, It is characterized in that The global average pooling layer extracts feature values from each input feature map, and then collects and integrates all feature values and passes them all to the 256-dimensional fully connected layer.
9. A method for detecting human body in an image according to claim 4, It is characterized in that The parameters set for the relative nodes of the two 256-dimensional fully connected layers are the same, that is, by setting the same parameters, the overall features are parameter-weighted, which can reduce the memory and calculation required for subsequent regression prediction analysis and labeling analysis.
10. A method for detecting human body in an image according to claim 5, It is characterized in that The human body parsing task is based on the CE2P framework fused with ASPP, and uses parallel hole convolutional layers with different rates to combine multi-scale contexts.
