Pedestrian tracking method, system, device and storage medium

By using pre-trained recognition models to compare face and human body features in urban rail transit, and combining the calculation of global features and attribute features, the problem of complex environments and low resolution of image acquisition equipment is solved, and fast and accurate pedestrian recognition is achieved. Identification and tracking improve public safety.

CN114663835BActive Publication Date: 2024-10-22HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210284985.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2024-10-22
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

Existing technologies in urban rail transit make it difficult to quickly and accurately identify target persons due to the complex environment and low resolution of image acquisition equipment. Traditional video surveillance and manual identification cannot meet the demand for real-time processing of massive videos, making it difficult to ensure public safety.

Method used

Use the pre-trained first recognition model to extract and compare face and human body features. If the recognition fails, use the second recognition model to extract global and attribute features, calculate the feature distance to determine the tracking success, and combine the separation distances of multiple cameras and Screen target pedestrians based on walking speed and analyze action trajectories.

Benefits of technology

It improves the efficiency and accuracy of target pedestrian identification, realizes fast and accurate pedestrian tracking in urban rail transit, meets the needs of real-time processing of massive videos, and ensures public safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663835B_ABST
    Figure CN114663835B_ABST
Patent Text Reader

Abstract

The present invention provides a pedestrian tracking method, system, device and storage medium, including: obtaining multiple image information of a target pedestrian; inputting each of the image information into a pre-trained first recognition model, extracting pedestrian features of each of the image information, comparing the extracted pedestrian features with the pedestrian information in the target library, and obtaining a comparison result; wherein the pedestrian features include facial features and body features; judging whether the comparison result is greater than a set threshold: if greater, the tracking is considered successful; otherwise, using a pre-trained second recognition model to extract global features and attribute features of each of the image information, calculating the distance between the global features and the attribute features, and if the distance is greater than the comprehensive threshold, the tracking is considered successful. The present invention adopts a method that integrates facial recognition technology and body recognition technology, and does not require user participation during the recognition process, which greatly improves the efficiency and accuracy of target pedestrian recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a pedestrian tracking method, system, device and storage medium. Background Art

[0002] In recent years, security incidents in urban rail transit places such as subway stations have occurred frequently. How to quickly and effectively identify the image of the target person in the image database is a very challenging problem. At present, face recognition methods are generally used when searching for target persons. However, in actual scenarios, due to complex environments and low resolution of image acquisition equipment, it is difficult to obtain clear face images. Face recognition methods cannot quickly and accurately identify the image of the target person. In addition, traditional video surveillance and manual recognition modes can no longer meet the needs of real-time processing of massive videos. How to accurately identify pedestrians in real time through a large number of monitoring probes to ensure the public safety of urban rail transit has become an urgent problem to be solved. Summary of the invention

[0003] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a pedestrian tracking method, system, device and storage medium, which are used to solve the problem that the face recognition method generally used in the prior art to search for the target person leads to the inability to quickly and accurately identify the target person.

[0004] A first aspect of the present invention provides a pedestrian tracking method, comprising: acquiring multiple image information of a target pedestrian;

[0005] Input each of the image information into a pre-trained first recognition model, extract pedestrian features from each of the image information, and compare the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result; wherein the pedestrian features include facial features and body features;

[0006] Determine whether the comparison result is greater than a set threshold:

[0007] If it is greater than, the tracking is considered successful;

[0008] Otherwise, a pre-trained second recognition model is used to extract the global features and attribute features of each of the image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than a comprehensive threshold, the tracking is considered successful.

[0009] In one embodiment of the present invention, the plurality of image information of the target pedestrian is obtained by shooting with a plurality of cameras;

[0010] The steps after successful tracking also include: screening the successfully tracked target pedestrians according to the interval distance between each camera and the walking speed of the target pedestrian, deleting the target pedestrians with unreasonable positions, analyzing the movement trajectories of the remaining target pedestrians, and obtaining target tracking information; wherein the target tracking information includes the identity information, trajectory information and current location of the target pedestrian.

[0011] In one embodiment of the present invention, the steps after acquiring multiple image information of the target pedestrian include:

[0012] After grayscale processing is performed on each of the image information, a target face frame and a target body frame in the image information are extracted, and the target face frame and the target body frame are respectively input into a pre-trained first recognition model.

[0013] In one embodiment of the present invention, the step of extracting the target face frame and the target body frame in the image information includes:

[0014] Using a ZFnet network to calculate the convolutional features of the image information;

[0015] Based on the convolutional features, the KM clustering algorithm is used to extract the initial candidate region, the IoU score between the initial candidate region and the real pedestrian region is calculated, and the region with an IoU score greater than a preset index is selected as the target face frame and the target body frame.

[0016] In one embodiment of the present invention, the first recognition model includes a face recognition model and a body recognition model;

[0017] The face recognition model extracts features from the input target face frame, compares the extracted face features with the face information in the face information database, calculates the similarity between the two, and obtains a face recognition result;

[0018] The human body recognition model extracts features from the input target human body frame, compares the extracted human body features with the human body information in the human body information database, calculates the distance between the two, and obtains a human body recognition result;

[0019] The face recognition result and the body recognition result together constitute the comparison result.

[0020] In one embodiment of the present invention, the second recognition model includes a global recognition model and a local recognition model;

[0021] The global recognition model is used to extract global features of the image information;

[0022] The local recognition model is used to extract local features of the image information, classify each local feature according to its attribute, assign a weight to each attribute and perform weighted summation to obtain the attribute feature.

[0023] A second aspect of the present invention further provides a pedestrian tracking system, comprising: an acquisition module, for acquiring multiple image information of a target pedestrian;

[0024] A recognition module, used for inputting each of the image information into a pre-trained first recognition model, extracting pedestrian features from each of the image information, and comparing the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result; wherein the pedestrian features include facial features and body features;

[0025] Determine whether the comparison result is greater than a set threshold:

[0026] If it is greater than, the tracking is considered successful;

[0027] Otherwise, a pre-trained second recognition model is used to extract the global features and attribute features of each of the image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than a comprehensive threshold, the tracking is considered successful.

[0028] In one embodiment of the present invention, it further includes:

[0029] An image detection module is used to obtain multiple image information of the target pedestrian through multiple cameras;

[0030] The screening module is used to screen the successfully tracked target pedestrians according to the interval distance between each camera and the walking speed of the target pedestrian, delete the target pedestrians with unreasonable positions, analyze the movement trajectories of the remaining target pedestrians, and obtain target tracking information; wherein the target tracking information includes the identity information, trajectory information and current location of the target pedestrian.

[0031] The third aspect of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method steps described in the pedestrian tracking method of the first aspect of the present invention are implemented.

[0032] The fourth aspect of the present invention further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method steps described in the pedestrian tracking method of the first aspect of the present invention.

[0033] As described above, a pedestrian tracking method, system, device and storage medium of the present invention have the following beneficial effects:

[0034] The present invention uses a pre-trained first recognition model to perform face recognition and body recognition on the acquired image information of the target pedestrian. If the recognition fails, the pre-trained second recognition model is used to extract the image information of the target pedestrian for global features and attribute features, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful. The present invention adopts a method of integrating face recognition technology and body recognition technology, and no user participation is required during the recognition process, which greatly improves the efficiency and accuracy of target pedestrian recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0036] Figure 1 It is a schematic flow chart of the pedestrian tracking method in the first embodiment of the present invention.

[0037] Figure 2 Shown is a schematic diagram of the movement trajectory of the target pedestrian in the first embodiment of the present invention.

[0038] Figure 3 Shown is a structural block diagram of a pedestrian tracking system in a second embodiment of the present invention.

[0039] Figure 4 FIG. 1 is a schematic diagram of a computer device according to a third embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0041] It should be noted that the illustrations provided in the following embodiments are only used to schematically illustrate the basic concept of the present invention. The figures only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0042] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0043] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0044] See also Figure 1 The first embodiment of the present invention relates to a pedestrian tracking method, which specifically includes:

[0045] Step S1: Acquire multiple image information of a target pedestrian.

[0046] Specifically, multiple image information of the target pedestrian is obtained by shooting with multiple cameras set up in rail transit. Each camera shoots the pedestrian in the rail transit environment and saves the captured video signal to the server. After calling the video signal from the server or obtaining the video signal from each camera in real time, based on the target pedestrian to be detected, the video signal is screenshotted at a preset interval, for example, once every five seconds, to obtain multiple image information of the target pedestrian, wherein the image information includes the ID value of the target pedestrian, and the image information is a color image.

[0047] To continue, in order to reduce the computational complexity of image processing without losing key information for locating and identifying the target pedestrian, after obtaining multiple image information of the target pedestrian, the present invention first performs grayscale processing on the recognition area of ​​each image information, converts the color image into a grayscale image, and then obtains a grayscale image corresponding to each recognition area, and calculates the gradient value of the grayscale image. During the selection of the recognition area, the gradient value avoids interference caused by the person's accessories, hair or background in the facial image, making the recognition targets such as the person's face and torso more obvious, which is convenient for subsequent recognition.

[0048] Furthermore, after locating the recognition target in the image, the original color image is framed based on the recognition target to obtain the target face frame and the target body frame. Specifically, the detection frame is used to extract the pedestrian in the image information, and the classification regression calculation is performed based on the Faster RCNN network to obtain a rectangular target face frame and a rectangular target body frame; wherein, the steps of extracting the target face frame and the target body frame include: using the ZFnet network to extract features and calculate the convolution features of the image information; based on the convolution features, the K-means clustering algorithm is used to extract the initial candidate area. In order to speed up the convergence speed, the Euclidean distance is used to calculate the distance between the two feature points, the ratio of the height and width of the candidate area to the unit grid length is clustered, and the IoU (intersection over union) is used to reflect the important indicators of the candidate area and the real pedestrian area. The IoU score of the initial candidate area and the real pedestrian area is calculated. The larger the IoU score, the smaller the difference between the two. The area with an IoU score greater than the preset index is selected as the target face frame and the target body frame. wherein, the objective function expression of clustering is

[0049]

[0050] Where M is the clustered sample set, N is the clustered category, Box[N] is the width and height of the candidate area obtained by clustering, and Truth[M] is the width and height of the real pedestrian area.

[0051] Furthermore, in order to improve the recognition accuracy, the present embodiment also uses the RPN deep network to generate more accurate candidate regions. The input of the RPN is the initial candidate region, and the output is a rectangular target candidate region. The position of the pedestrian rectangular box is represented by (x, y, w, h), where the point (x, y) represents the vertex coordinates of the center of the rectangular box, and w and h represent the width and height of the rectangular box, respectively. There are several windows in the output feature map of the convolution layer. The mapping point of the center of the current sliding window in the original pixel space is called an anchor. Each point in the convolution feature map is the center of the anchor, and there are k corresponding anchors. In this embodiment, if the IoU score between the area to be detected and the marked positive sample is greater than 0.7, it is determined to be a target candidate area, otherwise, it is determined to be a non-candidate area.

[0052] Step S2: input each image information into the pre-trained first recognition model, extract the pedestrian features of each image information, and compare the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result.

[0053] Specifically, the extracted target face frame and the rectangular target human body frame are input into the pre-trained first recognition model for recognition to obtain the recognition result. The first recognition model includes a face recognition model and a human body recognition model. The face recognition model extracts features from the input target face frame, and compares the extracted face features with the face information in the face information library, calculates the similarity between the two, and obtains the face recognition result; in addition, before using the face recognition model for face recognition, it is necessary to perform face normalization and face alignment on the multiple target face frames to be recognized to lay a foundation for subsequent face recognition. The human body recognition model uses a 2D key point extraction algorithm, a person segmentation algorithm, and a clothing feature migration algorithm to segment and extract features from the input target human body frame to reduce the impact of clothing changes; then the extracted human body features are compared with the human body information in the human body information library, and the distance between the two is calculated to obtain the human body recognition result. Specifically, the step of extracting 2D key points of the human body includes: inputting a color image through a confidence map PCM network and an affinity field PAF network, predicting a set of 2D confidence maps of body part positions and 2D vectors of affinity fields, encoding the correlation between the parts, and finally parsing the confidence map and affinity field to output the two-dimensional position of the key points of the person. The processing steps of the person segmentation algorithm include: inputting the image to be segmented, using the captured human key point information to obtain the human posture and calculate the corresponding key point area, and outputting the segmentation feature map. The processing steps of the clothing feature migration algorithm include: firstly, performing posture migration on pedestrians in the image library, inputting the 2D key points of the target pedestrian and the pedestrian character segmentation feature map in the image library, and obtaining the character segmentation feature map of the pedestrian in the image library with the same posture as the target person; then performing clothing migration, inputting the character segmentation feature map of the target pedestrian, the 2D human key points, and the human segmentation feature map generated by the pedestrian in the image library in the previous stage with the same posture as the target person, and outputting an image consistent with the clothing features of the target person through the U-Net network.

[0054] Furthermore, the steps of training the face recognition model include:

[0055] Construct a face recognition neural network model. The dataset in the face information database is used as the training set and test set. The dataset contains face images of different angles, different environments, and face occlusion, and is generated by manual annotation. The convolutional neural network VGGNet and the face loss function ArcFace are used for face recognition training. During the training process, the parameters of the initial face recognition model are corrected according to the loss value. When the loss value reaches the preset condition, the correction process is stopped and the parameters with the smallest loss value are selected as the parameters of the trained face recognition model; the test set is input into the trained face recognition model to verify its face recognition accuracy.

[0056] Furthermore, the steps of training the human recognition model include:

[0057] Construct a human body recognition neural network model. The data set in the human body information database is used as the training set and test set. The data set contains human body images in different postures, different environments, and clothing changes, and is generated through manual annotation verification. The convolutional neural network ResNet and the cross entropy loss function are used for human body recognition training. During the training process, the parameters of the initial human body recognition model are corrected according to the loss value. When the loss value reaches the preset condition, the correction process is stopped, and the parameters with the smallest loss value are selected as the parameters of the trained human body recognition model; the test set is input into the trained human body recognition model to verify its human body recognition accuracy.

[0058] It should be understood that the training of the above-mentioned face recognition model and body recognition model should be a continuous process. During the training process, the input model features and training parameters are gradually adjusted according to the previous recognition results until a good recognition accuracy is achieved. In addition, when using the trained face recognition model and body recognition model to recognize the image information of the target pedestrian, the target pedestrian should be recognized from different angles and at different times based on the video signals collected by multiple cameras, so as to update and enhance the characteristics of the target pedestrian.

[0059] Step S3: Determine whether the comparison result is greater than a set threshold:

[0060] Step S31: If it is greater than, the tracking is considered successful;

[0061] Step S32: Otherwise, use the pre-trained second recognition model to extract the global features and attribute features of each image information, calculate the distance between the global features and the attribute features, and if the distance is greater than the comprehensive threshold, it is considered that the tracking is successful.

[0062] Specifically, the comparison result includes the face recognition result and the body recognition result. If the comparison result is greater than the set threshold, the tracking is considered successful. It should be understood that the set thresholds corresponding to the face recognition result and the body recognition result can be the same or different. In a feasible embodiment, the threshold is set to 0.9. If the comparison result is greater than 0.9, it is considered that the target pedestrian is successfully identified and the tracking is successful; or, the set threshold corresponding to the face recognition result is set to 0.9, and the set threshold corresponding to the body recognition result is set to 0.8. If the comparison result meets both set thresholds, the tracking is considered successful.

[0063] Furthermore, when one of the comparison results is less than the corresponding set threshold, for example, the face recognition result is 0.95, and the body recognition result is 0.6, the pre-trained second recognition model is used to continue to recognize the global and local image information. Specifically, the second recognition model is constructed based on the ResNet network, including a global recognition model and a local recognition model. First, the global recognition model is used to extract the global feature g of the image information based on the pre-selected global input model features, and g∈R v , R is a real number set, v is the output dimension. Then, the local recognition model is used to extract the local features f of the image information according to the pre-selected local input features, and f∈R d , d is the output dimension; in view of the different importance of each attribute in the multiple image information of the target pedestrian, in order to improve the recognition accuracy, attribute recognition is performed on each local feature to obtain N attribute feature values ​​{h 1 ,h 2 ,…,h N}, and then use a fully connected layer and activation function Sigmoid to calculate the weight of each attribute feature. The formula is: w = σ (W (weight) f+b (weight) ), where σ represents the Sigmoid activation function, W (weight) ∈R N×d represents the weight matrix of the fully connected layer, b (weight) represents the deviation vector, and the resulting attribute w = [w1, w2, ..., w N ] Perform weighted summation to obtain the fused attribute features Finally, the distance between the global feature and the fused attribute feature is calculated to obtain a fused attribute value, and the fused attribute value is compared with the preset comprehensive threshold. If it is greater than the comprehensive threshold, the tracking is considered successful, otherwise, the tracking is considered failed.

[0064] See also Figure 2In this embodiment, multiple image information of the target pedestrian is obtained by shooting with multiple cameras set up in rail transit. In order to improve the tracking accuracy, after successfully tracking the target pedestrian, this embodiment also screens the tracked target pedestrian to obtain more accurate target tracking information. Specifically, the server stores the location information of each camera. The distance between each camera can be calculated based on the location information. Then, according to the time when the target pedestrian appears in multiple cameras, the average walking speed of the target pedestrian can be calculated. According to the distance between each camera and the walking speed of the target pedestrian, the tracked target pedestrian is screened, the target pedestrian with unreasonable position is deleted, the qualified target pedestrian is retained, and the movement trajectory of the remaining target pedestrian is analyzed to obtain the target tracking information; wherein, the target tracking information includes the identity information, trajectory information and current location of the target pedestrian. In the above manner, the information after real-time tracking and screening can be formed into a time-continuous, real-time tracking target trajectory, and the movement trajectory and real-time position of the target pedestrian are output for users to view. Figure 2 The left side is a schematic diagram of the distribution of cameras in the rail transit area, and the right side is the image information of pedestrian P0001 collected by different cameras. For example, pedestrian P0001 first appears at camera 001 and last appears at camera 012. Based on the filtered information, the movement trajectory of pedestrian P0001 can be formed: camera 001-camera 006-camera 007-camera 011-camera 012.

[0065] It can be seen that this embodiment uses the pre-trained first recognition model to perform face recognition and body recognition on the acquired image information of the target pedestrian. If the recognition fails, the pre-trained second recognition model is continued to be used to extract the image information of the target pedestrian for global features and attribute features, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful. The present invention also provides the user with target tracking information based on the tracking results, so that the user can understand the movement trajectory of the target pedestrian in real time. The present invention adopts a method that integrates face recognition technology and body recognition technology, and does not require user participation in the recognition process, which greatly improves the efficiency and accuracy of target pedestrian recognition.

[0066] See also Figure 3 The second embodiment of the present invention relates to a pedestrian tracking system, which corresponds to a pedestrian tracking method disclosed in the first embodiment, and specifically includes:

[0067] An acquisition module, used to acquire multiple image information of a target pedestrian;

[0068] Specifically, the pedestrian tracking system of this embodiment also includes an image detection module, which is used to obtain multiple image information of the target pedestrian through multiple cameras and save it to the server. After the acquisition module calls the video signal from the server or obtains the video signal from each camera in real time, based on the target pedestrian to be detected, the video signal is screenshotted at a preset interval, for example, once every five seconds, to obtain multiple image information of the target pedestrian, wherein the image information includes the ID value of the target pedestrian, and the image information is a color image.

[0069] Furthermore, in order to reduce the computational complexity of image processing without losing key information for locating and identifying the target pedestrian, the pedestrian tracking system of this embodiment also includes a grayscale processing module, which is used to perform grayscale processing on the recognition area of ​​each image information, convert the color image into a grayscale image, and then obtain a grayscale image corresponding to each recognition area, and calculate the gradient value of the grayscale image. During the selection of the recognition area, the gradient value avoids interference caused by the person's accessories, hair or background in the face image, making the recognition targets such as the person's face and torso more obvious, which is convenient for subsequent recognition.

[0070] Furthermore, the pedestrian tracking system of this embodiment also includes a frame extraction module. After locating the recognition target in the image, based on the recognition target, the frame extraction module performs classification regression calculation based on the Faster RCNN network to obtain a rectangular target face frame and a rectangular target body frame. Specifically, a detection frame is used to extract pedestrians from the image information that has been preprocessed by grayscale, wherein the steps of extracting the target face frame and the target body frame include: using the ZFnet network to perform feature extraction and calculate the convolution features of the image information; based on the convolution features, using the K-means clustering algorithm to extract the initial candidate area. In order to speed up the convergence speed, the Euclidean distance is used to calculate the distance between the two feature points, the ratio of the height and width of the candidate area to the unit grid length is clustered, and the IoU (intersection over union) is used to reflect the important indicators of the candidate area and the real pedestrian area. The IoU score of the initial candidate area and the real pedestrian area is calculated. The larger the IoU score, the smaller the difference between the two. The area with an IoU score greater than the preset index is selected as the target face frame and the target body frame. Among them, the objective function expression of clustering is

[0071]

[0072] Where M is the clustered sample set, N is the clustered category, Box[N] is the width and height of the candidate area obtained by clustering, and Truth[M] is the width and height of the real pedestrian area.

[0073] Furthermore, in order to improve the recognition accuracy, the present embodiment also uses the RPN deep network to generate more accurate candidate regions. The input of the RPN is the initial candidate region, and the output is a rectangular target candidate region. The position of the pedestrian rectangular box is represented by (x, y, w, h), where the point (x, y) represents the vertex coordinates of the center of the rectangular box, and w and h represent the width and height of the rectangular box, respectively. There are several windows in the output feature map of the convolution layer. The mapping point of the center of the current sliding window in the original pixel space is called an anchor. Each point in the convolution feature map is the center of the anchor, and there are k corresponding anchors. In this embodiment, if the IoU score between the area to be detected and the marked positive sample is greater than 0.7, it is determined to be a target candidate area, otherwise, it is determined to be a non-candidate area.

[0074] A recognition module, used for inputting each image information into a pre-trained first recognition model, extracting pedestrian features of each image information, and comparing the extracted pedestrian features with pedestrian information in a target library to obtain a comparison result; wherein the pedestrian features include facial features and body features;

[0075] Determine whether the comparison result is greater than the set threshold:

[0076] If it is greater than, the tracking is considered successful;

[0077] Otherwise, the pre-trained second recognition model is used to extract the global features and attribute features of each image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful.

[0078] Specifically, the extracted target face frame and the rectangular target human body frame are input into the pre-trained first recognition model for recognition to obtain the recognition result. The first recognition model includes a face recognition model and a human body recognition model. The face recognition model extracts features from the input target face frame, and compares the extracted face features with the face information in the face information library, calculates the similarity between the two, and obtains the face recognition result; in addition, before using the face recognition model for face recognition, it is necessary to perform face normalization and face alignment on the multiple target face frames to be recognized to lay a foundation for subsequent face recognition. The human body recognition model uses a 2D key point extraction algorithm, a person segmentation algorithm, and a clothing feature migration algorithm to segment and extract features from the input target human body frame to reduce the impact of clothing changes; then the extracted human body features are compared with the human body information in the human body information library, and the distance between the two is calculated to obtain the human body recognition result. Specifically, the step of extracting 2D key points of the human body includes: inputting a color image through a confidence map PCM network and an affinity field PAF network, predicting a set of 2D confidence maps of body part positions and 2D vectors of affinity fields, encoding the correlation between the parts, and finally parsing the confidence map and affinity field to output the two-dimensional position of the key points of the person. The processing steps of the person segmentation algorithm include: inputting the image to be segmented, using the captured human key point information to obtain the human posture and calculate the corresponding key point area, and outputting the segmentation feature map. The processing steps of the clothing feature migration algorithm include: firstly, performing posture migration on pedestrians in the image library, inputting the 2D key points of the target pedestrian and the pedestrian character segmentation feature map in the image library, and obtaining the character segmentation feature map of the pedestrian in the image library with the same posture as the target person; then performing clothing migration, inputting the character segmentation feature map of the target pedestrian, the 2D human key points, and the human segmentation feature map generated by the pedestrian in the image library in the previous stage with the same posture as the target person, and outputting an image consistent with the clothing features of the target person through the U-Net network.

[0079] To continue, the comparison result includes the face recognition result and the body recognition result. If the comparison result is greater than the set threshold, the tracking is considered successful. It should be understood that the set thresholds corresponding to the face recognition result and the body recognition result can be the same or different. In a feasible embodiment, the threshold is set to 0.9. If the comparison result is greater than 0.9, it is considered that the target pedestrian is successfully identified and the tracking is successful; or, the set threshold corresponding to the face recognition result is set to 0.9, and the set threshold corresponding to the body recognition result is set to 0.8. If the comparison result meets both set thresholds, the tracking is considered successful.

[0080] Furthermore, when one of the comparison results is less than the corresponding set threshold, for example, the face recognition result is 0.95, and the body recognition result is 0.6, the pre-trained second recognition model is used to continue to recognize the global and local image information. Specifically, the second recognition model includes a global recognition model and a local recognition model. First, the global recognition model is used to extract the global feature g of the image information based on the pre-selected global input model feature, and g∈R v , R is a real number set, v is the output dimension. Then, the local recognition model is used to extract the local features f of the image information according to the pre-selected local input features, and f∈R d , d is the output dimension; in view of the different importance of each attribute in the multiple image information of the target pedestrian, in order to improve the recognition accuracy, attribute recognition is performed on each local feature to obtain N attribute feature values ​​{h 1 , h2 2 ,…,h N}, and then use a fully connected layer and activation function Sigmoid to calculate the weight of each attribute feature. The formula is: w = σ (W (weight) f+b (weight) ), where σ represents the Sigmoid activation function, W (weight) ∈R N×d represents the weight matrix of the fully connected layer, b (weight) represents the deviation vector, and the resulting attribute w = [w1, w2, ..., w N ] Perform weighted summation to obtain the fused attribute features Finally, the distance between the global feature and the fused attribute feature is calculated to obtain a fused attribute value, and the fused attribute value is compared with the preset comprehensive threshold. If it is greater than the comprehensive threshold, the tracking is considered successful, otherwise, the tracking is considered failed.

[0081] Furthermore, the pedestrian tracking system of this embodiment further includes a model training module for training a face recognition model and a body recognition model, wherein the step of training the face recognition model includes:

[0082] Construct a face recognition neural network model. The dataset in the face information database is used as the training set and test set. The dataset contains face images of different angles, different environments, and face occlusion, and is generated by manual annotation. The convolutional neural network VGGNet and the face loss function ArcFace are used for face recognition training. During the training process, the parameters of the initial face recognition model are corrected according to the loss value. When the loss value reaches the preset condition, the correction process is stopped and the parameters with the smallest loss value are selected as the parameters of the trained face recognition model; the test set is input into the trained face recognition model to verify its face recognition accuracy.

[0083] The steps to train a human recognition model include:

[0084] Construct a human body recognition neural network model. The data set in the human body information database is used as the training set and test set. The data set contains human body images in different postures, different environments, and clothing changes, and is generated through manual annotation verification. The convolutional neural network ResNet and the cross entropy loss function are used for human body recognition training. During the training process, the parameters of the initial human body recognition model are corrected according to the loss value. When the loss value reaches the preset condition, the correction process is stopped, and the parameters with the smallest loss value are selected as the parameters of the trained human body recognition model; the test set is input into the trained human body recognition model to verify its human body recognition accuracy.

[0085] It should be understood that the training of the above-mentioned face recognition model and body recognition model should be a continuous process. During the training process, the input model features and training parameters are gradually adjusted according to the previous recognition results until a good recognition accuracy is achieved. In addition, when using the trained face recognition model and body recognition model to recognize the image information of the target pedestrian, the target pedestrian should be recognized from different angles and at different times based on the video signals collected by multiple cameras, so as to update and enhance the characteristics of the target pedestrian.

[0086] Furthermore, the pedestrian tracking system of this embodiment also includes a screening module, which is used to screen the successfully tracked target pedestrians according to the interval distance of each camera and the walking speed of the target pedestrian, delete the target pedestrians with unreasonable positions, analyze the movement trajectory of the remaining target pedestrians, and obtain the target tracking information; wherein, the target tracking information includes the identity information, trajectory information and current location of the target pedestrian. Specifically, the location information of each camera is stored in the server, and the interval distance between each camera can be calculated according to the location information, and then the average walking speed of the target pedestrian can be calculated according to the time when the target pedestrian appears in multiple cameras. According to the interval distance of each camera and the walking speed of the target pedestrian, the tracked target pedestrians are screened, the target pedestrians with unreasonable positions are deleted, the qualified target pedestrians are retained, and the movement trajectory of the remaining target pedestrians is analyzed to obtain the target tracking information; wherein, the target tracking information includes the identity information, trajectory information and current location of the target pedestrian. Through the above method, the information after real-time tracking and screening can be formed into a time-continuous, real-time tracking target trajectory, and the movement trajectory and real-time position of the target pedestrian are output for users to view.

[0087] It can be seen that this embodiment uses the pre-trained first recognition model to perform face recognition and body recognition on the acquired image information of the target pedestrian. If the recognition fails, the pre-trained second recognition model is continued to be used to extract the image information of the target pedestrian for global features and attribute features, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful. The present invention also provides the user with target tracking information based on the tracking results, so that the user can understand the movement trajectory of the target pedestrian in real time. The present invention adopts a method that integrates face recognition technology and body recognition technology, and does not require user participation in the recognition process, which greatly improves the efficiency and accuracy of target pedestrian recognition.

[0088] See also Figure 4 The third embodiment of the present invention relates to a computer device, comprising a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402. When the processor 402 executes the computer program, the following steps are implemented:

[0089] Acquire multiple image information of the target pedestrian;

[0090] Input each image information into the pre-trained first recognition model, extract pedestrian features from each image information, and compare the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result; wherein the pedestrian features include facial features and body features;

[0091] Determine whether the comparison result is greater than the set threshold:

[0092] If it is greater than, the tracking is considered successful;

[0093] Otherwise, the pre-trained second recognition model is used to extract the global features and attribute features of each image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful.

[0094] The memory 401 and the processor 402 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 402 and the memory 401 together. The bus can also connect various other circuits such as peripheral devices 403, regulators 404, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 402 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 402.

[0095] The processor 402 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 401 can be used to store data used by the processor 402 when performing operations.

[0096] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0097] A fourth embodiment of the present invention relates to a storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0098] Acquire multiple image information of the target pedestrian;

[0099] Input each image information into the pre-trained first recognition model, extract pedestrian features from each image information, and compare the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result; wherein the pedestrian features include facial features and body features;

[0100] Determine whether the comparison result is greater than the set threshold:

[0101] If it is greater than, the tracking is considered successful;

[0102] Otherwise, the pre-trained second recognition model is used to extract the global features and attribute features of each image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered successful.

[0103] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0104] In summary, a pedestrian tracking method, system, device and storage medium of the present invention performs face recognition and body recognition on the acquired image information of the target pedestrian through a pre-trained first recognition model. If the recognition fails, the pre-trained second recognition model is continued to be used to extract the image information of the target pedestrian for global features and attribute features, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, the tracking is considered to be successful. The present invention also provides the user with target tracking information based on the tracking results, so as to understand the movement trajectory of the target pedestrian in real time. The present invention adopts a method that integrates face recognition technology and body recognition technology, and does not require user participation in the recognition process, which greatly improves the efficiency and accuracy of target pedestrian recognition. Therefore, the present invention effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.

[0105] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A pedestrian tracking method, It is characterized in that include: Acquire multiple image information of the target pedestrian; Performing grayscale processing on the identification areas of each of the image information, generating a grayscale image corresponding to each identification area, and calculating the gradient value of the grayscale image; Using a ZFnet network to calculate the convolution features of the grayscale image; Based on the convolutional features, the KM clustering algorithm is used to extract the initial candidate region, the IoU score between the initial candidate region and the real pedestrian region is calculated, and the region with an IoU score greater than a preset index is selected as the target face frame and the target human frame. The objective function expression of the KM clustering algorithm is: min∑ M ∑ N (1-IOU(Box[N],Truth[M])), Wherein, M is the sample set of clustering, N is the category of clustering, Box[N] is the width and height of the candidate area obtained by clustering, and Truth[M] is the width and height of the real pedestrian area; the target face frame and the target body frame in each grayscale processed image information are input into the pre-trained first recognition model, the pedestrian features of each grayscale processed image information are extracted, and the extracted pedestrian features are compared with the pedestrian information in the target library to obtain the comparison results; wherein, the pedestrian features include face features and body features; Determine whether the comparison result is greater than a set threshold: If it is greater than, the tracking is considered successful; Otherwise, the pre-trained second recognition model is used to extract the global features and attribute features of each grayscale processed image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, it is considered that the tracking is successful; Wherein, the second recognition model includes a global recognition model and a local recognition model; The global recognition model is used to extract global features of image information after grayscale processing; The local recognition model is used to extract local features of the image information after grayscale processing, and classify each local feature according to the attribute to which it belongs; a weight is assigned to each attribute and a weighted sum is performed to obtain the attribute feature.

2. The pedestrian tracking method according to claim 1, Features: The multiple image information of the target pedestrian is obtained by shooting with multiple cameras; The steps after successful tracking also include: screening the successfully tracked target pedestrians according to the interval distance between each camera and the walking speed of the target pedestrian, deleting the target pedestrians with unreasonable positions, analyzing the movement trajectories of the remaining target pedestrians, and obtaining target tracking information; wherein the target tracking information includes the identity information, trajectory information and current location of the target pedestrian.

3. The pedestrian tracking method according to claim 1, It is characterized in that The first recognition model includes a face recognition model and a body recognition model; The face recognition model extracts features from the input target face frame, compares the extracted face features with the face information in the face information database, calculates the similarity between the two, and obtains a face recognition result; The human body recognition model extracts features from the input target human body frame, compares the extracted human body features with the human body information in the human body information database, calculates the distance between the two, and obtains a human body recognition result; The face recognition result and the body recognition result together constitute the comparison result.

4. A pedestrian tracking system, It is characterized in that include: An acquisition module, used to acquire multiple image information of a target pedestrian; An identification module, used to perform grayscale processing on the identification areas of each of the image information, generate a grayscale image corresponding to each identification area, and calculate the gradient value of the grayscale image; The recognition module is also used to calculate the convolution features of the grayscale image using a ZFnet network; The recognition module is also used to extract the initial candidate area based on the convolution feature using the KM clustering algorithm, calculate the IoU score between the initial candidate area and the real pedestrian area, and select the area with an IoU score greater than a preset index as the target face frame and the target body frame, wherein the objective function expression of the KM clustering algorithm is: min∑ M ∑ N (1-IOU(Box[N],Truth[M])), Where M is the clustered sample set, N is the clustered category, Box[N] is the width and height of the candidate area obtained by clustering, and Truth[M] is the width and height of the real pedestrian area; The recognition module is also used to input the target face frame and the target body frame in each grayscale processed image information into the pre-trained first recognition model, extract the pedestrian features of each grayscale processed image information, and compare the extracted pedestrian features with the pedestrian information in the target library to obtain a comparison result; Wherein, the pedestrian features include facial features and body features; Determine whether the comparison result is greater than a set threshold: If it is greater than, the tracking is considered successful; Otherwise, the pre-trained second recognition model is used to extract the global features and attribute features of each grayscale processed image information, and the distance between the global features and the attribute features is calculated. If the distance is greater than the comprehensive threshold, it is considered that the tracking is successful; Wherein, the second recognition model includes a global recognition model and a local recognition model; The global recognition model is used to extract global features of image information after grayscale processing; The local recognition model is used to extract local features of the image information after grayscale processing, and classify each local feature according to the attribute to which it belongs; a weight is assigned to each attribute and a weighted sum is performed to obtain the attribute feature.

5. The pedestrian tracking system according to claim 4, It is characterized in that Also includes: An image detection module is used to obtain multiple image information of the target pedestrian through multiple cameras; The screening module is used to screen the successfully tracked target pedestrians according to the interval distance between each camera and the walking speed of the target pedestrian, delete the target pedestrians with unreasonable positions, analyze the movement trajectories of the remaining target pedestrians, and obtain target tracking information; wherein the target tracking information includes the identity information, trajectory information and current location of the target pedestrian.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, Features: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.