Gait recognition method, device and equipment and storage medium
By using a gait image enhancement model to extract and enhance features from user images to be identified, the problem of reduced accuracy caused by the high inconsistency between the probe set and the registration set is solved, thus improving the accuracy of gait recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP ZHEJIANG
- Filing Date
- 2022-09-30
- Publication Date
- 2026-04-28
AI Technical Summary
When the probe set and the registration set are highly inconsistent, the accuracy of existing gait recognition technologies decreases.
A gait image enhancement model is adopted. Through feature extraction and feature enhancement processing, the first feature vector of the user image to be identified is obtained, and the second feature vector is obtained by feature enhancement to improve the accuracy of gait recognition.
By enhancing gait features, useful information is amplified while irrelevant information is weakened, thus improving the accuracy of gait recognition.
Smart Images

Figure CN116959090B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gait recognition technology, and in particular to a gait recognition method, apparatus, device and storage medium. Background Technology
[0002] Gait recognition is a technology that identifies a subject by observing their walking video. Compared to facial recognition and iris recognition, it does not require the subject's cooperation, is not easily disguised, and can identify the subject from a distance.
[0003] Current popular research directions in gait recognition include multi-view gait recognition and cross-view gait recognition. Most implementation schemes are based on the CASIA-B gait dataset from the Chinese Academy of Sciences and the OU-MVLP gait dataset from Osaka University. In these two datasets, the camera heights of the probe set and the registration set are consistent, allowing for direct feature extraction from the preprocessed gait sequences. However, in certain scenarios, such as inside a communication equipment room, the registration set consists of horizontally captured gait sequence images, while the cameras are mounted at a height. The captured gait videos have a certain overhead perspective. The stronger the overhead perspective, the less obvious the gait features become. In other words, gait videos under surveillance lose the specificity of the target's gait features. When the camera heights of the probe set and the registration set are inconsistent, the accuracy of gait recognition decreases. Summary of the Invention
[0004] The main objective of this application is to provide a gait recognition method, apparatus, device, and storage medium, which aims to solve the technical problem in the prior art that the accuracy of gait recognition is reduced when the detection set and the registration set are highly inconsistent.
[0005] To achieve the above objectives, this application provides a gait recognition method, the gait recognition method comprising:
[0006] Acquire the image of the user to be identified;
[0007] The user image to be identified is input into a preset gait image enhancement model. Based on the gait image enhancement model, feature extraction processing is performed on the user image to be identified to obtain a first feature vector of the user image to be identified. Then, feature enhancement processing is performed on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0008] User identification information is determined based on the second feature vector.
[0009] Optionally, before the step of acquiring the user image to be identified, the method includes:
[0010] Acquire user image samples, feature vector labels of the user image samples, and a gait recognition model;
[0011] The user image sample is input into the gait recognition model, and based on the gait recognition model, feature extraction processing is performed on the user image sample to obtain the third feature vector of the user image sample;
[0012] Based on the third feature vector and the feature vector labels of the user image samples, the preset main training model is iteratively trained to obtain a gait image enhancement model that meets the accuracy requirements.
[0013] Optionally, the step of iteratively training a preset master training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements includes:
[0014] The third feature vector is input into the main training model to obtain the first predicted enhancement vector, and the fourth feature vector is determined based on the first predicted enhancement vector and the third feature vector.
[0015] The fourth feature vector is combined with the feature vector labels of the user image sample to perform triplet loss, resulting in the first loss function.
[0016] Based on the first loss function, determine whether the main training model has completed its iteration;
[0017] If the main training model has not completed its iteration, the process returns to inputting the third feature vector into the main training model to obtain the first predicted enhancement vector, and determining the fourth feature vector based on the first predicted enhancement vector and the third feature vector. Training continues until the main training model has completed its iteration and training stops, resulting in a gait image enhancement model that meets the accuracy requirements.
[0018] Optionally, the step of iteratively training a preset master training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements further includes:
[0019] Obtain the shooting height label of the user image sample;
[0020] The third feature vector is input into a preset auxiliary training model to obtain predicted shooting height data, and the auxiliary training model is trained in the next round based on the predicted shooting height data and the shooting height label.
[0021] The third feature vector and the predicted shooting height data are input into the main training model to obtain the second prediction enhancement vector, and the fifth feature vector is obtained based on the second prediction enhancement vector and the third feature vector.
[0022] Based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample, a second loss function is determined;
[0023] Based on the second loss function, determine whether the main training model has completed its iteration;
[0024] If the main training model has not completed its iteration, the process returns to inputting the third feature vector into a preset auxiliary training model to obtain predicted shooting height data. Based on the predicted shooting height data and the shooting height label, the auxiliary training model is trained for the next round until the main training model has completed its iteration and training stops, resulting in a gait image enhancement model that meets the accuracy requirements.
[0025] Optionally, the feature vector label of the user image sample includes a first feature vector label corresponding to the fifth feature vector and a second feature vector label not corresponding to the fifth feature vector. The step of determining the second loss function based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample includes:
[0026] The third loss function is obtained by applying triplet loss to the fifth feature vector, the first feature vector label, and the second feature vector label.
[0027] A fourth loss function is obtained by applying cross-entropy loss to the shooting height labels of the user image samples and the predicted shooting height data;
[0028] The second loss function is determined based on the third loss function and the fourth loss function.
[0029] Optionally, the step of performing feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and performing feature enhancement processing on the first feature vector to obtain a second feature vector, includes:
[0030] Based on the gait recognition model, feature extraction processing is performed on the user image to be identified to obtain the first feature vector of the user image to be identified;
[0031] Based on the feature enhancement model, gait information enhancement processing is performed on the user image to be identified to obtain the enhanced vector of the user image to be identified;
[0032] Multiply the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector.
[0033] Optionally, the step of determining user identification information based on the second feature vector includes:
[0034] Obtain image features from the user registration set;
[0035] Calculate the feature distance between the second feature vector and the image features of the registration machine to obtain the feature distance result;
[0036] Based on the feature distance results, user identification information is determined.
[0037] This application also provides a gait recognition device, the gait recognition device comprising:
[0038] The acquisition module is used to acquire the image of the user to be identified;
[0039] The enhancement module is used to input the user image to be identified into a preset gait image enhancement model, perform feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and perform feature enhancement processing on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0040] The determination module is used to determine user identification information based on the second feature vector.
[0041] This application also provides a gait recognition device, which includes: a memory, a processor, and a program stored in the memory for implementing the gait recognition method.
[0042] The memory is used to store the program that implements the gait recognition method;
[0043] The processor is used to execute a program that implements the gait recognition method, so as to implement the steps of the gait recognition method.
[0044] This application also provides a storage medium storing a program for implementing a gait recognition method, wherein the program for implementing the gait recognition method is executed by a processor to implement the steps of the gait recognition method.
[0045] This application provides a gait recognition method, apparatus, device, and storage medium. Compared to existing technologies where the accuracy of gait recognition decreases due to inconsistencies in the heights of the detector set and the registration set, this application acquires a user image to be recognized; inputs the user image to be recognized into a preset gait image enhancement model; performs feature extraction processing on the user image to be recognized based on the gait image enhancement model to obtain a first feature vector of the user image to be recognized; and performs feature enhancement processing on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model; and determines user recognition information based on the second feature vector. In other words, this application further enhances the features of the user image to be recognized based on the extracted gait feature vectors, thereby strengthening useful gait information and weakening irrelevant information, making the gait features of the user image to be recognized more obvious, and improving the accuracy of gait recognition. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0047] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application;
[0048] Figure 2 This is a flowchart illustrating the first embodiment of the gait recognition method of this application;
[0049] Figure 3 This is a schematic diagram of the modules in the first embodiment of the gait recognition method of this application;
[0050] Figure 4 This is a schematic diagram of the modules in the second embodiment of the gait recognition method of this application;
[0051] Figure 5 This is a flowchart illustrating the second embodiment of the gait recognition method of this application;
[0052] Figure 6 This is a sequence of gait contour images after preprocessing using the gait recognition method of this application.
[0053] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0054] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0055] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of this application.
[0056] The terminal in this application embodiment can be a PC, or a smartphone, tablet computer, e-book reader, MP3 (Moving Picture Experts Group Audio Layer III) player, MP4 (Moving Picture Experts Group Audio Layer IV) player, portable computer, or other portable terminal devices with display functions.
[0057] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0058] Optionally, the terminal may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and so on. Sensors may include light sensors, motion sensors, and other sensors. Specifically, light sensors may include ambient light sensors and proximity sensors. The ambient light sensor can adjust the display brightness according to the ambient light level, while the proximity sensor can turn off the display and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, a gravity accelerometer can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the mobile terminal's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition functions (such as pedometers, taps), etc. Of course, the mobile terminal may also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be elaborated here.
[0059] Those skilled in the art will understand that Figure 1 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0060] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating device, a network communication module, a user interface module, and a gait recognition program.
[0061] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client (user terminal) and communicate with the client; and the processor 1001 can be used to call the gait recognition program stored in the memory 1005.
[0062] Reference Figure 2 This application provides a gait recognition method, which includes:
[0063] Step S100: Obtain the image of the user to be identified;
[0064] Step S200: Input the user image to be identified into a preset gait image enhancement model. Based on the gait image enhancement model, perform feature extraction processing on the user image to be identified to obtain a first feature vector of the user image to be identified. Then, perform feature enhancement processing on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0065] Step S300: Determine user identification information based on the second feature vector.
[0066] In this embodiment, a specific application scenario may be:
[0067] Inside the communication equipment room, the registration set consists of gait sequence images taken at a horizontal angle, while the cameras are installed at a high position. The gait videos captured have a certain top-down perspective. The stronger the top-down perspective, the less obvious the gait features are. In other words, the gait videos under surveillance will lose the specificity of the target's gait features. When the camera heights of the detection set and the registration set are inconsistent, it will lead to a decrease in the accuracy of gait recognition.
[0068] The specific steps are as follows:
[0069] Step S100: Obtain the image of the user to be identified;
[0070] In this embodiment, the gait recognition method is applied to a gait recognition device.
[0071] In this embodiment, the user image to be identified is an image of the user whose identity information is to be identified. The image can be a video or a picture. The method by which the device acquires the user image to be identified includes:
[0072] Method 1: The user to be identified is captured by the device's camera to obtain an image of the user. The camera can be mounted on the device or fixedly installed in a certain location and communicated with the device.
[0073] Method 2: The device obtains the image of the user to be identified by having the user upload the image themselves.
[0074] For example, in a communication equipment room environment, the camera is installed on the wall 5m above the ground, and the user to be identified is captured from a top-down perspective. When the user to be identified walks into the camera's shooting range, the camera takes a picture and sends the image of the user to the device.
[0075] Before step S100, the step of acquiring the user image to be identified, the method includes the following steps A100-A300:
[0076] Step A100: Obtain user image samples, feature vector labels of the user image samples, and gait recognition model;
[0077] In this embodiment, the user image samples are image samples used for model training and are historical data samples. The user image samples include images obtained by cameras shooting users at different heights, including horizontal and overhead views. Before step A200, the user image samples need to be preprocessed. The preprocessing methods include binarization, cropping, alignment, etc., and the original gait video is processed into a contour map gait sequence of size .
[0078] In this embodiment, the gait recognition model is a pre-trained gait recognition model used to process image features. The gait recognition model uses classic gait recognition networks such as GaitSet, GaitPart, and GaitNet, all of which achieve high accuracy. This part is not innovative in this invention and therefore will not be described in detail. The gait recognition network can extract gait features of a certain dimension from a gait contour map sequence, denoted as f. q This application sets the dimension to 128×1, i.e., f q It is a 128×1 feature vector. The gait recognition network G is pre-trained. The training process of G varies depending on the gait recognition network selected, and will not be elaborated further. The samples in the training set are fed into the trained G to obtain the unenhanced gait feature set F. q :
[0079] In this embodiment, the feature vector labels of the user image samples are the specific feature vectors of each user image sample. Since the user image samples from a level viewpoint contain the most obvious and numerous features, the feature vector labels of the user image samples in this application are obtained by pre-extracting feature vectors from the level viewpoint images in the user image samples. These gait features come from samples at different camera heights and need to be enhanced using S to make the enhanced gait features similar to the level view gait features. F q The features of the flat samples in the image are extracted and used as a reference when training S, denoted as
[0080] Step A200: Input the user image sample into the gait recognition model, and perform feature extraction processing on the user image sample based on the gait recognition model to obtain the third feature vector of the user image sample;
[0081] In this embodiment, the device inputs the user image samples into the gait recognition model. Based on the gait recognition model, feature extraction processing is performed on the user image samples to obtain a third feature vector of the user image samples. The user image samples include both level and overhead views of the same user image. Therefore, the third feature vector includes the feature vectors of both level and overhead views of the same user image. The feature vector of the level view of the user image samples is used as a control group. For example, the user image samples include image samples of user A and user B. Image samples of user A include A1 and A2, and image samples of user B include B1 and B2. A1 and B1 are images from a level view, and A2 and B2 are images from an overhead view. Therefore, the third feature vector includes the feature vector of the level view A1. a1 and B1's f b1 A2's top-down perspective a2 and B2's f b2 .
[0082] Step A300: Based on the third feature vector and the feature vector labels of the user image samples, the preset main training model is iteratively trained to obtain a gait image enhancement model that meets the accuracy requirements.
[0083] In this embodiment, the device iteratively trains a preset master training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements. The master training model is the model to be trained. The deep learning gait image enhancement model is obtained by iteratively training the master training model.
[0084] Specifically, step A300 includes the following steps A310-A340:
[0085] Step A310: Input the third feature vector into the main training model to obtain the first predicted enhancement vector, and determine the fourth feature vector based on the first predicted enhancement vector and the third feature vector;
[0086] In this embodiment, the device inputs the third feature vector into the main training model to obtain a first predicted enhancement vector, and determines a fourth feature vector based on the first predicted enhancement vector and the third feature vector. The main training model is trained according to the different enhancement vectors obtained from the feature vectors depending on the camera shooting height. The first predicted enhancement vector and the third feature vector are multiplied element by element to obtain the fourth feature vector. For example, if the third feature vector includes feature vector A1 and the predicted enhancement vector is A2, then the final fourth feature vector is A1⊙A2.
[0087] Step A320: Perform triplet loss on the fourth feature vector and the feature vector label of the user image sample to obtain the first loss function;
[0088] In this embodiment, the device performs a triplet loss on the fourth feature vector and the feature vector labels of the user image sample to obtain a first loss function, wherein the fourth feature vector is the feature vector after feature enhancement, and the information-enhanced gait feature f i ,and The corresponding flat shot features and non-corresponding flat shot features Triple loss:
[0089]
[0090] Among them, f i This refers to the gait features after information enhancement, i.e., the fourth feature vector; The feature vector of the same image in the reference group is a flat shot. This is the feature vector of the flat shot of other images in the reference group.
[0091] Step A330: Based on the first loss function, determine whether the main training model has completed its iteration;
[0092] In this embodiment, the device determines whether the main training model has completed its iteration based on the first loss function, that is, by minimizing the first loss function and calculating whether the first loss function has reached its minimum value, thereby determining whether the main training model has completed its iteration.
[0093] Step A340: If the main training model has not completed its iteration, return to the step of inputting the third feature vector into the main training model to obtain the first predicted enhancement vector, and determining the fourth feature vector based on the first predicted enhancement vector and the third feature vector, until the main training model completes its iteration and training stops, thus obtaining a gait image enhancement model that meets the accuracy requirements.
[0094] In this embodiment, if the main training model has not completed its iteration, the device returns to the step of inputting the third feature vector into the main training model to obtain the first predicted enhancement vector, and determining the fourth feature vector based on the first predicted enhancement vector and the third feature vector, until the main training model completes its iteration and training stops, thus obtaining a gait image enhancement model that meets the accuracy conditions. That is, iterative training continues until the main training model completes its iteration, thus obtaining a gait image enhancement model that meets the accuracy conditions.
[0095] Specifically, step A300 includes the following steps B100-B600:
[0096] Step B100: Obtain the shooting height label of the user image sample;
[0097] In this embodiment, the device acquires the shooting height label of the user image sample. The shooting height of the user image sample is the set height at which the camera shoots the user image sample. The training of the model in this application is based on the fact that the enhancement vector obtained from the feature vector is different for different camera shooting heights. Therefore, the gait image enhancement model identifies the camera height in the gait contour map based on the gait contour map and outputs an enhancement vector corresponding to the camera height.
[0098] Step B200: Input the third feature vector into the preset auxiliary training model to obtain the predicted shooting height data, and perform the next round of training on the auxiliary training model based on the predicted shooting height data and the shooting height label;
[0099] In this embodiment, the device inputs the third feature vector into a preset auxiliary training model to obtain predicted shooting height data. Based on the predicted shooting height data and the shooting height label, the auxiliary training model is trained in the next round. In this application, an auxiliary training model is added to the training of the gait image enhancement model. The auxiliary training model is trained iteratively in sync with the gait image enhancement model. That is, before the gait image enhancement model completes its iteration, the auxiliary training model performs the next round of iterative training. The auxiliary training model and the gait image enhancement model share weights except for the last fully connected layer of the gait image enhancement model. They output vectors of the same dimension to represent the camera shooting height data of the input gait contour map. By adding the auxiliary training model, the training direction of the gait image enhancement model is determined, thereby improving the accuracy and efficiency of model training.
[0100] Step B300: Input the third feature vector and the predicted shooting height data into the main training model to obtain the second prediction enhancement vector, and obtain the fifth feature vector based on the second prediction enhancement vector and the third feature vector;
[0101] In this embodiment, the device inputs the third feature vector and the predicted shooting height data into the main training model to obtain the second predicted enhancement vector, and obtains the fifth feature vector based on the second predicted enhancement vector and the third feature vector. The main training model is trained by using the shooting height data predicted by the auxiliary training model and the third feature vector. The predicted enhancement vector is determined according to the shooting height data. The corresponding elements of the second predicted enhancement vector and the third feature vector are multiplied together to obtain the fifth feature vector.
[0102] Step B400: Determine the second loss function based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample;
[0103] In this embodiment, the device determines a second loss function based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample.
[0104] Specifically, step B400 includes the following steps B410-B430:
[0105] Step B410: Apply triplet loss to the fifth feature vector, the first feature vector label, and the second feature vector label to obtain the third loss function;
[0106] In this embodiment, the third loss function L is obtained by following the same procedure as in step A320 above. tri for:
[0107]
[0108] Step B420: Perform cross-entropy loss on the shooting height labels of the user image samples and the predicted shooting height data to obtain the fourth loss function;
[0109] In this embodiment, the device performs cross-entropy loss on the shooting height labels of the user image samples and the predicted shooting height data to obtain a fourth loss function, wherein the fourth loss function L ce for:
[0110] L ce =-logp j
[0111] Where, p j This represents the probability that the gait profile is classified as a camera at height j.
[0112] Step B430: Determine the second loss function based on the third loss function and the fourth loss function.
[0113] In this embodiment, the device determines a second loss function based on the third loss function and the fourth loss function. Specifically, the second loss function L is expressed as:
[0114] L = 0.5 × L tri +0.5×L ce
[0115] Step B500: Based on the second loss function, determine whether the main training model has completed its iteration.
[0116] In this embodiment, as in step A330 above, the device determines whether the main training model has completed its iteration based on the second loss function.
[0117] Step B600: If the main training model has not completed its iteration, return to the step of inputting the third feature vector into the preset auxiliary training model to obtain the predicted shooting height data, and then performing the next round of training on the auxiliary training model based on the predicted shooting height data and the shooting height label, until the main training model has completed its iteration and training is stopped, thus obtaining a gait image enhancement model that meets the accuracy requirements.
[0118] In this embodiment, if the main training model has not completed its iteration, the device returns to the step of inputting the third feature vector into a preset auxiliary training model to obtain predicted shooting height data, and then performing the next round of training on the auxiliary training model based on the predicted shooting height data and the shooting height label, until the main training model has completed its iteration and training stops, thus obtaining a gait image enhancement model that meets the accuracy requirements.
[0119] Step S200: Input the user image to be identified into a preset gait image enhancement model. Based on the gait image enhancement model, perform feature extraction processing on the user image to be identified to obtain a first feature vector of the user image to be identified. Then, perform feature enhancement processing on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0120] In this embodiment, the device inputs the user image to be identified into a preset gait image enhancement model. Based on the gait image enhancement model, feature extraction processing is performed on the user image to be identified to obtain a first feature vector. The first feature vector is then enhanced to obtain a second feature vector. The first feature vector is extracted by the gait recognition model and is an unenhanced feature vector. The second feature vector is the enhanced feature vector. Based on the feature vector extraction of gait features of the user image to be identified, further feature enhancement is performed to enhance useful gait information and weaken irrelevant information, making the gait features of the user image to be identified more obvious and improving the accuracy of gait recognition.
[0121] In this embodiment, before performing feature extraction processing on the user image to be identified, the user image to be identified is preprocessed, referring to... Figure 6 The preprocessing methods include binarization, cropping, alignment, etc., which process the original gait video into a contour map gait sequence of size .
[0122] Specifically, step S200 includes the following steps S210-S230:
[0123] Step S210: Based on the gait recognition model, perform feature extraction processing on the user image to be identified to obtain the first feature vector of the user image to be identified;
[0124] In this embodiment, the device performs feature extraction processing on the user image to be identified based on the gait recognition model to obtain the first feature vector of the user image to be identified.
[0125] Step S220: Based on the feature enhancement model, perform gait information enhancement processing on the user image to be identified to obtain the enhancement vector of the user image to be identified;
[0126] In this embodiment, the device performs gait information enhancement processing on the user image to be identified based on the feature enhancement model, determines the image's shooting height, and determines the enhancement vector corresponding to the user image to be identified based on the shooting height. The feature enhancement module S is implemented by a convolutional neural network, and its input is the first contour image in the preprocessed gait sequence. This step is represented as: f a =S(x0).
[0127] Step S230: Multiply the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector.
[0128] In this embodiment, the device multiplies the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector. For example, assuming the camera height of the user image X to be identified is h1, the feature enhancement model outputs a corresponding enhancement vector. with f q Multiplying corresponding elements together yields the final second eigenvector:
[0129] Step S300: Determine user identification information based on the second feature vector.
[0130] In this embodiment, the device determines user identification information based on the second feature vector, wherein the user identification information specifically includes the user's name, department, position, and other information. The device is used to determine the user's information based on the user's image.
[0131] Specifically, step S300 includes the following steps S310-S330:
[0132] Step S310: Obtain image features of the user registration set;
[0133] In this embodiment, the device acquires image features of a user registration set, wherein the user registration set is a dataset of user images, containing images with flat-screen features for each user, and the image features of the user registration set are features of all images.
[0134] Step S320: Calculate the feature distance between the second feature vector and the image features of the registration machine to obtain the feature distance result;
[0135] In this embodiment, the device calculates the feature distance between the second feature vector and the image features of the registration machine to obtain the feature distance result.
[0136] Step S330: Determine user identification information based on the feature distance result.
[0137] In this embodiment, the device determines user identification information based on the feature distance results. Specifically, the device sets a threshold β. When the feature distance results between the probe set sample and all samples in the registration set are greater than β, the classifier will determine that the sample is a stranger sample. The device first considers whether all calculated feature distances exceed the threshold β. If they exceed the threshold, it indicates that a stranger has entered. If they do not exceed the threshold, the identity of the registration set sample closest to the probe set sample is the probe set identity identified by the network. That is, if the closest registration set sample corresponds to employee A, the user identification information is employee A; if it corresponds to employee B, the user identification information is employee B. For scenario 2, if after calculating the feature distance between the probe set sample and all samples in the registration set, it is found that all feature distances are greater than the threshold, it indicates that a stranger is approaching the communication room, and the system issues a warning. If the feature distance between a pair of samples is not greater than the threshold, it indicates that a registered employee is approaching the communication room, and the system does not issue a warning.
[0138] This application discloses a gait recognition method, which includes: acquiring a user image to be recognized; inputting the user image to be recognized into a preset gait image enhancement model; performing feature extraction processing on the user image to be recognized based on the gait image enhancement model to obtain a first feature vector of the user image to be recognized; and performing feature enhancement processing on the first feature vector to obtain a second feature vector, wherein the gait recognition model is composed of a gait recognition model and a feature enhancement model; and determining user recognition information based on the second feature vector. This application belongs to the field of gait recognition technology. Based on the feature vector extraction of gait features from the user image to be recognized, it further enhances the features to strengthen useful gait information and weaken irrelevant information, making the gait features of the user image to be recognized more obvious and improving the accuracy of gait recognition.
[0139] Based on the first embodiment described above, this application also provides another embodiment, referring to... Figure 4and Figure 5 The gait recognition method includes:
[0140] The model consists of five parts: preprocessing, gait recognition network, feature enhancement, auxiliary classifier, and classifier. First, the model training part: the gait recognition network G is trained. The input is flat-face samples (a sequence of flat-face gait contour maps) from the dataset, and the output (output1) is a 128×1 flat-face feature vector. After training, the weights of G are fixed, and all flat-face samples are passed through G to obtain the feature vectors of the flat-face samples in the dataset, which serves as the control group. The control group contains flat-face features of all targets. Next, the feature enhancement module S is trained. The input to S can be samples from the entire dataset (including flat-face and overhead shots), input into G and S in parallel. The output (output1) is the 128×1 flat-face feature extracted from the samples. To simplify the model, the input to S is actually a random gait contour map from the gait contour map sequence. The task of S is to identify the camera height in the gait contour map and output a 128×1 enhancement vector (output2) corresponding to the camera height. The corresponding element-wise multiplication of output2 and output1 yields the enhanced feature vector. This feature vector is then compared with the feature vector of the same target in the control group (level shot) to calculate the triplet loss. In other words, different camera heights correspond to different enhancement vectors. By multiplying the enhancement vector element-wise with the feature vector output1 from G, output1 can be enhanced according to different camera heights. To better extract information related to camera height, an auxiliary classifier A is added after S to assist training. To simplify dataset acquisition, camera height is used as a variable in the dataset. Let h0 be the camera height at level shot. A dataset containing n target subjects and k camera heights (h0, h1, ..., h0) is constructed. k-1 The gait video database D is used. The first m targets are divided into a training set D. train The remaining nm targets are divided into a validation set D. test ;
[0141] The next step is the model application: preprocessing, which decomposes the input video X0 into frame-level sequence images, followed by binarization, cropping, alignment, and other operations. After this process, the original gait video is processed into a gait sequence X of size 64×64 contour images: X={x0,x1,…,x…} t-1};
[0142] Feature extraction: Gait recognition network G can extract gait features of a certain dimension from gait contour map sequences, denoted as f. q The present invention sets the dimension to 128×1, that is, f qGiven a 128×1 feature vector, this step can be expressed as: f q =G(X);
[0143] Feature enhancement: Feature enhancement module S is used to enhance f q Gait information in the sequence. The feature enhancement module S is implemented by a convolutional neural network, and its input is the first contour map in the preprocessed gait sequence. This step is represented as: f a =S(x0); if the image capture height is h1, then A outputs a corresponding enhancement vector. with f q Multiplying corresponding elements together yields the final feature vector:
[0144] Identity recognition: f after feature enhancement processing i The sample is fed into classifier C and compared with the flat features in the registration set to calculate the feature distance. To distinguish between strangers and registered employees, a threshold β is set in C. When the feature distance between a sample in the probe set and all samples in the registration set is greater than β, the classifier will determine that the sample is a stranger sample.
[0145] This application also provides a gait recognition device, referring to... Figure 3 The gait recognition device includes:
[0146] The acquisition module 10 is used to acquire the image of the user to be identified;
[0147] The enhancement module 20 is used to input the user image to be identified into a preset gait image enhancement model, perform feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and perform feature enhancement processing on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0148] The determination module 30 is used to determine user identification information based on the second feature vector.
[0149] Optionally, the gait recognition device further includes:
[0150] The sample acquisition module is used to acquire user image samples, feature vector labels of the user image samples, and gait recognition model;
[0151] The feature extraction module is used to input the user image sample into the gait recognition model, and perform feature extraction processing on the user image sample based on the gait recognition model to obtain the third feature vector of the user image sample;
[0152] The training module is used to iteratively train the preset main training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements.
[0153] Optionally, the training module includes:
[0154] The first prediction module is used to input the third feature vector into the main training model to obtain the first prediction enhancement vector, and to determine the fourth feature vector based on the first prediction enhancement vector and the third feature vector.
[0155] The first loss module is used to perform triplet loss on the fourth feature vector and the feature vector label of the user image sample to obtain the first loss function.
[0156] The first judgment module is used to determine whether the main training model has completed its iteration based on the first loss function;
[0157] The first iterative training module is used to return to the step of inputting the third feature vector into the main training model to obtain the first predicted enhancement vector if the main training model has not completed its iteration, and to determine the fourth feature vector based on the first predicted enhancement vector and the third feature vector, until the main training model completes its iteration and training stops, thereby obtaining a gait image enhancement model that meets the accuracy conditions.
[0158] Optionally, the training module further includes:
[0159] The tag acquisition module is used to acquire the shooting height tag of the user image sample;
[0160] An auxiliary training module is used to input the third feature vector into a preset auxiliary training model to obtain predicted shooting height data;
[0161] The second prediction module is used to input the third feature vector and the predicted shooting height data into the main training model to obtain the second prediction enhancement vector, and to obtain the fifth feature vector based on the second prediction enhancement vector and the third feature vector;
[0162] The second loss module is used to determine a second loss function based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample;
[0163] The second judgment module is used to determine whether the main training model has completed its iteration based on the second loss function;
[0164] The second iterative training module is used to return to the step of inputting the third feature vector into the preset auxiliary training model to obtain the predicted shooting height data if the main training model has not completed its iteration, until the main training model has completed its iteration and training is stopped, so as to obtain a gait image enhancement model that meets the accuracy conditions.
[0165] Optionally, the second loss module includes:
[0166] The triplet loss module is used to perform triplet loss on the fifth feature vector, the first feature vector label, and the second feature vector label to obtain a third loss function.
[0167] The cross-entropy loss module is used to perform cross-entropy loss on the shooting height labels of the user image samples and the predicted shooting height data to obtain a fourth loss function;
[0168] The second loss function determination module is used to determine the second loss function based on the third loss function and the fourth loss function.
[0169] Optionally, the reinforcement module 20 includes:
[0170] The gait feature extraction module is used to perform feature extraction processing on the user image to be identified based on the gait recognition model to obtain the first feature vector of the user image to be identified;
[0171] The gait information enhancement module is used to perform gait information enhancement processing on the user image to be identified based on the feature enhancement model, so as to obtain the enhancement vector of the user image to be identified.
[0172] The calculation module is used to multiply the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector.
[0173] Optionally, the determining module 30 includes:
[0174] The image feature acquisition module is used to acquire image features from the user registration set;
[0175] The feature distance calculation module is used to calculate the feature distance between the second feature vector and the image features of the registration machine, and obtain the feature distance result.
[0176] The user identification information determination module is used to determine user identification information based on the feature distance result.
[0177] The specific implementation of the gait recognition device in this application is basically the same as the embodiments of the gait recognition method described above, and will not be repeated here.
[0178] Reference Figure 1 , Figure 1This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of this application.
[0179] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0180] Optionally, the gait recognition device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard. Optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0181] Those skilled in the art will understand that Figure 1 The gait recognition device structure shown does not constitute a limitation on the gait recognition device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0182] like Figure 1 As shown, the memory 1005, serving as a storage medium, may include an operating system, a network communication module, and a gait recognition program. The operating system is a program that manages and controls the hardware and software resources of the gait recognition device, supporting the operation of the gait recognition program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the gait recognition system.
[0183] exist Figure 1 In the gait recognition device shown, the processor 1001 is used to execute the gait recognition program stored in the memory 1005 to implement the steps of the gait recognition method described in any of the above claims.
[0184] The specific implementation of the gait recognition device in this application is basically the same as the embodiments of the gait recognition method described above, and will not be repeated here.
[0185] This application also provides a storage medium storing a program implementing a gait recognition method, the program implementing the gait recognition method being executed by a processor to implement the gait recognition method as follows:
[0186] Acquire the image of the user to be identified;
[0187] The user image to be identified is input into a preset gait image enhancement model. Based on the gait image enhancement model, feature extraction processing is performed on the user image to be identified to obtain a first feature vector of the user image to be identified. Then, feature enhancement processing is performed on the first feature vector to obtain a second feature vector. The gait recognition model is composed of a gait recognition model and a feature enhancement model.
[0188] User identification information is determined based on the second feature vector.
[0189] Optionally, before the step of acquiring the user image to be identified, the method includes:
[0190] Acquire user image samples, feature vector labels of the user image samples, and a gait recognition model;
[0191] The user image sample is input into the gait recognition model, and based on the gait recognition model, feature extraction processing is performed on the user image sample to obtain the third feature vector of the user image sample;
[0192] Based on the third feature vector and the feature vector labels of the user image samples, the preset main training model is iteratively trained to obtain a gait image enhancement model that meets the accuracy requirements.
[0193] Optionally, the step of iteratively training a preset master training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements includes:
[0194] The third feature vector is input into the main training model to obtain the first predicted enhancement vector, and the fourth feature vector is determined based on the first predicted enhancement vector and the third feature vector.
[0195] The fourth feature vector is combined with the feature vector labels of the user image sample to perform triplet loss, resulting in the first loss function.
[0196] Based on the first loss function, determine whether the main training model has completed its iteration;
[0197] If the main training model has not completed its iteration, the process returns to inputting the third feature vector into the main training model to obtain the first predicted enhancement vector, and determining the fourth feature vector based on the first predicted enhancement vector and the third feature vector. Training continues until the main training model has completed its iteration and training stops, resulting in a gait image enhancement model that meets the accuracy requirements.
[0198] Optionally, the step of iteratively training a preset master training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements further includes:
[0199] Obtain the shooting height label of the user image sample;
[0200] The third feature vector is input into a preset auxiliary training model to obtain predicted shooting height data, and the auxiliary training model is trained in the next round based on the predicted shooting height data and the shooting height label.
[0201] The third feature vector and the predicted shooting height data are input into the main training model to obtain the second prediction enhancement vector, and the fifth feature vector is obtained based on the second prediction enhancement vector and the third feature vector.
[0202] Based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample, a second loss function is determined;
[0203] Based on the second loss function, determine whether the main training model has completed its iteration;
[0204] If the main training model has not completed its iteration, the process returns to inputting the third feature vector into a preset auxiliary training model to obtain predicted shooting height data. Based on the predicted shooting height data and the shooting height label, the auxiliary training model is trained for the next round until the main training model has completed its iteration and training stops, resulting in a gait image enhancement model that meets the accuracy requirements.
[0205] Optionally, the feature vector label of the user image sample includes a first feature vector label corresponding to the fifth feature vector and a second feature vector label not corresponding to the fifth feature vector. The step of determining the second loss function based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample includes:
[0206] The third loss function is obtained by applying triplet loss to the fifth feature vector, the first feature vector label, and the second feature vector label.
[0207] A fourth loss function is obtained by applying cross-entropy loss to the shooting height labels of the user image samples and the predicted shooting height data;
[0208] The second loss function is determined based on the third loss function and the fourth loss function.
[0209] Optionally, the step of performing feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and performing feature enhancement processing on the first feature vector to obtain a second feature vector, includes:
[0210] Based on the gait recognition model, feature extraction processing is performed on the user image to be identified to obtain the first feature vector of the user image to be identified;
[0211] Based on the feature enhancement model, gait information enhancement processing is performed on the user image to be identified to obtain the enhanced vector of the user image to be identified;
[0212] Multiply the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector.
[0213] Optionally, the step of determining user identification information based on the second feature vector includes:
[0214] Obtain image features from the user registration set;
[0215] Calculate the feature distance between the second feature vector and the image features of the registration machine to obtain the feature distance result;
[0216] Based on the feature distance results, user identification information is determined.
[0217] The specific implementation of the storage medium in this application is basically the same as the embodiments of the gait recognition method described above, and will not be repeated here.
[0218] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the gait recognition method described above.
[0219] The specific implementation of the computer program product of this application is basically the same as the embodiments of the above-described gait recognition method, and will not be repeated here.
[0220] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0221] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0222] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0223] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A gait recognition method, characterized in that, The gait recognition method includes: Acquire the image of the user to be identified; Prior to the step of acquiring the user image to be identified, the method includes: Acquire user image samples, feature vector labels of the user image samples, and a gait recognition model; The user image sample is input into the gait recognition model, and based on the gait recognition model, feature extraction processing is performed on the user image sample to obtain the third feature vector of the user image sample; Based on the third feature vector and the feature vector labels of the user image samples, the preset main training model is iteratively trained to obtain a gait image enhancement model that meets the accuracy requirements. The step of iteratively training a preset main training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements further includes: Obtain the shooting height label of the user image sample; The third feature vector is input into a preset auxiliary training model to obtain predicted shooting height data, and the auxiliary training model is trained in the next round based on the predicted shooting height data and the shooting height label. The third feature vector and the predicted shooting height data are input into the main training model to obtain the second prediction enhancement vector, and the fifth feature vector is obtained based on the second prediction enhancement vector and the third feature vector. Based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample, a second loss function is determined; The feature vector labels of the user image samples include a first feature vector label corresponding to the fifth feature vector and a second feature vector label not corresponding to the fifth feature vector. The step of determining the second loss function based on the shooting height label of the user image samples, the predicted shooting height data, the fifth feature vector, and the feature vector labels of the user image samples includes: The third loss function is obtained by applying triplet loss to the fifth feature vector, the first feature vector label, and the second feature vector label. A fourth loss function is obtained by applying cross-entropy loss to the shooting height labels of the user image samples and the predicted shooting height data; Based on the third loss function and the fourth loss function, the second loss function is determined; Based on the second loss function, determine whether the main training model has completed its iteration; If the main training model has not completed its iteration, the process returns to inputting the third feature vector into the preset auxiliary training model to obtain the predicted shooting height data. Based on the predicted shooting height data and the shooting height label, the auxiliary training model is trained in the next round until the main training model has completed its iteration and training is stopped, resulting in a gait image enhancement model that meets the accuracy requirements. The user image to be identified is input into a preset gait image enhancement model. Based on the gait image enhancement model, feature extraction processing is performed on the user image to be identified to obtain a first feature vector of the user image to be identified. Then, feature enhancement processing is performed on the first feature vector to obtain a second feature vector. The gait image enhancement model is composed of a gait recognition model and a feature enhancement model. User identification information is determined based on the second feature vector.
2. The gait recognition method as described in claim 1, characterized in that, The step of iteratively training a preset main training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements includes: The third feature vector is input into the main training model to obtain the first predicted enhancement vector, and the fourth feature vector is determined based on the first predicted enhancement vector and the third feature vector. The fourth feature vector is combined with the feature vector labels of the user image sample to perform triplet loss, resulting in the first loss function. Based on the first loss function, determine whether the main training model has completed its iteration; If the main training model has not completed its iteration, the process returns to inputting the third feature vector into the main training model to obtain the first predicted enhancement vector, and determining the fourth feature vector based on the first predicted enhancement vector and the third feature vector. Training continues until the main training model has completed its iteration and training stops, resulting in a gait image enhancement model that meets the accuracy requirements.
3. The gait recognition method as described in claim 1, characterized in that, The step of performing feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and performing feature enhancement processing on the first feature vector to obtain a second feature vector, includes: Based on the gait recognition model, feature extraction processing is performed on the user image to be identified to obtain the first feature vector of the user image to be identified; Based on the feature enhancement model, gait information enhancement processing is performed on the user image to be identified to obtain the enhanced vector of the user image to be identified; Multiply the corresponding elements of the first feature vector and the enhancement vector to obtain the second feature vector.
4. The gait recognition method as described in claim 1, characterized in that, The step of determining user identification information based on the second feature vector includes: Obtain image features from the user registration set; Calculate the feature distance between the second feature vector and the image features of the registration set to obtain the feature distance result; Based on the feature distance results, user identification information is determined.
5. A gait recognition device, characterized in that, The gait recognition device includes: The acquisition module is used to acquire the image of the user to be identified; Before the step of acquiring the user image to be identified, the following steps are included: Acquire user image samples, feature vector labels of the user image samples, and a gait recognition model; The user image sample is input into the gait recognition model, and based on the gait recognition model, feature extraction processing is performed on the user image sample to obtain the third feature vector of the user image sample; Based on the third feature vector and the feature vector labels of the user image samples, the preset main training model is iteratively trained to obtain a gait image enhancement model that meets the accuracy requirements. The step of iteratively training a preset main training model based on the third feature vector and the feature vector labels of the user image samples to obtain a gait image enhancement model that meets the accuracy requirements also includes: Obtain the shooting height label of the user image sample; The third feature vector is input into a preset auxiliary training model to obtain predicted shooting height data, and the auxiliary training model is trained in the next round based on the predicted shooting height data and the shooting height label. The third feature vector and the predicted shooting height data are input into the main training model to obtain the second prediction enhancement vector, and the fifth feature vector is obtained based on the second prediction enhancement vector and the third feature vector. Based on the shooting height label of the user image sample, the predicted shooting height data, the fifth feature vector, and the feature vector label of the user image sample, a second loss function is determined; The feature vector labels of the user image samples include a first feature vector label corresponding to the fifth feature vector and a second feature vector label not corresponding to the fifth feature vector. The step of determining the second loss function based on the shooting height label of the user image samples, the predicted shooting height data, the fifth feature vector, and the feature vector labels of the user image samples includes: The third loss function is obtained by applying triplet loss to the fifth feature vector, the first feature vector label, and the second feature vector label. A fourth loss function is obtained by applying cross-entropy loss to the shooting height labels of the user image samples and the predicted shooting height data; Based on the third loss function and the fourth loss function, the second loss function is determined; Based on the second loss function, determine whether the main training model has completed its iteration; If the main training model has not completed its iteration, the process returns to inputting the third feature vector into the preset auxiliary training model to obtain the predicted shooting height data. Based on the predicted shooting height data and the shooting height label, the auxiliary training model is trained in the next round until the main training model has completed its iteration and training is stopped, resulting in a gait image enhancement model that meets the accuracy requirements. The enhancement module is used to input the user image to be identified into a preset gait image enhancement model, perform feature extraction processing on the user image to be identified based on the gait image enhancement model to obtain a first feature vector of the user image to be identified, and perform feature enhancement processing on the first feature vector to obtain a second feature vector. The gait image enhancement model is composed of a gait recognition model and a feature enhancement model. The determination module is used to determine user identification information based on the second feature vector.
6. A gait recognition device, characterized in that, The gait recognition device includes: a memory, a processor, and a program stored in the memory for implementing the gait recognition method. The memory is used to store the program that implements the gait recognition method; The processor is configured to execute a program that implements the gait recognition method to implement the steps of the gait recognition method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a program for implementing the gait recognition method, which is executed by a processor to implement the steps of the gait recognition method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image processing model training method and device and medium
CN110827219A
Face recognition method and system based on BP neural network
CN111652021A