Method and apparatus for identifying attributes of a worn object

By combining multiple convolutional layers and stitching layers in the attribute recognition model to process wearable object features, the problem of inaccurate recognition caused by single feature extraction in existing technologies is solved, achieving higher recognition accuracy and speed.

CN115294554BActive Publication Date: 2026-06-05DONGGUAN ZKTECO ELECTRONICS TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGGUAN ZKTECO ELECTRONICS TECH
Filing Date
2022-07-15
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing network models rely on single-feature extraction when identifying objects worn by pedestrians, resulting in inaccurate identification results.

Method used

By using multiple convolutional and splicing layers in the attribute recognition model, the features of wearable objects are processed separately, and coarse-grained and fine-grained features are combined to form a stronger representation capability.

Benefits of technology

It improves the recognition accuracy of wearable objects, especially in the recognition of backpacks and shoulder straps, with an accuracy rate of 93.25% and a recognition speed of 3.48ms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294554B_ABST
    Figure CN115294554B_ABST
Patent Text Reader

Abstract

The application provides a method and device for identifying attributes of a wearing object, and relates to the field of image recognition. The application processes first features based on a first convolution layer with N convolution kernels to obtain second features; processes the second features based on a second convolution layer with M convolution kernels to obtain third features, which is equivalent to continuously extracting new features (third features) of the wearing object based on previous features (second features), that is, extracting fine-grained features (third features) of the wearing object from coarse-grained features (second features) of the wearing object. The obtained second features and third features are spliced, so that the obtained fourth features not only retain the coarse-grained features of the wearing object but also add the fine-grained features of the wearing object, so that the fourth features have stronger ability to represent the attributes of the wearing object. Thus, the identification result of the wearing object determined according to the fourth features is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image recognition, and in particular relates to a method and apparatus for recognizing the attributes of wearable objects. Background Technology

[0002] As artificial intelligence technology continues to mature, people are using network models trained with AI to identify objects worn by pedestrians. However, the features extracted by these network models are relatively limited, leading to inaccurate identification results based on these features. Summary of the Invention

[0003] This application provides a method and apparatus for identifying the attributes of wearable objects, which can improve the identification accuracy of wearable objects.

[0004] To achieve the above objectives, in a first aspect, embodiments of this application provide a method for identifying wearable object attributes, the method being applied to a first device, the method comprising:

[0005] The first feature of the wearable object to be identified is processed by N convolution kernels in the first convolutional layer of the attribute recognition model to obtain the second feature, which has N channels.

[0006] Based on the second feature, the M convolutional kernels of the second convolutional layer of the attribute recognition model are processed respectively to obtain the third feature, and the number of channels of the third feature is M;

[0007] The second and third features are combined in the splicing layer of the attribute recognition model to obtain the fourth feature. The fourth feature has M+N channels and is used to determine the recognition result of the wearable object to be identified.

[0008] Where M and N are positive integers.

[0009] In the above scheme, this application processes the first feature using a first convolutional layer with N convolutional kernels to obtain the second feature; a second convolutional layer with M convolutional kernels processes the second feature to obtain the third feature. This is equivalent to extracting new features (the third feature) of the wearable object based on the previous features (the second feature), that is, extracting fine-grained features (the third feature) of the wearable object from its coarse-grained features (the second feature). The obtained second and third features are concatenated to obtain a fourth feature that retains both the coarse-grained and fine-grained features of the wearable object. Therefore, the fourth feature has a stronger ability to represent the attributes of the wearable object. The identification result of the wearable object determined based on the fourth feature is more accurate.

[0010] Optionally, the attribute recognition model further includes a third convolutional layer, a global pooling layer, and an attribute recognition layer. The method also includes:

[0011] The fourth feature is processed by Q convolutional kernels in the third convolutional layer to obtain the fifth feature, which has Q channels.

[0012] The second and fifth features are input into the concatenation layer and concatenated to obtain the sixth feature, which has Q+N channels.

[0013] The sixth feature is input into the global pooling layer for global pooling to obtain the seventh feature, which has Q+N channels.

[0014] The seventh feature is input into the attribute recognition layer for recognition, and the recognition result of the wearable object to be recognized is obtained; where Q is a positive integer.

[0015] Optionally, the first feature is a feature of the original image of the wearable object to be identified, or the method further includes:

[0016] The features of the original image of the wearable object to be identified are input into the P convolutional kernels of the fourth convolutional layer of the attribute recognition model for processing to obtain the eighth feature, which has P channels.

[0017] The first pooling layer of the eighth feature input attribute recognition model is pooled to obtain the first feature; where P is a positive integer.

[0018] Optionally, the wearable object to be identified is a backpack, and the method further includes:

[0019] Acquire a first image, which includes a first pedestrian target;

[0020] The first image is input into the pedestrian keypoint detection model to determine the two shoulder nodes and the two hip nodes of the first pedestrian target;

[0021] The original image is obtained based on two shoulder nodes and two hip nodes.

[0022] Optionally, the method further includes:

[0023] Acquire at least one captured image;

[0024] Input at least one image into the pedestrian detection model to determine whether a pedestrian exists in at least one image;

[0025] The first image is determined based on an image in which at least one person is present.

[0026] Optionally, the backpack identification result includes at least one of no backpack, backpack body, and backpack straps.

[0027] Optionally, the attribute recognition model further includes a first batch normalization layer and a first activation layer. Based on the first feature of the wearable object to be recognized, the second feature is obtained by processing it in N convolutional kernels of the first convolutional layer of the attribute recognition model, including:

[0028] The first feature of the wearable object to be identified is input into N convolutional kernels of the first convolutional layer for processing to obtain the ninth feature, which has N channels.

[0029] The ninth feature is input into the first batch normalization layer for normalization to obtain the tenth feature, which has N channels.

[0030] The tenth feature is input into the first activation layer for activation, resulting in the second feature; and / or,

[0031] The attribute recognition model also includes a second batch normalization layer and a second activation layer. Based on the second feature, the M convolutional kernels of the second convolutional layer of the attribute recognition model are processed to obtain the third feature, which includes:

[0032] The second feature is input into M convolutional kernels of the second convolutional layer for processing to obtain the eleventh feature, which has M channels.

[0033] The eleventh feature is input into the second batch normalization layer for normalization to obtain the twelfth feature, which has M channels.

[0034] The twelfth feature is input into the second activation layer for activation, resulting in the third feature.

[0035] Optionally, the attribute recognition model further includes a second pooling layer. After the tenth feature is input into the first activation layer for activation to obtain the second feature, the second feature and the third feature are concatenated in the concatenation layer of the attribute recognition model to obtain the fourth feature, including:

[0036] The second feature is input into the second pooling layer for pooling to obtain the pooled second feature, which has N channels.

[0037] The third feature is concatenated with the pooled second feature in the concatenation layer to obtain the fourth feature.

[0038] Secondly, embodiments of this application provide a device for identifying the attributes of a wearable object, the device comprising:

[0039] The first determining unit is used to process the first feature of the wearable object to be identified in N convolutional kernels of the first convolutional layer of the attribute recognition model to obtain the second feature, wherein the number of channels of the second feature is N.

[0040] The first determining unit is also used to process the second feature in the M convolutional kernels of the second convolutional layer of the attribute recognition model to obtain the third feature, wherein the number of channels of the third feature is M.

[0041] The third determining unit is also used to splice the second feature and the third feature in the splicing layer of the attribute recognition model to obtain the fourth feature. The fourth feature has M+N channels and is used to determine the recognition result of the wearable object to be recognized.

[0042] Where M and N are positive integers.

[0043] Thirdly, embodiments of this application provide an apparatus for identifying wearable object attributes, including a processor coupled to a memory, wherein the processor is used to execute a computer program or instructions stored in the memory to implement the method described in the first aspect or any embodiment of the first aspect.

[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in the first aspect or any embodiment of the first aspect. Attached Figure Description

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

[0046] Figure 1 This is a flowchart of a method for identifying wearable object attributes provided in an embodiment of this application;

[0047] Figure 2 This is a schematic diagram of the first feature provided in the embodiments of this application;

[0048] Figure 3 This is a schematic diagram illustrating the determination of the first image provided in an embodiment of this application;

[0049] Figure 4 This is a schematic diagram illustrating the determination of the original image provided in an embodiment of this application;

[0050] Figure 5 This is a schematic diagram illustrating the determination of the fourth feature provided in an embodiment of this application;

[0051] Figure 6 This is a flowchart illustrating a method for determining a fourth feature provided in an embodiment of this application;

[0052] Figure 7 This is a flowchart illustrating another method for determining the fourth feature provided in an embodiment of this application;

[0053] Figure 8 This is a flowchart of a method for determining an attribute recognition model provided in an embodiment of this application;

[0054] Figure 9 This is a flowchart of another method for determining an attribute recognition model provided in an embodiment of this application;

[0055] Figure 10 This is a schematic diagram of a device for identifying the attributes of a wearable object, provided in an embodiment of this application.

[0056] Figure 11 This is a schematic diagram of another device for identifying the attributes of wearable objects provided in an embodiment of this application. Detailed Implementation

[0057] The technical solutions in the embodiments of this application will be described in detail below with reference to the embodiments of this application.

[0058] It should be understood that the methods, situations, categories, and classifications of embodiments in this application are only for the convenience of description and do not constitute any limitation on this application. Various methods, categories, situations, and features in the embodiments can be combined with each other without contradiction.

[0059] It should also be understood that the terms "first," "second," and "third" in the embodiments of this application are for distinction only and do not constitute any limitation on this application. It should also be understood that in the various embodiments of this application, the sequence numbers of the various processes do not imply the execution order of the steps; the execution order of the steps is determined by their internal logic and does not constitute any limitation on the execution process of the embodiments of this application.

[0060] As artificial intelligence technology continues to mature, people are using network models trained with AI to identify objects worn by pedestrians. However, the features extracted by these network models are relatively limited, making the identification results based on these features inaccurate.

[0061] Based on the problems in related technologies, this application proposes a method and apparatus for identifying the attributes of wearable objects. The method includes: processing a first feature of the wearable object to be identified using N convolutional kernels in a first convolutional layer of an attribute recognition model to obtain a second feature, the second feature having N channels; processing the second feature using M convolutional kernels in a second convolutional layer of the attribute recognition model to obtain a third feature, the third feature having M channels; and concatenating the second and third features in a concatenation layer of the attribute recognition model to obtain a fourth feature, the fourth feature having M+N channels. The fourth feature is used to determine the recognition result of the wearable object to be identified; where M and N are positive integers. This application processes the first feature using a first convolutional layer with N kernels to obtain the second feature; and processes the second feature using a second convolutional layer with M kernels to obtain the third feature. This is equivalent to extracting new features (the third feature) of the wearable object based on the previous features (the second feature), that is, extracting fine-grained features (the third feature) of the wearable object from the coarse-grained features (the second feature) of the wearable object. The second and third features are concatenated to obtain a fourth feature that retains both coarse-grained and fine-grained features of the wearable object. This fourth feature thus has a stronger ability to characterize the attributes of the wearable object. Therefore, the identification result of the wearable object determined based on the fourth feature is more accurate.

[0062] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0063] The implementation of this application is based on an attribute recognition model, which utilizes the knowledge of neural networks and is obtained through training and testing processes. Taking the attribute recognition model to be trained as the first model as an example, the first model becomes the attribute recognition model after the testing process. The following describes the process of determining the attribute recognition model.

[0064] The following is the training process of the first model.

[0065] The first model consists of convolutional layer 1, convolutional layer 2, and splicing layer 1.

[0066] Optionally, the second device acquires N1 sample images, each of which corresponds to the actual recognition result of the wearable object. The second device inputs the features of the first sample image from the N1 sample images into N convolutional kernels of convolutional layer 1 for processing to obtain feature 1, with N channels. The second device inputs feature 1 into M convolutional kernels of convolutional layer 2 for processing to obtain feature 2, with M channels. The second device inputs feature 1 and feature 2 into stitching layer 1 for stitching to obtain feature 3, with M+N channels. The second device obtains the prediction result of the wearable object in the first sample image based on feature 3. The second device determines a first loss value based on the actual recognition result of the wearable object corresponding to the first sample image and the prediction result of the wearable object in the first sample image. If the first loss value is greater than a first threshold, the second device adjusts the parameters in convolutional layer 1, convolutional layer 2, and stitching layer 1 according to the first loss value to obtain the adjusted parameters. The second device processes the features of the second sample image from N1 sample images into the N convolutional kernels of the adjusted convolutional layer 1 to obtain feature 4, which has N channels. The second device processes the features of the second sample image into the M convolutional kernels of the adjusted convolutional layer 2 to obtain feature 5, which has M channels. The second device concatenates feature 4 and feature 5 into the adjusted convolutional layer 1 to obtain feature 6, which has M+N channels. The second device obtains the prediction result of the wearable object in the second sample image based on feature 6. The second device determines the second loss value based on the actual recognition result of the wearable object corresponding to the second sample image and the prediction result of the wearable object in the second sample image. If the second loss value is less than or equal to the first threshold, the second device determines the adjusted convolutional layer 1, the adjusted convolutional layer 2, and the adjusted convolutional layer 1 as convolutional layer a, convolutional layer b, and convolutional layer a, respectively.

[0067] The first sample image and the second sample image are both sample images from N1 sample images.

[0068] The following is the testing process for the first model.

[0069] Optionally, the second device acquires M1 sample images, each of which corresponds to the actual recognition result of the wearable object. These M1 sample images differ from the N1 sample images. The second device inputs the features of the third sample image from the M1 sample images into N convolutional kernels of convolutional layer a for processing to obtain feature 7, which has N channels. The second device inputs feature 7 into M convolutional kernels of convolutional layer b for processing to obtain feature 8, which has M channels. The second device inputs features 7 and 8 into stitching layer a for stitching to obtain feature 9, which has N+M channels. The second device then uses feature 9 to obtain the wearable object from the third sample image. The second device obtains the prediction results of the objects in the M1 sample images, excluding the third sample image. The second device compares the prediction results of the objects in each of the M1 sample images with the actual recognition results of the objects in each of the M1 sample images, and determines the number Q1 of the prediction results of the objects that are the same as the actual recognition results of the objects in the M1 sample images. If Q1 is greater than or equal to the second threshold, the second device determines the convolutional layer a, convolutional layer b, and stitching layer a as the first convolutional layer, the second convolutional layer, and the stitching layer. Wherein, Q1 is less than or equal to M1.

[0070] The resulting attribute recognition model consists of a first convolutional layer, a second convolutional layer, and a splicing layer.

[0071] Optionally, the wearable object is a backpack, and the backpack identification result includes at least one of no backpack, backpack body, and backpack straps.

[0072] Optionally, the worn object is a bracelet, and the bracelet identification result includes at least one of no bracelet and partially bracelet.

[0073] Optionally, the second device may be a terminal device.

[0074] Alternatively, the terminal device can be any of a mobile phone, computer, or tablet computer.

[0075] Optionally, the first or second loss value can be determined using the cross-entropy loss function.

[0076] For example, the cross-entropy loss function is as shown in equation (1), where x (i) The prediction result for the knapsack problem for the i-th sample image; y (i) y(i) represents the actual recognition result of the backpack corresponding to the i-th sample image; n represents the type of the actual recognition result of the backpack; j can take at least one of 0, 1, and 2, where 0 represents no backpack, 1 represents the backpack body, and 2 represents the backpack straps; sign(y(i)=j) is the sign function, and its expression is shown in equation (2); θ is the system parameter; P(y(i) =j|x (i) ,θ) is the softmax prediction function.

[0077]

[0078]

[0079] Optionally, the first model also includes convolutional layer 3, pooling layer 1, pooling layer 2, convolutional layer 4, batch normalization layer 1, activation layer 1, batch normalization layer 2, activation layer 2, global pooling layer 1, and attribute recognition layer 1.

[0080] In the above scheme, the second device can use N1 sample images to train convolutional layer 3, pooling layer 1, pooling layer 2, convolutional layer 3, batch normalization layer 1, activation layer 1, batch normalization layer 2, activation layer 2, global pooling layer 1, and attribute recognition layer 1, obtaining trained convolutional layer c, pooling layer a, pooling layer b, convolutional layer d, batch normalization layer a, activation layer a, batch normalization layer b, activation layer b, global pooling layer a, and attribute recognition layer a. The specific training process is similar to the process of training convolutional layer 1, convolutional layer 2, and stitching layer 1 to obtain convolutional layer a, convolutional layer b, and stitching layer a. Each sample image in the N1 sample images corresponds to the actual recognition result of the wearable object.

[0081] Similarly, the second device can use M1 sample images to test convolutional layer c, pooling layer a, pooling layer b, convolutional layer d, batch normalization layer a, activation layer a, batch normalization layer b, activation layer b, global pooling layer a, and attribute recognition layer a, to obtain the fourth convolutional layer, first pooling layer, second pooling layer, third convolutional layer, first batch normalization layer, first activation layer, second batch normalization layer, second activation layer, global pooling layer, and attribute recognition layer. The specific testing process is similar to the process of testing convolutional layer a, convolutional layer b, and stitching layer a to obtain the first convolutional layer, second convolutional layer, and stitching layer. Each sample image in the M1 sample images corresponds to the actual recognition result of the wearable object.

[0082] The resulting attribute recognition model includes a first convolutional layer, a second convolutional layer, a concatenation layer, a fourth convolutional layer, a first pooling layer, a second pooling layer, a third convolutional layer, a first batch normalization layer, a first activation layer, a second batch normalization layer, a second activation layer, a global pooling layer, and an attribute recognition layer.

[0083] The attribute recognition model obtained in this application has an accuracy rate of 93.25% for recognizing items without a backpack and 97.1% for recognizing backpack straps. The recognition speed achievable using a GPU is 3.48ms, and the recognition speed achievable using a CPU is 47ms. The GPU specifications are GTX1080Ti, and the CPU specifications are Intel(R)Xeon(R)CPU E5-2603 v4@1.70GHz.

[0084] Figure 1 A flowchart of a method for identifying wearable object attributes provided in an embodiment of this application is shown below. Figure 1 As shown, the method is applied to a first device, and the method includes the following steps:

[0085] S110, the first device processes the first feature of the wearable object to be identified in N convolutional kernels of the first convolutional layer of the attribute recognition model to obtain the second feature, the number of channels of the second feature being N; where N is a positive integer.

[0086] Optionally, the first device in S110 may be a terminal device.

[0087] Alternatively, the terminal device can be either a server or a computer.

[0088] Optionally, the first device and the second device can be the same device, such as the same computer; or they can be different devices, such as the first device being a laptop terminal and the second device being a server.

[0089] It should be understood that the size of each feature can be characterized by its length, width, and number of channels. The number of channels is also called depth. For example, as... Figure 2 The first feature shown has 3 channels, meaning it consists of three features (feature a, feature b, and feature c). Features a, b, and c each have a length and width of 2, indicating that each feature is 2*2 in size, meaning each feature consists of 4 elements: feature a consists of elements 5, 3, 1, and 2; feature b consists of elements 2, 6, 3, and 1; and feature c consists of elements 8, 3, 4, and 7.

[0090] The process of obtaining the second feature from the first feature will be discussed in two cases below.

[0091] In case one, the number of channels for the first feature is 1.

[0092] Optionally, when the number of channels of the first feature is 1, S110 includes: the first device inputs the first feature into N convolution kernels, and the first feature is convolved with each of the N convolution kernels to obtain the second feature.

[0093] Case 2: The number of channels for the first feature is O, where O is a positive integer greater than 1.

[0094] Optionally, when the number of channels of the first feature is 0, S110 includes: the first device inputs the first feature into N convolutional kernels, and the features of each of the 0 channels of the first feature are convolved with the first convolutional kernel of the N convolutional kernels to obtain feature 10, where the number of channels of feature 10 is 0; the first device sums the features of the 0 channels of feature 10 to obtain the summed feature 10; the first device convolves the features of each of the 0 channels of the first feature with the second convolutional kernel of the N convolutional kernels to obtain feature 11, where the number of channels of feature 11 is 0. The number of channels is 0; the first device sums the features of the 0 channels of feature 11 to obtain the summed feature 11; and so on, until the first device convolves the features of each of the 0 channels of the first feature with the Nth convolution kernel of N convolution kernels to obtain feature N+9, and the number of channels of feature 11 is 0; the first device sums the features of the 0 channels of feature N+9 to obtain the summed feature N+9; the first device combines the summed feature 10, the summed feature 11, ..., the summed feature N+9 to form the second feature.

[0095] Optionally, the first feature in S110 is a feature of the original image of the wearable object to be identified.

[0096] Optionally, if the original image of the wearable object to be identified is a grayscale image and the number of channels of the features of the original image of the wearable object to be identified is 1, S110 includes: the first device inputs the features of the original image of the wearable object to be identified into N convolutional kernels of the first convolutional layer for processing respectively to obtain the second feature.

[0097] In this process, the first device inputs the features of the original image of the wearable object to be identified into N convolutional kernels of the first convolutional layer for processing, and obtains the second feature. The specific process is similar to that in case one of obtaining the second feature from the first feature.

[0098] Optionally, if the original image of the wearable object to be identified is a color image (RGB image), and the number of channels of the features of the original image of the wearable object to be identified is 3, S110 includes: the first device inputs the features of the original image of the wearable object to be identified into N convolution kernels of the first convolutional layer for processing respectively to obtain the second feature.

[0099] In this process, the first device inputs the features of the original image of the wearable object to be identified into N convolutional kernels of the first convolutional layer for processing, and obtains the second feature. The specific process is similar to that in case two of obtaining the second feature from the first feature.

[0100] Optionally, before S110, the method further includes: the first device inputs the features of the original image of the wearable object to be identified into the P convolutional kernels of the fourth convolutional layer of the attribute recognition model for processing to obtain an eighth feature, the number of channels of the eighth feature being P; the first device inputs the eighth feature into the first pooling layer of the attribute recognition model for pooling to obtain a first feature; wherein, P is a positive integer.

[0101] In the above scheme, the features of the original image of the wearable object to be identified are processed by P convolutional kernels of the fourth convolutional layer to obtain the eighth feature, which is a local feature in the original image. This local feature can describe most of the features of the wearable object. Pooling the eighth feature can reduce the dimensionality of the obtained local feature, that is, reduce the size of the local feature, which can speed up the feature processing speed of the first device.

[0102] Wherein, the number of channels of the first feature is P, where P is an integer greater than 1. The specific process by which the first device processes the first feature into N convolutional kernels of the first convolutional layer to obtain the second feature is similar to Case 2 in obtaining the second feature from the first feature.

[0103] Optionally, the first pooling layer can be an average pooling layer, a max pooling layer, or a random pooling layer.

[0104] It should be understood that the human body has multiple joint points, such as the shoulder joint, knee joint, and hip joint. By detecting these joint points using a pedestrian keypoint detection model, the device can identify the pedestrian's posture or wearable objects on their body. For example, pedestrians typically wear bags between their shoulders and hips, so the backpack can be identified by detecting the area between the shoulder and hip joints. Similarly, pedestrians typically wear bracelets between their wrists and elbows, so the bracelet can be identified by detecting the area between the wrist and elbow joints.

[0105] The following description uses a backpack as an example of the wearable object to be identified.

[0106] Optionally, the method further includes: a first device acquiring a first image, the first image including a first pedestrian target; the first device inputting the first image into a pedestrian keypoint detection model to determine two shoulder nodes and two hip nodes of the first pedestrian target; and the first device obtaining an original image based on the two shoulder nodes and the two hip nodes.

[0107] Optionally, the backpack identification result includes at least one of no backpack, backpack body, and backpack straps.

[0108] Optionally, the pedestrian keypoint detection model is a MobilePose model or an AlphaPose model.

[0109] It should be understood that during walking, pedestrians adjust their posture, so the two symmetrical joints of a pedestrian are not aligned. For example, the two shoulder joints, the two knee joints, and the two wrist joints.

[0110] Optionally, the first device obtains the original image based on the two shoulder nodes and the two hip nodes, including: the first device extracts an image including the two shoulder nodes and the two hip nodes from the first image to obtain the original image.

[0111] Optionally, the method further includes: the first device establishing a planar coordinate system with the lower left corner of the first image as the origin, wherein the extension of the line connecting the lower right corner of the first image to the origin is the X-axis, and the extension of the line connecting the upper left corner of the first image to the origin is the Y-axis; the first device obtaining the original image based on two shoulder nodes and two hip nodes includes: the first device calculating the average of the ordinate values ​​of the two shoulder nodes to obtain a first value; the first device calculating the average of the ordinate values ​​of the two hip nodes to obtain a second value; and the first device extracting the original image from the first image based on the first value and the second value.

[0112] The following description uses a bracelet as an example of the wearable object to be identified.

[0113] Optionally, the method further includes: a first device acquiring a first image, the first image including a first pedestrian target; the first device inputting the first image into a pedestrian keypoint detection model to determine two wrist nodes and two elbow nodes of the first pedestrian target; and the first device obtaining an original image based on the two wrist nodes and the two elbow nodes.

[0114] Optionally, the bracelet identification result includes at least one of no bracelet and partially bracelet.

[0115] Optionally, the pedestrian keypoint detection model is a MobilePose model or an AlphaPose model.

[0116] Optionally, the first device obtains the original image based on two wrist nodes and two elbow nodes, including: the first device extracts an image including two wrist nodes and two elbow nodes from the first image to obtain the original image.

[0117] Optionally, the method further includes: the first device establishing a planar coordinate system with the lower left corner of the first image as the origin, wherein the extension of the line connecting the lower right corner of the first image to the origin is the X-axis, and the extension of the line connecting the upper left corner of the first image to the origin is the Y-axis; the first device obtaining the original image based on two wrist nodes and two elbow nodes includes: the first device averaging the ordinate values ​​of the two wrist nodes to obtain a third value; the first device averaging the ordinate values ​​of the two elbow nodes to obtain a fourth value; and the first device extracting the original image from the first image based on the third and fourth values.

[0118] Optionally, before the first device acquires the first image, the method further includes: the first device acquiring at least one captured image; the first device inputting the at least one image into a pedestrian detection model to determine whether a pedestrian exists in the at least one image; and the first device determining the first image based on an image in which a pedestrian exists.

[0119] Optionally, the pedestrian detection model is either the HOG+SVM detection model, the ICF+AdaBoost detection model, or the HyperLearner detection model.

[0120] Optionally, the first device determines the first image based on an image containing a pedestrian in at least one image, including: if an image containing a pedestrian contains multiple pedestrians, the first device crops the image containing multiple pedestrians to obtain multiple images containing one pedestrian, and the multiple images containing one pedestrian include the first image; if an image containing a pedestrian contains one pedestrian, the first device determines the image containing one pedestrian as the first image.

[0121] To better understand the technical solution of this application, the following example, using a backpack as an example, provides a description of how to determine the original image of the wearable object to be identified.

[0122] like Figure 3 The given pedestrian joints are 14: head node 1, neck node 2, left shoulder node 3, right shoulder node 4, left elbow node 5, right elbow node 6, left wrist node 7, right wrist node 8, left hip node 9, right hip node 10, left knee node 11, right knee node 12, left ankle node 13, and right ankle node 14. The first device acquires a monitoring image I captured by a camera; the first device establishes a planar coordinate system with the lower left corner of monitoring image I as the origin, where the extension of the line connecting the lower right corner of monitoring image I to the origin is the X-axis, and the extension of the line connecting the upper left corner of monitoring image I to the origin is the Y-axis; the monitoring image I is input into the pedestrian detection model, and it is found that a pedestrian exists in monitoring image I; for example... Figure 3 As shown, the first device extracts an image from surveillance image I that includes a pedestrian, i.e., includes... Figure 3 Images of 14 joints ( Figure 3 (The thick solid line in the image) yields the first image I. p The first device will display the first image I. p Inputting the pedestrian keypoint detection model, the coordinates of left shoulder node 3, right shoulder node 4, left hip node 9, and right hip node 10 are obtained as follows: and The first device sets the ordinate values ​​of the two shoulder nodes. and Calculate the average value to obtain the first value y. s The first device's ordinate values ​​for the two hip nodes and Calculate the average value to obtain the second value y. h ;like Figure 4 As shown, the first device, based on the first value y s and the first value y h In the first image, a rectangular region is cropped, that is, the area is cut off. Figure 4 The image marked with thick dashed lines in the image is used to obtain the original image I. b .

[0123] in, Indicates The bottom left corner point, with The first image I is obtained by cropping a rectangular area from the upper right corner of the monitoring image I. p . The width of the first image, i.e. Indicates (0, y) s () is the bottom left corner, with For the top right corner point of the first image I p The original image I was obtained by cropping a rectangular region. b .

[0124] Optionally, the attribute recognition model further includes a first batch normalization layer and a first activation layer. S110 includes: the first device inputs the first feature of the wearable object to be recognized into N convolutional kernels of the first convolutional layer for processing to obtain a ninth feature, the ninth feature having N channels; the first device inputs the ninth feature into the first batch normalization layer for normalization to obtain a tenth feature, the tenth feature having N channels; the first device inputs the tenth feature into the first activation layer for activation to obtain a second feature.

[0125] In the above scheme, since the input feature distributions of each layer in the attribute recognition model are different, batch normalization of the ninth feature transforms the output features of each layer into a normal distribution, thereby improving the feedback capability of the attribute recognition model. The first device activates the tenth feature and performs a nonlinear transformation on it, giving the attribute recognition model depth meaning, that is, enhancing the representation capability of the attribute recognition model.

[0126] Optionally, the first activation layer may be a rectified linear unit (ReLU) or a Gaussian error linear unit (GELU).

[0127] S120, the first device processes the second feature based on the second feature in the M convolutional kernels of the second convolutional layer of the attribute recognition model to obtain the third feature, the number of channels of the third feature is M; where M is a positive integer.

[0128] Optionally, the attribute recognition model further includes a second batch normalization layer and a second activation layer. S120 includes: the first device inputs the second feature into M convolutional kernels of the second convolutional layer for processing to obtain an eleventh feature, the number of channels of the eleventh feature being M; the first device inputs the eleventh feature into the second batch normalization layer for normalization to obtain a twelfth feature, the number of channels of the twelfth feature being M; the first device inputs the twelfth feature into the second activation layer for activation to obtain a third feature.

[0129] In the above scheme, since the input feature distributions of each layer in the attribute recognition model are different, batch normalization of the eleventh feature transforms the output features of each layer into a normal distribution, thereby improving the feedback capability of the attribute recognition model. The first device activates the twelfth feature and performs a nonlinear transformation on it, giving the attribute recognition model depth meaning, that is, enhancing the representation capability of the attribute recognition model.

[0130] It should be understood that the number of channels for the second feature is N, where N is a positive integer greater than 1. The specific process of processing the second feature with the M convolutional kernels of the second convolutional layer to obtain the third feature is similar to the second case where the first feature is used to obtain the second feature, and will not be repeated here.

[0131] The second batch normalization layer and the first batch normalization layer have the same specific processing procedures.

[0132] Optionally, the second activation layer may be the same as or different from the first activation layer.

[0133] For example, when the first activation layer is a ReLU layer, the second activation layer is also a ReLU layer.

[0134] For example, when the first activation layer is a ReLU layer, the second activation layer is a GELU layer.

[0135] Optionally, S120 includes: the first device performing dimensionality reduction processing based on the second feature to obtain the dimensionality-reduced second feature, wherein the number of channels of the dimensionality-reduced second feature is N; the first device processing the dimensionality-reduced second feature in M ​​convolutional kernels of the second convolutional layer of the attribute recognition model to obtain the third feature.

[0136] Optionally, the attribute recognition model further includes a fifth convolutional layer, a third batch normalization layer, and a third activation layer. The first device performs dimensionality reduction processing based on the second feature to obtain the dimensionality-reduced second feature, including: the first device inputs the second feature into R convolutional kernels of the fifth convolutional layer for processing to obtain the processed second feature, the number of channels of the processed second feature being R, and the length and width of the R convolutional kernels being 1; the first device inputs the processed second feature into the third batch normalization layer for normalization to obtain the normalized second feature, the number of channels of the normalized second feature being R; the first device activates the third activation layer with the normalized second feature to obtain the dimensionality-reduced second feature.

[0137] In the above scheme, the first device performs dimensionality reduction on the second feature, which involves convolving the second feature, batch normalizing the convolved feature, and activating the normalized feature. This reduces the size of local features and speeds up the device's feature processing. Furthermore, batch normalization and activation processing give the resulting attribute recognition model better feedback and representation capabilities.

[0138] S130, the first device splices the second feature and the third feature in the splicing layer of the attribute recognition model to obtain the fourth feature. The fourth feature has M+N channels and is used to determine the recognition result of the wearable object to be recognized.

[0139] Optionally, the splicing layer is a concat layer.

[0140] The process of obtaining the fourth feature based on the second and third features will be discussed in two cases below.

[0141] Case 1: The length of the second feature is different from the length of the third feature, and / or the width of the second feature is different from the width of the third feature.

[0142] Optionally, in S130, the first device compares the length of the second feature with the length of the third feature; if the length of the third feature is greater than the length of the second feature, then zero-padding is performed on the second feature in the length direction so that the length of the second feature is the same as the length of the third feature; if the width of the third feature is greater than the width of the second feature, then zero-padding is performed on the second feature in the width direction so that the width of the second feature is the same as the width of the third feature; the first device inputs the third feature and the zero-padding second feature into the splicing layer and splices them in the channel number direction to obtain the fourth feature.

[0143] It should be understood that the above only illustrates cases where the length and width of the third feature are relatively large. The cases where the length and / or width of the third feature are relatively large, as well as the cases where the length and width of the second feature are relatively large, are similar to those where the length and width of the third feature are relatively large. These will not be elaborated upon further here.

[0144] To better understand the technical solution of this application, the following example, taking case one, describes how the second feature and the third feature are combined to obtain the fourth feature.

[0145] like Figure 5 The second feature shown in Figure (a) has a length, width, and number of channels of 2, 2, and 3, respectively. The second feature has 3 channels, and the features on the three channels are feature e, feature f, and feature g. Feature e consists of elements 2, 3, 5, and 2; feature f consists of elements 4, 6, 9, and 1; and feature g consists of elements 6, 3, 4, and 5. Figure 5 The third feature shown in Figure (b) has a length, width, and number of channels of 2, 3, and 2, respectively. The third feature has 2 channels, and the features on the two channels are feature h and feature i, where feature h consists of elements 6, 3, 1, 2, 7, and 3; feature i consists of elements 2, 4, 1, 8, 4, and 9. The first device splices the second and third features in the channel direction to obtain the fourth feature as shown... Figure 5 As shown in Figure (c), from Figure 5 As shown in Figure (c), after padding features e, f, and g, which make up the second feature, with zeros in the width direction, the third feature is then spliced ​​with the zero-padded second feature on the channel to obtain the fourth feature.

[0146] Case 2: The length of the second feature is the same as the length of the third feature, and the width of the second feature is the same as the width of the third feature.

[0147] Optionally, S130 includes: the first device performing feature splicing of the third feature and the second feature into the splicing layer in the direction of the number of channels to obtain the fourth feature.

[0148] Optionally, the attribute recognition model further includes a second pooling layer. S130 includes: the first device inputs the second feature into the second pooling layer for pooling to obtain the pooled second feature, the number of channels of the pooled second feature being N; the first device inputs the third feature and the pooled second feature into a concatenation layer for concatenation to obtain the fourth feature.

[0149] In the above scheme, pooling the second feature can reduce the dimensionality of the obtained local feature (second feature), that is, reduce the size of the local feature, which can speed up the feature processing speed of the first device.

[0150] Optionally, the second pooling layer can be an average pooling layer, a max pooling layer, or a random pooling layer.

[0151] Optionally, the second pooling layer may be the same as or different from the first pooling layer.

[0152] For example, the first pooling layer is an average pooling layer, and the second pooling layer is also an average pooling layer.

[0153] For example, the first pooling layer is an average pooling layer, and the second pooling layer is a max pooling layer.

[0154] Optionally, the third feature can be the third feature in S120, or it can be the third feature obtained after processing with M convolutional kernels, batch normalization, and activation.

[0155] To better understand the technical solution of this application, such as Figure 6 A flowchart of a method for determining the fourth feature is provided.

[0156] S610, the first device inputs the first feature of the wearable object to be identified into the N convolution kernels of the first convolutional layer for processing to obtain the ninth feature.

[0157] S620, the first device inputs the ninth feature into the first batch normalization layer to obtain the tenth feature.

[0158] S630, the first device inputs the tenth feature into the first activation layer to obtain the second feature.

[0159] S640, the first device inputs the second feature into the M convolutional kernels of the second convolutional layer and processes them respectively to obtain the eleventh feature.

[0160] S650, the first device inputs the eleventh feature into the second batch normalization layer to obtain the twelfth feature.

[0161] S660, the first device inputs the twelfth feature into the second activation layer, and the third feature is the same.

[0162] S670 is the same as S130.

[0163] It should be understood that the neural network model is a deep learning-based model; therefore, the attribute recognition model implemented in this application based on deep learning can have more network layers. Optionally, the first device can also perform steps similar to S610-S670. This can increase the feature extraction capability of the attribute recognition model, making the model have more accurate recognition capabilities.

[0164] To better understand the technical solution of this application, such as Figure 7 A flowchart of another method for determining the fourth feature is given.

[0165] S710 is the same as S610.

[0166] S720 is the same as S620.

[0167] The S730 is the same as the S630.

[0168] S740, the first device inputs the second feature into the second pooling layer for pooling to obtain the pooled second feature.

[0169] S750, the first device inputs the pooled second feature into M convolutional kernels of the second convolutional layer for processing to obtain the eleventh feature, the number of channels of the eleventh feature being M.

[0170] The S760 is the same as the S650.

[0171] The S770 is the same as the S660.

[0172] In S780, the first device concatenates the pooled second feature with the third feature from S660 into the concatenation layer of the input attribute recognition model to obtain the fourth feature.

[0173] Optionally, the attribute recognition model further includes a third convolutional layer, a global pooling layer, and an attribute recognition layer. After S130, the method further includes: the first device processes the fourth feature using Q convolutional kernels in the third convolutional layer to obtain a fifth feature, the fifth feature having Q channels; the first device concatenates the second feature and the fifth feature into a concatenation layer to obtain a sixth feature, the sixth feature having Q+N channels; the first device inputs the sixth feature into a global pooling layer for global pooling to obtain a seventh feature, the seventh feature having Q+N channels; the first device inputs the seventh feature into the attribute recognition layer for recognition to obtain the recognition result of the wearable object to be recognized; where Q is a positive integer.

[0174] In the above scheme, the first device processes the fourth feature using Q convolutional kernels in the third convolutional layer to obtain the fifth feature; the first device concatenates the fifth feature and the second feature to obtain the sixth feature; the first device performs global pooling on the sixth feature to obtain the seventh feature; and the first device uses the seventh feature to identify the wearable object to be identified. This scheme can be understood as the specific implementation process of using the fourth feature in S130 to determine the identification result of the wearable object to be identified. Specifically, global pooling of the sixth feature can achieve feature dimensionality reduction and greatly reduce the parameters of the attribute recognition model; the seventh feature obtained after global pooling is input into the attribute recognition layer to obtain the classification of the wearable object's attributes.

[0175] Optionally, the global pooling layer can be either a global average pooling layer or a global max pooling layer.

[0176] Optionally, the attribute recognition layer can be a softmax layer.

[0177] It should be understood that the number of channels for the fourth feature is M+N, where M+N are both positive integers greater than 1, so the number of channels for the fourth feature is greater than 1. The specific process of processing the fourth feature with Q convolutional kernels in the third convolutional layer to obtain the fifth feature is similar to the second case where the first feature is used to obtain the second feature, and will not be repeated here.

[0178] Optionally, the attribute recognition model further includes a sixth convolutional layer. After the first device concatenates the second feature and the fifth feature into the concatenation layer to obtain the sixth feature, the method further includes: processing the sixth feature in W convolutional kernels of the sixth convolutional layer to obtain a thirteenth feature, the number of channels of the thirteenth feature being W; and the first device concatenates the second feature and the thirteenth feature in the concatenation layer to obtain a fourteenth feature, the number of channels of the fourteenth feature being W+N.

[0179] In the above scheme, the first device can further process the obtained fourteenth feature in the convolutional layer to obtain a new feature; the new feature is then concatenated with the second feature to obtain the concatenated feature. However, this processing method will make the features containing wearable object attributes weaker and weaker. Therefore, it is necessary to appropriately select the number of times the feature is processed in the convolutional layer and concatenated with the second feature (one process is to process the feature in the convolutional layer to obtain a new feature, and then concatenate the new feature with the second feature).

[0180] To better understand the technical solution of this application, Figure 8 A flowchart of a method for determining an attribute recognition model is provided.

[0181] like Figure 8As shown, the first feature input to the first convolutional layer can be a feature of the original image of the wearable object to be identified, or it can be the eighth feature obtained by passing the features of the original image of the wearable object to be identified through the fourth convolutional layer, and then the first feature obtained by passing the eighth feature through the first pooling layer. The scheme for the first convolutional layer to process the first feature to obtain the ninth feature is the same as in S710; the scheme for the first batch normalization layer to normalize the ninth feature to obtain the tenth feature is the same as in S720; the scheme for the first activation layer to activate the tenth feature to obtain the second feature is the same as in S730; the scheme for the second pooling layer to pool the second feature to obtain the pooled second feature is the same as in S740; the scheme for the second convolutional layer to process the pooled second feature to obtain the eleventh feature is the same as in S750; and the scheme for the second batch normalization layer to normalize the eleventh feature to obtain the twelfth feature is the same as in S760. The second activation layer activates the twelfth feature to obtain the third feature in the same way as S770; the concatenation layer concatenates the second and third features to obtain the fourth feature in the same way as S780; the third convolutional layer processes the fourth feature to obtain the fifth feature in the same way as processing the fourth feature separately in the Q convolutional kernels of the third convolutional layer to obtain the fifth feature; the concatenation layer concatenates the second and fifth features to obtain the sixth feature; the global pooling layer performs global pooling on the sixth feature to obtain the seventh feature; the attribute recognition layer recognizes the seventh feature to obtain the recognition result of the wearable object to be recognized.

[0182] To better understand the technical solution of this application, Figure 9 A flowchart of another method for determining the attribute recognition model is given.

[0183] like Figure 9 As shown, it is Figure 8Based on this, CBR4, the third pooling layer, CBR5, CBR6, CBR7, CBR8, and the fourth pooling layer are added. Specifically, CBR4 processes the sixth feature to obtain the thirteenth feature; the third pooling layer pools the thirteenth feature to obtain the pooled thirteenth feature; CBR5 processes the thirteenth feature to obtain the fourteenth feature; the concatenation layer concatenates the pooled thirteenth feature with the fourteenth feature to obtain the fifteenth feature; CBR6 processes the fifteenth feature to obtain the sixteenth feature; the concatenation layer concatenates the pooled thirteenth feature with the sixteenth feature to obtain the seventeenth feature; CBR7 processes the seventeenth feature to obtain the eighteenth feature; the concatenation layer concatenates the pooled thirteenth feature with the eighteenth feature to obtain the nineteenth feature; CBR7 processes the nineteenth feature to obtain the twentieth feature; the fourth pooling layer pools the twentieth feature to obtain the pooled twentieth feature; and the global pooling layer performs global pooling on the pooled twentieth feature to obtain the seventh feature. In other words, the attribute recognition model can further process the features of the wearable object through convolutional layers, and then concatenate the features obtained after convolution. This allows the attribute recognition model to include more network layers, improving its ability to extract features from the wearable object, thus leading to more accurate recognition results based on the extracted features. Specifically, CBR1 includes a first convolutional layer, a first batch normalization layer, and a first activation layer. CBR2 includes a second convolutional layer, a second batch normalization layer, and a second activation layer. CBR3 includes a third convolutional layer, a third batch normalization layer, and a third activation layer. CBR4 includes a sixth convolutional layer, a fourth batch normalization layer, and a fourth activation layer. CBR5 includes a seventh convolutional layer, a fifth batch normalization layer, and a fifth activation layer. CBR6 includes an eighth convolutional layer, a sixth batch normalization layer, and a sixth activation layer. CBR7 includes a ninth convolutional layer, a seventh batch normalization layer, and a seventh activation layer. CBR8 includes a tenth convolutional layer, an eighth batch normalization layer, and an eighth activation layer. Specifically, when the first feature is a feature of the original image of the wearable object to be identified, the first device can input the original image into CBR1 for processing. When the first feature is obtained by processing the features of the wearable object to be identified into the fourth convolutional layer to obtain the eighth feature, and then inputting the eighth feature into the first pooling layer for pooling, the first device can input the first feature into CBR5 for processing. The pooled features can be processed through two or three concatenation layers. The process from obtaining the sixth feature to obtaining the twentieth feature is similar to the scheme from obtaining the features of the original image to obtaining the sixth feature.

[0184] Figure 10 This is a schematic diagram of the structure of a device for identifying wearable object attributes provided in an embodiment of this application, as shown below. Figure 10 As shown, the apparatus provided in this embodiment includes:

[0185] The first determining unit 101 is used to process the first feature of the wearable object to be identified in N convolutional kernels of the first convolutional layer of the attribute recognition model to obtain the second feature, wherein the number of channels of the second feature is N.

[0186] The second determining unit 102 is also used to process the second feature in the M convolutional kernels of the second convolutional layer of the attribute recognition model to obtain the third feature, wherein the number of channels of the third feature is M.

[0187] The third determining unit 103 is also used to splice the second feature and the third feature in the splicing layer of the attribute recognition model to obtain the fourth feature. The number of channels of the fourth feature is M+N. The fourth feature is used to determine the recognition result of the wearable object to be recognized.

[0188] Where M and N are positive integers.

[0189] Optionally, the attribute recognition model further includes a third convolutional layer, a global pooling layer, and an attribute recognition layer. The device further includes: a fourth determining unit 104, used to process the fourth feature in the Q convolutional kernels of the third convolutional layer to obtain a fifth feature, the fifth feature having Q channels; to concatenate the second feature and the fifth feature into a concatenation layer to obtain a sixth feature, the sixth feature having Q+N channels; to input the sixth feature into a global pooling layer for global pooling to obtain a seventh feature, the seventh feature having Q+N channels; and to input the seventh feature into the attribute recognition layer for recognition to obtain the recognition result of the wearable object to be recognized; wherein, Q is a positive integer.

[0190] Optionally, the first feature is a feature of the original image of the wearable object to be identified.

[0191] Optionally, the device further includes: a fifth determining unit 105, used to input the features of the original image of the wearable object to be identified into the P convolutional kernels of the fourth convolutional layer of the attribute recognition model for processing to obtain an eighth feature, wherein the number of channels of the eighth feature is P; and input the eighth feature into the first pooling layer of the attribute recognition model for pooling to obtain a first feature; wherein P is a positive integer.

[0192] Optionally, the device further includes an acquisition unit 106 for acquiring a first image, the first image including a first pedestrian target.

[0193] Optionally, the device further includes: a sixth determining unit 107, used to input the first image into the pedestrian key point detection model, determine two shoulder nodes and two hip nodes of the first pedestrian target; and obtain the original image based on the two shoulder nodes and two hip nodes.

[0194] Optionally, the acquisition unit 106 is also used to acquire at least one captured image.

[0195] Optionally, the sixth determining unit 107 is further configured to input at least one image into the pedestrian detection model respectively, determine whether there is a pedestrian in at least one image; and determine a first image based on an image in which there is a pedestrian.

[0196] Optionally, the backpack identification result includes at least one of no backpack, backpack body, and backpack straps.

[0197] Optionally, the attribute recognition model further includes a first batch normalization layer and a first activation layer. The first determination unit 101 is specifically used to input the first feature of the wearable object to be identified into N convolutional kernels of the first convolutional layer for processing to obtain a ninth feature, the ninth feature having N channels; input the ninth feature into the first batch normalization layer for normalization to obtain a tenth feature, the tenth feature having N channels; and input the tenth feature into the first activation layer for activation to obtain a second feature.

[0198] Optionally, the attribute recognition model further includes a second batch normalization layer and a second activation layer. The second determination unit 102 is specifically used to process the second feature by inputting it into the M convolutional kernels of the second convolutional layer to obtain the eleventh feature, which has M channels; to input the eleventh feature into the second batch normalization layer for normalization to obtain the twelfth feature, which has M channels; and to input the twelfth feature into the second activation layer for activation to obtain the third feature.

[0199] Optionally, the attribute recognition model further includes a second pooling layer and a second determining unit 103, which is specifically used to input the second feature into the second pooling layer for pooling to obtain the pooled second feature, wherein the number of channels of the pooled second feature is N; and to input the third feature and the pooled second feature into the concatenation layer for concatenation to obtain the fourth feature.

[0200] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0201] Based on the same inventive concept Figure 11 The apparatus for identifying wearable object attributes provided in the embodiments of this application includes a processor coupled to a memory. When the processor executes a computer program or instructions stored in the memory, it implements the method of the first aspect or any embodiment of the first aspect described above.

[0202] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of the first aspect or any embodiment of the first aspect described above.

[0203] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a device. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer chip, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0204] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0205] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0206] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for identifying wearable object attributes, characterized in that, The method includes: The first feature of the wearable object to be identified is processed by N convolutional kernels in the first convolutional layer of the attribute recognition model to obtain the second feature, which has N channels; wherein, the second feature is a coarse-grained feature of the wearable object. Based on the second feature, the M convolutional kernels of the second convolutional layer of the attribute recognition model are processed respectively to obtain the third feature, wherein the number of channels of the third feature is M; wherein, the third feature is the fine-grained feature of the wearable object; The second feature and the third feature are spliced ​​together in the splicing layer of the attribute recognition model to obtain a fourth feature. The fourth feature has M+N channels and is used to determine the recognition result of the wearable object to be recognized. Where M and N are positive integers.

2. The method as described in claim 1, characterized in that, The attribute recognition model further includes a third convolutional layer, a global pooling layer, and an attribute recognition layer; the method further includes: The fourth feature is processed by Q convolutional kernels in the third convolutional layer to obtain the fifth feature, wherein the number of channels of the fifth feature is Q. The second feature and the fifth feature are input into the splicing layer and spliced ​​to obtain the sixth feature, which has Q+N channels. The sixth feature is input into the global pooling layer for global pooling to obtain the seventh feature, which has Q+N channels. The seventh feature is input into the attribute recognition layer for recognition, and the recognition result of the wearable object to be recognized is obtained; Where Q is a positive integer.

3. The method as described in claim 1, characterized in that, The first feature is a feature of the original image of the wearable object to be identified, or the method further includes: The features of the original image of the wearable object to be identified are input into the P convolutional kernels of the fourth convolutional layer of the attribute recognition model for processing to obtain the eighth feature, wherein the number of channels of the eighth feature is P. The eighth feature is input into the first pooling layer of the attribute recognition model for pooling to obtain the first feature; Where P is a positive integer.

4. The method as described in claim 3, characterized in that, The wearable object to be identified is a backpack, and the method further includes: Acquire a first image, the first image including a first pedestrian target; The first image is input into the pedestrian key point detection model to determine the two shoulder nodes and the two hip nodes of the first pedestrian target; The original image is obtained based on the two shoulder nodes and the two hip nodes.

5. The method as described in claim 4, characterized in that, The method further includes: Acquire at least one captured image; The at least one image is input into the pedestrian detection model to determine whether a pedestrian exists in the at least one image; The first image is determined based on an image in which a pedestrian is present.

6. The method as described in claim 4, characterized in that, The backpack identification result includes at least one of the following: no backpack, backpack body, and backpack straps.

7. The method as described in claim 1, characterized in that, The attribute recognition model further includes a first batch normalization layer and a first activation layer. The first feature based on the wearable object to be identified is processed by N convolutional kernels of the first convolutional layer of the attribute recognition model to obtain the second feature, including: The first feature of the wearable object to be identified is input into N convolutional kernels of the first convolutional layer for processing to obtain the ninth feature, wherein the number of channels of the ninth feature is N. The ninth feature is input into the first batch normalization layer for normalization to obtain the tenth feature, and the number of channels of the tenth feature is N; The tenth feature is input into the first activation layer for activation to obtain the second feature; And / or, The attribute recognition model further includes a second batch normalization layer and a second activation layer, wherein the third feature is obtained by processing the M convolutional kernels of the second convolutional layer of the attribute recognition model based on the second feature, including: The second feature is input into M convolutional kernels of the second convolutional layer for processing to obtain the eleventh feature, wherein the number of channels of the eleventh feature is M. The eleventh feature is input into the second batch normalization layer for normalization to obtain the twelfth feature, and the number of channels of the twelfth feature is M; The twelfth feature is input into the second activation layer for activation, thereby obtaining the third feature.

8. The method as described in claim 7, characterized in that, The attribute recognition model further includes a second pooling layer. After the tenth feature is input into the first activation layer for activation to obtain the second feature, the second feature and the third feature are concatenated in the concatenation layer of the attribute recognition model to obtain a fourth feature, including: The second feature is input into the second pooling layer for pooling to obtain the pooled second feature, wherein the number of channels of the pooled second feature is N; The third feature and the pooled second feature are input into the splicing layer for splicing to obtain the fourth feature.

9. A device for identifying the attributes of a wearable object, characterized in that, The device includes: The first determining unit is used to process the first feature of the wearable object to be identified in N convolutional kernels of the first convolutional layer of the attribute recognition model to obtain the second feature, wherein the second feature has N channels; wherein the second feature is a coarse-grained feature of the wearable object. The second determining unit is further configured to process the second feature based on the M convolution kernels of the second convolutional layer of the attribute recognition model to obtain a third feature, wherein the number of channels of the third feature is M; wherein the third feature is a fine-grained feature of the wearable object; The third determining unit is further configured to splice the second feature and the third feature in the splicing layer of the attribute recognition model to obtain a fourth feature, wherein the number of channels of the fourth feature is M+N, and the fourth feature is used to determine the recognition result of the wearable object to be recognized. Where M and N are positive integers.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.