Pedestrian identity recognition method and device, equipment and storage medium

Through deep learning technology, the pre-trained object detection model and identity recognition model are used to solve the problem that pedestrian identity recognition in the monitoring video stream is susceptible to environmental factors, achieving higher recognition accuracy and efficiency.

CN119832640APending Publication Date: 2025-04-15BEIJING INST OF RADIO METROLOGY & MEASUREMENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411967834.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The prior art is susceptible to environmental factors when using surveillance video streams to identify pedestrians, and cannot guarantee accuracy and difficult to achieve good results.

Method used

Deep learning technology is used to identify pedestrians through pre-trained object detection model and identity recognition model. The object detection model is used to extract the whole body image of a pedestrian, while the identity recognition model is compared and learned through knowledge distillation between the student network and the teacher network, and outputs the target feature vector to achieve identity recognition.

Benefits of technology

It improves the accuracy and efficiency of pedestrian identity identification, and can accurately track pedestrians between different cameras, which is suitable for security monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832640A_ABST
    Figure CN119832640A_ABST
Patent Text Reader

Abstract

The invention discloses a pedestrian identity recognition method, device and equipment and a storage medium, relates to the field of computer vision, and aims to solve the problems that in the prior art, when identity recognition is carried out by using monitoring video streams, the identity recognition is easily influenced by environmental factors, the accuracy cannot be ensured, and a good effect is difficult to obtain. The method comprises the following steps: acquiring a to-be-recognized target image; inputting the target image into a pre-trained target detection model to obtain a pedestrian detection frame, and cutting the target image into blocks according to the pedestrian detection frame to obtain a pedestrian whole body image; preprocessing the whole-body image of the pedestrian, and inputting the whole-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model; and outputting an identity recognition result according to the target feature vector. Based on the method, the whole-body image of the pedestrian is extracted through the target detection model, and the target feature vector is extracted through the identity recognition model, so that the accuracy of identity recognition is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] At present, the application of deep learning methods in the field of computer vision is becoming more and more popular. At the same time, with the widespread distribution of surveillance cameras in shopping malls, residential areas, stations, campuses and even streets, deep learning and convolutional neural networks (CNN) are increasingly used in applications such as pedestrian detection, tracking systems and identity recognition. Neural networks are gradually becoming an ideal choice in the field of image classification and target detection.

[0003] In the related technology, when using surveillance video streams to identify pedestrians, the main methods used are recognition schemes based on face detection and recognition schemes based on trajectory tracking. However, the application scenarios of these two schemes are limited. In actual application scenarios, they are easily affected by environmental factors and cannot guarantee a certain accuracy rate. It is difficult to achieve good results. Specifically, due to the activity trajectory of the target pedestrian or the resolution of the camera, the area pixels of the obtained pedestrian image are generally larger than 150*450 pixels, and the high-definition frontal facial information of the target pedestrian cannot be obtained, and thus high-precision face recognition and comparison cannot be performed. On the other hand, in crowded scenes, since the target is very easy to intersect with the trajectory of other non-interested targets, the output results of the trajectory tracking algorithm will be disordered. In addition, in multi-camera scenes, since the trajectory tracking algorithm mainly relies on the results of the previous frames for re-inference, the label of the target pedestrian cannot be shared among multiple cameras, further affecting the overall recognition effect. Summary of the invention

[0004] The present specification provides a pedestrian identification method, device, equipment and storage medium to solve the problem that the prior art is easily affected by environmental factors when using surveillance video streams for identification, cannot guarantee accuracy, and is difficult to achieve good results.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] In a first aspect of the present specification, a pedestrian identification method is provided, comprising:

[0007] Acquire a target image to be identified;

[0008] Input the target image into a pre-trained target detection model to obtain a pedestrian detection frame output by the target detection model, and slice the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of the feature extraction;

[0009] Preprocessing the pedestrian full-body image, and inputting the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network perform comparative learning based on knowledge distillation, and perform iterative training by presetting a cross-entropy loss function;

[0010] According to the target feature vector, an identity recognition result is output.

[0011] In some preferred embodiments, determining the identity recognition result according to the target feature vector includes:

[0012] Acquire a pedestrian feature set, wherein the pedestrian feature set stores a plurality of sample feature vectors and pedestrian identity information corresponding to each sample feature vector;

[0013] Comparing the target feature vector with each sample feature vector in the pedestrian feature set in sequence to determine whether there is a first feature vector in the pedestrian feature set, and the similarity between the first feature vector and the target feature vector is less than a preset first threshold;

[0014] If the first feature vector exists in the pedestrian feature set, it is determined that the identity recognition is successful, and the pedestrian identity information corresponding to the first feature vector is used as the identity recognition result.

[0015] In some preferred embodiments, the method further comprises:

[0016] Determine whether there is a second feature vector in the pedestrian feature set, and the Euclidean space distance between the second feature vector and the appearance feature vector is greater than a preset second threshold;

[0017] If it is determined that the second feature vector exists in the pedestrian feature set, the pedestrian identity information corresponding to the second feature vector is obtained, and the second feature vector and the corresponding pedestrian identity information are stored in the pedestrian feature set to update the pedestrian feature set.

[0018] In some preferred embodiments, the preprocessing of the pedestrian full-body image includes:

[0019] Traversing each full-body image of a pedestrian, and determining a first image and a second image in the full-body image of the pedestrian, wherein the first image is a full-body image of the pedestrian whose image pixel value is lower than a preset pixel threshold, and the second image is a full-body image of the pedestrian whose image occlusion rate is higher than a preset image occlusion threshold;

[0020] The first image and the second image are deleted from the pedestrian full-body image to obtain a preprocessed pedestrian full-body image.

[0021] In some preferred embodiments, the training process of the target detection model includes:

[0022] Pre-training the initial target detection model by presetting the first data set to determine the initial model weights;

[0023] Obtaining a target detection data set, and dividing the target detection data set into a training set and a validation set according to a preset data division ratio;

[0024] Based on the initial model weights, the initial target detection model is iteratively trained through the training set, and an evaluation result is determined through the validation set, so as to iteratively adjust the hyperparameters of the initial target detection model according to the evaluation result until the evaluation result meets the preset expected value.

[0025] In some preferred embodiments, the step of acquiring a target detection dataset includes:

[0026] Acquire a second data set, wherein the second data set includes pedestrian images from multiple different sources, with different characteristics, and in different acquisition methods;

[0027] Preprocessing the second data set includes: image enhancement based on Mosaic, affine transformation based on Randommaffine, image based on Mixup, and image conversion based on random parameter adjustment;

[0028] The preprocessed second data set is labeled to obtain the target detection data set.

[0029] In some preferred embodiments, the training process of the identity recognition model includes:

[0030] Acquire a target detection data set for training the target detection model, and extract a full-body image of a pedestrian from the target detection data set;

[0031] Randomly transforming the full-body image of the pedestrian to obtain a global perspective image and a local perspective image;

[0032] Inputting the global perspective image into an initial teacher network, and inputting the global perspective image and the local perspective image into an initial student network, to obtain a first eigenvector output by the initial teacher network and a second eigenvector output by the initial student network;

[0033] By using a preset activation function, the first feature vector and the second feature vector are respectively mapped into probability distributions, and the cross entropy of the two probability distributions is calculated to measure the distribution similarity;

[0034] Calculate the target loss value by presetting the minimized cross entropy loss function;

[0035] According to the target loss value, the initial student network and the initial teacher network are iteratively trained until the target loss value reaches a preset standard value, wherein the parameters of the student network are learnable parameters, and the learnable parameters are weighted updated using a preset stochastic gradient descent algorithm, and the parameters of the teacher network are the weighted sum of the teacher network parameters and the student network parameters at the previous iteration.

[0036] In a second aspect of the present specification, a pedestrian identification device is provided, comprising:

[0037] A data acquisition module, used to acquire a target image to be identified;

[0038] A first detection module is used to input the target image into a pre-trained target detection model, obtain a pedestrian detection frame output by the target detection model, and slice the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of the feature extraction;

[0039] A second detection module is used to preprocess the pedestrian full-body image and input the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network perform comparative learning based on knowledge distillation, and perform iterative training by presetting a cross entropy loss function;

[0040] A data output module is used to output an identity recognition result according to the target feature vector.

[0041] The third aspect of this specification provides a pedestrian identification device, comprising: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the pedestrian identification method described in the first aspect.

[0042] In a fourth aspect of the present specification, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the pedestrian identification method described in the first aspect.

[0043] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0044] The present invention uses deep learning technology and relies on massive raw image data to perform deep training of the model, continuously optimizing its recognition ability and response speed. Based on this method, the full-body image of the pedestrian is first identified through the target detection model, and on this basis, the target feature vector that can characterize the identity characteristics of the pedestrian is further extracted through the identity recognition model, thereby making the identity recognition result obtained based on the target feature vector more accurate.

[0045] Specifically, since this method first extracts and slices the full-body image of the pedestrian from the target image of the surveillance video frame, it can effectively isolate irrelevant images in the environment, thereby making the target feature vector extracted in the subsequent steps more accurate. Based on this method, pedestrians can also be accurately and efficiently identified and tracked between different cameras, which is of great significance in the field of security monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0047] Figure 1 A flowchart of a pedestrian identification method provided in an embodiment of this specification;

[0048] Figure 2 A schematic diagram of the structure of a pedestrian identification device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0050] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0051] Please refer to Figure 1 ,like Figure 1 As shown, the first embodiment of the present application proposes a pedestrian identification method, the method comprising:

[0052] Step S1, obtaining a target image to be identified;

[0053] Step S2, inputting the target image into a pre-trained target detection model, obtaining a pedestrian detection frame output by the target detection model, and slicing the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of feature extraction;

[0054] In this embodiment, a target image containing the pedestrian to be detected is first obtained by using a suitable image acquisition device or by capturing a fixed frame from a video stream. This image serves as basic data for subsequent detection and analysis in this embodiment.

[0055] The target detection model in this embodiment includes a backbone network and a prediction head. The backbone network is responsible for extracting features from the target image, such as extracting representative feature information from the image through a series of convolution and pooling operations. The backbone network is followed by a prediction head, which is used to predict and output the pedestrian detection frame according to the result of feature extraction.

[0056] In this embodiment, after all the pedestrian cropped images and skeleton images are obtained by using the target detection model, the images that do not meet the quality standards are screened and the image blocks that are too small and smaller than the preset pixels (preferably, the preset pixels are set to 30,000) and the images that are severely blocked are discarded. It can be understood that the image blocks with too small pixel values ​​are discarded because they may not provide sufficiently clear and complete pedestrian information; at the same time, the images that are severely blocked are also discarded because their key parts are blocked, which may cause deviations or inaccuracies in subsequent analysis.

[0057] Based on this, the data quality of subsequent processing can be effectively ensured and the accuracy and reliability of the overall detection and analysis can be improved.

[0058] Step S3, preprocessing the pedestrian full-body image, and inputting the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network are subjected to comparative learning based on knowledge distillation, and are iteratively trained by minimizing a preset cross entropy loss function;

[0059] Step S4: outputting the identity recognition result according to the target feature vector.

[0060] Specifically, the architecture of the identity recognition model in this embodiment is the same as the architecture of knowledge distillation, that is, the model weights are trained in a contrastive learning manner. The identity recognition model includes a feature extractor for a student network and a feature extractor for a teacher network. After feature extraction of the two networks, the softmax activation function with a temperature parameter is used to map the features to a probability distribution, and the cross entropy of the two distributions is calculated to measure the distribution similarity. Since the image blocks of different perspectives come from the same image, the loss function or optimization goal of this model is to minimize the cross entropy loss.

[0061] In this embodiment, the preprocessed pedestrian images are input into the identity recognition model to output the corresponding vector for each picture, and then the identity recognition judgment is performed using the preset database. Specifically, the cosine similarity can be compared with the preset pictures in the database, and the pictures with a similarity less than 0.01 are recorded as "hit", that is, the target of interest is found in the scene.

[0062] Furthermore, determining the identity recognition result based on the target feature vector includes: obtaining a pedestrian feature set, wherein the pedestrian feature set stores multiple sample feature vectors and pedestrian identity information corresponding to each sample feature vector; sequentially comparing the target feature vector with each sample feature vector in the pedestrian feature set for similarity, to determine whether there is a first feature vector in the pedestrian feature set, the similarity between the first feature vector and the target feature vector being less than a preset first threshold; if the first feature vector exists in the pedestrian feature set, determining that the identity recognition is successful, and using the pedestrian identity information corresponding to the first feature vector as the identity recognition result.

[0063] Furthermore, the method also includes: determining whether there is a second feature vector in the pedestrian feature set, and the Euclidean space distance between the second feature vector and the appearance feature vector is greater than a preset second threshold; if it is determined that the second feature vector exists in the pedestrian feature set, obtaining the pedestrian identity information corresponding to the second feature vector, and storing the second feature vector and the corresponding pedestrian identity information in the pedestrian feature set to update the pedestrian feature set.

[0064] In this embodiment, after each full-body image of a pedestrian is input into the identity recognition model and mapped into a target feature vector, it is compared with each pair of pedestrian-feature set mappings in the database, that is, the input image block is compared with the existing feature set in the database using cosine similarity to perform Euclidean space distance comparison. Specifically, the distance is performed with the above-mentioned first threshold of 0.01 and the second threshold of 0.2. If the similarity is less than 0.01, the input pedestrian image block can be determined to belong to a certain pedestrian. Image blocks with a similarity balance between 0.01-0.2 are discarded. In addition, if the similarity is greater than 0.2, the image block can be regarded as pedestrian information that is not yet stored in the database, and a new pedestrian-feature set mapping can be established to expand the database.

[0065] Furthermore, the preprocessing of the pedestrian full-body image includes: traversing each pedestrian full-body image, and determining a first image and a second image in the pedestrian full-body image, the first image being a pedestrian full-body image with a picture pixel value lower than a preset pixel threshold, and the second image being a pedestrian full-body image with a picture occlusion rate higher than a preset image occlusion threshold; deleting the first image and the second image in the pedestrian full-body image to obtain a preprocessed pedestrian full-body image.

[0066] In this embodiment, the preset pixel threshold may be 30,000, and the preset image occlusion threshold may be thirty percent, that is, image blocks that are too small with a size less than 30,000 pixels and images that are severely occluded (with an occlusion rate higher than thirty percent) are discarded to ensure the accuracy of the final detection result.

[0067] Furthermore, the training process of the target detection model includes: pre-training the initial target detection model by presetting a first data set to determine the initial model weight; obtaining the target detection data set, and dividing the target detection data set into a training set and a validation set according to a preset data division ratio; based on the initial model weight, iteratively training the initial target detection model through the training set, and determining the evaluation result through the validation set, so as to iteratively adjust the hyperparameters of the initial target detection model according to the evaluation result until the evaluation result meets the preset expected value.

[0068] Furthermore, the acquiring of the target detection data set includes:

[0069] Acquire a second data set, which includes pedestrian images from a variety of different sources, different characteristics, and different acquisition methods; preprocess the second data set, including: image enhancement based on Mosaic, affine transformation based on Randommaffine, image based on Mixup, and image conversion based on random parameter adjustment; annotate the preprocessed second data set to obtain the target detection data set.

[0070] Specifically, the first data set mentioned above can be a relatively reliable public data set in the field. As an example, this embodiment uses the public COCO2016Keypoint data set for model pre-training, and after pre-training, it obtains a variety of different sources, different characteristics or different acquisition methods to expand the data set, covering different scenes such as indoor, outdoor, day and night changes, etc., different shooting equipment, different lighting conditions, different weather conditions, image and video data, and completes the annotation of the overall data set in a machine-assisted and manually reviewed manner. More source data contains more diverse samples, and these samples can cover a wider range of data distribution. Therefore, the model trained with multi-source data can learn more diverse feature representations, so that it has stronger generalization ability, enabling the model to better handle unseen data and show good performance in different tasks or scenarios.

[0071] In this embodiment, the pre-trained weights on the MsCOCO public dataset are used as the initial weights, which can significantly speed up the training of the model. By using the pre-trained weights, the initial detection model can determine the correct parameter direction more quickly, thereby accelerating the training process, significantly shortening the model training time, and improving the efficiency of research or application.

[0072] In addition, since the pre-trained weights are trained on a large amount of data, they already have a certain generalization ability. When these weights are used as initial weights, the model can more easily learn new features, thereby better adapting to the new data distribution and improving generalization ability. During the model training process, the learning rate gradually decreases. As the learning rate decreases, the step size of the model update in each iteration gradually decreases, which helps the model converge more stably in the later stages of training. The loss fluctuations during the training process are usually small, making it easier to converge to the optimal solution and improve the stability of the model. Gradually reducing the learning rate helps the model better generalize to unseen data in the later stages of training and avoid overfitting. It can achieve better performance in a shorter time and accelerate the training process. Using the strategy of gradually reducing the learning rate can save computing resources and reduce training costs. Using well-trained target detection models and classification models can realize the recognition of various hidden danger features and improve recognition accuracy.

[0073] When preprocessing the second data set, the preprocessing methods used include: Mosaic preprocessing, taking out four pictures, randomly cropping, scaling, cropping an area and rearranging them, and splicing four pictures into one picture; Random affine affine transformation randomly rotates, translates, scales, and cuts the pictures; MixUp changes the transparency of two pictures and merges them together; and other methods such as randomly adjusting the hue, saturation and transparency, and randomly flipping up and down and left and right. The performance and generalization ability of the model are improved, making it better adapted to state recognition in various complex application scenarios. It should be noted that if the picture is affine transformed, the corresponding human key point annotations are processed in the same way.

[0074] Preferably, the preset data division ratio is 5:1, that is, the data is divided into a training set and a validation set in a ratio of 5:1.

[0075] As a feasible implementation method, when dividing the data set, a test set is also divided to evaluate the generalization performance of the initial deep learning model through the test set, and the initial deep learning model whose generalization performance meets the expected effect is selected as the trained deep learning model.

[0076] Furthermore, the training process of the identity recognition model includes: obtaining a target detection data set for training the target detection model, and extracting a full-body image of a pedestrian from the target detection data set; performing random transformations on the full-body image of the pedestrian to obtain a global perspective image and a local perspective image; inputting the global perspective image into an initial teacher network, and inputting the global perspective image and the local perspective image into an initial student network to obtain a first eigenvector output by the initial teacher network and a second eigenvector output by the initial student network; through a preset activation function, mapping the first eigenvector and the second eigenvector to probability distributions respectively, and calculating the cross entropy of the two probability distributions to measure the distribution similarity; calculating a target loss value by minimizing the cross entropy loss function; according to the target loss value, iteratively training the initial student network and the initial teacher network until the target loss value reaches a preset standard value, wherein the parameters of the student network are learnable parameters, and the learnable parameters are weighted updated using a preset stochastic gradient descent algorithm, and the parameters of the teacher network are the weighted sum of the teacher network parameters and the student network parameters at the previous iteration.

[0077] It should be noted that since the appearance information of pedestrians is crucial to identity discrimination, this embodiment incorporates appearance information into the pedestrian features with reference to the DINO method, so that pedestrians with similar appearances are closer in the feature space. The model input is a picture, and after random transformation, 2 global perspectives and 4 local perspectives are obtained. The random transformation includes horizontal flipping with a probability of 50%; randomly changing brightness, contrast, saturation and hue with a probability of 80%; converting color pictures to grayscale images with a probability of 20%; and randomly adding Gaussian noise. The global perspective is obtained by randomly cropping the original image and ensuring that the cropped image occupies more than 80% of the original image; similarly, the cropped image of the local perspective occupies 10%-30% of the original image.

[0078] In terms of network construction, the student network and the teacher network have the same architecture, both consisting of a vision tranformer (ViT) module. The teacher network only accepts input from global perspective image blocks, while the student network includes input from all perspectives. Based on the self-attention mechanism, the input image is divided into a sequence of image blocks that are flattened into 1*9, and then these sequences are passed to (ViT). Through the self-attention mechanism and position embedding, ViT can map each image block into a high-dimensional space and capture the global and local information in the image.

[0079] In order to maintain consistency at each training timestamp, the two-way network architecture adopts the momentum encoder method with reference to the MoCo algorithm. Among them, the parameters of the student network are learnable parameters, and the weights are updated using the stochastic gradient descent algorithm; the parameters of the teacher network are the weighted sum of the teacher network parameters and the student network parameters at the previous moment; during the training process, considering the size of the graphics card memory, the batch size is set to 32, and the learning rate is slowly reduced from 0.01 to 0.0001 in the form of a cosine curve to avoid gradient oscillation. The temperature parameter of the student network is set to 0.1, and the temperature parameter of the teacher network is set to 0.06.

[0080] Please refer to Figure 2 The second embodiment of the present application proposes a pedestrian identification device, such as Figure 2 As shown, the pedestrian identification device includes:

[0081] A data acquisition module, used to acquire a target image to be identified;

[0082] A first detection module is used to input the target image into a pre-trained target detection model, obtain a pedestrian detection frame output by the target detection model, and slice the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of the feature extraction;

[0083] A second detection module is used to preprocess the pedestrian full-body image and input the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network perform comparative learning based on knowledge distillation, and perform iterative training by presetting a cross entropy loss function;

[0084] A data output module is used to output an identity recognition result according to the target feature vector.

[0085] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of each module in the above-described device can refer to the corresponding process in the aforementioned method example, and will not be repeated here.

[0086] The third embodiment of the present application proposes a pedestrian identification device, comprising: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned pedestrian identification method.

[0087] The fourth embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the above-mentioned pedestrian identification method.

[0088] Technicians in the relevant technical field can clearly understand that, for the convenience and conciseness of description, the specific working process or relevant instructions when the instructions in the pedestrian identification device described above and the computer-readable storage medium are executed can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0089] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A pedestrian identification method, characterized in that: The method comprises: Acquire a target image to be identified; Input the target image into a pre-trained target detection model to obtain a pedestrian detection frame output by the target detection model, and slice the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of the feature extraction; Preprocessing the pedestrian full-body image, and inputting the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network perform comparative learning based on knowledge distillation, and perform iterative training by presetting a cross-entropy loss function; According to the target feature vector, an identity recognition result is output.

2. The pedestrian identification method according to claim 1, characterized in that: Determining the identity recognition result according to the target feature vector includes: Acquire a pedestrian feature set, wherein the pedestrian feature set stores a plurality of sample feature vectors and pedestrian identity information corresponding to each sample feature vector; Comparing the target feature vector with each sample feature vector in the pedestrian feature set in sequence to determine whether there is a first feature vector in the pedestrian feature set, and the similarity between the first feature vector and the target feature vector is less than a preset first threshold; If the first feature vector exists in the pedestrian feature set, it is determined that the identity recognition is successful, and the pedestrian identity information corresponding to the first feature vector is used as the identity recognition result.

3. The pedestrian identification method according to claim 2, characterized in that: The method further comprises: Determine whether there is a second feature vector in the pedestrian feature set, and the Euclidean space distance between the second feature vector and the appearance feature vector is greater than a preset second threshold; If it is determined that the second feature vector exists in the pedestrian feature set, the pedestrian identity information corresponding to the second feature vector is obtained, and the second feature vector and the corresponding pedestrian identity information are stored in the pedestrian feature set to update the pedestrian feature set.

4. The pedestrian identification method according to claim 1, characterized in that: The preprocessing of the pedestrian full body image includes: Traversing each full-body image of a pedestrian, and determining a first image and a second image in the full-body image of the pedestrian, wherein the first image is a full-body image of the pedestrian whose image pixel value is lower than a preset pixel threshold, and the second image is a full-body image of the pedestrian whose image occlusion rate is higher than a preset image occlusion threshold; The first image and the second image are deleted from the pedestrian full-body image to obtain a preprocessed pedestrian full-body image.

5. The pedestrian identification method according to claim 1, characterized in that: The training process of the target detection model includes: Pre-training the initial target detection model by presetting the first data set to determine the initial model weights; Obtaining a target detection data set, and dividing the target detection data set into a training set and a validation set according to a preset data division ratio; Based on the initial model weights, the initial target detection model is iteratively trained through the training set, and an evaluation result is determined through the validation set, so as to iteratively adjust the hyperparameters of the initial target detection model according to the evaluation result until the evaluation result meets the preset expected value.

6. The pedestrian identification method according to claim 1, characterized in that: The acquiring of the target detection data set includes: Acquire a second data set, wherein the second data set includes pedestrian images from multiple different sources, with different characteristics, and in different acquisition methods; Preprocessing the second data set includes: image enhancement based on Mosaic, affine transformation based on Random affine, image based on Mixup, and image conversion based on random parameter adjustment; The preprocessed second data set is labeled to obtain the target detection data set.

7. The pedestrian identification method according to claim 1, characterized in that: The training process of the identity recognition model includes: Acquire a target detection data set for training the target detection model, and extract a full-body image of a pedestrian from the target detection data set; Randomly transforming the full-body image of the pedestrian to obtain a global perspective image and a local perspective image; Inputting the global perspective image into an initial teacher network, and inputting the global perspective image and the local perspective image into an initial student network, to obtain a first eigenvector output by the initial teacher network and a second eigenvector output by the initial student network; By using a preset activation function, the first feature vector and the second feature vector are respectively mapped into probability distributions, and the cross entropy of the two probability distributions is calculated to measure the distribution similarity; Calculate the target loss value by presetting the minimized cross entropy loss function; According to the target loss value, the initial student network and the initial teacher network are iteratively trained until the target loss value reaches a preset standard value, wherein the parameters of the student network are learnable parameters, and the learnable parameters are weighted updated using a preset stochastic gradient descent algorithm, and the parameters of the teacher network are the weighted sum of the teacher network parameters and the student network parameters at the previous iteration.

8. A pedestrian identification device, characterized in that: include: A data acquisition module, used to acquire a target image to be identified; A first detection module is used to input the target image into a pre-trained target detection model, obtain a pedestrian detection frame output by the target detection model, and slice the target image according to the pedestrian detection frame to obtain a full-body image of the pedestrian, wherein the target detection model includes a backbone network and a prediction head, the backbone network is used to extract features from the target image, and the prediction head is used to predict and output the pedestrian detection frame according to the result of the feature extraction; A second detection module is used to preprocess the pedestrian full-body image and input the preprocessed pedestrian full-body image into a pre-trained identity recognition model to obtain a target feature vector output by the identity recognition model, wherein the identity recognition model includes a student network and a teacher network, the student network and the teacher network perform comparative learning based on knowledge distillation, and perform iterative training by presetting a cross entropy loss function; A data output module is used to output an identity recognition result according to the target feature vector.

9. A pedestrian identification device, characterized in that: include: at least one processor; And a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the pedestrian identification method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the pedestrian identification method according to any one of claims 1 to 7.