Gait recognition method and device under unmanned aerial vehicle perspective, electronic equipment and medium

By combining gait recognition models from both horizontal and UAV perspectives and optimizing training with multiple loss values, the problem of low gait recognition accuracy from the UAV perspective was solved, achieving higher recognition accuracy and more reliable pedestrian tracking.

CN116994329BActive Publication Date: 2025-12-19BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310551757.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2025-12-19
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

From the perspective of drones, the accuracy of gait recognition is low, mainly because the target pedestrian is far away from the drone and the gait sequence is blurry when moving, and the lower body is obscured, resulting in insufficient information.

Method used

By combining a gait recognition model from a horizontal perspective with a gait recognition model from a UAV perspective, features are extracted using the trained first gait recognition model and a second gait recognition model is trained. Various loss value calculation methods are used to optimize the model and improve recognition accuracy.

Benefits of technology

It improves the accuracy of gait recognition from the perspective of drones, ensuring the accuracy and consistency of pedestrian recognition during the tracking process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116994329B_ABST
    Figure CN116994329B_ABST
Patent Text Reader

Abstract

The application provides a gait recognition method and device under the perspective of a UAV, electronic equipment and a medium, wherein the method comprises: inputting a first gait sequence of a target pedestrian under a horizontal perspective into a trained first gait recognition model to extract first gait features of the target pedestrian; inputting a second gait sequence of the same target pedestrian under the perspective of a UAV into a second gait recognition model to be trained to extract second gait features of the target pedestrian; calculating a first loss value of the second gait recognition model according to the first gait features and the second gait features, training the second gait recognition model using the first loss value, stopping training until the second gait recognition model meets a training stop condition, and obtaining a target gait recognition model after training; and the target gait recognition model is used to recognize gait features of a pedestrian to be recognized under the perspective of a UAV. Through the method, the accuracy of gait recognition under the perspective of a UAV can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of gait recognition, and in particular to a gait recognition method and device under the perspective of a UAV, an electronic device, and a medium. BACKGROUND

[0002] Gait recognition is a technology for identifying the identity of a pedestrian according to the walking manner of the pedestrian, and has wide applications in various fields such as crime prevention, forensic identification, and social security. The combination of gait recognition and UAV technology can more accurately identify and track target pedestrians. However, there are several challenges in gait recognition under the perspective of a UAV. First, because the distance between the target pedestrian and the UAV is relatively far, and both the UAV and the target pedestrian are in a moving state, the acquired gait sequence is relatively blurred, making it difficult to accurately identify. Second, under the perspective of a UAV, the lower body of the target pedestrian is often blocked, and only the gait features of the upper body of the target pedestrian can be acquired, which makes the acquired gait information very limited and difficult to accurately identify the target pedestrian. Therefore, the accuracy of gait recognition under the perspective of a UAV is currently low. SUMMARY

[0003] In view of this, the purpose of the present application is to provide a gait recognition method and device under the perspective of a UAV, an electronic device, and a medium, to improve the accuracy of gait recognition under the perspective of a UAV.

[0004] In a first aspect, the embodiments of the present application provide a gait recognition method under the perspective of a UAV, the method comprising:

[0005] inputting a first gait sequence of a target pedestrian under a horizontal perspective into a pre-trained first gait recognition model, extracting first gait features of the target pedestrian through the first gait recognition model, and inputting a second gait sequence of the same target pedestrian under the perspective of a UAV into a second gait recognition model to be trained, extracting second gait features of the target pedestrian through the second gait recognition model;

[0006] According to the first gait features and the second gait features, a first loss value of the second gait recognition model is calculated, the second gait recognition model is trained using the first loss value, and the training is stopped when the second gait recognition model meets a training cutoff condition, to obtain a target gait recognition model after training; the target gait recognition model is used to identify the gait features of a pedestrian to be identified under the perspective of a UAV.

[0007] In combination with the first aspect, the embodiments of the present application provide a first possible implementation manner of the first aspect, wherein the first loss value of the second gait recognition model is calculated according to the first gait features and the second gait features, comprising:

[0008] inputting the first gait feature into a first normalization layer to output a third gait feature, and inputting the second gait feature into a second normalization layer to output a fourth gait feature;

[0009] inputting the third gait feature into a convolution layer to output a fifth gait feature, and inputting the fourth gait feature into the convolution layer to output a sixth gait feature;

[0010] calculating a first loss value of the second gait recognition model using the fifth gait feature and the sixth gait feature.

[0011] With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the training the second gait recognition model using the first loss value comprises:

[0012] inputting the second gait feature into a third normalization layer to output a seventh gait feature, and using the seventh gait feature and an identity label of the target pedestrian to calculate a first triplet loss value;

[0013] inputting the seventh gait feature into a first full connection layer to output a classification result of the target pedestrian, and using the classification result and the identity label to calculate a first cross-entropy loss value;

[0014] performing weighted average calculation on the first loss value, the first triplet loss value and the first cross-entropy loss value to obtain a second loss value, and using the second loss value to train the second gait recognition model.

[0015] With reference to the first aspect, in a third possible implementation manner of the first aspect, before the inputting the first gait sequence of the target pedestrian in the horizontal view angle into the pre-trained first gait recognition model, the method further comprises:

[0016] inputting a sample gait sequence of a sample pedestrian in the horizontal view angle into an initial gait recognition model to be trained, and extracting a sample gait feature of the sample pedestrian by the initial gait recognition model;

[0017] inputting the sample gait feature into a fourth normalization layer to output a first sample gait feature, and using the first sample gait feature and a sample identity label of the sample pedestrian to calculate a second triplet loss value;

[0018] inputting the first sample gait feature into a second full connection layer to output a sample classification result of the sample pedestrian, and using the sample classification result and the sample identity label to calculate a second cross-entropy loss value;

[0019] perform weighted average calculation on the second triplet loss value and the second cross-entropy loss value to obtain a third loss value;

[0020] training the initial gait recognition model using the third loss value until the training of the initial gait recognition model is stopped when the initial gait recognition model meets a training stop condition, to obtain the first gait recognition model.

[0021] With reference to the first aspect, a fourth possible implementation of the first aspect is provided in the embodiments of the present application, and after the target gait recognition model is obtained, the method further includes:

[0022] In the process of tracking pedestrians, a plurality of continuous first gait images of a first to-be-identified pedestrian captured by a UAV are obtained to generate a third gait sequence of the first to-be-identified pedestrian from the UAV perspective according to the plurality of continuous first gait images, and a plurality of continuous second gait images of a second to-be-identified pedestrian captured by the UAV are obtained to generate a fourth gait sequence of the second to-be-identified pedestrian from the UAV perspective according to the plurality of continuous second gait images;

[0023] The third gait sequence is input into the target gait recognition model, and the eighth gait feature of the first to-be-identified pedestrian is extracted by the target gait recognition model; the fourth gait sequence is input into the target gait recognition model, and the ninth gait feature of the second to-be-identified pedestrian is extracted by the target gait recognition model;

[0024] It is judged whether the similarity between the eighth gait feature and the ninth gait feature is greater than a preset similarity; when the similarity is greater than the preset similarity, it indicates that the first to-be-identified pedestrian and the second to-be-identified pedestrian are the same pedestrian; when the similarity is not greater than the preset similarity, it indicates that the first to-be-identified pedestrian and the second to-be-identified pedestrian are different pedestrians.

[0025] With reference to the first possible implementation of the first aspect, a fifth possible implementation of the first aspect is provided in the embodiments of the present application, and the use of the fifth gait feature and the sixth gait feature to calculate the first loss value of the second gait recognition model includes:

[0026] The Euclidean distance between the fifth gait feature and the sixth gait feature is calculated, and the Euclidean distance is taken as the first loss value.

[0027] In a second aspect, the embodiments of the present application further provide a gait recognition device from the perspective of a UAV, and the device includes:

[0028] The first input module is configured to input a first gait sequence of a target pedestrian in a horizontal view into a pre-trained first gait recognition model, extract a first gait feature of the target pedestrian through the first gait recognition model, and input a second gait sequence of the same target pedestrian in a UAV view into a second gait recognition model to be trained, and extract a second gait feature of the target pedestrian through the second gait recognition model.

[0029] The first computing module is configured to calculate a first loss value of the second gait recognition model according to the first gait feature and the second gait feature, train the second gait recognition model using the first loss value until the second gait recognition model meets a training stop condition, and obtain a target gait recognition model after training is completed, wherein the target gait recognition model is configured to identify a gait feature of a pedestrian to be identified in a UAV view.

[0030] With reference to the second aspect, in a first possible implementation manner of the second aspect, in the process in which the first computing module is configured to calculate the first loss value of the second gait recognition model according to the first gait feature and the second gait feature, the first computing module is specifically configured to:

[0031] input the first gait feature into a first normalization layer to output a third gait feature, and input the second gait feature into a second normalization layer to output a fourth gait feature;

[0032] input the third gait feature into a convolution layer to output a fifth gait feature, and input the fourth gait feature into the convolution layer to output a sixth gait feature;

[0033] calculate the first loss value of the second gait recognition model using the fifth gait feature and the sixth gait feature.

[0034] With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, in the process in which the first computing module is configured to train the second gait recognition model using the first loss value, the first computing module is specifically configured to:

[0035] input the second gait feature into a third normalization layer to output a seventh gait feature, and calculate a first triplet loss value using the seventh gait feature and an identity label of the target pedestrian;

[0036] input the seventh gait feature into a first full connection layer to output a classification result of the target pedestrian, and calculate a first cross-entropy loss value using the classification result and the identity label;

[0037] The first loss value, the first triplet loss value and the first cross-entropy loss value are weighted and averaged to obtain a second loss value, so as to train the second gait recognition model by using the second loss value.

[0038] With reference to the second aspect, the third possible implementation manner of the second aspect is provided.

[0039] The second input module is configured to input a sample gait sequence of a sample pedestrian in a horizontal perspective into an initial gait recognition model to be trained before the first input module inputs a first gait sequence of a target pedestrian in the horizontal perspective into the pre-trained first gait recognition model, and extract a sample gait feature of the sample pedestrian by the initial gait recognition model.

[0040] The third input module is configured to input the sample gait feature into a fourth normalization layer to output a first sample gait feature, so as to calculate a second triplet loss value by using the first sample gait feature and a sample identity label of the sample pedestrian.

[0041] The fourth input module is configured to input the first sample gait feature into a second full connection layer to output a sample classification result of the sample pedestrian, so as to calculate a second cross-entropy loss value by using the sample classification result and the sample identity label.

[0042] The second calculation module is configured to perform weighted average calculation on the second triplet loss value and the second cross-entropy loss value to obtain a third loss value.

[0043] The training module is configured to train the initial gait recognition model by using the third loss value, and stop training when the initial gait recognition model meets a training stop condition, so as to obtain the first gait recognition model.

[0044] With reference to the second aspect, the fourth possible implementation manner of the second aspect is provided.

[0045] The acquisition module is configured to, after the first calculation module obtains the target gait recognition model trained, acquire a plurality of continuous first gait images of a first to-be-recognized pedestrian captured by a UAV in a process of pedestrian tracking, so as to generate a third gait sequence of the first to-be-recognized pedestrian in a UAV perspective according to the plurality of continuous first gait images, and acquire a plurality of continuous second gait images of a second to-be-recognized pedestrian captured by the UAV, so as to generate a fourth gait sequence of the second to-be-recognized pedestrian in the UAV perspective according to the plurality of continuous second gait images.

[0046] The fifth input module is configured to input the third gait sequence into the target gait recognition model, extract an eighth gait feature of the first to-be-recognized pedestrian by the target gait recognition model, and input the fourth gait sequence into the target gait recognition model, extract a ninth gait feature of the second to-be-recognized pedestrian by the target gait recognition model.

[0047] The judging module is configured to judge whether a similarity between the eighth gait feature and the ninth gait feature is greater than a preset similarity, and when the similarity is greater than the preset similarity, it is indicated that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are the same pedestrian, and when the similarity is not greater than the preset similarity, it is indicated that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are different pedestrians.

[0048] In a third aspect, an electronic device is provided, including a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps in any possible implementation manner of the first aspect.

[0049] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to perform the steps in any possible implementation manner of the first aspect.

[0050] The method, device, electronic device and medium provided by the embodiments of the present application can gradually make the second gait feature extracted by the second gait recognition model under the perspective of the unmanned aerial vehicle close to the first gait feature, thereby improving the accuracy of the gait feature recognition of the second gait recognition model under the perspective of the unmanned aerial vehicle.

[0051] In order to make the above objectives, characteristics and advantages of the present application more apparent, clear and easy to understand, the following preferred embodiments are specifically described below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0053] Figure 1 A flow chart of a gait recognition method under the perspective of a UAV provided by an embodiment of the present application is shown;

[0054] Figure 2 A schematic diagram of a process of calculating a first loss value provided by an embodiment of the present application is shown;

[0055] Figure 3 A schematic diagram of a process of training a second gait recognition model provided by an embodiment of the present application is shown;

[0056] Figure 4 A schematic diagram of a training process of a first gait recognition model provided by an embodiment of the present application is shown;

[0057] Figure 5 A structural schematic diagram of a gait recognition device under the perspective of a UAV provided by an embodiment of the present application is shown;

[0058] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of the present application.

[0060] In view of the problem that the gait recognition accuracy under the perspective of a UAV is low at present. Based on this, the embodiments of the present application provide a gait recognition method and device under the perspective of a UAV, an electronic device and a medium, to improve the accuracy of gait recognition under the perspective of a UAV, which will be described in the following embodiments.

[0061] Embodiment one:

[0062] To facilitate the understanding of the present embodiment, first of all, a gait recognition method under the perspective of a UAV disclosed by the present application is introduced in detail. Figure 1 The flow chart of the gait recognition method under the perspective of a UAV provided by the present application is shown, as shown in Figure 1 The steps S101-S102 are included.

[0063] S101: input the first gait sequence of the target pedestrian under the horizontal perspective into the first gait recognition model trained in advance, extract the first gait features of the target pedestrian through the first gait recognition model, and input the second gait sequence of the same target pedestrian under the perspective of a UAV into the second gait recognition model to be trained, and extract the second gait features of the target pedestrian through the second gait recognition model.

[0064] In this embodiment, the first gait sequence is generated by a plurality of continuous third gait images, and the third gait image is an image of the target pedestrian taken under the horizontal perspective. The perspective of a UAV is a top-down perspective, and the second gait sequence is generated by a plurality of continuous fourth gait images, and the fourth gait image is an image of the target pedestrian taken under the perspective of a UAV. The third gait image and the fourth gait image are taken at the same time.

[0065] S102: according to the first gait features and the second gait features, calculate the first loss value of the second gait recognition model, use the first loss value to train the second gait recognition model, stop training when the second gait recognition model meets the training stopping condition, and obtain the target gait recognition model after training; the target gait recognition model is used to identify the gait features of the pedestrian to be identified under the perspective of a UAV.

[0066] In this embodiment, after calculating the first loss value of the second gait recognition model, when the second gait recognition model does not meet the training stopping condition, the first loss value is used to train the learnable parameters in the second gait recognition model, and step S101 is continued to be executed until the training of the second gait recognition model is stopped when the training stopping condition is met, and the second gait recognition model that meets the training stopping condition is used as the target gait recognition model.

[0067] The training stopping condition can be that the first loss value converges to a certain extent, that is, the first loss value tends to be stable and no longer decreases.

[0068] In this embodiment, the first gait recognition model is trained using the gait sequences of pedestrians in a horizontal perspective, and the gait sequences of pedestrians in the horizontal perspective can contain more gait features of pedestrians, so the first gait recognition model has higher recognition accuracy when recognizing the gait features of pedestrians in the horizontal perspective. However, in the perspective of the UAV, the lower body of the pedestrian is blocked, and only the gait features of the upper body of the target pedestrian can be obtained, which makes the obtained gait information very limited. Therefore, if the second gait recognition model is trained only using the gait sequences in the perspective of the UAV, the recognition accuracy of the second gait recognition model will be low. Based on this, in this embodiment, the first gait recognition model is used to assist in training the second gait recognition model, so as to improve the accuracy of gait recognition of the second gait recognition model.

[0069] In a possible implementation, Figure 2 A schematic diagram of a process for calculating a first loss value provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, after the first gait sequence is input into the first gait recognition model to obtain the first gait feature, and the second gait sequence is input into the second gait recognition model to obtain the second gait feature, the first loss value of the second gait recognition model is calculated according to the first gait feature and the second gait feature in step S102. Specifically, the following steps can be performed: Figure 2

[0070] The first gait feature is input into a first normalization layer (LayerNorm) to output a third gait feature, and the second gait feature is input into a second normalization layer (LayerNorm) to output a fourth gait feature;

[0071] The third gait feature is input into a convolution layer (1x1Conv) to output a fifth gait feature, and the fourth gait feature is input into a convolution layer to output a sixth gait feature;

[0072] The first loss value of the second gait recognition model is calculated using the fifth gait feature and the sixth gait feature.

[0073] Specifically, the Euclidean distance between the fifth gait feature and the sixth gait feature can be calculated, and the Euclidean distance is taken as the first loss value.

[0074] In a possible implementation, Figure 3 A schematic diagram of a process for training the second gait recognition model provided by an embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, when the first loss value is used to train the second gait recognition model in step S102, the following steps can be performed: Figure 3

[0075] ​​The second gait feature is input into a third normalization layer (BNNeck) to output a seventh gait feature, so as to calculate a first triplet loss value by using the seventh gait feature and an identity label of the target pedestrian;

[0076] The seventh gait feature is input into a first full connection layer to output a classification result of the target pedestrian, so as to calculate a first cross-entropy loss value by using the classification result and the identity label;

[0077] The first loss value, the first triplet loss value and the first cross-entropy loss value are weighted and averaged to obtain a second loss value, and the second gait recognition model is trained by using the second loss value.

[0078] In this embodiment, the second gait feature is used to represent the identity of the target pedestrian predicted by the second gait recognition model, and therefore the seventh gait feature also represents the identity of the target pedestrian predicted by the second gait recognition model. The seventh gait feature and the identity label of the target pedestrian are input into a triplet loss function to calculate the first triplet loss value. The classification result of the target pedestrian is also used to represent the identity of the target pedestrian. The classification result and the identity label are input into a cross-entropy loss function to calculate the first cross-entropy loss value.

[0079] At this time, the training stop condition can be that the second loss value converges to a certain degree, that is, the second loss value tends to be stable and no longer decreases.

[0080] In this embodiment, by calculating a plurality of loss values of the second gait recognition model, the plurality of loss values (that is, the second loss value calculated from the plurality of loss values) are used to train the learnable parameters in the second gait recognition model, which is beneficial to improve the training efficiency of the second gait recognition model, and further improve the accuracy of gait feature recognition of the second gait recognition model.

[0081] In a possible implementation manner, Figure 4 A schematic diagram of a training process of a first gait recognition model provided by an embodiment of the present application is shown as follows: Figure 4 As described above, the first gait recognition model is trained in the following manner:

[0082] A sample gait sequence of a sample pedestrian in a horizontal view is input into an initial gait recognition model to be trained, and a sample gait feature of the sample pedestrian is extracted by the initial gait recognition model;

[0083] The sample gait feature is input into a fourth normalization layer (LayerNorm) to output a first sample gait feature, so as to calculate a second triplet loss value by using the first sample gait feature and a sample identity label of the sample pedestrian;

[0084] The first sample gait feature is input to a second fully connected layer, and a sample classification result of the sample pedestrian is output, so as to calculate a second cross-entropy loss value by using the sample classification result and a sample identity label;

[0085] The second triplet loss value and the second cross-entropy loss value are weighted and averaged to obtain a third loss value.

[0086] The initial gait recognition model is trained by using the third loss value, and the training is stopped when the initial gait recognition model meets a training stop condition, to obtain a first gait recognition model.

[0087] In this embodiment, the training stop condition is that the third loss value converges to a certain degree, that is, the third loss value tends to be stable and does not decrease any more.

[0088] In a possible implementation, after obtaining the target gait recognition model after the training is completed, the following steps can also be performed:

[0089] In the process of pedestrian tracking, a plurality of continuous first gait images of a first to-be-recognized pedestrian photographed by the unmanned aerial vehicle are obtained, so as to generate a third gait sequence of the first to-be-recognized pedestrian from the unmanned aerial vehicle perspective according to the plurality of continuous first gait images; and a plurality of continuous second gait images of a second to-be-recognized pedestrian photographed by the unmanned aerial vehicle are obtained, so as to generate a fourth gait sequence of the second to-be-recognized pedestrian from the unmanned aerial vehicle perspective according to the plurality of continuous second gait images.

[0090] The third gait sequence is input into the target gait recognition model, and an eighth gait feature of the first to-be-recognized pedestrian is extracted by the target gait recognition model; the fourth gait sequence is input into the target gait recognition model, and a ninth gait feature of the second to-be-recognized pedestrian is extracted by the target gait recognition model.

[0091] It is judged whether the similarity between the eighth gait feature and the ninth gait feature is greater than a preset similarity; when the similarity is greater than the preset similarity, it indicates that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are the same pedestrian; and when the similarity is not greater than the preset similarity, it indicates that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are different pedestrians.

[0092] In this embodiment, the first gait image and the second gait image photographed by the unmanned aerial vehicle in the flight process are both images from a top-down perspective.

[0093] In this embodiment, whether the two pedestrians are the same pedestrian is identified, so as to ensure that the pedestrian tracked in the process of pedestrian tracking is the same pedestrian.

[0094] Embodiment Two:

[0095] Based on the same technical concept, the present application also provides a gait recognition device from the perspective of an unmanned aerial vehicle, Figure 5A structural schematic diagram of a gait recognition device under a UAV visual angle is shown, and the device comprises: Figure 5

[0096] A first input module 501 is configured to input a first gait sequence of a target pedestrian under a horizontal visual angle into a pre-trained first gait recognition model, extract a first gait feature of the target pedestrian through the first gait recognition model, and input a second gait sequence of the same target pedestrian under a UAV visual angle into a second gait recognition model to be trained, and extract a second gait feature of the target pedestrian through the second gait recognition model.

[0097] A first calculation module 502 is configured to calculate a first loss value of the second gait recognition model according to the first gait feature and the second gait feature, train the second gait recognition model using the first loss value, stop training when the second gait recognition model meets a training cutoff condition, and obtain a target gait recognition model after training is completed; the target gait recognition model is used to identify a gait feature of a pedestrian to be identified under a UAV visual angle.

[0098] Optionally, when the first calculation module 502 is configured to calculate the first loss value of the second gait recognition model according to the first gait feature and the second gait feature, it is specifically configured to:

[0099] input the first gait feature into a first normalization layer to output a third gait feature, and input the second gait feature into a second normalization layer to output a fourth gait feature;

[0100] input the third gait feature into a convolution layer to output a fifth gait feature, and input the fourth gait feature into the convolution layer to output a sixth gait feature;

[0101] calculate the first loss value of the second gait recognition model using the fifth gait feature and the sixth gait feature.

[0102] Optionally, when the first calculation module 502 is configured to train the second gait recognition model using the first loss value, it is specifically configured to:

[0103] input the second gait feature into a third normalization layer to output a seventh gait feature, and calculate a first triplet loss value using the seventh gait feature and an identity label of the target pedestrian;

[0104] input the seventh gait feature into a first full connection layer to output a classification result of the target pedestrian, and calculate a first cross-entropy loss value using the classification result and the identity label;

[0105] ​The first loss value, the first triplet loss value and the first cross-entropy loss value are weighted and averaged to obtain a second loss value, so as to train the second gait recognition model using the second loss value.

[0106] Optionally, the method further comprises:

[0107] The second input module is configured to input a sample gait sequence of a sample pedestrian in a horizontal perspective into an initial gait recognition model to be trained before the first input module 501 inputs a first gait sequence of a target pedestrian in the horizontal perspective into the pre-trained first gait recognition model, and the sample gait feature of the sample pedestrian is extracted by the initial gait recognition model;

[0108] The third input module is configured to input the sample gait feature into a fourth normalization layer to output a first sample gait feature, so as to calculate a second triplet loss value using the first sample gait feature and a sample identity label of the sample pedestrian.

[0109] The fourth input module is configured to input the first sample gait feature into a second full connection layer to output a sample classification result of the sample pedestrian, so as to calculate a second cross-entropy loss value using the sample classification result and the sample identity label.

[0110] The second calculation module is configured to perform weighted average calculation on the second triplet loss value and the second cross-entropy loss value to obtain the third loss value.

[0111] The training module is configured to train the initial gait recognition model using the third loss value until the training of the initial gait recognition model is stopped when the initial gait recognition model meets a training stop condition, so as to obtain the first gait recognition model.

[0112] Optionally, the method further comprises:

[0113] The acquisition module is configured to, after the first calculation module 502 obtains the target gait recognition model trained, in a process of pedestrian tracking, acquire a plurality of continuous first gait images of a first to-be-recognized pedestrian captured by a UAV, so as to generate a third gait sequence of the first to-be-recognized pedestrian in a UAV perspective according to the plurality of continuous first gait images, and acquire a plurality of continuous second gait images of a second to-be-recognized pedestrian captured by the UAV, so as to generate a fourth gait sequence of the second to-be-recognized pedestrian in the UAV perspective according to the plurality of continuous second gait images.

[0114] The fifth input module is configured to input the third gait sequence into the target gait recognition model, extract an eighth gait feature of the first to-be-recognized pedestrian by the target gait recognition model, and input the fourth gait sequence into the target gait recognition model, extract a ninth gait feature of the second to-be-recognized pedestrian by the target gait recognition model.

[0115] The judging module is configured to judge whether a similarity between the eighth gait feature and the ninth gait feature is greater than a preset similarity, and when the similarity is greater than the preset similarity, it is indicated that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are the same pedestrian, and when the similarity is not greater than the preset similarity, it is indicated that the first to-be-recognized pedestrian and the second to-be-recognized pedestrian are different pedestrians.

[0116] Embodiment three:

[0117] Figure 6 A structural schematic diagram of an electronic device provided in the embodiment of the application includes a processor 601, a memory 602 and a bus 603. The memory 602 stores machine readable instructions executable by the processor 601. When the electronic device runs the information processing method described above, the processor 601 and the memory 602 communicate through the bus 603. The processor 601 executes the machine readable instructions to perform the method steps described in embodiment one.

[0118] Embodiment four:

[0119] The embodiment four of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is run by a processor, the method steps described in embodiment one are executed.

[0120] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the apparatus, the electronic device and the computer readable storage medium described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.

[0121] In the several embodiments provided in the application, it should be understood that the disclosed apparatus and method can be implemented by other manners. The apparatus embodiments described above are merely schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some communication interfaces, apparatuses or units, which can be electrical, mechanical or other forms.

[0122] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0123] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0124] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0125] Finally, it should be noted that: the above-described embodiments are merely specific embodiments of the present application, used to illustrate the technical solutions of the present application, and not to limit them, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: any skilled person in the art within the technical range disclosed by the present application, they can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and all should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A gait recognition method under a drone perspective, characterized in that, The method comprises: inputting a first gait sequence of a target pedestrian under a horizontal perspective into a pre-trained first gait recognition model, extracting a first gait feature of the target pedestrian through the first gait recognition model, and inputting a second gait sequence of the same target pedestrian under a UAV perspective into a second gait recognition model to be trained, and extracting a second gait feature of the target pedestrian through the second gait recognition model; calculating a first loss value of the second gait recognition model according to the first gait feature and the second gait feature, training the second gait recognition model using the first loss value until the second gait recognition model meets a training stop condition, and obtaining a target gait recognition model after training is completed; the target gait recognition model is used to identify a gait feature of a pedestrian to be identified under a UAV perspective; the calculating a first loss value of the second gait recognition model according to the first gait feature and the second gait feature comprises: inputting the first gait feature into a first normalization layer to output a third gait feature, and inputting the second gait feature into a second normalization layer to output a fourth gait feature; inputting the third gait feature into a convolution layer to output a fifth gait feature, and inputting the fourth gait feature into the convolution layer to output a sixth gait feature; calculating the first loss value of the second gait recognition model using the fifth gait feature and the sixth gait feature; training the second gait recognition model using the first loss value comprises: inputting the second gait feature into a third normalization layer to output a seventh gait feature, and calculating a first triplet loss value using the seventh gait feature and an identity label of the target pedestrian; inputting the seventh gait feature into a first full connection layer to output a classification result of the target pedestrian, and calculating a first cross-entropy loss value using the classification result and the identity label; performing weighted average calculation on the first loss value, the first triplet loss value and the first cross-entropy loss value to obtain a second loss value, and training the second gait recognition model using the second loss value.

2. The method of claim 1, wherein, Before the inputting a first gait sequence of a target pedestrian under a horizontal perspective into a pre-trained first gait recognition model, the method further comprises: inputting a sample gait sequence of a sample pedestrian under a horizontal perspective into an initial gait recognition model to be trained, and extracting a sample gait feature of the sample pedestrian through the initial gait recognition model; inputting the sample gait feature into a fourth normalization layer to output a first sample gait feature, and calculating a second triplet loss value using the first sample gait feature and a sample identity label of the sample pedestrian; inputting the first sample gait feature into a second full connection layer to output a sample classification result of the sample pedestrian, and calculating a second cross-entropy loss value using the sample classification result and the sample identity label; performing weighted average calculation on the second triplet loss value and the second cross-entropy loss value to obtain a third loss value; The initial gait recognition model is trained using the third loss value until the training of the initial gait recognition model is stopped when the initial gait recognition model meets a training stop condition, and the first gait recognition model is obtained.

3. The method of claim 1, wherein, After obtaining the target gait recognition model trained, the method further comprises: In the process of tracking pedestrians, a plurality of continuous first gait images of a first to-be-identified pedestrian photographed by a UAV are acquired to generate a third gait sequence of the first to-be-identified pedestrian from the perspective of the UAV according to the plurality of continuous first gait images, and a plurality of continuous second gait images of a second to-be-identified pedestrian photographed by the UAV are acquired to generate a fourth gait sequence of the second to-be-identified pedestrian from the perspective of the UAV according to the plurality of continuous second gait images; The third gait sequence is input into the target gait recognition model to extract an eighth gait feature of the first to-be-identified pedestrian by the target gait recognition model, and the fourth gait sequence is input into the target gait recognition model to extract a ninth gait feature of the second to-be-identified pedestrian by the target gait recognition model; It is judged whether a similarity between the eighth gait feature and the ninth gait feature is greater than a preset similarity; when the similarity is greater than the preset similarity, it is indicated that the first to-be-identified pedestrian and the second to-be-identified pedestrian are the same pedestrian; and when the similarity is not greater than the preset similarity, it is indicated that the first to-be-identified pedestrian and the second to-be-identified pedestrian are different pedestrians.

4. The method of claim 1, wherein, The first loss value of the second gait recognition model is calculated using the fifth gait feature and the sixth gait feature, comprising: The Euclidean distance between the fifth gait feature and the sixth gait feature is calculated, and the Euclidean distance is taken as the first loss value.

5. A gait recognition device under the perspective of a drone, characterized by, The device comprises: The first input module is configured to input a first gait sequence of a target pedestrian from a horizontal perspective into a pre-trained first gait recognition model to extract a first gait feature of the target pedestrian by the first gait recognition model, and input a second gait sequence of the same target pedestrian from the perspective of a UAV into a to-be-trained second gait recognition model to extract a second gait feature of the target pedestrian by the second gait recognition model; The first calculation module is configured to calculate a first loss value of the second gait recognition model according to the first gait feature and the second gait feature, train the second gait recognition model using the first loss value, stop training when the second gait recognition model meets a training stop condition, and obtain a target gait recognition model trained; the target gait recognition model is used to identify gait features of a to-be-identified pedestrian from the perspective of the UAV; When the first calculation module is configured to calculate the first loss value of the second gait recognition model according to the first gait feature and the second gait feature, the first calculation module is specifically configured to: The first gait feature is input into a first normalization layer to output a third gait feature, and the second gait feature is input into a second normalization layer to output a fourth gait feature; inputting the third gait feature into a convolution layer to output a fifth gait feature, and inputting the fourth gait feature into the convolution layer to output a sixth gait feature; calculating a first loss value of the second gait recognition model using the fifth gait feature and the sixth gait feature; when the first calculation module is used for training the second gait recognition model using the first loss value, it is specifically used for: inputting the second gait feature into a third normalization layer to output a seventh gait feature, and using the seventh gait feature and an identity label of the target pedestrian to calculate a first triplet loss value; inputting the seventh gait feature into a first full connection layer to output a classification result of the target pedestrian, and using the classification result and the identity label to calculate a first cross-entropy loss value; performing weighted average calculation on the first loss value, the first triplet loss value and the first cross-entropy loss value to obtain a second loss value, and using the second loss value to train the second gait recognition model.

6. An electronic device, comprising: comprise: a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the steps of the method in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the method in any one of claims 1 to 4.