Attribute identification method, device, storage medium and electronic device

By combining the pre-trained human attribute recognition model with the fusion technology of global and local feature extraction modules, the problem of insufficient human attribute recognition accuracy in the existing technology is solved, especially in multiple human body images, higher recognition accuracy is achieved. .

CN114424258BActive Publication Date: 2024-10-01SHENZHEN HEYTAP TECHNOLOGY CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN201980100569.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-23
Publication Date
2024-10-01
Estimated Expiration
2039-12-23

AI Technical Summary

Technical Problem

The existing technology has insufficient accuracy in human body attribute recognition, especially when there are multiple human bodies in the image, it is difficult to effectively identify human body attribute characteristics.

Method used

Using the pre-trained human attribute recognition model, combined with the global feature extraction module and the local feature extraction module, the local feature extraction module is used to extract features of the human image, and the global feature extraction module is used to extract features of the image to be identified, and the results of the two are fused. Perform attribute identification.

Benefits of technology

The accuracy of human attribute recognition is significantly improved, especially when there are multiple human bodies in the image, the recognition accuracy is increased by nearly 5 percentage points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114424258B_ABST
    Figure CN114424258B_ABST
Patent Text Reader

Abstract

A method, device, storage medium and electronic device for attribute recognition. First, an image to be recognized is obtained, and a human body image is captured from the image to be recognized (101); then, a pre-trained human body attribute recognition model is called to extract features from the image to be recognized and the human body image respectively, and the feature extraction results are fused to obtain fused features; finally, attribute recognition is performed using the fused features to obtain corresponding attribute feature information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image recognition technology, and in particular to an attribute recognition method, device, storage medium and electronic device. Background Art

[0002] Human attribute recognition is the identification of a person's gender, age, clothing type and color, etc. It is widely used in dangerous behavior warning, industrial security, violation monitoring, and intelligent services of electronic devices. For example, public security agencies often need to narrow the search scope based on the attributes of suspects. For another example, electronic devices need to make intelligent recommendations based on the attributes of users. Summary of the invention

[0003] The present application provides an attribute recognition method, device, storage medium and electronic device, which can improve the accuracy of human attribute recognition.

[0004] In a first aspect, the present application provides an attribute identification method, comprising:

[0005] Acquire an image to be identified, and capture a human body image from the image to be identified;

[0006] Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0007] Performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature;

[0008] Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized.

[0009] In a second aspect, the present application further provides an attribute recognition device, comprising:

[0010] An image acquisition component is used to acquire an image to be identified and capture a human body image from the image to be identified;

[0011] A model calling component calls a pre-trained human attribute recognition model, wherein the human attribute recognition model includes a feature extraction module and an attribute recognition module, wherein the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0012] A feature extraction component, used to extract features from the human body image based on the local feature extraction module, and to extract features from the image to be identified based on the global feature extraction module, and to fuse the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fused feature;

[0013] The attribute recognition component is used to perform attribute recognition on the fused feature based on the attribute recognition module to obtain attribute feature information of the image to be recognized.

[0014] In a third aspect, the present application further provides a storage medium having a computer program stored thereon, wherein when the computer program is executed on a computer, the computer is caused to execute:

[0015] Acquire an image to be identified, and capture a human body image from the image to be identified;

[0016] Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0017] Performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature;

[0018] Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized.

[0019] In a fourth aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program stored in the memory to execute:

[0020] Acquire an image to be identified, and capture a human body image from the image to be identified;

[0021] Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0022] Performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature;

[0023] Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The technical solution and beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0025] Figure 1 It is a flow chart of the attribute identification method provided in an embodiment of the present application.

[0026] Figure 2 This is an example diagram of the attribute identification interface provided in an embodiment of the present application.

[0027] Figure 3 This is an example diagram of the selection sub-interface provided in an embodiment of the present application.

[0028] Figure 4 It is a schematic diagram of the architecture of the human attribute recognition model provided in an embodiment of the present application.

[0029] Figure 5 It is a schematic diagram of the detailed architecture of the feature extraction module provided in the embodiment of the present application.

[0030] Figure 6 It is a schematic diagram of fusion features obtained by fusion in an embodiment of the present application.

[0031] Figure 7 It is another schematic diagram of the architecture of the human attribute recognition model provided in an embodiment of the present application.

[0032] Figure 8 This is another schematic diagram of the architecture of the human attribute recognition model provided in an embodiment of the present application.

[0033] Fig. 9 It is another flowchart of the attribute identification method provided in an embodiment of the present application.

[0034] Fig.10 It is a structural diagram of the attribute identification device provided in an embodiment of the present application.

[0035] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0036] Fig.12 It is another structural schematic diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] Please refer to the drawings, where the same component symbols represent the same components. The principle of the present application is illustrated by implementing it in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application, which should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0038] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0039] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0040] Among them, machine learning (ML) is a multi-disciplinary interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning and other technologies.

[0041] It should be noted that this application focuses on the preprocessing process before formal machine learning, which aims to filter out data samples with annotation noise, so as to better perform machine learning based on the filtered data samples.

[0042] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the first flow chart of the attribute identification method provided in the embodiment of the present application. The flow chart of the attribute identification method may include:

[0043] In 101, an image to be recognized is obtained, and a human body image is captured from the image to be recognized.

[0044] It should be noted that the embodiments of the present application will be described from the perspective of an electronic device. The electronic device may receive an input attribute recognition request in a variety of different ways, wherein the attribute recognition request is used to indicate an image to be recognized that needs to be recognized by attributes.

[0045] For example, the electronic device may receive an input attribute identification request through an attribute identification interface including a request input interface, such as Figure 2 As shown, the request input interface can be in the form of an input box, in which the user can type the identification information of the image to be attributed and input confirmation information (such as directly pressing the Enter key on the keyboard) to input an attribute identification request, which carries the identification information of the image to be attributed. Accordingly, the electronic device can determine the image to be identified that needs to be attributed according to the identification information in the received attribute identification request.

[0046] For example, in Figure 2 The attribute identification interface also includes an "open" control. On the one hand, when the electronic device detects that the open control is triggered, it will superimpose a selection sub-interface (such as Figure 3 As shown), the selection sub-interface provides the user with thumbnails of images that can be attribute-identified, such as thumbnails of image A, image B, image C, image D, image E, image F, etc., for the user to search and select the thumbnails of the images that need to be attribute-identified; on the other hand, after selecting the thumbnail of the image that needs to be attribute-identified, the user can trigger the confirmation control provided by the selection sub-interface to input an attribute identification request to the electronic device, and the attribute identification request is associated with the thumbnail of the image selected by the user, instructing the electronic device to use the image selected by the user as the image that needs to be attribute-identified.

[0047] In addition, those skilled in the art may also set other specific implementations of the input attribute recognition request according to actual needs, and the present invention does not impose any specific limitation on this.

[0048] After receiving the input attribute recognition request, the electronic device obtains the image to be recognized according to the attribute recognition request, and captures the human body image from the image to be recognized.

[0049] Among them, the present application does not limit how to capture the human body image from the image to be identified, and ordinary technicians in this field can adopt appropriate capture methods according to actual needs.

[0050] In 102, a pre-trained human attribute recognition model is called. The human attribute recognition model includes a feature extraction module and an attribute recognition module. The feature extraction module includes a global feature extraction module and a local feature extraction module.

[0051] It should be noted that in this application, a human attribute recognition model is pre-trained using a machine learning method, and the human attribute recognition model is configured to recognize human attributes in an image. Human attributes include human visual features that can be perceived by computers and humans, such as gender, age, top type, top color, bottom type, and bottom color.

[0052] Please refer to Figure 4 The human attribute recognition model provided in this application is composed of two parts, namely a feature extraction module for feature extraction and an attribute recognition module for attribute recognition. The feature extraction module includes a global feature extraction module and a local feature extraction module. The global feature extraction module is configured to extract features from the entire image, while the local feature extraction module is configured to extract features from the human body part in the image.

[0053] In 103, feature extraction is performed on the human body image based on the local feature extraction module, and feature extraction is performed on the image to be identified based on the global feature extraction module, and the feature extraction results of the local feature extraction module and the global feature extraction module are fused to obtain fused features.

[0054] Correspondingly, the electronic device inputs the human body image captured from the image to be identified into the local feature extraction module, thereby performing feature extraction on the human body image based on the local feature extraction module. In addition, the electronic device also inputs the original image to be identified into the global feature extraction module, thereby performing feature extraction on the image to be identified based on the global feature extraction module.

[0055] It should be noted that if attribute recognition is performed directly based on the features extracted from the human body image, the rich information in the background outside the human body will be omitted, and if attribute recognition is performed directly based on the features extracted from the image to be recognized, more useless information will be attached, and when there are multiple human bodies in the image, there is a certain correlation between different human bodies. Therefore, the electronic device further fuses the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fused feature, so that the fused feature not only carries the important features of the human body, but also carries the rich and effective features in the background.

[0056] In 104, attribute recognition is performed on the fused features based on the attribute recognition module to obtain attribute feature information of the image to be recognized.

[0057] After fusing to obtain the fused features, the electronic device further inputs the fused features into an attribute recognition module, thereby performing attribute recognition on the fused features based on the attribute recognition module, thereby obtaining attribute feature information of the image to be recognized, and the attribute feature information describes the human attributes of the human body in the image to be recognized.

[0058] For example, for an image to be recognized, its attribute feature information includes:

[0059] Gender: "Male", age: "Youth", top type: "Shirt", top color: "White", bottom type: "Pants", bottom color: "Black".

[0060] It should be noted that, by comparing the attribute recognition method provided in this application with related technologies, the recognition accuracy of the attribute recognition method provided in this application has been greatly improved, especially when there are multiple human bodies in one picture, the recognition accuracy is improved more significantly, by nearly 5 percentage points.

[0061] As can be seen from the above, the present application obtains an image to be identified and captures a human body image from the image to be identified, and then calls a pre-trained human body attribute recognition model, which includes a feature extraction module and an attribute recognition module. The feature extraction module includes a global feature extraction module and a local feature extraction module, and performs feature extraction on the human body image based on the local feature extraction module, and performs feature extraction on the image to be identified based on the global feature extraction module, and fuses the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fused feature, which carries not only important features of the human body in the image, but also rich and effective features in the background. Finally, attribute recognition is performed on the fused feature based on the attribute recognition module, so as to obtain more accurate attribute feature information of the image to be identified.

[0062] In one embodiment, the local feature extraction module includes N local convolution layers, the global feature extraction module includes N global convolution layers, the human body image is subjected to feature extraction based on the local feature extraction module, and the image to be identified is subjected to feature extraction based on the global feature extraction module, and the feature extraction results of the local feature extraction module and the global feature extraction module are fused to obtain fused features, including:

[0063] (1) performing convolution operations on human body images layer by layer based on N local convolution layers, and performing convolution operations on the image to be recognized layer by layer based on N global convolution layers, wherein, in the operation process of the N local convolution layers, multiple target local convolution layers are selected, and for each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer;

[0064] (2) The convolution operation result of the Nth local convolutional layer is used as the fusion feature.

[0065] Please refer to Figure 5In the embodiment of the present application, the global feature extraction module is composed of N convolutional layers, and the feature extraction module is composed of N convolutional layers. It should be noted that the global feature extraction module and the local feature extraction module do not share parameters. For the sake of distinction, the present application refers to the convolutional layers constituting the global feature extraction module as global convolutional layers, and the convolutional layers constituting the local feature extraction module as local convolutional layers.

[0066] In an embodiment of the present application, feature extraction is performed on a human body image based on a local feature extraction module, including performing convolution operations on the human body image layer by layer based on N local convolution layers, that is, inputting the human body image into the first local convolution layer for convolution operation, and obtaining the first convolution operation result, that is, the feature extraction result of the first local convolution layer, and then inputting the convolution operation result of the first local convolution layer into the second convolution layer for convolution operation to obtain the second convolution operation result, and so on, until the Nth local convolution layer obtains the Nth convolution operation result according to the N-1th convolution operation result.

[0067] Correspondingly, feature extraction is performed on the human body image based on the global feature extraction module, including performing convolution operations on the human body image layer by layer based on N layers of global convolution layers, that is, the human body image is input into the first layer of global convolution layer for convolution operation, and the first layer of convolution operation result obtained is the feature extraction result of the first layer of global convolution layer, and then the convolution operation result of the first layer of global convolution layer is input into the second layer of convolution layer for convolution operation to obtain the second layer of convolution operation result, and so on, until the Nth layer of global convolution layer obtains the Nth layer of convolution operation result according to the N-1th layer of convolution operation result.

[0068] The present application performs feature fusion in the feature extraction process of the local feature extraction module and the global feature extraction module. Among them, in the operation process of N local convolutional layers, multiple target local convolutional layers are selected, and for each target local convolutional layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolutional layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain the fusion result as the input of the next local convolutional layer. It should be noted that the present application does not limit the method of selecting the target local convolutional layer. For example, multiple non-adjacent local convolutional layers can be randomly selected as the target local convolutional layer.

[0069] For example, please refer to Figure 6, the image to be identified is input into the global feature extraction module for convolution operation layer by layer, and the human body image is input into the local feature extraction module for convolution operation layer by layer. Assuming that local convolution layer 1 and local convolution layer 3 are selected as the target local convolution layers, during the operation of the global feature extraction module and the local feature extraction module, the electronic device obtains the local convolution operation result of the local convolution layer 1, and obtains the global convolution operation result of the global convolution layer 1, and fuses the two convolution operation results to obtain the fusion result, and uses the fusion result as the input of the local convolution layer 2 to obtain the local convolution operation result of the local convolution layer 2, then, the local convolution operation result of the local convolution layer 2 is input into the local convolution layer 3 to obtain the local convolution operation result of the local convolution layer 3, at this time, the global convolution operation result of the global convolution layer 3 is also obtained, and the fusion result obtained by fusing the two convolution operation results is used as the input of the local convolution layer 4, and the convolution operation is continued until the local convolution operation result of the local convolution layer N is obtained. It can be seen that in the aforementioned convolution operation process, the feature extraction results of the local feature extraction module and the global feature extraction module are fused. Accordingly, this application uses the local convolution operation result of the local convolution layer N as the final fused feature for attribute recognition.

[0070] In one embodiment, the fusion result is obtained by fusing the local convolution operation result and the global convolution operation result, including:

[0071] The adaptive weight corresponding to the target local convolution layer is obtained, and the local convolution operation result and the global convolution operation result are fused according to the adaptive weight to obtain the fusion result.

[0072] Please refer to Figure 7 The human attribute recognition model provided in the present application also includes an adaptive weight module, which is connected to each global convolution layer of the global feature extraction module and each local convolution layer of the local feature extraction module, and is configured to predict the adaptive weight of the fusion of the convolution operation results of a local convolution layer and the global convolution layer of the same layer, that is, the adaptive weight module takes the convolution operation results of the local convolution layer and the global convolution layer of the same layer as input, and takes the corresponding adaptive weight as output.

[0073] Correspondingly, when the electronic device fuses the local convolution operation results and the global convolution operation results to obtain the fusion result, it predicts the adaptive weight corresponding to the target local convolution layer based on the adaptive weight module, and then fuses the local convolution operation results of the target local convolution layer and the global convolution operation results of the global convolution layer of the same layer according to the predicted adaptive weight to obtain the fusion result.

[0074] In one embodiment, the fusion result is obtained by fusion according to the following formula:

[0075] F_out=F_a+αF_b;

[0076] Among them, F_out represents the fusion result, F_a represents the local convolution operation result of the target local convolution layer, F_b represents the global convolution operation result of the global convolution layer at the same layer as the target local convolution layer, and α represents the adaptive weight corresponding to the target local convolution layer.

[0077] In one embodiment, before obtaining a fusion result by fusing the local convolution operation result and the global convolution operation result according to the adaptive weight, the method further includes:

[0078] (1) Identify whether the adaptive weight reaches the preset weight;

[0079] (2) If it is not reached, the local convolution operation result and the global convolution operation result are fused according to the adaptive weight to obtain the fusion result;

[0080] (3) If it is reached, the adaptive weight is corrected to the preset weight, and then the local convolution operation result and the global convolution operation result are fused according to the corrected adaptive weight to obtain the fusion result.

[0081] In the embodiment of the present application, a preset weight is also configured, and the preset weight is used to constrain the maximum value of the adaptive weight. Among them, the value of the preset weight can be taken by an ordinary technician in the field according to actual needs, and is not specifically limited in this application. For example, in the embodiment of the present application, the preset weight is configured to 0.8.

[0082] Correspondingly, after obtaining the adaptive weight corresponding to the target local convolution layer, the electronic device does not directly fuse the local convolution operation result of the target local convolution layer and the panoramic convolution result of the global convolution layer of the same layer according to the adaptive weight, but first identifies whether the adaptive weight reaches the preset weight.

[0083] Among them, if the acquired adaptive weight does not reach the preset weight, the electronic device fuses the aforementioned local convolution operation result and the global convolution operation result according to the adaptive weight, and obtains the corresponding fusion result; if the acquired adaptive weight reaches the preset weight, the electronic device corrects the adaptive weight, that is, corrects the adaptive weight to the preset weight, and then fuses the aforementioned local convolution operation result and the global convolution operation result according to the corrected adaptive weight, and obtains the corresponding fusion result.

[0084] In one embodiment, a plurality of target local convolutional layers are selected, including:

[0085] The N local convolutional layers are divided into three parts according to the depth of the layers, and a local convolutional layer is selected from each part as the target local convolutional layer.

[0086] The embodiment of the present application further provides a method for selecting a target local convolution layer to obtain fusion features through better fusion.

[0087] Among them, the electronic device first divides the N local convolution layers into three parts according to the depth of the layers, namely, the shallow local convolution layer, the middle local convolution layer and the deep local convolution layer. Then, the electronic device selects a local convolution layer from the shallow local convolution layer as the target local convolution layer, selects a local convolution layer from the middle local convolution layer as the target local convolution layer, and selects a local convolution layer from the deep local convolution layer as the target local convolution layer, so that the selected target local convolution layer covers the shallow, middle and deep parts of the local feature extraction module. In this way, when performing feature fusion, the feature extraction results of the global feature extraction module and the local feature extraction module can be fused at the shallow, middle and deep levels.

[0088] It should be noted that the present application does not impose any specific restrictions on the method of selecting the target local convolution layer from the three parts obtained by the above division, and can be configured by ordinary technicians in this field according to actual needs. For example, in the present application, the last local convolution layer of each part is selected as the target local convolution layer.

[0089] In one embodiment, capturing a human body image from an image to be recognized includes:

[0090] (1) Calling the pre-trained human body recognition model to identify the human body area in the image to be recognized;

[0091] (2) The image content of the human body area is intercepted to obtain a human body image.

[0092] It should be noted that in the embodiment of the present application, a human body recognition model is pre-trained using a machine learning method, and the human body recognition model is configured to perform human body recognition on an image to identify a human body region therein. The present application does not specifically limit the configuration and training method of the human body recognition model, and a person of ordinary skill in the art may select the configuration and training method of the human body recognition model according to actual needs.

[0093] Accordingly, when the electronic device captures a human body image from an image to be recognized, it can call a pre-trained human body recognition model, input the image to be recognized into the human body recognition model, and then recognize the human body region in the image to be recognized based on the human body recognition model. Then, the electronic device captures the image content corresponding to the human body region from the image to be recognized, that is, obtains the human body image.

[0094] In one embodiment, the attribute recognition module includes a fully connected layer, and the fused features are input into the attribute recognition module to obtain attribute feature information of the image to be recognized, including:

[0095] The fused features are input into the fully connected layer for classification processing to obtain attribute feature information.

[0096] In the embodiment of the present application, the attribute recognition module includes a fully connected layer, which plays the role of a "classifier" in the entire human attribute recognition model.

[0097] Correspondingly, when the electronic device performs attribute recognition on the fused features based on the attribute recognition module, the fused features can be input into the fully connected layer for classification processing, so as to obtain the attribute feature information of the image to be recognized.

[0098] In one embodiment, the human attribute recognition model further includes a dimension reduction module, which inputs the fusion feature into the attribute recognition module to obtain the attribute feature information of the image to be recognized, and further includes:

[0099] (1) Performing feature dimensionality reduction on the fusion features based on the dimensionality reduction module to obtain the fusion features after dimensionality reduction;

[0100] Based on the attribute recognition module, the fusion features are identified and the attribute feature information of the image to be identified is obtained, including:

[0101] (2) The attribute recognition module is input with the fusion features after dimension reduction to perform attribute recognition and obtain the corresponding attribute feature information.

[0102] Please refer to Figure 8 The human attribute recognition model provided in this application also includes a dimensionality reduction module, which can be a pooling layer. Figure 8 As shown, one end of the dimension reduction module is connected to the feature extraction module, and the other end is connected to the attribute recognition module.

[0103] In the embodiment of the present application, after the electronic device obtains the fused feature by fusing the feature extraction results of the local feature extraction module and the global feature extraction module, it does not directly perform attribute recognition based on the fused feature, but inputs the fused feature into the dimension reduction module, thereby performing feature dimension reduction processing on the fused feature based on the dimension reduction module to obtain the fused feature after dimension reduction. Then, the electronic device inputs the fused feature after dimension reduction into the attribute recognition module for attribute recognition, and obtains attribute feature information accordingly.

[0104] Please refer to Fig. 9 , the process of the attribute identification method provided by this application can also be:

[0105] In 201, the electronic device obtains an image to be recognized, and captures a human body image from the image to be recognized.

[0106] It should be noted that the embodiments of the present application will be described from the perspective of an electronic device. The electronic device may receive an input attribute recognition request in a variety of different ways, wherein the attribute recognition request is used to indicate an image to be recognized that needs to be recognized by attributes.

[0107] For example, the electronic device may receive an input attribute identification request through an attribute identification interface including a request input interface, such as Figure 2 As shown, the request input interface can be in the form of an input box, in which the user can type the identification information of the image to be attributed and input confirmation information (such as directly pressing the Enter key on the keyboard) to input an attribute identification request, which carries the identification information of the image to be attributed. Accordingly, the electronic device can determine the image to be identified that needs to be attributed according to the identification information in the received attribute identification request.

[0108] For example, in Figure 2 The attribute identification interface also includes an "open" control. On the one hand, when the electronic device detects that the open control is triggered, it will superimpose a selection sub-interface (such as Figure 3 As shown), the selection sub-interface provides the user with thumbnails of images that can be attribute-identified, such as thumbnails of image A, image B, image C, image D, image E, image F, etc., for the user to search and select the thumbnails of the images that need to be attribute-identified; on the other hand, after selecting the thumbnail of the image that needs to be attribute-identified, the user can trigger the confirmation control provided by the selection sub-interface to input an attribute identification request to the electronic device, and the attribute identification request is associated with the thumbnail of the image selected by the user, instructing the electronic device to use the image selected by the user as the image that needs to be attribute-identified.

[0109] In addition, those skilled in the art may also set other specific implementations of the input attribute recognition request according to actual needs, and the present invention does not impose any specific limitation on this.

[0110] After receiving the input attribute recognition request, the electronic device obtains the image to be recognized according to the attribute recognition request, and captures the human body image from the image to be recognized.

[0111] Among them, the present application does not limit how to capture the human body image from the image to be identified, and ordinary technicians in this field can adopt appropriate capture methods according to actual needs.

[0112] In 202, the electronic device calls a pre-trained human attribute recognition model, which includes a feature extraction module and an attribute recognition module. The feature extraction module includes a global feature extraction module and a local feature extraction module. The local feature extraction module includes N local convolution layers, and the global feature extraction module includes N global convolution layers.

[0113] It should be noted that in this application, a human attribute recognition model is pre-trained using a machine learning method, and the human attribute recognition model is configured to recognize human attributes in an image. Human attributes include human visual features that can be perceived by computers and humans, such as gender, age, top type, top color, bottom type, and bottom color.

[0114] Please refer to Figure 4 The human attribute recognition model provided in the present application is composed of two parts, namely a feature extraction module for feature extraction and an attribute recognition module for attribute recognition. Among them, the feature extraction module includes a global feature extraction module and a local feature extraction module. The global feature extraction module is configured to extract features of the image as a whole, while the local feature extraction module is configured to extract features of the human body part in the image. Among them, the global feature extraction module is composed of N layers of convolutional layers, and the feature extraction module is composed of N layers of convolutional layers. It should be noted that the global feature extraction module and the local feature extraction module do not share parameters. For the sake of distinction, the present application refers to the convolutional layers constituting the global feature extraction module as global convolutional layers, and the convolutional layers constituting the local feature extraction module as local convolutional layers.

[0115] In 203, the electronic device performs convolution operation on the human body image layer by layer based on N local convolution layers, and performs convolution operation on the image to be recognized layer by layer based on N global convolution layers, wherein, in the operation process of the N local convolution layers, the N local convolution layers are divided into three parts according to the depth of the layers, and a local convolution layer is selected from each part as the target local convolution layer. For each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer.

[0116] In 204, the electronic device uses the convolution operation result of the Nth local convolution layer as the fusion feature of the global feature extraction module and the local feature extraction module.

[0117] In an embodiment of the present application, feature extraction is performed on a human body image based on a local feature extraction module, including performing convolution operations on the human body image layer by layer based on N local convolution layers, that is, inputting the human body image into the first local convolution layer for convolution operation, and obtaining the first convolution operation result, that is, the feature extraction result of the first local convolution layer, and then inputting the convolution operation result of the first local convolution layer into the second convolution layer for convolution operation to obtain the second convolution operation result, and so on, until the Nth local convolution layer obtains the Nth convolution operation result according to the N-1th convolution operation result.

[0118] Correspondingly, feature extraction is performed on the human body image based on the global feature extraction module, including performing convolution operations on the human body image layer by layer based on N layers of global convolution layers, that is, the human body image is input into the first layer of global convolution layer for convolution operation, and the first layer of convolution operation result obtained is the feature extraction result of the first layer of global convolution layer, and then the convolution operation result of the first layer of global convolution layer is input into the second layer of convolution layer for convolution operation to obtain the second layer of convolution operation result, and so on, until the Nth layer of global convolution layer obtains the Nth layer of convolution operation result according to the N-1th layer of convolution operation result.

[0119] The present application performs feature fusion in the feature extraction process of the local feature extraction module and the global feature extraction module. Among them, in the operation process of N local convolutional layers, multiple target local convolutional layers are selected, and for each target local convolutional layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolutional layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain the fusion result as the input of the next local convolutional layer. It should be noted that the present application does not limit the method of selecting the target local convolutional layer. For example, multiple non-adjacent local convolutional layers can be randomly selected as the target local convolutional layer.

[0120] For example, please refer to Figure 6, the image to be identified is input into the global feature extraction module for convolution operation layer by layer, and the human body image is input into the local feature extraction module for convolution operation layer by layer. Assuming that local convolution layer 1 and local convolution layer 3 are selected as the target local convolution layers, during the operation of the global feature extraction module and the local feature extraction module, the electronic device obtains the local convolution operation result of the local convolution layer 1, and obtains the global convolution operation result of the global convolution layer 1, and fuses the two convolution operation results to obtain the fusion result, and uses the fusion result as the input of the local convolution layer 2 to obtain the local convolution operation result of the local convolution layer 2, then, the local convolution operation result of the local convolution layer 2 is input into the local convolution layer 3 to obtain the local convolution operation result of the local convolution layer 3, at this time, the global convolution operation result of the global convolution layer 3 is also obtained, and the fusion result obtained by fusing the two convolution operation results is used as the input of the local convolution layer 4, and the convolution operation is continued until the local convolution operation result of the local convolution layer N is obtained. It can be seen that in the aforementioned convolution operation process, the feature extraction results of the local feature extraction module and the global feature extraction module are fused. Accordingly, this application uses the local convolution operation result of the local convolution layer N as the final fused feature for attribute recognition.

[0121] In 205 , the electronic device performs attribute recognition on the fused features based on the attribute recognition module to obtain attribute feature information of the image to be recognized.

[0122] After fusing to obtain the fused features, the electronic device further inputs the fused features into an attribute recognition module, thereby performing attribute recognition on the fused features based on the attribute recognition module, thereby obtaining attribute feature information of the image to be recognized, and the attribute feature information describes the human attributes of the human body in the image to be recognized.

[0123] For example, for an image to be recognized, its attribute feature information includes:

[0124] Gender: "Male", age: "Youth", top type: "Shirt", top color: "White", bottom type: "Pants", bottom color: "Black".

[0125] It should be noted that, by comparing the attribute recognition method provided in this application with related technologies, the recognition accuracy of the attribute recognition method provided in this application has been greatly improved, especially when there are multiple human bodies in one picture, the recognition accuracy is improved more significantly, by nearly 5 percentage points.

[0126] Please refer to Fig.10 , Fig.10 3 is a schematic diagram of the structure of the attribute recognition device provided by the present application. The attribute recognition device may include: an image acquisition component 301, a model calling component 302, a feature extraction component 303 and an attribute recognition component 304.

[0127] The image acquisition component 301 is used to acquire the image to be identified and capture the human body image from the image to be identified;

[0128] The model calling component 302 is used to call the pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, and the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0129] The feature extraction component 303 is used to extract features of the human body image based on the local feature extraction module, and to extract features of the image to be identified based on the global feature extraction module, and to fuse the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fused feature;

[0130] The attribute recognition component 304 is used to perform attribute recognition on the fused features based on the attribute recognition module to obtain attribute feature information of the image to be recognized.

[0131] In one embodiment, the local feature extraction module includes N local convolution layers, the global feature extraction module includes N global convolution layers, the human body image is subjected to feature extraction based on the local feature extraction module, and the image to be identified is subjected to feature extraction based on the global feature extraction module, and the feature extraction results of the local feature extraction module and the global feature extraction module are fused to obtain fused features, and the feature extraction component 303 is used to:

[0132] Based on N local convolution layers, convolution operations are performed on human body images layer by layer, and based on N global convolution layers, convolution operations are performed on the image to be recognized layer by layer, wherein, in the operation process of the N local convolution layers, multiple target local convolution layers are selected, and for each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer;

[0133] The convolution operation result of the Nth local convolution layer is used as the fusion feature.

[0134] In one embodiment, when the local convolution operation result and the global convolution operation result are fused to obtain the fusion result, the feature extraction component 303 is used to:

[0135] The adaptive weight corresponding to the target local convolution layer is obtained, and the local convolution operation result and the global convolution operation result are fused according to the adaptive weight to obtain the fusion result.

[0136] In one embodiment, the feature extraction component 303 obtains the fusion result by fusion according to the following formula:

[0137] F_out=F_a+αF_b;

[0138] Among them, F_out represents the fusion result, F_a represents the local convolution operation result of the target local convolution layer, and F_b represents the global convolution operation result of the global convolution layer of the same layer.

[0139] In one embodiment, before fusing the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain the fusion result, the feature extraction component 303 is further used to:

[0140] Identify whether the adaptive weight reaches the preset weight;

[0141] If not, the feature extraction component 303 fuses the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result;

[0142] If it is reached, the feature extraction component 303 corrects the adaptive weight to the preset weight, and then fuses the local convolution operation result and the global convolution operation result according to the corrected adaptive weight to obtain the fusion result.

[0143] In one embodiment, when selecting multiple target local convolutional layers, the feature extraction component 303 is used to:

[0144] The N local convolutional layers are divided into three parts according to the depth of the layers, and a local convolutional layer is selected from each part as the target local convolutional layer.

[0145] In one embodiment, when capturing a human body image from an image to be identified, the image acquisition component 301 is used to:

[0146] Call the pre-trained human body recognition model to identify the human body area in the image to be recognized;

[0147] The image content of the human body area is intercepted to obtain a human body image.

[0148] In one embodiment, the attribute recognition module includes a fully connected layer. When the attribute recognition module performs attribute recognition on the fused features to obtain attribute feature information of the image to be recognized, the attribute recognition component 304 is used to:

[0149] The fused features are input into the fully connected layer for classification processing to obtain attribute feature information.

[0150] In one embodiment, the human attribute recognition model further includes a dimension reduction module. Before the fusion feature is input into the attribute recognition module to obtain the attribute feature information of the image to be recognized, the attribute recognition component 304 is further used to:

[0151] Based on the dimension reduction module, the fusion features are reduced in dimension to obtain the fusion features after dimension reduction;

[0152] When the attribute recognition module performs attribute recognition on the fused features to obtain attribute feature information of the image to be recognized, the attribute recognition component 304 is used to:

[0153] The attribute recognition module is input with the fusion features after dimension reduction to perform attribute recognition to obtain attribute feature information.

[0154] It should be noted that the attribute identification device provided in the embodiment of the present application belongs to the same concept as the attribute identification method in the above embodiment. Any method provided in the attribute identification method embodiment can be run on the attribute identification device. The specific implementation process is detailed in the above attribute identification method embodiment and will not be repeated here.

[0155] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program stored therein is executed on a computer, the computer executes the attribute identification method provided in the embodiment of the present application. The storage medium may be a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0156] The present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the attribute identification method provided in the present application by calling the computer program stored in the memory.

[0157] For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Fig.11 , Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0158] The processor 401 is electrically connected to the memory 402 .

[0159] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device, executes various functions of the electronic device and processes data by running or loading computer programs stored in the memory 402 and calling data stored in the memory 402.

[0160] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0161] In the embodiment of the present application, the processor 401 in the electronic device will load instructions corresponding to the processes of one or more computer programs into the memory 402 according to the following steps, and the processor 401 will run the computer program stored in the memory 402 to implement various functions, as follows:

[0162] Acquire an image to be identified, and capture a human body image from the image to be identified;

[0163] Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0164] Extract features of the human body image based on the local feature extraction module, extract features of the image to be identified based on the global feature extraction module, and fuse the feature extraction results of the local feature extraction module and the global feature extraction module to obtain fused features;

[0165] Based on the attribute recognition module, the attributes of the fused features are recognized to obtain the attribute feature information of the image to be recognized.

[0166] Please refer to Fig.12 , Fig.11 Another structural diagram of an electronic device provided in an embodiment of the present application, Fig.11 The difference between the electronic device shown is that the electronic device further includes components such as an input unit 403 and an output unit 404 .

[0167] The input unit 403 may be used to receive input numbers, character information or user feature information (such as fingerprints), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0168] The output unit 404 may be used to display information input by a user or information provided to a user, such as a screen.

[0169] In the embodiment of the present application, the processor 401 calls the computer program in the memory 402 to execute:

[0170] Acquire an image to be identified, and capture a human body image from the image to be identified;

[0171] Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module;

[0172] Extract features of the human body image based on the local feature extraction module, extract features of the image to be identified based on the global feature extraction module, and fuse the feature extraction results of the local feature extraction module and the global feature extraction module to obtain fused features;

[0173] Based on the attribute recognition module, the attributes of the fused features are recognized to obtain the attribute feature information of the image to be recognized.

[0174] In one embodiment, the local feature extraction module includes N layers of local convolution layers, the global feature extraction module includes N layers of global convolution layers, and the human body image is subjected to feature extraction based on the local feature extraction module, and the image to be identified is subjected to feature extraction based on the global feature extraction module, and the feature extraction results of the local feature extraction module and the global feature extraction module are fused to obtain fused features. The processor 401 is used to execute:

[0175] Based on N local convolution layers, convolution operations are performed on human body images layer by layer, and based on N global convolution layers, convolution operations are performed on the image to be recognized layer by layer, wherein, in the operation process of the N local convolution layers, multiple target local convolution layers are selected, and for each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer;

[0176] The convolution operation result of the Nth local convolution layer is used as the fusion feature.

[0177] In one embodiment, when the local convolution operation result and the global convolution operation result are fused to obtain the fusion result, the processor 401 is used to execute:

[0178] The adaptive weight corresponding to the target local convolution layer is obtained, and the local convolution operation result and the global convolution operation result are fused according to the adaptive weight to obtain the fusion result.

[0179] In one embodiment, the processor 401 obtains a fusion result by fusion according to the following formula:

[0180] F_out=F_a+αF_b;

[0181] Among them, F_out represents the fusion result, F_a represents the local convolution operation result of the target local convolution layer, and F_b represents the global convolution operation result of the global convolution layer of the same layer.

[0182] In one embodiment, before obtaining a fusion result by fusing the local convolution operation result and the global convolution operation result according to the adaptive weight, the processor 401 is further configured to execute:

[0183] Identify whether the adaptive weight reaches the preset weight;

[0184] If not, the processor 401 fuses the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result;

[0185] If it is reached, the processor 401 corrects the adaptive weight to the preset weight, and then fuses the local convolution operation result and the global convolution operation result according to the corrected adaptive weight to obtain a fusion result.

[0186] In one embodiment, when selecting multiple target local convolutional layers, the processor 401 is used to execute:

[0187] The N local convolutional layers are divided into three parts according to the depth of the layers, and a local convolutional layer is selected from each part as the target local convolutional layer.

[0188] In one embodiment, when capturing a human body image from an image to be identified, the processor 401 is configured to execute:

[0189] Call the pre-trained human body recognition model to identify the human body area in the image to be recognized;

[0190] The image content of the human body area is intercepted to obtain a human body image.

[0191] In one embodiment, the attribute recognition module includes a fully connected layer. When the attribute recognition module performs attribute recognition on the fused feature to obtain attribute feature information of the image to be recognized, the processor 401 is used to execute:

[0192] The fused features are input into the fully connected layer for classification processing to obtain attribute feature information.

[0193] In one embodiment, the human attribute recognition model further includes a dimension reduction module. Before inputting the fusion feature into the attribute recognition module to obtain the attribute feature information of the image to be recognized, the processor 401 is further configured to execute:

[0194] Based on the dimension reduction module, the fusion features are reduced in dimension to obtain the fusion features after dimension reduction;

[0195] When the attribute recognition module performs attribute recognition on the fused feature to obtain attribute feature information of the image to be recognized, the processor 401 is used to execute:

[0196] The attribute recognition module is input with the fusion features after dimension reduction to perform attribute recognition to obtain attribute feature information.

[0197] It should be noted that the electronic device provided in the embodiment of the present application belongs to the same concept as the attribute identification method in the above embodiment. Any method provided in the attribute identification method embodiment can be run on the electronic device. The specific implementation process is detailed in the feature extraction method embodiment and will not be repeated here.

[0198] It should be noted that, for the attribute identification method of the embodiment of the present application, ordinary testers in the field can understand that all or part of the process of implementing the attribute identification method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the attribute identification method. Among them, the storage medium can be a disk, an optical disk, a read-only memory, a random access memory, etc.

[0199] For the data screening device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

Claims

1. A method for attribute identification, in, The attribute identification method comprises: Acquire an image to be identified, and capture a human body image from the image to be identified; Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module; The method comprises: performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature, including: performing convolution operation on the human body image layer by layer based on N layers of local convolution layers, and performing convolution operation on the image to be identified layer by layer based on N layers of global convolution layers, wherein, in the operation process of the N layers of local convolution layers, the N layers of local convolution layers are divided into three parts according to the depth of the layers, and a local convolution layer is selected from each part as a target local convolution layer. For each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer; and the convolution operation result of the Nth local convolution layer is used as the fusion feature; wherein, the local feature extraction module includes N layers of local convolution layers, and the global feature extraction module includes N layers of global convolution layers; Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized.

2. The attribute identification method according to claim 1, in, The human attribute recognition model further includes an adaptive weight module, based on which the adaptive weight corresponding to the target local convolution layer is predicted; The fusing the local convolution operation result and the global convolution operation result to obtain a fusion result includes: Obtain an adaptive weight corresponding to the target local convolution layer, and fuse the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result.

3. The attribute identification method according to claim 2, in, The fusion result is obtained by fusion according to the following formula: F_out=F_a+αF_b; Among them, F_out represents the fusion result, F_a represents the local convolution operation result of the target local convolution layer, F_b represents the global convolution operation result of the global convolution layer of the same layer, and α represents the adaptive weight corresponding to the target local convolution layer.

4. The attribute identification method according to claim 3, in, Before fusing the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result, the method further includes: Identifying whether the adaptive weight reaches a preset weight; If not reached, fusing the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result; If it is reached, the adaptive weight is corrected to the preset weight, and then the local convolution operation result and the global convolution operation result are fused according to the corrected adaptive weight to obtain the fusion result.

5. The attribute identification method according to claim 1, in, The step of intercepting a human body image from the image to be identified comprises: Calling a pre-trained human body recognition model to recognize a human body region in the image to be recognized; The image content of the human body region is intercepted to obtain the human body image.

6. The attribute identification method according to claim 1, in, The attribute recognition module includes a fully connected layer, and the attribute recognition of the fused feature based on the attribute recognition module is performed to obtain the attribute feature information of the image to be recognized, including: The fused features are input into the fully connected layer for classification processing to obtain the attribute feature information.

7. The attribute identification method according to claim 1, in, The human attribute recognition model further includes a dimension reduction module, and before inputting the fusion feature into the attribute recognition module to obtain the attribute feature information of the image to be recognized, it also includes: Performing feature dimension reduction on the fusion feature based on the dimension reduction module to obtain the fusion feature after dimension reduction; The performing attribute recognition on the fusion feature based on the attribute recognition module to obtain attribute feature information of the image to be recognized includes: The fusion features after dimension reduction are input into the attribute recognition module for attribute recognition to obtain the attribute feature information.

8. An attribute recognition device , in, include: An image acquisition component is used to acquire an image to be identified and capture a human body image from the image to be identified; A model calling component calls a pre-trained human attribute recognition model, wherein the human attribute recognition model includes a feature extraction module and an attribute recognition module, wherein the feature extraction module includes a global feature extraction module and a local feature extraction module; A feature extraction component, used to extract features from the human body image based on the local feature extraction module, and to extract features from the image to be identified based on the global feature extraction module, and to fuse the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fused feature, including: performing convolution operations on the human body image layer by layer based on N layers of local convolution layers, and performing convolution operations on the image to be identified layer by layer based on N layers of global convolution layers, wherein, in the operation process of the N layers of local convolution layers, the N layers of local convolution layers are divided into three parts according to the depth of the layers, a local convolution layer is selected from each part as a target local convolution layer, for each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fused result as the input of the next local convolution layer; the convolution operation result of the Nth local convolution layer is used as the fused feature; wherein, the local feature extraction module includes N layers of local convolution layers, and the global feature extraction module includes N layers of global convolution layers; The attribute recognition component is used to perform attribute recognition on the fused feature based on the attribute recognition module to obtain attribute feature information of the image to be recognized.

9. A storage medium, in, The storage medium stores a computer program, which, when executed on a computer, causes the computer to execute: Acquire an image to be identified, and capture a human body image from the image to be identified; Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module; The method comprises: performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature, including: performing convolution operation on the human body image layer by layer based on N layers of local convolution layers, and performing convolution operation on the image to be identified layer by layer based on N layers of global convolution layers, wherein, in the operation process of the N layers of local convolution layers, the N layers of local convolution layers are divided into three parts according to the depth of the layers, and a local convolution layer is selected from each part as a target local convolution layer. For each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer; and the convolution operation result of the Nth local convolution layer is used as the fusion feature; wherein, the local feature extraction module includes N layers of local convolution layers, and the global feature extraction module includes N layers of global convolution layers; Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized.

10. An electronic device, in, The electronic device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute, by calling the computer program stored in the memory: Acquire an image to be identified, and capture a human body image from the image to be identified; Calling a pre-trained human attribute recognition model, the human attribute recognition model includes a feature extraction module and an attribute recognition module, the feature extraction module includes a global feature extraction module and a local feature extraction module; The method comprises: performing feature extraction on the human body image based on the local feature extraction module, and performing feature extraction on the image to be identified based on the global feature extraction module, and fusing the feature extraction results of the local feature extraction module and the global feature extraction module to obtain a fusion feature, including: performing convolution operation on the human body image layer by layer based on N layers of local convolution layers, and performing convolution operation on the image to be identified layer by layer based on N layers of global convolution layers, wherein, in the operation process of the N layers of local convolution layers, the N layers of local convolution layers are divided into three parts according to the depth of the layers, and a local convolution layer is selected from each part as a target local convolution layer. For each target local convolution layer, its local convolution operation result is obtained, and the global convolution operation result of the global convolution layer of the same layer is obtained, and the local convolution operation result and the global convolution operation result are fused to obtain a fusion result as the input of the next local convolution layer; and the convolution operation result of the Nth local convolution layer is used as the fusion feature; wherein, the local feature extraction module includes N layers of local convolution layers, and the global feature extraction module includes N layers of global convolution layers; Based on the attribute recognition module, attribute recognition is performed on the fused feature to obtain attribute feature information of the image to be recognized.

11. The electronic device according to claim 10, in, The human attribute recognition model further includes an adaptive weight module, based on which the adaptive weight corresponding to the target local convolution layer is predicted; When the local convolution operation result and the global convolution operation result are fused to obtain a fusion result, the processor is used to execute: Obtain an adaptive weight corresponding to the target local convolution layer, and fuse the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result.

12. The electronic device according to claim 11, in, The fusion result is obtained by fusion according to the following formula: F_out=F_a+αF_b; Among them, F_out represents the fusion result, F_a represents the local convolution operation result of the target local convolution layer, F_b represents the global convolution operation result of the global convolution layer of the same layer, and α represents the adaptive weight corresponding to the target local convolution layer.

13. The electronic device according to claim 12, in, Before fusing the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result, the processor is further configured to execute: Identifying whether the adaptive weight reaches a preset weight; If not reached, the processor executes the step of fusing the local convolution operation result and the global convolution operation result according to the adaptive weight to obtain a fusion result; If reached, the processor executes: The adaptive weight is corrected to a preset weight, and then the local convolution operation result and the global convolution operation result are fused according to the corrected adaptive weight to obtain a fusion result.

14. The electronic device according to claim 10, in, When capturing a human body image from the image to be identified, the processor is used to execute: Calling a pre-trained human body recognition model to recognize a human body region in the image to be recognized; The image content of the human body region is intercepted to obtain the human body image.

15. The electronic device according to claim 10, in, The attribute recognition module includes a fully connected layer. When attribute recognition is performed on the fused feature based on the attribute recognition module to obtain attribute feature information of the image to be recognized, the processor is configured to execute: The fused features are input into the fully connected layer for classification processing to obtain the attribute feature information.

16. The electronic device according to claim 10, in, The human attribute recognition model further includes a dimension reduction module. Before the fusion feature is input into the attribute recognition module to obtain the attribute feature information of the image to be recognized, the processor is further configured to execute: Performing feature dimension reduction on the fusion feature based on the dimension reduction module to obtain the fusion feature after dimension reduction; When the attribute recognition module performs attribute recognition on the fusion feature to obtain attribute feature information of the image to be recognized, the processor is configured to execute: The fusion features after dimension reduction are input into the attribute recognition module for attribute recognition to obtain the attribute feature information.

Citation Information

Patent Citations

  • Object property recognizing method, device and system

    CN107784282A

  • Classification method and device, electronic equipment, computer storage medium and program

    CN108229341A

  • Human-body attribute recognition method, device, storage medium and electronic device

    CN109522790A

  • A face attribute classification system based on a bidirectional Ladder structure

    CN109886072A

  • A multi-task attribute identification system for a target object

    CN109948709A