A computational framework for cross-border person re-identification

By introducing a cross-border pedestrian re-identification calculation framework in pedestrian re-identification technology, combining pedestrian tracking and clothing characteristics, the identification problem in complex scenarios is solved, and efficient and accurate pedestrian re-identification is achieved.

CN117095426BActive Publication Date: 2025-02-18GUANGXI UNIV FOR NATITIES
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310912237.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-02-18
Estimated Expiration
2043-07-24

AI Technical Summary

Technical Problem

The existing pedestrian re-identification technology is difficult to deal with problems such as occlusion and overlap in complex scenarios, and due to changes in lighting, the computing power demand is too large, and real-time calculation and feedback cannot be achieved.

Method used

The cross-border pedestrian re-identification calculation framework is adopted, and the weight bonus mode combined with pedestrian tracking and clothing characteristics is judged, the time and cost of model re-identification is reduced, and the speed and accuracy of pedestrian re-identification are improved.

Benefits of technology

Effectively identify target pedestrians, reduce the impact of appearance changes on recognition, improve recognition speed and accuracy, and reduce computing resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117095426B_ABST
    Figure CN117095426B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of pedestrian recognition technology, and in particular to a cross-border pedestrian re-identification computing framework, including a video monitoring platform, which is used to obtain the real-time video stream of the IPC camera, and the video monitoring platform pushes the real-time video stream to the pedestrian tracking module according to the request and through the RTSP protocol; the pedestrian tracking module, which is used for image cropping of the real-time video stream to obtain pedestrian feature values ​​and character clothing attribute feature values; the ReIDCore module, which is used for matching the pedestrian feature values ​​and the character clothing attribute feature values, and cooperates with the pedestrian tracking module to perform global portrait feature weight determination; a scheduler, which is used for scheduling and management of the ReIDCore module. The present invention judges pedestrians by combining pedestrian tracking and clothing features with a weighted addition model, which saves time and cost for repeated model training and improves the speed and accuracy of pedestrian re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pedestrian recognition, and in particular to a cross-border pedestrian re-identification computing framework. Background Art

[0002] Pedestrian re-identification refers to the use of computer vision technology to determine whether there is a specific pedestrian in an image or video queue; or it refers to identifying the target pedestrian in a video sequence from existing possible sources and non-overlapping camera fields of view.

[0003] Due to the differences between different camera devices, and the fact that pedestrians have both rigid and flexible characteristics, and their appearance is easily affected by clothing, scale, occlusion, posture and viewing angle, the data of ReID in actual application scenarios is very complex. Generally speaking, there are the following problems: how to solve the problems of occlusion and overlap of pedestrian images in complex scenes; how to solve the problem of pedestrian images being identified as new pedestrians under cross-lens conditions due to external factors such as lighting; the computing power requirements are too large to achieve real-time calculations and provide feedback. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a cross-border pedestrian re-identification calculation framework, which judges pedestrians by combining pedestrian tracking and clothing features with a weighted addition model, saving the time and cost of repeated model training and improving the speed and accuracy of pedestrian re-identification.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] A cross-border pedestrian re-identification computing framework, characterized by including a video monitoring platform, a pedestrian tracking module, a ReIDCore module and a scheduler.

[0007] The video monitoring platform is used to obtain the real-time video stream of the IPC camera. The video monitoring platform pushes the real-time video stream to the pedestrian tracking module according to the request and through the RTSP protocol;

[0008] The pedestrian tracking module is used for image cropping of the real-time video stream to obtain a human image, and the pedestrian tracking module calculates the feature value of the human image to obtain the pedestrian feature value and the feature value of the person's clothing attribute, and the pedestrian tracking module exchanges data with the ReIDCore module through the message middleware;

[0009] The ReIDCore module is used to match the pedestrian feature value and the clothing attribute feature value of the person, and cooperates with the pedestrian tracking module to perform global portrait feature duplication judgment;

[0010] The scheduler is used for scheduling and management of the ReIDCore module.

[0011] Furthermore, a person re-identification method using the framework includes the following steps:

[0012] S1. The video monitoring platform obtains the real-time video stream of the IPC camera, and the video monitoring platform pushes the real-time video stream to the pedestrian tracking module through the RTSP protocol according to the request;

[0013] S2. The pedestrian tracking module tracks the pedestrians in the real-time video stream through the pedestrian detection frame and assigns a local_ID to the pedestrian, and the pedestrian tracking module calculates the feature value of the human body image to obtain the pedestrian feature value and the character clothing attribute feature value;

[0014] S3. The pedestrian tracking module sends the local_ID, the pedestrian feature value and the character clothing attribute feature value to the scheduler through the message middleware, and the scheduler sends the local_ID, the pedestrian feature value and the character clothing attribute feature value to the ReIDCore module;

[0015] S4. The ReIDCore module matches the local_ID, the pedestrian feature value and the character clothing attribute feature value with the feature value in the memory of the ReIDCore module to determine whether the pedestrian has a global_ID; if the pedestrian has a global_ID, the global_ID of the pedestrian sequence is updated, and the pedestrian information is saved in the memory of the ReIDCore module; if the pedestrian does not have a global_ID, a global_ID is allocated to the pedestrian, and the pedestrian information is saved in the memory of the ReIDCore module according to the load balancing strategy of the ReIDCore module;

[0016] S5. After the pedestrian tracking module receives the global_ID information returned by the scheduler, it updates the global_ID to the pedestrian tracking module;

[0017] S6. After every preset time, collect the container information of the ReIDCore module and perform load balancing operations.

[0018] Furthermore, in step S2, the pedestrian tracking module calculates the characteristic value of clothing attributes of the person, including the following steps:

[0019] S2.1 initialize a first detector for separating pedestrians from backgrounds, and obtain a human image after removing the background through the detector;

[0020] S2.2 initialize a second detector for separating the upper and lower garments of the pedestrian, and obtain an upper garment image and a lower garment image through the second detector;

[0021] S2.3 setting a candidate dictionary and storing candidate image names, candidate top images and candidate bottom images respectively;

[0022] S2.4 sets a dictionary of cosine similarity and stores the similarity of the gray-level co-occurrence matrix of the image to be searched and the candidate image.

[0023] S2.5 extracting the keywords of the candidate image names in the candidate dictionary and the feature values ​​of the corresponding candidate top clothing images and candidate bottom clothing images;

[0024] S2.6 The data of step S3.5 and step S3.4 are compared through the gray level co-occurrence matrix parameter comparison function to obtain the cosine similarity between the top of the image to be found and the top of the candidate image, and the cosine similarity between the bottom of the image to be found and the bottom of the candidate image;

[0025] S2.7 sets a total dictionary and stores the sum of the upper garment similarity and the lower garment similarity to obtain the attribute feature value of the person's clothing.

[0026] Furthermore, in step S4, the matching method of the ReIDCore module includes the following steps:

[0027] S4.1 Determine whether the length of all pedestrian feature values ​​extracted in the pedestrian tracking module is 0;

[0028] S4.2 When the length of all pedestrian feature values ​​extracted in the pedestrian tracking module is not 0, all pedestrian feature values, pedestrian numbers and camera numbers are extracted in the pedestrian tracking module;

[0029] S4.3 Calculate the cosine similarity numpy array of the feature value of the pedestrian to be matched and the features of all pedestrians in the memory of the ReIDCore module, and the total confidence ranking is the weighted value of 75% pedestrian feature similarity and 25% clothing feature similarity;

[0030] S4.4 obtains the maximum value index according to the sorting direction. When the cosine similarity of the maximum value index index is greater than the judgment threshold, the number of the pedestrian who has successfully matched is returned to determine whether the pedestrian has a global_ID; when the cosine similarity of the maximum value index index is less than the judgment threshold, the match fails to determine whether the pedestrian has a global_ID.

[0031] Furthermore, in step S5, the updating strategy of the pedestrian tracking module is to tend to save feature values ​​that are greatly different from existing local feature values.

[0032] Furthermore, in step S6, the process of collecting the container information of the ReIDCore module and performing load balancing operation is as follows:

[0033] S6.1 Obtain a contraction value based on the total number of people and the number of containers in all the ReIDCore modules;

[0034] S6.2 When the contraction value is greater than the contraction threshold, the ReIDCore module performs an expansion operation and calls the add_ReIDCore module interface of the scheduler to generate a new ReIDCore module;

[0035] S6.3 When the shrinkage value is less than the shrinkage threshold, the ReIDCore module performs a shrinkage operation and confirms the number of ReIDCore modules that need to be shrunk. The original ReIDCore modules are divided into two groups, and the pedestrians in the group with fewer people are loaded into the ReIDCore module with more people according to the load balancing rules by calling the batch load function in the scheduler, and the freezing time is reset.

[0036] Furthermore, it also includes a management module, a basic business module, an online character feature module, an archive storage device and a persistence module.

[0037] The management module is used for scheduling and managing each of the pedestrian tracking modules, and the management module is also used to start the pedestrian tracking module, destroy the pedestrian tracking module, and collect and summarize the operating status of each of the pedestrian tracking modules;

[0038] The basic business module is used for log management, algorithm parameters, ReID query and system settings;

[0039] The online character feature module is used to store the portrait feature information of the ReIDCore module;

[0040] The archive memory is used for storing data output during algorithm operation and for storing archived portrait images;

[0041] The persistence module is used for persistence of operation logs, algorithm logs, and pedestrian features, and the persistence module communicates with the video surveillance platform, the pedestrian tracking module, the ReIDCore module, the basic business module, the online character feature module, and the archive storage device through the message middleware.

[0042] Furthermore, the pedestrian tracking module selects the entire head and the entire body of the pedestrian in each video frame through YOLOv5, and obtains the head frame and the body frame that meet the rules and the head frame and the body frame that do not meet the rules through filtering rules;

[0043] For head frames and body frames that meet the rules, the heads and bodies with area overlap greater than 70% are matched;

[0044] For head frames and body frames that do not conform to the rules, the distance between the edges of the head and the body is calculated to match the head with the body;

[0045] The matched head and body are fed into DeepSort for tracking.

[0046] Furthermore, the filtering rules include a head filtering rule and a body filtering rule. The head filtering rule is that when there are multiple head frames on a human body, the one with the smallest area meets the head filtering rule, and the remaining head frames do not meet the head filtering rule.

[0047] The body filtering rule selects a body frame that meets the head filtering rule. A body frame that includes a head and whose IoU with the head is greater than 0.7 meets the body filtering rule, and the remaining body frames do not meet the head filtering rule.

[0048] The beneficial effects of the present invention are:

[0049] The pedestrian tracking module performs image cropping on the video stream to obtain human body images, and completes the calculation of human features in the pedestrian tracking module to obtain pedestrian feature values ​​and human clothing attribute feature values. The ReIDCore module pairs the human clothing attribute feature values ​​and performs pedestrian re-identification by judging the weight of portrait features to accurately identify the target pedestrian. The pedestrian tracking module of the present invention has a good pre-trained model and a weighted addition model combined with clothing features to judge pedestrians, which saves time and cost for repeated model training, reduces the susceptibility of pedestrian appearance to the influence of clothing, scale, occlusion, posture and viewing angle, and improves the speed and accuracy of pedestrian re-identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a framework diagram of a cross-border pedestrian re-identification calculation framework according to a preferred embodiment of the present invention.

[0051] Figure 2 It is a recognition flow chart of a cross-border pedestrian re-identification calculation framework according to a preferred embodiment of the present invention.

[0052] Figure 3 It is a pedestrian tracking flow chart of a cross-border pedestrian re-identification calculation framework according to a preferred embodiment of the present invention.

[0053] In the figure, 1- video surveillance platform, 2- pedestrian tracking module, 3- ReIDCore module, 4- scheduler, 5- message middleware, 6- management module, 7- basic business module, 8- online character feature module, 9- archive storage, 10- persistence module. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0056] Please also see Figures 1 to 3 A cross-border pedestrian re-identification computing framework of a preferred embodiment of the present invention includes a video monitoring platform 1, a pedestrian tracking module 2, a ReIDCore module 3, a scheduler 4, a management module 6, a basic business module 7, an online character feature module 8, an archive storage 9 and a persistence module 10.

[0057] The video monitoring platform 1 is used to obtain the real-time video stream of the IPC camera. The video monitoring platform 1 pushes the real-time video stream to the pedestrian tracking module 2 according to the request and through the RTSP protocol.

[0058] The pedestrian tracking module 2 is used for image cropping of real-time video stream to obtain human images, and the pedestrian tracking module 2 calculates the characteristic values ​​of human images to obtain pedestrian characteristic values ​​and characteristic values ​​of human clothing attributes, and the pedestrian tracking module 2 exchanges data with the ReIDCore module 3 through the message middleware 5. The message middleware 5 of this embodiment

[0059] like Figure 3 As shown, the pedestrian tracking module 2 selects the entire head and body of the pedestrian in each video frame through YOLOv5, and obtains the head frame and body frame that meet the rules and the head frame and body frame that do not meet the rules through filtering rules;

[0060] For head frames and body frames that meet the rules, the heads and bodies with area overlap greater than 70% are matched;

[0061] For head frames and body frames that do not conform to the rules, the distance between the edges of the head and the body is calculated to match the head with the body;

[0062] The matched head and body are fed into DeepSort for tracking.

[0063] The filtering rules include head filtering rules and body filtering rules. The head filtering rule is that when there are multiple head frames on a human body, the one with the smallest area meets the head filtering rules, and the remaining head frames do not meet the head filtering rules.

[0064] The body filtering rule selects the body frame that meets the head filtering rule. The body frame that contains the head and whose IoU with the head is greater than 0.7 meets the body filtering rule, and the rest of the body frames do not meet the head filtering rule.

[0065] The pedestrian tracking module 2 of this embodiment uses the improved YOLOv5 and DeepSort algorithms, where YOLO realizes object detection and DeepSort realizes target tracking.

[0066] The message middleware 5 of this embodiment adopts RabbitMQ to achieve loose coupling between system functional modules and improve system scalability.

[0067] The ReIDCore module 3 is used to match pedestrian feature values ​​and clothing attribute feature values, and collaborates with the pedestrian tracking module 2 to perform global portrait feature duplication detection.

[0068] The scheduler 4 is used for scheduling and management of the ReIDCore module 3 .

[0069] The management module 6 is used for the scheduling management of each pedestrian tracking module 2 , and the management module 6 is also used for starting the pedestrian tracking module 2 , destroying the pedestrian tracking module 2 and collecting and summarizing the operating status of each pedestrian tracking module 2 .

[0070] Basic business module 7 is used for log management, algorithm parameters, ReID query and system settings.

[0071] The online character feature module 8 is used to store the portrait feature information of the ReIDCore module 3.

[0072] The archive memory 9 is used for storing the data output during the algorithm operation and for storing the archived portrait images.

[0073] The persistence module 10 is used for persistence of operation logs, algorithm logs, and pedestrian features, and the persistence module 10 communicates with the video monitoring platform 1, pedestrian tracking module 2, ReIDCore module 3, basic business module 7, online character feature module 8 and archive storage 9 through the message middleware 5.

[0074] The pedestrian tracking module 2 performs image cropping on the video stream to obtain a human body image, and completes the calculation of the person's features in the pedestrian tracking module 2, thereby obtaining pedestrian feature values ​​and person clothing attribute feature values. The ReIDCore module 3 pairs the person clothing attribute feature values, and performs pedestrian re-identification by judging the weight of portrait features to accurately identify the target pedestrian. The pedestrian tracking module 2 of the present invention has a good pre-trained model and a weighted addition model combined with clothing features to judge pedestrians, which saves time and cost for repeated model training, reduces the susceptibility of pedestrian appearance to the influence of clothing, scale, occlusion, posture and viewing angle, and improves the speed and accuracy of pedestrian re-identification.

[0075] The pedestrian re-identification method using this framework includes the following steps:

[0076] S1. The video monitoring platform 1 obtains the real-time video stream of the IPC camera, and the video monitoring platform 1 pushes the real-time video stream to the pedestrian tracking module 2 through the RTSP protocol according to the request.

[0077] S2. The pedestrian tracking module 2 tracks pedestrians in the real-time video stream through the pedestrian detection frame and assigns a local_ID to the pedestrian. The pedestrian tracking module 2 calculates the feature values ​​of the human body image to obtain the pedestrian feature values ​​and the feature values ​​of the person's clothing attributes.

[0078] The pedestrian tracking module 2 uses the retrained YOLOv5 and DeepSort methods to improve the accuracy of person tracking. At the same time, the pedestrian tracking module 2 extracts the person's clothing attributes and pedestrian features calculated by TransReID.

[0079] In step S2, the pedestrian tracking module 2 calculates the attribute characteristic value of the person's clothing, including the following steps:

[0080] S2.1 initialize a first detector for separating pedestrians from backgrounds, and obtain a human image after removing the background through the detector;

[0081] S2.2 initialize a second detector for separating the upper and lower garments of the pedestrian, and obtain an upper garment image and a lower garment image through the second detector;

[0082] S2.3 setting a candidate dictionary and storing candidate image names, candidate top images and candidate bottom images respectively;

[0083] S2.4 sets a dictionary of cosine similarity and stores the similarity of the gray-level co-occurrence matrix of the image to be searched and the candidate image.

[0084] S2.5 extracting the keywords of the candidate image names in the candidate dictionary and the feature values ​​of the corresponding candidate top clothing images and candidate bottom clothing images;

[0085] S2.6 The data of step S3.5 and step S3.4 are compared through the gray level co-occurrence matrix parameter comparison function to obtain the cosine similarity between the top of the image to be found and the top of the candidate image, and the cosine similarity between the bottom of the image to be found and the bottom of the candidate image;

[0086] S2.7 sets a total dictionary and stores the sum of the upper garment similarity and the lower garment similarity to obtain the attribute feature value of the person's clothing.

[0087] S3. The pedestrian tracking module 2 sends the local_ID, pedestrian feature values ​​and character clothing attribute feature values ​​to the scheduler 4 through the message middleware 5, and the scheduler 4 sends the local_ID, pedestrian feature values ​​and character clothing attribute feature values ​​to the ReIDCore module 3.

[0088] The pedestrian tracking module 2 exchanges data with the ReIDCore module 3 through the message middleware 5, passes the local_id, pedestrian feature values, and character clothing attribute feature values ​​to the scheduler 4, and sends the feature values ​​(pedestrian feature values, character clothing attribute feature values) to the ReIDCore module 3 for matching through the scheduler 4.

[0089] S4. ReIDCore module 3 matches the local_ID, pedestrian feature values ​​and character clothing attribute feature values ​​with the feature values ​​in the memory of ReIDCore module 3 to determine whether the pedestrian has a global_ID; when the pedestrian has a global_ID, the global_ID of the pedestrian sequence is updated, and the pedestrian information is saved in the memory of the ReIDCore module; when the pedestrian does not have a global_ID, a global_ID is assigned to the pedestrian, and the pedestrian information is saved in the memory of the ReIDCore module according to the load balancing strategy of the ReIDCore module.

[0090] In this embodiment, ReIDCore module 3 calls ReIDCore one by one through the scheduler. ReIDCore uses a matching algorithm that integrates TransReID and other semantic-level pedestrian features to compare whether the pedestrian exists in each ReIDCore in turn. If so, ReIDCore module 3 sends the global_id of the pedestrian back to the pedestrian tracking module 2; if the pedestrian does not exist, the scheduler allocates the global_id and adds the pedestrian to the memory of the corresponding ReIDCore according to the load balancing strategy of ReIDCore module 3, and also returns the corresponding information to the pedestrian tracking module 2.

[0091] In step S4, the matching method of the ReIDCore module 3 includes the following steps:

[0092] S4.1 determines whether the length of all pedestrian feature values ​​extracted in the pedestrian tracking module 2 is 0;

[0093] S4.2 When the length of all pedestrian feature values ​​extracted in the pedestrian tracking module 2 is not 0, all pedestrian feature values, pedestrian numbers and camera numbers are extracted in the pedestrian tracking module 2;

[0094] S4.3 calculates the cosine similarity numpy array of the feature value of the pedestrian to be matched and the features of all pedestrians in the memory of ReIDCore module 3, and the total confidence ranking is the weighted value of 75% pedestrian feature similarity and 25% clothing feature similarity;

[0095] S4.4 obtains the maximum value index according to the sorting direction. When the cosine similarity of the maximum value index index is greater than the judgment threshold, the number of the pedestrian who has successfully matched is returned to determine whether the pedestrian has a global_ID; when the cosine similarity of the maximum value index index is less than the judgment threshold, the match fails to determine whether the pedestrian has a global_ID.

[0096] S5. After receiving the global_ID information returned by the scheduler 4, the pedestrian tracking module 2 updates the global_ID to the pedestrian tracking module 2.

[0097] In step S5, the updating strategy of the pedestrian tracking module 2 is to tend to save feature values ​​that are greatly different from existing local feature values.

[0098] S6. After every preset time, collect the container information of the ReIDCore module and perform load balancing operations.

[0099] In step S6, the process of collecting the container information of the ReIDCore module and performing load balancing operations is as follows:

[0100] S6.1 obtain a shrinkage value based on the total number of people and the number of containers in all ReIDCore modules 3;

[0101] S6.2 When the contraction value is greater than the contraction threshold, the ReIDCore module 3 performs an expansion operation and calls the add_ReIDCore module interface of the scheduler 4 to generate a new ReIDCore module;

[0102] S6.3 When the shrinkage value is less than the shrinkage threshold, the ReIDCore module 3 performs a shrinkage operation and confirms the number of ReIDCore modules that need to be shrunk. The original ReIDCore modules are divided into two groups, and the pedestrians in the group with fewer people are loaded into the ReIDCore module with more people according to the load balancing rules by calling the batch load function in the scheduler 4, and the freezing time is reset.

[0103] Among them, the contraction threshold: determines whether ReIDCore should perform load balancing operations. The maximum number of pedestrians: the maximum number of pedestrians that can be stored in each ReIDCore. The minimum number of pedestrians: the minimum number of pedestrians that should exist in each ReIDCore. Freeze time: After a container has undergone a scaling operation, a certain freezing time must be allowed before the next scaling operation can be performed.

[0104] This embodiment combines the improved ReID algorithm with the pedestrian attribute recognition algorithm, calculates through distributed devices, and extracts pedestrian attribute labels at the semantic level in a dual-channel manner, thereby greatly improving the speed and accuracy of pedestrian attribute recognition under cross-camera conditions. At the same time, by designing a distributed framework, combining methods with pedestrian attributes at the semantic level, and judging pedestrians through a good pre-trained model and a weighted addition model combined with clothing features, the time and cost of repeated model training are saved, and the speed and accuracy of pedestrian re-identification are improved.

[0105] In person re-identification, the commonly used evaluation indicators are: CMC curve and mAP. CMC (Cumulative Match Characteristic) curve refers to the cumulative matching characteristic curve, and mAP (Mean Average Precision) refers to the average precision. The CMC curve can comprehensively reflect the performance of the person re-identification classifier.

[0106] Before calculating the CMC curve, the similarity between the query target and the target image in the image library is sorted, and then sorted from large to small according to the similarity to obtain the top-k retrieval images of the image library. The probability of the correct query result is:

[0107]

[0108] The CMC curve is calculated by adding the Acck of each query image and dividing it by the total number of query images, usually expressed as Rank-k. For example, the Rank-1 accuracy represents the probability of correctly matching to the first target in the match list.

[0109] mAP can reflect the degree to which all correctly queried pedestrian images are ranked at the front of the result queue in the query results, while taking into account the average precision AP and precision recall PR of the query process.

[0110] In order to verify the performance of this embodiment, the original ReID algorithm and the improved method were used for testing respectively, all using the model trained by market-1501. The CMC curve and mAP comparison data are as follows:

[0111]

[0112] Table 1 is a comparison data table of the original ReID algorithm and this embodiment.

Claims

1. A cross-border pedestrian re-identification computation framework, characterized in that: It includes a video surveillance platform (1), a pedestrian tracking module (2), a ReIDCore module (3) and a scheduler (4). The video monitoring platform (1) is used to obtain the real-time video stream of the IPC camera, and the video monitoring platform (1) pushes the real-time video stream to the pedestrian tracking module (2) according to the request and through the RTSP protocol; The pedestrian tracking module (2) is used for image cropping of the real-time video stream to obtain a human image, and the pedestrian tracking module (2) calculates the feature value of the human image to obtain a pedestrian feature value and a feature value of a person's clothing attribute, and the pedestrian tracking module (2) exchanges data with the ReIDCore module (3) via a message middleware (5); The ReIDCore module (3) is used for matching the pedestrian feature value and the clothing attribute feature value of the person, and cooperates with the pedestrian tracking module (2) to perform global portrait feature duplication judgment; The scheduler (4) is used for scheduling and managing the ReIDCore module (3); The pedestrian re-identification method using this framework includes the following steps: S1. The video monitoring platform (1) obtains the real-time video stream of the IPC camera, and the video monitoring platform (1) pushes the real-time video stream to the pedestrian tracking module (2) according to the request and through the RTSP protocol; S2. The pedestrian tracking module (2) tracks the pedestrians in the real-time video stream through the pedestrian detection frame and assigns a local_ID to the pedestrians, and the pedestrian tracking module (2) calculates the feature value of the human body image to obtain the pedestrian feature value and the feature value of the person's clothing attribute; S3. The pedestrian tracking module (2) sends the local_ID, the pedestrian feature value and the character clothing attribute feature value to the scheduler (4) through the message middleware (5), and the scheduler (4) sends the local_ID, the pedestrian feature value and the character clothing attribute feature value to the ReIDCore module (3); S4. The ReIDCore module (3) matches the local_ID, the pedestrian feature value and the character clothing attribute feature value with the feature value in the memory of the ReIDCore module (3) to determine whether the pedestrian has a global_ID; When the pedestrian has a global_ID, update the global_ID of the pedestrian sequence and save the pedestrian information to the memory of the ReIDCore module; when the pedestrian does not have a global_ID, assign a global_ID to the pedestrian and save the pedestrian information to the memory of the ReIDCore module according to the load balancing strategy of the ReIDCore module; S5. After the pedestrian tracking module (2) receives the global_ID information returned by the scheduler (4), the global_ID is updated to the pedestrian tracking module (2); S6. After each preset time, collect the container information of the ReIDCore module and perform load balancing operations; The method for calculating the attribute characteristic value of clothing of a person by the pedestrian tracking module (2) comprises the following steps: S2.1 initialize a first detector for separating pedestrians from backgrounds, and obtain a human image after removing the background through the detector; S2.2 initialize a second detector for separating the upper and lower garments of the pedestrian, and obtain an upper garment image and a lower garment image through the second detector; S2.3 setting a candidate dictionary and storing candidate image names, candidate top images and candidate bottom images respectively; S2.4 sets a dictionary of cosine similarity and stores the similarity of the gray level co-occurrence matrix of the image to be searched and the candidate image; S2.5 extracting the keywords of the candidate image names in the candidate dictionary and the feature values ​​of the corresponding candidate top clothing images and candidate bottom clothing images; S2.6 The data of step S3.5 and step S3.4 are compared through the gray level co-occurrence matrix parameter comparison function to obtain the cosine similarity between the top of the image to be found and the top of the candidate image, and the cosine similarity between the bottom of the image to be found and the bottom of the candidate image; S2.7 sets a total dictionary and stores the sum of the upper garment similarity and the lower garment similarity to obtain the attribute feature value of the person's clothing; The matching method of the ReIDCore module (3) comprises the following steps: S4.1 Determine whether the length of all pedestrian feature values ​​extracted in the pedestrian tracking module (2) is 0; S4.2 When the length of all pedestrian feature values ​​extracted in the pedestrian tracking module (2) is not 0, all pedestrian feature values, pedestrian numbers and camera numbers are extracted in the pedestrian tracking module (2); S4.3 Calculate the cosine similarity numpy array between the feature value of the pedestrian to be matched and the features of all pedestrians in the memory of the ReIDCore module (3), and the total confidence ranking is the weighted value of 75% pedestrian feature similarity and 25% clothing feature similarity; S4.4 obtains the maximum value index according to the sorting direction, and when the cosine similarity of the maximum value index index is greater than the judgment threshold, returns the number of the successfully matched pedestrian to determine whether the pedestrian has a global_ID; When the cosine similarity of the maximum value index index is less than the judgment threshold, the matching fails, and it is judged that the pedestrian does not have a global_ID.

2. According to claim 1, a cross-border pedestrian re-identification computing framework is characterized by: In step S5, the updating strategy of the pedestrian tracking module (2) is to tend to save feature values ​​that are significantly different from existing local feature values.

3. According to claim 1, a cross-border pedestrian re-identification computing framework is characterized by: In step S6, the process of collecting the container information of the ReIDCore module and performing load balancing operations is as follows: S6.1 obtaining a shrinkage value according to the total number of people and the number of containers in all the ReIDCore modules (3); S6.2 When the contraction value is greater than the contraction threshold, the ReIDCore module (3) performs an expansion operation and calls the add_ReIDCore module interface of the scheduler (4) to generate a new ReIDCore module; S6.3 When the shrinkage value is less than the shrinkage threshold, the ReIDCore module (3) performs a shrinkage operation and confirms the number of ReIDCore modules to be shrunk to, divides the original ReIDCore modules into two groups, and loads the pedestrians in the group with fewer people into the ReIDCore module with more people according to the load balancing rules by calling the batch load function in the scheduler (4), and resets the freezing time.

4. According to claim 1, a cross-border pedestrian re-identification computing framework is characterized by: It also includes a management module (6), a basic business module (7), an online character feature module (8), an archive storage (9) and a persistence module (10). The management module (6) is used for scheduling and managing each of the pedestrian tracking modules (2), and the management module (6) is also used for starting the pedestrian tracking module (2), destroying the pedestrian tracking module (2) and collecting and summarizing the operating status of each of the pedestrian tracking modules (2); The basic business module (7) is used for log management, algorithm parameters, ReID query and system settings; The online character feature module (8) is used for storing the character feature information of the ReIDCore module (3); The archive memory (9) is used for storing data output during algorithm operation and for storing archived portrait images; The persistence module (10) is used for persisting operation logs, algorithm logs, and pedestrian features, and the persistence module (10) communicates with the frequency monitoring platform (1), the pedestrian tracking module (2), the ReIDCore module (3), the basic business module (7), the online character feature module (8), and the archive storage (9) through the message middleware (5).

5. According to claim 1, the cross-border pedestrian re-identification computing framework is characterized by: The pedestrian tracking module (2) selects the entire head and body of the pedestrian in each video frame through YOLOv5, and obtains the head frame and body frame that meet the rules and the head frame and body frame that do not meet the rules through filtering rules; For head frames and body frames that meet the rules, the heads and bodies with area overlap greater than 70% are matched; For head frames and body frames that do not conform to the rules, the distance between the edges of the head and the body is calculated to match the head with the body; The matched head and body are fed into DeepSort for tracking.

6. The cross-border pedestrian re-identification computing framework according to claim 5 is characterized by: The filtering rules include a head filtering rule and a body filtering rule. The head filtering rule is that when there are multiple head frames on a human body, the one with the smallest area meets the head filtering rule, and the remaining head frames do not meet the head filtering rule. The body filtering rule selects a body frame that meets the head filtering rule. A body frame that includes a head and whose IoU with the head is greater than 0.7 meets the body filtering rule, and the remaining body frames do not meet the head filtering rule.

Citation Information

Patent Citations

  • Spark-based distributed massive video analysis system

    CN108683877A

  • Pedestrian tracking method based on improved YOLOv5 and DeepSORT

    CN114724082A

  • Behavior detection method and device, electronic equipment and storage medium

    CN114743262A