Training Method, Device, Electronic Device and Storage Medium for Gait Recognition Model

By calculating the group pairing and loss value of the standard and noise feature sets, the problem of the impact of noise data in the gait recognition model is solved, the accuracy of the model and the accuracy of feature extraction are improved, and the identity discrimination ability is enhanced.

CN116543464BActive Publication Date: 2025-08-05BEIJING NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310545157.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2025-08-05
Estimated Expiration
2043-05-15

AI Technical Summary

Technical Problem

During the training process of the existing gait recognition model, due to the influence of noise data caused by changes in pedestrian dress, it is difficult to accurately cluster the gait sequence of the same pedestrian, resulting in inaccurate identity label allocation and affecting the accuracy of the model.

Method used

By grouping the standard and noise feature sets, reliable and non-reliable gait feature pairs are determined, triple loss values, difficult sample mining comparison loss values, and adaptive migration loss values are calculated, and feature extractors are trained to improve the accuracy of feature extraction.

Benefits of technology

Effectively reduce the impact of noise data on model training, improve the accuracy of gait recognition model and feature extraction, and enhance the identity discrimination ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543464B_ABST
    Figure CN116543464B_ABST
Patent Text Reader

Abstract

The present application provides a training method, device, electronic device, and storage medium for a gait recognition model, wherein the method includes: pairing gait features in a standard feature set and a noise feature set to obtain multiple gait feature pairs; determining whether a gait feature pair is a reliable gait feature pair or an unreliable gait feature pair; determining a first triplet of gait features from the reliable gait feature pairs, and using three gait features in the first triplet of gait features to calculate a triplet loss value and a hard-to-distinguish sample mining contrast loss value; determining a second triplet of gait features from the unreliable gait feature pairs, and using three gait features in the second triplet of gait features to calculate an adaptive transfer loss value; and using the triplet loss value, the hard-to-distinguish sample mining contrast loss value, and the adaptive transfer loss value to train learnable parameters in a feature extractor. In this way, the accuracy of feature extraction by the feature extractor is 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 training method, device, electronic device, and storage medium for a gait recognition model. Background Art

[0002] Gait recognition can distinguish target identities at long distances and has enormous application value in real-life production. However, when collecting gait sequences (i.e., training samples) for training gait recognition models, multiple cameras are typically installed at the collection site, resulting in multiple gait sequences being collected for a single pedestrian. Furthermore, to enable the gait recognition model to better extract gait features, each pedestrian can be asked to change clothes multiple times when collecting training samples, collecting gait sequences for each pedestrian in different attire. However, when a pedestrian's attire changes, the gait sequences corresponding to the same pedestrian may be collected in different attire. Therefore, when performing person re-identification (i.e., clustering gait sequences for the same pedestrian), it is difficult to cluster gait sequences for the same pedestrian in different attire. Clustering all gait sequences corresponding to the same pedestrian is done to assign a corresponding pedestrian identity label to these gait sequences. If the gait sequences of the same pedestrian under different attire are clustered into multiple categories (for example, each attire is a category), then each gait sequence corresponding to the same pedestrian will be assigned a different pedestrian identity label, resulting in different identity labels for the same pedestrian under different attire, that is, the pedestrian identity label assignment of the gait sequence is inaccurate. This will introduce noisy training data into the training of the gait recognition model (noisy training data means that the pedestrian identity labels of some gait sequences are inaccurate). Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a training method, device, electronic device and storage medium for a gait recognition model to reduce the impact of noisy training data on the training of the gait recognition model and improve the accuracy of the gait recognition model.

[0004] In a first aspect, an embodiment of the present application provides a method for training a gait recognition model, comprising:

[0005] Gait features in the standard feature set and the noise feature set are paired to obtain multiple gait feature pairs; wherein the gait features of the same pedestrian sample in different attire in the standard feature set correspond to the same identity label; the gait features of the same pedestrian sample in different attire in the noise feature set correspond to respective identity labels; the gait features are extracted from the gait sequence by a feature extractor to be trained;

[0006] For each of the gait feature pairs, determining whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect;

[0007] Determining a first triplet of gait features from the reliable gait feature pairs, and calculating a triplet loss value and a hard-to-define sample mining contrast loss value using three gait features in the first triplet of gait features; the first triplet of gait features includes two gait features of the same sample pedestrian in different attire, and a gait feature of another sample pedestrian;

[0008] Determining a second triplet of gait features from the unreliable gait feature pair, and calculating an adaptive transfer loss value using three gait features in the second triplet of gait features; the second triplet of gait features includes two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian;

[0009] The learnable parameters in the feature extractor are trained using the triplet loss value, the hard sample mining contrast loss value, and the adaptive migration loss value.

[0010] In combination with the first aspect, an embodiment of the present application provides a first possible implementation of the first aspect, wherein, for each gait feature pair, determining whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature set to which the two gait features in the gait feature pair belong and the corresponding identity tags includes:

[0011] For each gait feature pair, when both gait features in the gait feature pair are from the standard feature set, the gait feature pair is regarded as a reliable gait feature pair;

[0012] When both gait features in the gait feature pair are from the noise feature set, determining whether the two gait features correspond to the same identity tag; when the two gait features correspond to the same identity tag, determining the gait feature pair as a reliable gait feature pair; when the two gait features correspond to different identity tags, determining the gait feature pair as an unreliable gait feature pair;

[0013] When the two gait features in the gait feature pair come from different feature sets, it is determined whether the two gait features in the gait feature pair correspond to the same identity tag. When the two gait features correspond to the same identity tag, the gait feature pair is determined to be a reliable feature pair.

[0014] In combination with the first aspect, the embodiment of the present application provides a second possible implementation of the first aspect, wherein each of the gait features includes features corresponding to each body part; and calculating the triplet loss value using three gait features in the first triplet of gait features includes:

[0015] The triplet loss value corresponding to the first triplet gait feature is calculated by the following formula:

[0016]

[0017] in, represents the triplet loss value corresponding to the kth human body part, i and j are two gait features of the same sample pedestrian in different clothes in the first triplet gait feature, h is the gait feature of another sample pedestrian in the first triplet gait feature, m tp is the preset parameter, P i k represents the feature corresponding to the kth human body part in gait feature i, P j k represents the feature corresponding to the kth human body part in gait feature j, represents the feature corresponding to the kth human body part in the gait feature h, D() represents the Euclidean distance, [] + represents [w] + =max(0,w); Indicates a training round The number of the first triplet of gait features not equal to 0;

[0018]

[0019] Among them, K means that there are K human body parts in total, L tp Represents the triplet loss value corresponding to the first triplet gait feature.

[0020] In combination with the second possible implementation of the first aspect, the embodiment of the present application provides a third possible implementation of the first aspect, wherein the using three gait features in the first triplet of gait features to calculate the contrast loss value for hard-to-separate sample mining includes:

[0021] The contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature is calculated by the following formula:

[0022]

[0023] Among them, L hc represents the contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature, g iis the feature output after inputting gait feature i into the batch normalization layer, g j is the feature output after inputting gait feature j into the batch normalization layer, g h is the feature output after inputting the gait feature h into the batch normalization layer, τ is a constant, g i g j g j and g j The cosine similarity between i g h g j and g h The cosine similarity between s Indicates the total number of gait features used in one training round.

[0024] In combination with the second possible implementation of the first aspect, the embodiment of the present application provides a fourth possible implementation of the first aspect, wherein the using three gait features in the second triplet of gait features to calculate the adaptive transfer loss value includes:

[0025] The adaptive transfer loss value corresponding to the second triplet gait feature is calculated by the following formula:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031]

[0032]

[0033]

[0034]

[0035]

[0036]

[0037] Among them, L at represents the adaptive transfer loss value corresponding to the second triplet gait feature; x and y are two gait features of the same sample pedestrian in different clothing in the second triplet gait feature, and z is the gait feature of another sample pedestrian in the second triplet gait feature; represents the feature corresponding to the kth human body part in the gait feature x, represents the feature corresponding to the kth human body part in the gait feature y, represents the feature corresponding to the kth human body part in the gait feature z; D() represents the Euclidean distance, [] + represents [w] + =max(0,w);s xy represents the similarity between gait feature x and gait feature y, s xz represents the similarity between gait feature x and gait feature z; Indicates a training round Not equal to 0 and s xy the number of second triplet gait features within the first preset range;

[0038] Represents x pos The feature corresponding to the kth human body part, x pos are the gait features of the same sample pedestrian as the gait feature x, express With each The largest Euclidean distance among the Euclidean distances between them; represents y pos The feature corresponding to the kth human body part, y pos are the gait features of the same sample pedestrian as the gait feature y, express With each The largest Euclidean distance among the Euclidean distances between them;

[0039] Represents x neg The feature corresponding to the kth human body part, x neg are the gait features of different sample pedestrians from the gait feature x, express With each The smallest Euclidean distance among the Euclidean distances between them; represents z neg The feature corresponding to the kth human body part, z neg are the gait features of different sample pedestrians belonging to the gait feature z, express With each The smallest Euclidean distance between them.

[0040] In combination with the first aspect, an embodiment of the present application provides a fifth possible implementation of the first aspect, wherein the using the triplet loss value, the hard-to-separate sample mining contrast loss value, and the adaptive migration loss value to train the learnable parameters in the feature extractor includes:

[0041] A target loss value is calculated based on the triplet loss value, the hard-to-distinguish sample mining contrast loss value, the adaptive migration loss value, and the weight assigned to each loss value, so as to train the learnable parameters in the feature extractor using the target loss value.

[0042] In combination with the first aspect, the embodiment of the present application provides a sixth possible implementation of the first aspect, wherein, before pairing the gait features in the standard feature set and the noise feature set to obtain multiple gait feature pairs, the method further includes:

[0043] The gait sequences in the standard sequence set and the noise sequence set are input into the feature extractor to be trained, and the gait features corresponding to each gait sequence are output, so that the gait features corresponding to the gait sequences in the standard sequence set are stored in the standard feature set, and the gait features corresponding to the gait sequences in the noise sequence set are stored in the noise feature set; the gait sequences of the same sample pedestrian in different attire in the standard sequence set correspond to the same identity label; the gait sequences of the same sample pedestrian in different attire in the noise sequence set correspond to respective identity labels.

[0044] In a second aspect, an embodiment of the present application further provides a training device for a gait recognition model, comprising:

[0045] a pairing module for pairing gait features in a standard feature set and a noise feature set to obtain a plurality of gait feature pairs; wherein the gait features of the same pedestrian sample in different attire in the standard feature set correspond to the same identity label; and the gait features of the same pedestrian sample in different attire in the noise feature set correspond to respective identity labels; and the gait features are extracted from the gait sequence by a feature extractor to be trained;

[0046] a first determination module for determining, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect;

[0047] a second determination module, configured to determine a first triplet of gait features from the reliable gait feature pairs, and calculate a triplet loss value and a hard-to-distinguish sample mining contrast loss value using three gait features in the first triplet of gait features; the first triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian;

[0048] a third determining module, configured to determine a second triplet of gait features from the unreliable gait feature pair, and calculate an adaptive transfer loss value using three gait features in the second triplet of gait features; the second triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian;

[0049] A training module is used to train the learnable parameters in the feature extractor using the triple loss value, the hard-to-distinguish sample mining contrast loss value and the adaptive migration loss value.

[0050] In conjunction with the second aspect, an embodiment of the present application provides a first possible implementation of the second aspect, wherein the first determination module, when used to determine, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature set to which the two gait features in the gait feature pair belong and the corresponding identity tags, is specifically used to:

[0051] For each gait feature pair, when both gait features in the gait feature pair are from the standard feature set, the gait feature pair is regarded as a reliable gait feature pair;

[0052] When both gait features in the gait feature pair are from the noise feature set, determining whether the two gait features correspond to the same identity tag; when the two gait features correspond to the same identity tag, determining the gait feature pair as a reliable gait feature pair; when the two gait features correspond to different identity tags, determining the gait feature pair as an unreliable gait feature pair;

[0053] When the two gait features in the gait feature pair come from different feature sets, it is determined whether the two gait features in the gait feature pair correspond to the same identity tag. When the two gait features correspond to the same identity tag, the gait feature pair is determined to be a reliable feature pair.

[0054] In conjunction with the second aspect, an embodiment of the present application provides a second possible implementation of the second aspect, wherein each of the gait features includes features corresponding to each body part; and when the second determination module is used to calculate the triplet loss value using the three gait features in the first triplet gait feature, it is specifically used to:

[0055] The triplet loss value corresponding to the first triplet gait feature is calculated by the following formula:

[0056]

[0057] in, represents the triplet loss value corresponding to the kth human body part, i and j are two gait features of the same sample pedestrian in different clothes in the first triplet gait feature, h is the gait feature of another sample pedestrian in the first triplet gait feature, m tp is the preset parameter, P i k represents the feature corresponding to the kth human body part in gait feature i, P j k represents the feature corresponding to the kth human body part in gait feature j, represents the feature corresponding to the kth human body part in the gait feature h, D() represents the Euclidean distance, [] + represents [w] + =max(0,w); Indicates a training round The number of the first triplet of gait features not equal to 0;

[0058]

[0059] Among them, K means that there are K human body parts in total, L tp Represents the triplet loss value corresponding to the first triplet gait feature.

[0060] In combination with the second possible implementation of the second aspect, an embodiment of the present application provides a third possible implementation of the second aspect, wherein the second determination module, when used to calculate the contrast loss value for hard-to-separate sample mining using the three gait features in the first triplet of gait features, is specifically used to:

[0061] The contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature is calculated by the following formula:

[0062]

[0063] Among them, L hc represents the contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature, g i is the feature output after inputting gait feature i into the batch normalization layer, g j is the feature output after inputting gait feature j into the batch normalization layer, g h is the feature output after inputting the gait feature h into the batch normalization layer, τ is a constant, gi g j g j and g j The cosine similarity between i g h g j and g h The cosine similarity between s Indicates the total number of gait features used in one training round.

[0064] In combination with the second possible implementation of the second aspect, an embodiment of the present application provides a fourth possible implementation of the second aspect, wherein the third determination module, when used to calculate the adaptive transfer loss value using the three gait features in the second triplet of gait features, is specifically configured to:

[0065] The adaptive transfer loss value corresponding to the second triplet gait feature is calculated by the following formula:

[0066]

[0067]

[0068]

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075]

[0076]

[0077] Among them, L at represents the adaptive transfer loss value corresponding to the second triplet gait feature; x and y are two gait features of the same sample pedestrian in different clothing in the second triplet gait feature, and z is the gait feature of another sample pedestrian in the second triplet gait feature; represents the feature corresponding to the kth human body part in the gait feature x, represents the feature corresponding to the kth human body part in the gait feature y, represents the feature corresponding to the kth human body part in the gait feature z; D() represents the Euclidean distance, [] + represents [w] + =max(0,w);s xy represents the similarity between gait feature x and gait feature y, s xz represents the similarity between gait feature x and gait feature z; Indicates a training round Not equal to 0 and s xy the number of second triplet gait features within the first preset range;

[0078] Represents x pos The feature corresponding to the kth human body part, x pos are the gait features of the same sample pedestrian as the gait feature x, express With each The largest Euclidean distance among the Euclidean distances between them; represents y pos The feature corresponding to the kth human body part, y pos are the gait features of the same sample pedestrian as the gait feature y, express With each The largest Euclidean distance among the Euclidean distances between them;

[0079] Represents x neg The feature corresponding to the kth human body part, x neg are the gait features of different sample pedestrians from the gait feature x, express With each The smallest Euclidean distance among the Euclidean distances between them; represents z neg The feature corresponding to the kth human body part, z neg are the gait features of different sample pedestrians belonging to the gait feature z, express With each The smallest Euclidean distance between them.

[0080] In combination with the second aspect, an embodiment of the present application provides a fifth possible implementation of the second aspect, wherein the training module, when used to train the learnable parameters in the feature extractor using the triple loss value, the hard-to-distinguish sample mining contrast loss value, and the adaptive migration loss value, is specifically used to:

[0081] A target loss value is calculated based on the triplet loss value, the hard-to-distinguish sample mining contrast loss value, the adaptive migration loss value, and the weight assigned to each loss value, so as to train the learnable parameters in the feature extractor using the target loss value.

[0082] In combination with the second aspect, the embodiments of the present application provide a sixth possible implementation of the second aspect, which further includes:

[0083] An input module is used to input the gait sequences in the standard sequence set and the noise sequence set into the feature extractor to be trained before the pairing module pairs the gait features in the standard feature set and the noise feature set to obtain multiple gait feature pairs, and output the gait features corresponding to each gait sequence, so as to store the gait features corresponding to the gait sequences in the standard sequence set in the standard feature set, and store the gait features corresponding to the gait sequences in the noise sequence set in the noise feature set; the gait sequences of the same sample pedestrian in different attire in the standard sequence set correspond to the same identity label; the gait sequences of the same sample pedestrian in different attire in the noise sequence set correspond to respective identity labels.

[0084] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, wherein 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 when the machine-readable instructions are executed by the processor, the steps of any possible implementation method of the first aspect above are performed.

[0085] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any possible implementation method of the first aspect are executed.

[0086] The embodiments of the present application provide a training method, device, electronic device, and storage medium for a gait recognition model. When training a feature extractor (i.e., a gait recognition model), the gait features in a reliable gait feature pair are used to calculate the triple loss value and the hard-to-distinguish sample mining comparison loss value of the feature extractor, so that the feature extractor can learn from reliable training data (i.e., reliable gait feature pairs), where reliable means that the identity label corresponding to each gait feature is correct. In addition, the gait features in an unreliable gait feature pair are also used to calculate the adaptive migration loss value of the feature extractor, so that the feature extractor can mine useful information from unreliable training data (i.e., unreliable gait feature pairs, where unreliable means that the identity label corresponding to each gait feature may be correct or incorrect), so that the gait features extracted by the feature extractor are more identity-discriminative (identity discriminativeness is used to distinguish identities), thereby improving the accuracy of feature extraction by the feature extractor.

[0087] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0089] Figure 1 A flowchart of a training method for a gait recognition model provided in an embodiment of the present application is shown;

[0090] Figure 2 A flowchart of another gait recognition model training method provided in an embodiment of the present application is shown;

[0091] Figure 3 A schematic structural diagram of a gait recognition model training device provided in an embodiment of the present application is shown;

[0092] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here 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 application for protection, but merely represents the 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 making creative work are within the scope of protection of this application.

[0094] Considering that using noisy training data to train a gait recognition model can easily affect the accuracy of the trained gait recognition model, embodiments of the present application provide a gait recognition model training method, apparatus, electronic device, and storage medium to reduce the impact of noisy training data on gait recognition model training and improve the accuracy of the gait recognition model, which is described below through embodiments.

[0095] Example 1:

[0096] To facilitate understanding of this embodiment, a training method for a gait recognition model disclosed in an embodiment of the present application is first introduced in detail. Figure 1 A flow chart of a training method for a gait recognition model provided in an embodiment of the present application is shown. Figure 1 As shown, the following steps S101-S105 are included:

[0097] S101: Pair the gait features in the standard feature set and the noise feature set to obtain multiple gait feature pairs; wherein, the gait features of the same sample pedestrian in different clothing in the standard feature set correspond to the same identity label; the gait features of the same sample pedestrian in different clothing in the noise feature set correspond to their respective identity labels; the gait features are extracted from the gait sequence by the feature extractor to be trained.

[0098] In this embodiment, the standard feature set includes multiple gait features and the identity tag corresponding to each gait feature. The gait features corresponding to the same sample pedestrian in different attire in the standard feature set correspond to the same identity tag. In other words, the identity tag corresponding to each gait feature in the standard feature set is correct. The noise feature set also includes multiple gait features and the identity tag corresponding to each gait feature. The gait features corresponding to the same sample pedestrian in different attire in the noise feature set correspond to their own identity tags (i.e., they may correspond to the same identity tag or different identity tags). Normally, the gait features corresponding to the same sample pedestrian in different attire should correspond to the same identity tag. If the gait features corresponding to the same sample pedestrian in different attire correspond to their own identity tags (i.e., they may correspond to the same identity tag or different identity tags), then the identity tag corresponding to each gait feature in the noise feature set may be correct or incorrect.

[0099] In this embodiment, when the gait features in the standard feature set and the noise feature set are paired to obtain multiple gait feature pairs, specifically:

[0100] Randomly select a gait feature from the standard feature set, randomly select a gait feature from the noise feature set, and form the two gait features into a pair of gait feature pairs; and / or, randomly select two gait features from the standard feature set, and form the two gait features into a pair of gait feature pairs; and / or, randomly select two gait features from the noise feature set, and form the two gait features into a pair of gait feature pairs.

[0101] In a possible implementation, before executing step S101, the following steps may be performed: inputting the gait sequences in the standard sequence set and the noise sequence set into the feature extractor to be trained, outputting the gait features corresponding to each gait sequence, storing the gait features corresponding to the gait sequences in the standard sequence set in the standard feature set, and storing the gait features corresponding to the gait sequences in the noise sequence set in the noise feature set; the gait sequences of the same sample pedestrian in different attire in the standard sequence set correspond to the same identity label; and the gait sequences of the same sample pedestrian in different attire in the noise sequence set correspond to respective identity labels.

[0102] The feature extractor is the gait recognition model, which can be specifically a gait quality perception network (GQAN).

[0103] S102: For each gait feature pair, determine whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature set to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein, the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect.

[0104] In this embodiment, each gait feature pair includes two gait features, which may come from the same feature set (for example, both from the standard feature set or the noise feature set), or may come from different feature sets (i.e., one from the standard feature set and the other from the noise feature set).

[0105] In one possible implementation, Figure 2 FIG. 1 is a flow chart showing another method for training a gait recognition model provided in an embodiment of the present application. Figure 2 As shown, when executing step S102, the following steps may be specifically performed:

[0106] S1021: For each gait feature pair, when both gait features in the gait feature pair are from the standard feature set, the gait feature pair is regarded as a reliable gait feature pair.

[0107] S1022: When both gait features in the gait feature pair come from the noise feature set, determine whether the two gait features correspond to the same identity tag. When the two gait features correspond to the same identity tag, determine the gait feature pair as a reliable gait feature pair; when the two gait features correspond to different identity tags, determine the gait feature pair as an unreliable gait feature pair.

[0108] S1023: When the two gait features in the gait feature pair come from different feature sets, determine whether the two gait features in the gait feature pair correspond to the same identity tag. When the two gait features correspond to the same identity tag, determine the gait feature pair as a reliable feature pair.

[0109] In this embodiment, the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; the identity tags corresponding to the two gait features in the unreliable gait feature pair may be correct or incorrect.

[0110] S103: Determine a first triplet of gait features from the reliable gait feature pairs, and use the three gait features in the first triplet of gait features to calculate the triplet loss value and the difficult-to-separate sample mining comparison loss value; the first triplet of gait features includes two gait features of the same sample pedestrian in different attire, as well as the gait features of another sample pedestrian.

[0111] In this embodiment, the first triplet gait feature is (i, j, h), where i and j are two gait features with the same identity label in the reliable gait feature pair, and h is a gait feature with a different identity label from i and j.

[0112] In a possible implementation, each gait feature includes features corresponding to each body part. For example, the gait feature includes features corresponding to each body part (head, upper limbs, lower limbs, etc.).

[0113] When executing step S103 and using the three gait features in the first triplet of gait features to calculate the triplet loss value, the triplet loss value corresponding to the first triplet of gait features can be calculated using the following formula:

[0114]

[0115] in, represents the triplet loss value corresponding to the kth human body part, i and j are two gait features of the same sample pedestrian in different clothes in the first triplet gait feature, h is the gait feature of another sample pedestrian in the first triplet gait feature, m tp is the preset parameter, P i k represents the feature corresponding to the kth human body part in gait feature i, P j k represents the feature corresponding to the kth human body part in gait feature j, represents the feature corresponding to the kth human body part in the gait feature h, D() represents the Euclidean distance, [] + represents [w] + =max(0,w); Indicates a training round The number of the first triplet of gait features not equal to 0;

[0116]

[0117] Among them, K means that there are K human body parts in total, L tp Represents the triplet loss value corresponding to the first triplet gait feature.

[0118] In this embodiment, [] + represents [w] + =max(0,w), which means when the number w in the brackets is greater than or equal to 0, [] + When the number w in the brackets is less than 0, [] + is 0. The training round refers to the round number of each training round. The first triplet gait feature that is not equal to 0 means that the first triplet gait feature corresponds to After being substituted into the formula, the first triplet of gait features whose formula is not equal to 0.

[0119] In a possible implementation, when performing step S103 and using the three gait features in the first triplet of gait features to calculate the hard-to-distinguish sample mining contrast loss value, the hard-to-distinguish sample mining contrast loss value corresponding to the first triplet of gait features can be calculated by the following formula:

[0120]

[0121] Among them, L hc represents the contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature, g i is the feature output after inputting gait feature i into the batch normalization layer (BBN), g j is the feature output after inputting gait feature j into the batch normalization layer, g h is the feature output after inputting the gait feature h into the batch normalization layer, τ is a constant, g i g j g j and g j The cosine similarity between i g h g j and g h The cosine similarity between s Indicates the total number of gait features used in one training round.

[0122] In this embodiment, the triplet loss value and the hard-to-distinguish sample mining comparison loss value are calculated using the gait features in the reliable gait feature pairs, thereby avoiding the influence of unreliable gait feature pairs with noise, and facilitating the accuracy of the gait recognition model (feature extractor).

[0123] S104: Determine a second triplet of gait features from the unreliable gait feature pairs, and use the three gait features in the second triplet of gait features to calculate an adaptive transfer loss value; the second triplet of gait features includes two gait features of the same sample pedestrian in different attire, and the gait features of another sample pedestrian.

[0124] In this embodiment, the second triplet of gait features is (x, y, z), where x and y are two gait features with the same identity tag in an unreliable gait feature pair, and z is a gait feature with a different identity tag from x and y. For example, in the unreliable gait feature pairs x and z, and y and z, x and z have different identity tags, and y and z have different identity tags. However, x and y may not be an unreliable gait feature pair, and thus x and y may be two gait features with the same identity tag.

[0125] In a possible implementation, when performing step S104 and using the three gait features in the second triplet of gait features to calculate the adaptive transfer loss value, the adaptive transfer loss value corresponding to the second triplet of gait features can be calculated using the following formula:

[0126]

[0127]

[0128]

[0129]

[0130]

[0131]

[0132]

[0133]

[0134]

[0135]

[0136]

[0137] Among them, L at represents the adaptive transfer loss value corresponding to the second triplet gait feature; x and y are two gait features of the same sample pedestrian in different clothing in the second triplet gait feature, and z is the gait feature of another sample pedestrian in the second triplet gait feature; represents the feature corresponding to the kth human body part in the gait feature x, represents the feature corresponding to the kth human body part in the gait feature y, represents the feature corresponding to the kth human body part in the gait feature z; D() represents the Euclidean distance, [] + represents [w] +=max(0,w);s xy represents the similarity between gait feature x and gait feature y, s xz represents the similarity between gait feature x and gait feature z; Indicates a training round Not equal to 0 and s xy the number of second triplet gait features within the first preset range;

[0138] Represents x pos The feature corresponding to the kth human body part, x pos are the gait features of the same sample pedestrian as the gait feature x, express With each The largest Euclidean distance among the Euclidean distances between them; represents y pos The feature corresponding to the kth human body part, y pos are the gait features of the same sample pedestrian as the gait feature y, express With each The largest Euclidean distance among the Euclidean distances between them;

[0139] Represents x neg The feature corresponding to the kth human body part, x neg are the gait features of different sample pedestrians from the gait feature x, express With each The smallest Euclidean distance among the Euclidean distances between them; represents z neg The feature corresponding to the kth human body part, z neg are the gait features of different sample pedestrians belonging to the gait feature z, express With each The smallest Euclidean distance between them.

[0140] The first preset range is [ρ1, 1], where ρ is a similarity threshold.

[0141] In this embodiment, mining useful information from unreliable gait feature pairs is specifically performed in an adaptive manner between features. How close the distance between two gait features that may correspond to the same identity tag (gait feature x and gait feature y) is, and how far the distance between two gait features that may correspond to different identity tags (gait feature x and gait feature z) is, depends on the similarity S of the predicted unreliable gait feature pairs. xyand S xz That is, when S xy When the gait feature x and gait feature y are within the first preset range, they may correspond to the same identity tag. Calculate the loss. When Sxz is within the second preset range, the gait feature x and the gait feature z may correspond to different identity labels. Calculate the loss. The second preset range is [-1, ρ2].

[0142] in, The purpose is to encourage two gait features that may correspond to the same identity label to be close to each other. The goal is to encourage two gait features that may correspond to different identity labels to move away from each other. The adaptive transfer loss value calculated in this way makes the gait features extracted by the gait recognition model more discriminative of identity, which is used to distinguish pedestrian identities.

[0143] S105: Use the triplet loss value, the hard-to-distinguish sample mining contrast loss value and the adaptive transfer loss value to train the learnable parameters in the feature extractor.

[0144] In one possible implementation, a target loss value may be calculated based on the triplet loss value, the hard-to-distinguish sample mining contrast loss value, and the adaptive migration loss value, as well as the weight assigned to each loss value, so as to train the learnable parameters in the feature extractor using the target loss value.

[0145] In this embodiment, the target loss value L can be calculated specifically by the following formula:

[0146] L=L tp +αL hc +βL at

[0147] Among them, α and β are preset weights.

[0148] In this embodiment, considering that most of the collected gait sequences are noisy, the standard gait sequences need to be manually confirmed, so the number is relatively small. When training the gait recognition model, if standard gait sequences are used for training, the model training will not be in place due to the small number of training samples. If noisy gait sequences are used for training, the accuracy of model training will be affected. Therefore, in this application, the loss value is calculated using standard gait sequences and noisy gait sequences respectively, so that the model can learn knowledge from reliable gait feature pairs and mine useful information from unreliable gait feature pairs. tp is computed on the part-level representation to obtain a good base model. hc Computation is performed on the body-level representation to learn whether two gait features are from the same pedestrian. atIt is computed on the part-level representation and aims to transfer knowledge to parts based on the ontology-level similarity.

[0149] Example 2:

[0150] Based on the same technical concept, this application also provides a training device for a gait recognition model. Figure 3 FIG. 1 shows a structural diagram of a training device for a gait recognition model provided in an embodiment of the present application. Figure 3 As shown, the device includes:

[0151] a pairing module for pairing gait features in a standard feature set and a noise feature set to obtain a plurality of gait feature pairs; wherein the gait features of the same pedestrian sample in different attire in the standard feature set correspond to the same identity label; and the gait features of the same pedestrian sample in different attire in the noise feature set correspond to respective identity labels; and the gait features are extracted from the gait sequence by a feature extractor to be trained;

[0152] a first determination module for determining, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect;

[0153] a second determination module, configured to determine a first triplet of gait features from the reliable gait feature pairs, and calculate a triplet loss value and a hard-to-distinguish sample mining contrast loss value using three gait features in the first triplet of gait features; the first triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian;

[0154] a third determining module, configured to determine a second triplet of gait features from the unreliable gait feature pair, and calculate an adaptive transfer loss value using three gait features in the second triplet of gait features; the second triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian;

[0155] A training module is used to train the learnable parameters in the feature extractor using the triple loss value, the hard-to-distinguish sample mining contrast loss value and the adaptive migration loss value.

[0156] Optionally, when the first determination module is used to determine, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature set to which the two gait features in the gait feature pair belong and the corresponding identity tags, it is specifically used to:

[0157] For each gait feature pair, when both gait features in the gait feature pair are from the standard feature set, the gait feature pair is regarded as a reliable gait feature pair;

[0158] When both gait features in the gait feature pair are from the noise feature set, determining whether the two gait features correspond to the same identity tag; when the two gait features correspond to the same identity tag, determining the gait feature pair as a reliable gait feature pair; when the two gait features correspond to different identity tags, determining the gait feature pair as an unreliable gait feature pair;

[0159] When the two gait features in the gait feature pair come from different feature sets, it is determined whether the two gait features in the gait feature pair correspond to the same identity tag. When the two gait features correspond to the same identity tag, the gait feature pair is determined to be a reliable feature pair.

[0160] Optionally, each of the gait features includes features corresponding to each body part; when the second determination module is used to calculate the triplet loss value using the three gait features in the first triplet gait feature, it is specifically used to:

[0161] The triplet loss value corresponding to the first triplet gait feature is calculated by the following formula:

[0162]

[0163] in, represents the triplet loss value corresponding to the kth human body part, i and j are two gait features of the same sample pedestrian in different clothes in the first triplet gait feature, h is the gait feature of another sample pedestrian in the first triplet gait feature, m tp is the preset parameter, P i k represents the feature corresponding to the kth human body part in gait feature i, P j k represents the feature corresponding to the kth human body part in gait feature j, represents the feature corresponding to the kth human body part in the gait feature h, D() represents the Euclidean distance, [] + represents [w] + =max(0,w); Indicates a training round The number of the first triplet of gait features not equal to 0;

[0164]

[0165] Among them, K means that there are K human body parts in total, L tp Represents the triplet loss value corresponding to the first triplet gait feature.

[0166] Optionally, when the second determining module is used to calculate the contrast loss value for hard-to-distinguish sample mining using three gait features in the first triplet of gait features, the second determining module is specifically configured to:

[0167] The contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature is calculated by the following formula:

[0168]

[0169] Among them, L hc represents the contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature, g i is the feature output after inputting gait feature i into the batch normalization layer, g j is the feature output after inputting gait feature j into the batch normalization layer, g h is the feature output after inputting the gait feature h into the batch normalization layer, τ is a constant, g i g j g j and g j The cosine similarity between i g h g j and g h The cosine similarity between s Indicates the total number of gait features used in one training round.

[0170] Optionally, when the third determination module is used to calculate the adaptive transfer loss value using the three gait features in the second triplet of gait features, it is specifically used to:

[0171] The adaptive transfer loss value corresponding to the second triplet gait feature is calculated by the following formula:

[0172]

[0173]

[0174]

[0175]

[0176]

[0177]

[0178]

[0179]

[0180]

[0181]

[0182]

[0183] Among them, L at represents the adaptive transfer loss value corresponding to the second triplet gait feature; x and y are two gait features of the same sample pedestrian in different clothing in the second triplet gait feature, and z is the gait feature of another sample pedestrian in the second triplet gait feature; represents the feature corresponding to the kth human body part in the gait feature x, represents the feature corresponding to the kth human body part in the gait feature y, represents the feature corresponding to the kth human body part in the gait feature z; D() represents the Euclidean distance, [] + represents [w] + =max(0,w);s xy represents the similarity between gait feature x and gait feature y, s xz represents the similarity between gait feature x and gait feature z; Indicates a training round Not equal to 0 and s xy the number of second triplet gait features within the first preset range;

[0184] Represents x pos The feature corresponding to the kth human body part, x pos are the gait features of the same sample pedestrian as the gait feature x, express With each The largest Euclidean distance among the Euclidean distances between them; represents y pos The feature corresponding to the kth human body part, y pos are the gait features of the same sample pedestrian as the gait feature y, express With each The largest Euclidean distance among the Euclidean distances between them;

[0185] Represents x neg The feature corresponding to the kth human body part, x neg are the gait features of different sample pedestrians from the gait feature x, express With each The smallest Euclidean distance among the Euclidean distances between them; represents z neg The feature corresponding to the kth human body part, z neg are the gait features of different sample pedestrians belonging to the gait feature z, express With each The smallest Euclidean distance between them.

[0186] Optionally, when the training module is used to train the learnable parameters in the feature extractor using the triple loss value, the hard-to-distinguish sample mining contrast loss value, and the adaptive migration loss value, it is specifically used to:

[0187] A target loss value is calculated based on the triplet loss value, the hard-to-distinguish sample mining contrast loss value, the adaptive migration loss value, and the weight assigned to each loss value, so as to train the learnable parameters in the feature extractor using the target loss value.

[0188] Optionally, also include:

[0189] An input module is used to input the gait sequences in the standard sequence set and the noise sequence set into the feature extractor to be trained before the pairing module pairs the gait features in the standard feature set and the noise feature set to obtain multiple gait feature pairs, and output the gait features corresponding to each gait sequence, so as to store the gait features corresponding to the gait sequences in the standard sequence set in the standard feature set, and store the gait features corresponding to the gait sequences in the noise sequence set in the noise feature set; the gait sequences of the same sample pedestrian in different attire in the standard sequence set correspond to the same identity label; the gait sequences of the same sample pedestrian in different attire in the noise sequence set correspond to respective identity labels.

[0190] Example 3:

[0191] Figure 4A structural diagram of an electronic device provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus 403, wherein the memory 402 stores machine-readable instructions executable by the processor 401. When the electronic device runs the above-mentioned information processing method, the processor 401 communicates with the memory 402 through the bus 403, and the processor 401 executes the machine-readable instructions to perform the method steps described in Example 1.

[0192] Example 4:

[0193] The fourth embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps described in the first embodiment are executed.

[0194] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, electronic devices, and computer-readable storage media can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection of some communication interface, device or unit, which can be electrical, mechanical or other forms.

[0196] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

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

[0198] If the functions are implemented 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 that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling 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 various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0199] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A training method for a gait recognition model, characterized in that: include: Gait features in the standard feature set and the noise feature set are paired to obtain multiple gait feature pairs; wherein the gait features of the same pedestrian sample in different attire in the standard feature set correspond to the same identity label; the gait features of the same pedestrian sample in different attire in the noise feature set correspond to respective identity labels; the gait features are extracted from the gait sequence by a feature extractor to be trained; For each of the gait feature pairs, determining whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect; Determining a first triplet of gait features from the reliable gait feature pairs, and calculating a triplet loss value and a hard-to-define sample mining contrast loss value using three gait features in the first triplet of gait features; the first triplet of gait features includes two gait features of the same sample pedestrian in different attire, and a gait feature of another sample pedestrian; Determining a second triplet of gait features from the unreliable gait feature pair, and calculating an adaptive transfer loss value using three gait features in the second triplet of gait features; the second triplet of gait features includes two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian; The learnable parameters in the feature extractor are trained using the triplet loss value, the hard sample mining contrast loss value, and the adaptive migration loss value.

2. The method according to claim 1, characterized in that The step of determining, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags, includes: For each gait feature pair, when both gait features in the gait feature pair are from the standard feature set, the gait feature pair is regarded as a reliable gait feature pair; When both gait features in the gait feature pair are from the noise feature set, determining whether the two gait features correspond to the same identity tag; when the two gait features correspond to the same identity tag, determining the gait feature pair as a reliable gait feature pair; when the two gait features correspond to different identity tags, determining the gait feature pair as an unreliable gait feature pair; When the two gait features in the gait feature pair come from different feature sets, it is determined whether the two gait features in the gait feature pair correspond to the same identity tag. When the two gait features correspond to the same identity tag, the gait feature pair is determined to be a reliable feature pair.

3. The method according to claim 1, characterized in that Each of the gait features includes features corresponding to each body part; The calculating a triplet loss value using three gait features in the first triplet gait feature comprises: The triplet loss value corresponding to the first triplet gait feature is calculated by the following formula: in, represents the triplet loss value corresponding to the kth human body part, i and j are two gait features of the same sample pedestrian in different clothes in the first triplet gait feature, h is the gait feature of another sample pedestrian in the first triplet gait feature, m tp is the preset parameter, represents the feature corresponding to the kth human body part in gait feature i, represents the feature corresponding to the kth human body part in gait feature j, represents the feature corresponding to the kth human body part in the gait feature h, D() represents the Euclidean distance, represents [w] + =max(0,w); Indicates a training round The number of the first triplet of gait features not equal to 0; Among them, K means that there are K human body parts in total, L tp Represents the triplet loss value corresponding to the first triplet gait feature.

4. The method according to claim 3, characterized in that The step of calculating the hard-to-distinguish sample mining contrast loss value using three gait features in the first triplet of gait features includes: The contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature is calculated by the following formula: Among them, L hc represents the contrast loss value of the hard-to-distinguish sample mining corresponding to the first triplet gait feature, g i is the feature output after inputting gait feature i into the batch normalization layer, g j is the feature output after inputting gait feature j into the batch normalization layer, g h is the feature output after inputting the gait feature h into the batch normalization layer, τ is a constant, g i g j g j and g j The cosine similarity between i g h g j and g h The cosine similarity between s Indicates the total number of gait features used in one training round.

5. The method according to claim 3, characterized in that: The calculating the adaptive transfer loss value using the three gait features in the second triplet of gait features includes: The adaptive transfer loss value corresponding to the second triplet gait feature is calculated by the following formula: Among them, L at represents the adaptive transfer loss value corresponding to the second triplet gait feature; x and y are two gait features of the same sample pedestrian in different clothing in the second triplet gait feature, and z is the gait feature of another sample pedestrian in the second triplet gait feature; represents the feature corresponding to the kth human body part in the gait feature x, represents the feature corresponding to the kth human body part in the gait feature y, represents the feature corresponding to the kth human body part in the gait feature z; D() represents the Euclidean distance, represents [w] + =max(0,w);s xy represents the similarity between gait feature x and gait feature y, s xz represents the similarity between gait feature x and gait feature z; Indicates a training round Not equal to 0 and s xy the number of second triplet gait features within the first preset range; Represents x pos The feature corresponding to the kth human body part, x pos are the gait features of the same sample pedestrian as the gait feature x, express With each The largest Euclidean distance among the Euclidean distances between them; represents y pos The feature corresponding to the kth human body part, y pos are the gait features of the same sample pedestrian as the gait feature y, express With each The largest Euclidean distance among the Euclidean distances between them; Represents x neg The feature corresponding to the kth human body part, x neg are the gait features of different sample pedestrians from the gait feature x, express With each The smallest Euclidean distance among the Euclidean distances between them; represents z neg The feature corresponding to the kth human body part, z neg are the gait features of different sample pedestrians belonging to the gait feature z, express With each The smallest Euclidean distance between them.

6. The method according to claim 1, characterized in that The using the triplet loss value, the hard sample mining contrast loss value, and the adaptive migration loss value to train the learnable parameters in the feature extractor includes: A target loss value is calculated based on the triplet loss value, the hard-to-distinguish sample mining contrast loss value, the adaptive migration loss value, and the weight assigned to each loss value, so as to train the learnable parameters in the feature extractor using the target loss value.

7. The method according to claim 1, characterized in that: Before pairing the gait features in the standard feature set and the noise feature set to obtain a plurality of gait feature pairs, the method further includes: The gait sequences in the standard sequence set and the noise sequence set are input into the feature extractor to be trained, and the gait features corresponding to each gait sequence are output, so that the gait features corresponding to the gait sequences in the standard sequence set are stored in the standard feature set, and the gait features corresponding to the gait sequences in the noise sequence set are stored in the noise feature set; the gait sequences of the same sample pedestrian in different attire in the standard sequence set correspond to the same identity label; the gait sequences of the same sample pedestrian in different attire in the noise sequence set correspond to respective identity labels.

8. A training device for a gait recognition model, characterized in that: include: a pairing module for pairing gait features in a standard feature set and a noise feature set to obtain a plurality of gait feature pairs; wherein the gait features of the same pedestrian sample in different attire in the standard feature set correspond to the same identity label; and the gait features of the same pedestrian sample in different attire in the noise feature set correspond to respective identity labels; and the gait features are extracted from the gait sequence by a feature extractor to be trained; a first determination module for determining, for each gait feature pair, whether the gait feature pair is a reliable gait feature pair or an unreliable gait feature pair based on the feature sets to which the two gait features in the gait feature pair belong and the corresponding identity tags; wherein the identity tags corresponding to the two gait features in the reliable gait feature pair are correct; and the identity tags corresponding to the two gait features in the unreliable gait feature pair are correct or incorrect; a second determination module, configured to determine a first triplet of gait features from the reliable gait feature pairs, and calculate a triplet loss value and a hard-to-distinguish sample mining contrast loss value using three gait features in the first triplet of gait features; the first triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian; a third determining module, configured to determine a second triplet of gait features from the unreliable gait feature pair, and calculate an adaptive transfer loss value using three gait features in the second triplet of gait features; the second triplet of gait features including two gait features of the same sample pedestrian in different attire and a gait feature of another sample pedestrian; A training module is used to train the learnable parameters in the feature extractor using the triple loss value, the hard-to-distinguish sample mining contrast loss value and the adaptive migration loss value.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video pedestrian re-identification method based on triple pyramid model and migration fusion

    CN113591697A

  • Cross-view gait recognition method based on metric learning and space-time double-flow network

    CN114998995A