A method for recording and updating characteristics of personnel trajectory
Through the matching method between the terminal and the server, the portrait trajectory features are managed and the representative photo sequence is updated, which solves the problems of low accuracy and slow speed in the portrait recognition system and achieves efficient portrait trajectory comparison.
Patent Information
- Application Number
- CN202111292567.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-03
AI Technical Summary
When the quality of surveillance snapshots in the existing portrait recognition system is uncontrollable and there is a large difference between ID photos and surveillance photos, the accuracy of portrait trajectory comparison is low and the speed decreases as the number of snapshots increases.
Using terminal and server-side distribution matching, through the comparison and update of the local portrait feature database and the cloud trajectory database, full sequences and representative photo sequences are used for trajectory data management, the quantity and quality of the representative photo sequences are controlled, and the comparison speed is optimized. and accuracy.
It improves the accuracy and speed of portrait trajectory comparison, reduces the computing load on the server side, and avoids the reduction in comparison speed caused by the increase in the number of snapshots.
Smart Images

Figure CN114064669B
Abstract
Description
Technical Field
[0001] The present invention relates to a personnel trajectory management method, and in particular to a personnel trajectory feature recording and feature updating method. Background Art
[0002] Face recognition technology has been widely used. A large number of cameras for collecting portraits are installed at each checkpoint. Since all people passing through the monitoring points are collected and processed, the computing power required for portrait detection and recognition has reached an unprecedented level. The general method in existing portrait recognition system technology is to compare the captured face photo with the feature library of the recorded identity portrait photos. If a match is found, the internal unique person ID can be obtained, thus forming a trajectory.
[0003] However, the quality of surveillance snapshots is uncontrollable, and the ID photos used as the basis for comparison often differ significantly from surveillance photos in terms of age and image quality. Therefore, many camera snapshots cannot be accurately compared. To solve this problem, historical snapshots are usually used as a basis for comparison to improve the accuracy of the results. As time goes by, the storage capacity of snapshots will increase rapidly. If the number of snapshot terminals is large and widely distributed, it means that the number of people captured is large, which requires extremely high computing power for the server. In addition, as the number of snapshots increases, the speed of portrait trajectory comparison for a single portrait image will become slower and slower. Summary of the invention
[0004] In view of the above-mentioned defects of the prior art, the present invention provides a method for recording and updating personnel trajectory features, which solves the problem that the existing identity confirmation and historical trajectory search methods have low accuracy and the speed becomes slower and slower as the number of snapshots increases.
[0005] The technical solution of the present invention is as follows: A method for recording and updating characteristics of personnel trajectory, comprising the following steps:
[0006] Step 1: The terminal captures a person's image and extracts features to compare with the terminal's local portrait feature library to determine the person's identity result, and sends the comparison result and the captured person's image to the server. The person's identity result includes matching with the terminal's local portrait feature library to obtain the identity of the person in the library or failing to match to form a stranger;
[0007] Step 2: The server searches for the corresponding trajectory sequence data in the cloud trajectory library according to the identity of the person in the library, or creates new trajectory sequence data when the terminal cannot match and forms a stranger, or searches for trajectory sequence data with similar features to the captured person image;
[0008] Step 3: Use the captured person image obtained in step 1 to update the trajectory sequence data newly created or found in step 2;
[0009] Among them, the same person in the local portrait feature library of the terminal and the cloud trajectory library has a one-to-one corresponding personnel identity ID information, the trajectory sequence data includes a full sequence and a representative photo sequence, the full sequence contains all personnel images belonging to the same person, the representative photo sequence is a number of personnel images with the best quality and representative angles in the full sequence and is set with an upper limit of more than 1, the step 3 updates the trajectory sequence data by adding the captured personnel image to the full sequence and updating the representative photo sequence according to the quality, and the step 2 searches for trajectory sequence data with similar features to the captured personnel image by comparing the similarity between the captured personnel image and the representative photo sequence.
[0010] Furthermore, it includes step 4, synchronously updating the representative photo sequence in the updated trajectory sequence data to the local portrait feature library of the terminal, and accelerating the terminal's comparison and recognition speed by using the newly captured person images as much as possible as the terminal comparison basis.
[0011] Furthermore, in the step 2, when the terminal cannot match and forms a stranger, new trajectory sequence data is created or trajectory sequence data with similar features to the captured person image is found. Specifically, a first similarity threshold is set, and the first similarity between the captured person image and all the trajectory sequence data in the cloud trajectory library is calculated. When there is no trajectory sequence data and the first similarity between the captured person image exceeds the first similarity threshold, new trajectory sequence data is added to the cloud trajectory library. When one or more trajectory sequence data and the first similarity between the captured person image exceeds the first similarity threshold, the captured person image obtained in step 1 is used to update the trajectory sequence data with the highest first similarity.
[0012] Furthermore, in order to optimize the trajectory sequence data in the cloud trajectory library and reduce the formation of multiple trajectory sequence data for the same person due to factors such as capture time and angle, thereby slowing down the comparison speed of the entire server side, when the similarity between more than one trajectory sequence data and the captured person image exceeds the first similarity threshold, the captured person image obtained in step 1 is first used to update the trajectory sequence data with the highest first similarity, and then a second similarity threshold is set, and the second similarity is calculated for the representative photo sequence in the trajectory sequence data with the highest first similarity and the remaining trajectory sequence data, respectively, and the remaining trajectory sequence data exceeding the second similarity threshold are merged with the trajectory sequence data with the highest first similarity. When merging, the entire sequence of the trajectory sequence data is directly merged, and after the representative photo sequence of the trajectory sequence data is merged, the number of images in the representative photo sequence is controlled according to the upper limit of the number.
[0013] Furthermore, when updating the trajectory sequence data in step 3, the representative photo sequence is updated according to the quality, which specifically includes the following steps: step 3-1, judging whether the number of images in the representative photo sequence is greater than 0, if not greater than 0, directly adding the captured personnel image to the representative photo sequence and ending the update; if greater than 0, proceeding to step S3-2; step 3-2, judging whether the captured personnel image reaches the basic quality, if not reaching the basic quality, ending the update; if reaching the basic quality, proceeding to step S3-3; step S3-3, adding the captured personnel image to the representative photo sequence, and then controlling the number of images in the representative photo sequence according to the upper limit of the number, and ending the update.
[0014] Furthermore, in order to reduce the impact of low-quality representative photo images in the representative photo sequence on similarity matching when creating new trajectory sequence data, the step S3-3 first determines whether the number of images in the representative photo sequence is greater than 1. If so, the captured image of the person is added to the representative photo sequence, and then the number of images in the representative photo sequence is controlled according to the upper limit, and the update is terminated. Otherwise, step S3-4 is entered; step S3-4, determines whether the images in the representative photo sequence reach the basic quality. If so, the captured image of the person is added to the representative photo sequence to terminate the update; if not, the captured image of the person replaces the image in the representative photo sequence.
[0015] Furthermore, the basic quality is that the size of the face in the image exceeds the face threshold, the image clarity exceeds the clarity threshold, and the left and right side face angles of the face in the image are within the angle threshold.
[0016] Furthermore, in order to enrich the image features in the representative photo sequence and speed up the comparison when comparing the captured images, the representative photo sequence is divided into several groups according to the left and right side face angles. When the number of images in the representative photo sequence is controlled according to the upper limit, images with poor clarity in the group with a large number of images are preferentially eliminated. When multiple groups have the same number of images, images with poor clarity in these groups are preferentially eliminated.
[0017] Furthermore, the upper limit of the number of the representative photo sequences is 7 to 10.
[0018] The advantages of the technical solution provided by the present invention are:
[0019] The computing load is divided by a distributed matching method between the terminal and the server. On the server side, the trajectory data is composed of a full sequence only for displaying information and a representative photo sequence for comparison. The quality of the representative photo sequence is updated and its upper limit is controlled, thereby reducing the amount of comparison data on the server side, so that the comparison speed will not be reduced due to the increase in the number of full sequences. At the same time, because the quality of the representative photo sequence is updated, the quality of the representative photo sequence will gradually improve as the number of snapshots increases. Therefore, the present invention can also improve the accuracy of the comparison structure without reducing the comparison speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a schematic diagram of the system modules of the personnel trajectory feature recording and feature updating method of the present invention.
[0021] Figure 2 The figure is a schematic diagram of a specific flow chart of the personnel trajectory feature recording and feature updating method of the present invention.
[0022] Figure 3 Schematic diagram of the representative photo sequence update method (only one image and does not meet the basic quality).
[0023] Figure 4 Schematic diagram of the representative photo sequence update method (only one image and meeting the basic quality).
[0024] Figure 5 Schematic diagram of the photo sequence update method (the number of images exceeds the upper limit).
[0025] Figure 6 Schematic diagram of merging two trajectory sequence data. DETAILED DESCRIPTION
[0026] The present invention is further described below in conjunction with examples. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading this description, various equivalent modifications to this description by those skilled in the art fall within the scope defined by the claims attached to this application.
[0027] Please combine Figure 1As shown, the system structure adopted by the personnel trajectory feature recording and feature updating method of this embodiment includes a terminal and a server side, wherein the terminal device is installed in a place that needs to be monitored, such as a community, a hotel, etc., and the terminal device includes an intelligent recognition device and a personnel image capture device (camera, camera, etc.). Multiple personnel image capture devices can be set up at a specific location, and multiple personnel image capture devices are configured with an intelligent recognition device for local terminal recognition. The server side is connected to multiple terminals through a network, and the number of server load clusters configured on the server side is evaluated based on the amount of data collected by the terminal device. These terminals can be distributed in multiple different locations to monitor the entire area.
[0028] The overall process of the method for recording and updating the characteristics of a person's trajectory is as follows: first, the intelligent recognition device connects to the server to obtain the terminal's local portrait feature library and the connection information of the person's image capture device; then the intelligent recognition device connects to the camera and takes the stream; then the intelligent recognition device decodes the code stream and performs face detection, and starts feature extraction and face comparison after detecting the face; then the intelligent recognition device uploads the comparison results to the server; finally, the server receives the terminal data and starts trajectory search. For specific steps, please refer to Figure 2 As shown,
[0029] Step 1. The terminal's personnel image capture device captures the personnel image, and then the intelligent recognition device extracts features from the captured personnel image and compares the features with the terminal's local portrait feature library to determine the personnel identity result. There are two possibilities for the personnel identity result. One is that a record matching the captured personnel image can be found from the terminal's local portrait feature library, thereby determining the personnel identity and obtaining a unique personnel ID. The same unique personnel ID is also used to record the trajectory sequence data in the cloud trajectory library on the server side. In other words, for the same person, he or she has the same ID in the terminal's local portrait feature library and the cloud trajectory library. The other is that no record matching the captured personnel image can be found from the terminal's local portrait feature library, in which case the personnel identity result is indicated as a stranger. The intelligent recognition device sends the identified personnel identity result and the captured personnel image to the server side and proceeds to step 2.
[0030] Step 2, this step 2 and step 3 are executed by the server. The server performs corresponding matching and updating according to the information uploaded by the intelligent recognition device of the terminal. Specifically, when there is a unique person ID in the information uploaded by the intelligent recognition device, the server directly searches for the corresponding trajectory sequence data in the cloud trajectory library according to the unique person ID, and then updates the trajectory sequence data with the captured person image obtained at the same time, that is, enters step 3 (the specific update method is detailed in step 3). When there is no unique person ID in the information uploaded by the intelligent recognition device, which indicates a stranger, the server re-identifies and matches the captured person image. At this time, the basis for identification and matching is all the trajectory sequence data in the cloud trajectory library. The cloud trajectory library is composed as follows: all captured person images of the same person form the same trajectory sequence data, which are distinguished by a unique person ID, and the image quality of each trajectory sequence data will be distinguished again, divided into a representative photo sequence and a full sequence, wherein the representative photo sequence is the image that actually participates in the trajectory search and matching, and the full sequence is only for display information, which contains all the person images of the person, but does not participate in subsequent comparison and matching. The representative photo sequence is set with an upper limit, which is generally 7 to 10 photos. A trajectory feature vector (X1, X2, ..., Xn) with the portrait features of each representative photo as elements is generated. The sequence classifies the trajectories according to the registered position information or the location and time of each trajectory node in the sequence, so as to facilitate the speed optimization of trajectory search according to the priority of proximity to time and location.
[0031] When performing identification and matching on the server side, whether the match is determined based on whether the similarity between the captured person image and the representative photo sequence in the trajectory sequence data exceeds a first set first similarity threshold, and the first similarity threshold may vary according to the specific circumstances of the match. Specifically, when the representative photo sequence in the trajectory sequence data has only one image, the captured person image is considered to be matched if the similarity therewith reaches 92 or more; when the representative photo sequence has two images, the average similarity reaches 90, which is considered a match; when the representative photo sequence has three images, the average or median similarity reaches 88, which is considered a match; when the representative photo sequence has more than three images, the average or median similarity reaches 86, which is considered a match.
[0032] For all the trajectory sequence data in the cloud trajectory library, the number of matching hits is divided into several situations. When there is no matching hit for any trajectory sequence data, the image of the person captured by the server is a stranger, and a new trajectory sequence data is created in the cloud trajectory library accordingly, and the captured image of the person is updated for the trajectory sequence data, that is, step 3 is entered. When only one trajectory sequence data is matched, the captured image of the person is directly updated for the trajectory sequence data, and step 3 is also entered. When there are two or more trajectory sequence data that match, the captured image of the person is directly updated for the sequence data with the highest similarity in the manner of step 3, and then the similarity between the other trajectory sequence data that hits and the sequence data with the highest similarity needs to be calculated to determine whether they match each other. The specific method is as follows: the trajectory feature vectors representing the image sequence in the two trajectory sequence data are (X1, X2, ..., Xn) and (X1, X2, ..., Xm), and the similarity is calculated two by two, that is, an m:n comparison is performed, that is, m times of judgment similar to the above 1:n are performed to determine whether the two trajectory sequence data match or not, and the total number of similarity calculations is num=m*n; when num=1, a similarity greater than 92 is considered to be a match; when num=2, a similarity minimum greater than 88 is considered to be a match; when num is equal to 3, a similarity average greater than 88 is considered to be a match; when num>3 but less than 8, a similarity average greater than 88 or a median greater than 90 is considered to be a match; when num>8 but less than 64, a similarity average greater than 84 or a median greater than 86 is considered to be a match; when num>64, a similarity average greater than 80 or a median greater than 82 is considered to be a match. If the match is hit, the two trajectory sequence data are merged. Specifically, the merging operation is to directly merge the full sequence in the trajectory sequence data. After the representative photo sequences of the trajectory sequence data are merged, the number of images in the representative photo sequence is controlled according to the upper limit of the number in the control method of the number of images in the representative photo sequence in step 3.
[0033] Step 3: Use the captured person image obtained in step 1 to update the newly created or found trajectory sequence data; specifically, it includes:
[0034] Step 3-1, determine whether the number of images in the representative photo sequence is greater than 0. If not, it means that there is no representative photo image, that is, this person appears for the first time. Regardless of the quality of this picture, it will be used as a representative photo and will be replaced when a picture that meets the representative photo requirement is entered later. Therefore, the captured person image is directly added to the representative photo sequence, and the corresponding full sequence is also added to end the update; if greater than 0, enter step S3-2.
[0035] Step 3-2, determine whether the captured person image reaches the basic quality. If it does not reach the basic quality, just add the captured person image to the corresponding full sequence and end the update; if it reaches the basic quality, enter step S3-3, where the basic quality of the image mainly considers the face size, clarity, and side face angle. The face size is determined by the eye distance. The face threshold can be set to 60, the clarity threshold is set to 0.7, and the side face angle threshold can be set to 60° on the left and right.
[0036] Step S3-3 first determines whether the number of images in the representative photo sequence is greater than 1. If so, the captured person image is added to the representative photo sequence, and also added to the corresponding full sequence. The number of images in the representative photo sequence is then controlled according to the upper limit, and the update is terminated. If not, it means there is only one representative photo image. At this time, two situations need to be considered, so enter step S3-4 for classification processing.
[0037] Step S3-4, determine whether the image in the representative photo sequence reaches the basic quality, because the original representative photo image may be a representative photo image that must be stored after the new trajectory sequence data is created, and the representative photo image may not meet the basic quality requirements, so it is first judged to determine whether the newly captured person image is directly added to the representative photo sequence or replaced. Therefore, when the judgment result is yes, the original image meets the basic quality requirements, the captured person image is added to the representative photo sequence, and the corresponding full sequence is also added to end the update; if the judgment result is no, the original image does not meet the basic quality requirements, the captured person image replaces the image in the representative photo sequence, and the corresponding full sequence is added to end the update.
[0038] In the above process, the images in the representative photo sequence are classified according to the side face angle. For example, when the upper limit of the number of representative photo sequences in this embodiment is 10, the side face angles can be divided into 7 categories, namely -45°, -30°, -15°, 0°, 15°, 30°, and 45°. "-" indicates the left side. The newly added captured image of the person is classified into the category to which the side face angle is closest. Then the number is controlled according to the clarity. That is, when the number of images in the representative photo sequence reaches the upper limit, the angle of the category with the largest number of representative photos is found, and then the angle with the lowest clarity is found in this category and eliminated. If there are two or more categories with the same number of representative photos, the angle with the lowest clarity is found in these categories and eliminated.
[0039] Step 4: Synchronize the representative photo sequence in the updated trajectory sequence data to the local portrait feature library of the terminal. For example, after the image of the person captured by Terminal No. 1 of the hotel is compared on the server side and the trajectory data sequence is updated, the corresponding representative photo sequence is synchronized to the local portrait feature library of Terminal No. 1 of the hotel. In this way, the higher-quality captured images of the person are used as the basis for terminal comparison, which can speed up the comparison and recognition speed of the terminal.
Claims
1. A method for recording and updating characteristics of personnel trajectory, characterized in that: The following steps are involved: Step 1: The terminal captures a person's image and extracts features to compare with the terminal's local portrait feature library to determine the person's identity result, and sends the comparison result and the captured person's image to the server. The person's identity result includes matching with the terminal's local portrait feature library to obtain the identity of the person in the library or failing to match to form a stranger; Step 2: The server searches for corresponding trajectory sequence data in the cloud trajectory library according to the identity of the person in the library, or creates new trajectory sequence data or searches for trajectory sequence data with similar features to the captured person image when the terminal cannot match and forms a stranger. Specifically, a first similarity threshold is set, and the captured person image is calculated with a first similarity of all trajectory sequence data in the cloud trajectory library. When no trajectory sequence data has a first similarity exceeding the first similarity threshold with the captured person image, new trajectory sequence data is added to the cloud trajectory library. When a trajectory sequence data has a first similarity exceeding the first similarity threshold with the captured person image, the captured person image obtained in step 1 is used to match the first trajectory sequence data with the captured person image. When the similarity between more than one trajectory sequence data and the captured person image exceeds the first similarity threshold, the first trajectory sequence data with the highest similarity is first updated with the captured person image obtained in step 1, and then a second similarity threshold is set, and the second similarity is calculated for the representative photo sequence in the first trajectory sequence data with the highest similarity and the remaining trajectory sequence data respectively, and the remaining trajectory sequence data exceeding the second similarity threshold are merged with the first trajectory sequence data with the highest similarity. When merging, the entire sequence of the trajectory sequence data is directly merged, and after the representative photo sequence of the trajectory sequence data is merged, the number of images in the representative photo sequence is controlled according to the upper limit of the number; Step 3, using the captured personnel image obtained in step 1 to update the trajectory sequence data newly created or found in step 2, specifically including the following steps: Step 3-1, judging whether the number of images in the representative photo sequence is greater than 0, if not greater than 0, directly adding the captured personnel image to the representative photo sequence to end the update; if greater than 0, entering step S3-2; Step 3-2, judging whether the captured personnel image reaches the basic quality, if not, ending the update; if reaching the basic quality, entering step S3-3; Step S3-3 first judges whether the number of images in the representative photo sequence is greater than 1, if yes, adding the captured personnel image to the representative photo sequence, and then controlling the number of images in the representative photo sequence according to the upper limit, ending the update, if not, entering step S3-4; Step S3-4, judging whether the images in the representative photo sequence reach the basic quality, if yes, adding the captured personnel image to the representative photo sequence to end the update; if not, replacing the images in the representative photo sequence with the captured personnel image; Among them, the same person in the local portrait feature library of the terminal and the cloud trajectory library has a one-to-one corresponding personnel identity ID information, the trajectory sequence data includes a full sequence and a representative photo sequence, the full sequence contains all personnel images belonging to the same person, the representative photo sequence is a number of personnel images with the best quality and representative angles in the full sequence and is set with an upper limit of more than 1, the step 3 updates the trajectory sequence data by adding the captured personnel image to the full sequence and updating the representative photo sequence according to the quality, and the step 2 searches for trajectory sequence data with similar features to the captured personnel image by comparing the similarity between the captured personnel image and the representative photo sequence.
2. The method for recording and updating characteristics of personnel trajectory according to claim 1, characterized in that: The method comprises step 4 of synchronously updating the representative photo sequence in the updated trajectory sequence data to the local portrait feature library of the terminal.
3. The method for recording and updating characteristics of personnel trajectory according to claim 1, characterized in that: The basic quality is that the size of the face in the image exceeds the face threshold, the image clarity exceeds the clarity threshold, and the left and right side face angles of the face in the image are within the angle threshold.
4. The method for recording and updating characteristics of personnel trajectory according to claim 1, characterized in that: The representative photo sequence is divided into several groups according to the left and right side face angles. When the number of images in the representative photo sequence is controlled according to the upper limit of the number, the images with poor clarity in the group with a larger number of images are preferentially eliminated. When multiple groups have the same number of images, the images with poor clarity in these groups are preferentially eliminated.
5. The method for recording and updating characteristics of personnel trajectory according to claim 1, characterized in that: The upper limit of the number of representative photo sequences is 7 to 10.
Citation Information
Patent Citations
Vehicle trajectory prediction model establishment and prediction method
CN110176142A
Cloud deployment-oriented multi-target trajectory tracking method and system
CN112669345A
Personnel identity confirmation and trajectory management method and system based on end-cloud combination
CN113590866A
KR20200060942A
