A pedestrian image clustering method, device, electronic device and storage medium

By using logical unit division and level sequential clustering methods in the monitoring system, the problems of large amount of pedestrian image clustering and high error rate are solved, and more efficient and accurate pedestrian image clustering are achieved, and the intelligent security capabilities of the monitoring system are improved.

CN114419352BActive Publication Date: 2025-07-04ZHEJIANG UNIVIEW TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011089901.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-13
Publication Date
2025-07-04
Estimated Expiration
2040-10-13

AI Technical Summary

Technical Problem

In the prior art, pedestrian image clustering calculations are large, low efficiency and error-prone, making it difficult to effectively improve the intelligent security capabilities of the monitoring system.

Method used

The monitoring area is divided into multiple spatial ranges using logical unit division rules, and clustering operations are performed in sequence from low to high in unit levels, including face clustering and pedestrian re-identification, and clustering is achieved using image acquisition module, level determination module and image clustering module.

Benefits of technology

By reducing the uncertainty of the number of images within the unit level, the clustering speed is improved, the error rate of clustering results is reduced, and the reliability and efficiency of the monitoring system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419352B_ABST
    Figure CN114419352B_ABST
Patent Text Reader

Abstract

The present application discloses a pedestrian image clustering method, and the pedestrian image clustering method includes: obtaining pedestrian images captured within a logic unit; wherein, the logic unit is a spatial range divided according to a preset spatial division rule; determining the unit level of each logic unit according to the preset spatial division rule; and sequentially performing clustering operations on the pedestrian images captured within the logic unit in ascending order of the unit level. The present application can improve the clustering speed of pedestrian images and reduce the error rate of clustering results. The present application also discloses a pedestrian image clustering device, a storage medium, and an electronic device, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a pedestrian image clustering method, apparatus, electronic device, and storage medium. Background Art

[0002] Surveillance cameras are applied in all aspects of social life. Since the shooting area of each surveillance camera is limited, it is impossible to directly determine whether the pedestrian images captured by two surveillance cameras belong to the same person. In this field, image clustering is usually used to cluster the images belonging to the same pedestrian into one group to improve the intelligent security ability of the surveillance system.

[0003] In the related art, usually all pedestrian images are clustered and calculated to obtain all the images related to a certain person, so as to determine the action trajectory of the target. This clustering method has a large amount of calculation, low efficiency, and the clustering result is extremely prone to errors.

[0004] Therefore, how to improve the clustering speed of pedestrian images and reduce the error rate of clustering results is a technical problem that those skilled in the art need to solve currently. Summary of the Invention

[0005] The purpose of this application is to provide a pedestrian image clustering method, apparatus, electronic device, and storage medium, which can improve the clustering speed of pedestrian images and reduce the error rate of clustering results.

[0006] To solve the above technical problem, this application provides a pedestrian image clustering method, which includes:

[0007] Obtain the pedestrian images captured within the logical unit; wherein, the logical unit is a spatial range divided according to a preset spatial division rule;

[0008] Determine the unit level of each logical unit according to the preset spatial division rule;

[0009] Perform clustering operations on the pedestrian images captured within the logical unit in ascending order of the unit level.

[0010] Optionally, performing clustering operations on the pedestrian images captured within the logical unit in ascending order of the unit level includes:

[0011] Take the lowest unit level as the current level to be processed;

[0012] Perform clustering operations on the pedestrian images captured within the logical unit of the current level to be processed respectively;

[0013] Judge whether the current level to be processed is the highest unit level;

[0014] If not, the unit level of the current level to be processed is increased by one level to obtain a new current level to be processed, and the step of performing clustering operations on the pedestrian images captured within the logical units of the current level to be processed respectively is entered.

[0015] Optionally, after performing clustering operations on the pedestrian images captured within the logical units of the current level to be processed, it further includes:

[0016] Determine whether there are unclustered pedestrian images;

[0017] If so, determine new logical units according to the alternative space division rule, and perform clustering operations on the unclustered pedestrian images captured within the new logical units in ascending order of unit level.

[0018] Optionally, the preset space division rule is to divide the space range based on paths; among them, the logical units are in a connection relationship, and the unit levels of two interconnected logical units differ by one level;

[0019] Or, the preset space division rule is to divide the space range based on regions; among them, the logical units of the target unit level are covered by the logical units of one level higher in unit level.

[0020] Optionally, if there is a connection relationship between the logical units at adjacent unit levels, performing clustering operations on the pedestrian images captured within the logical units in ascending order of unit level includes:

[0021] Take the lowest unit level as the current level to be processed;

[0022] Generate a set of logical units to be processed including all logical units of the current level to be processed;

[0023] Select a logical unit to be processed from the set of logical units to be processed;

[0024] Take the logical unit that is connected to the logical unit to be processed and has a unit level higher than the current processing level as the main road logical unit;

[0025] Take the logical unit that is connected to the main road logical unit and has a unit level lower than the main road logical unit as the branch road logical unit;

[0026] Perform clustering operations on the pedestrian images captured within the main road logical unit and the branch road logical unit;

[0027] Determine whether there are logical units to be processed in the set of logical units to be processed that have not performed clustering operations;

[0028] If there are unprocessed logic units for which the clustering operation has not been performed, then perform the operation of selecting an unprocessed logic unit from the set of unprocessed logic units;

[0029] If there are no unprocessed logic units for which the clustering operation has not been performed, then determine whether the current processing level is the second highest unit level; if so, end the process; if not, increase the unit level of the current processing level by one level to obtain a new current processing level, and enter the operation of generating a set of unprocessed logic units including all logic units at the current processing level.

[0030] Optionally, perform the clustering operation on the pedestrian images captured within the logic units in ascending order of the unit levels, including:

[0031] Perform face clustering operation and / or pedestrian re-identification operation on the pedestrian images captured within the logic units in ascending order of the unit levels; wherein, the pedestrian images include images captured by a camera and / or images extracted from a surveillance video.

[0032] Optionally, after performing the clustering operation on the pedestrian images captured within the logic units in ascending order of the unit levels, further include:

[0033] Generate pedestrian trajectory information according to the clustering results of the pedestrian images corresponding to each logic unit; wherein, the pedestrian trajectory information includes the logic units passed by the pedestrian and the time the pedestrian stays in the logic unit.

[0034] This application also provides a pedestrian image clustering device, which includes:

[0035] An image acquisition module, configured to acquire pedestrian images captured within a logic unit; wherein, the logic unit is a spatial range divided according to a preset spatial division rule;

[0036] A level determination module, configured to determine the unit level of each logic unit according to the preset spatial division rule;

[0037] An image clustering module, configured to perform the clustering operation on the pedestrian images captured within the logic units in ascending order of the unit levels.

[0038] This application also provides a storage medium, on which a computer program is stored, and when the computer program is executed, the steps performed by the above-mentioned pedestrian image clustering method are implemented.

[0039] This application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps performed by the above-mentioned pedestrian image clustering method are implemented.

[0040] The present application provides a pedestrian image clustering method, including obtaining pedestrian images captured within a logical unit; wherein, the logical unit is a spatial range divided according to a preset spatial division rule; determining the unit level of each logical unit according to the preset spatial division rule; and sequentially performing clustering operations on the pedestrian images captured within the logical unit in ascending order of the unit level.

[0041] The present application first divides a spatial range according to a preset spatial division rule to obtain a plurality of logical units, and the pedestrian images obtained in each logical unit are images of pedestrians within the logical unit. After determining the unit level of each logical unit, the present application sequentially performs clustering operations on the pedestrian images captured within the logical unit in ascending order of the unit level. Since the number of pedestrian images captured within a logical unit at a certain unit level is much less than all pedestrian images, performing clustering operations in ascending order of the unit level can significantly reduce the uncertainty of the pedestrian images for comparison and accelerate the convergence speed of clustering. Thus, it can be seen that the present application can improve the clustering speed of pedestrian images and reduce the error rate of clustering results. The present application also provides a pedestrian image clustering device, an electronic device, and a storage medium, which have the above beneficial effects and will not be elaborated here. Description of the Drawings

[0042] In order to more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0043] Figure 1 It is a flowchart of a pedestrian image clustering method provided by an embodiment of the present application;

[0044] Figure 2 It is a flowchart of another pedestrian image clustering method provided by an embodiment of the present application;

[0045] Figure 3 It is a processing flowchart of clustering analysis of pedestrian images based on logical units in practical applications provided by an embodiment of the present application;

[0046] Figure 4 It is a processing flowchart of another clustering analysis of pedestrian images based on logical units in practical applications provided by an embodiment of the present application;

[0047] Figure 5 It is a schematic structural diagram of a pedestrian image clustering device provided by an embodiment of the present application. Detailed Embodiments

[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application.

[0049] Please refer to the following Figure 1 , Figure 1 , which is a flowchart of a pedestrian image clustering method provided by an embodiment of this application.

[0050] The specific steps may include:

[0051] S101: Obtain pedestrian images captured within a logic unit;

[0052] Among them, in this embodiment, there may be an operation of dividing a target space into multiple logic units according to a preset space division rule, and each logic unit is a certain space range within the target space. Specifically, a logic unit may be a space range divided by region, a space range divided by path, or a space range divided by other rules.

[0053] It can be understood that a logic unit may include any number of image capturing devices (such as cameras, video cameras) to capture pedestrian images within the logic unit. The pedestrian images captured within the logic unit specifically refer to: pedestrian images captured by the image capturing devices within the logic unit. After obtaining the pedestrian images captured within the logic unit in this step, the pedestrian images captured within each logic unit can be stored separately in a folder, so that the pedestrian images stored in a folder are all images of pedestrians within the same logic unit. The pedestrian images mentioned in this step include images captured by a video camera and may also include images extracted from surveillance videos. The images captured by the video camera may be images captured by a front-end network camera IPC.

[0054] S102: Determine the unit level of each logic unit according to the preset space division rule;

[0055] Among them, each logic unit has its corresponding space range, and each space range can have its corresponding unit level. This step can determine the unit level corresponding to each logic unit according to the above corresponding relationship.

[0056] In this embodiment, the unit level of each logical unit can be determined according to a preset space division rule. Specifically, in this embodiment, the unit level can be determined according to the location of the logical unit, the space size of the logical unit, or both the location and the space size of the logical unit. If the preset space division rule is to divide the space range based on regions, taking the campus of a school as an example, the logical units corresponding to the unit levels from low to high can be: classrooms, floors, buildings, teaching areas, and colleges in sequence. The current logical unit is covered by a higher-level logical unit, and the pedestrians appearing in the current logical unit will necessarily appear in the higher-level logical unit. If the preset space division rule is to divide the space range based on paths, the logical units corresponding to the unit levels from low to high are: indoor walkways, corridors, branch roads, and main roads in sequence. The current logical unit is connected to a higher-level logical unit. The pedestrians entering and leaving the current logical unit will ultimately merge into the higher-level logical unit. In addition, for a division rule for which the level cannot be defined, all logical units can be defined as the same level.

[0057] S103: Perform a clustering operation on the pedestrian images captured within the logical units in ascending order of the unit level.

[0058] Among them, in this step, the clustering operation is first performed on the pedestrian images captured within the logical units with a lower unit level, and then on the pedestrian images captured within the logical units with a higher unit level. Since there are fewer pedestrian images captured within the logical units with a lower unit level, performing the clustering operation on the pedestrian images captured within the logical units with a lower unit level first can reduce the uncertainty of the clustering calculation. When upgrading to a logical unit with a higher unit level after clustering the logical units with a lower unit level, this embodiment can classify the unclustered captured photos into the existing clustering results, thereby reducing the comparison calculation operation. When calculating which pedestrian ID the multiple-angle photos of a pedestrian belong to, since there are limited pedestrians in the smallest logical unit and the choice is small, the uncertainty of the pedestrian images used for comparison is greatly reduced, and the clustering convergence speed is accelerated. Compared with the clustering process without location information, the clustering process based on logical units provided in this embodiment can reduce pedestrian clustering errors and improve the processing efficiency.

[0059] Illustrate the implementation process of S101 to S103: According to the preset space division rule, the entire building can be divided into three logical units at the unit level: the entire building, the floor, and the room. Obtain the pedestrian images captured by the image capturing devices at the entrances and exits of each room, the pedestrian images captured by the image capturing devices at the entrances and exits of each floor, and the pedestrian images captured by the image capturing devices at the entrance and exit of the entire building. Determine that the unit level of the entire building is the highest level, the unit level of the floor is the second highest level, and the unit level of the room is the lowest level according to the preset space division rule. Perform clustering operations on the pedestrian images captured in the room, floor, and entire building in ascending order of the unit level. Specifically, the pedestrian images captured at the entrances and exits of each room can be clustered separately first; after the pedestrian images captured in the room are all clustered, the pedestrian images captured at the entrances and exits of each floor are clustered separately; after the pedestrian images captured in the floor are all clustered, the pedestrian images captured at the entrance and exit of the entire building are clustered.

[0060] The clustering operation mentioned in this step may include a face clustering operation or a person re-identification (ReID) operation. The face clustering operation is an algorithm that groups faces in a set according to their identities. Face clustering also analyzes by comparing all the faces in the set pairwise and then based on the similarity values of these comparisons, grouping people belonging to the same identity into one group. Person re-identification, also known as pedestrian re-identification, is a technology that uses computer vision technology to determine whether a specific pedestrian exists in an image or video sequence. The person re-identification technology can retrieve images of the same pedestrian captured across devices for a given monitored pedestrian image.

[0061] In this embodiment, the space range is first divided according to the preset space division rule to obtain multiple logical units, and the pedestrian images obtained in each logical unit are images of pedestrians within the logical unit. After determining the unit level of each logical unit, this embodiment performs clustering operations on the pedestrian images captured in the logical unit in ascending order of the unit level. Since the number of pedestrian images captured in a logical unit at a certain unit level is much less than all the pedestrian images, performing the clustering operation in ascending order of the unit level can greatly reduce the uncertainty of the pedestrian images used for comparison and speed up the convergence speed of clustering. Thus, it can be seen that this embodiment can improve the clustering speed of pedestrian images and reduce the error rate of the clustering results.

[0062] As for Figure 1For further introduction of the corresponding embodiment, after performing clustering operations on the pedestrian images captured within the logical unit in sequence according to the ascending order of the unit levels, pedestrian trajectory information can also be generated based on the clustering results of the pedestrian images corresponding to each logical unit; wherein, the pedestrian trajectory information includes the logical units passed by the pedestrian and the time the pedestrian stays in the logical unit. By analyzing the pedestrian trajectory information, suspicious persons can be identified, and the reliability of the monitoring system can be improved.

[0063] Please refer to Figure 2 , Figure 2 which is a flowchart of another method for clustering pedestrian images provided by an embodiment of the present application. This embodiment is a specific introduction to Figure 1 performing clustering operations on the pedestrian images captured within the logical unit in sequence according to the ascending order of the unit levels in step S103 of the corresponding embodiment. This embodiment can be combined with the Figure 1 corresponding embodiment to obtain a further implementation manner. This embodiment may include the following steps:

[0064] S201: Set the lowest unit level as the current level to be processed;

[0065] S202: Perform clustering operations on the pedestrian images captured within the logical units of the current level to be processed respectively;

[0066] S203: Determine whether the current level to be processed is the highest unit level; if so, end the process; if not, proceed to step S204;

[0067] S204: Increase the unit level of the current level to be processed by one level to obtain a new current level to be processed, and proceed to S202.

[0068] In the above embodiment, the lowest unit level is first set as the current level to be processed, and clustering operations are performed on the pedestrian images captured within the logical units of the current level to be processed respectively. Then, the current level to be processed is increased so as to perform clustering operations on the pedestrian images captured within the logical units of a higher level until the clustering operations are performed on all the pedestrian images captured within the logical units. The above process is illustrated by an example. A building has two floors, and each floor has 2 rooms. In this embodiment, clustering operations are first performed on the pedestrian images captured by the cameras at the entrances and exits of the 4 rooms in sequence. After the clustering of the pedestrian images captured within all the rooms is completed, clustering operations are performed on the pedestrian images captured by the cameras at the entrance and exit of the first floor and the second floor respectively. Finally, clustering operations are performed on the pedestrian images captured by the camera at the entrance and exit of the whole building. This embodiment clusters pedestrian images based on logical units, first clusters pedestrians in the smallest logical unit, and then gradually increases the logical unit level until the highest level. By the above method, errors can be significantly reduced, and clustering can be achieved faster.

[0069] As a feasible implementation manner, Figure 1 in the corresponding embodiment, superposition clustering can be performed based on logical units divided by multiple rules. For example, clustering can be first performed based on the area of Rule 1, and then clustering can be performed on the unclustered pedestrian images based on the path of Rule 2, so as to accelerate the convergence calculation of data and the accuracy of clustering.

[0070] Specifically, after performing a clustering operation on pedestrian images captured within a logical unit divided according to a preset space division rule, the following operations may further exist: determining whether there are unclustered pedestrian images; if so, determining new logical units according to an alternative space division rule, and sequentially performing clustering operations on the unclustered pedestrian images captured within the new logical units in ascending order of unit level. The above-mentioned alternative space division rule and the preset space division rule are different division rules. For example, the preset space division rule can be to divide the space range based on regions, and the alternative space division rule can be to divide the space range based on paths; for another example, the preset space division rule can be to divide the space range based on paths, and the alternative space division rule can be to divide the space range based on regions. After determining the new logical units according to the alternative space division rule, an operation of determining the unit level of the new logical units may exist, so as to sequentially perform clustering operations on the unclustered pedestrian images captured within the new logical units in ascending order of the unit level of the new logical units.

[0071] Illustrate the above process by way of example. If the logical units divided according to the preset space division rule include A, B, C, and D; where the unit level of A is higher than that of B, C, and D, and the unit level of B is higher than that of C and D. If clustering operations are sequentially performed on the pedestrian images captured within the logical units in ascending order of unit level, there is an unclustered pedestrian image a in A and an unclustered pedestrian image d in D. If the new logical units divided according to the alternative space division rule include E, F, and G, at this time the pedestrian image a is in E and d is in F; perform a pedestrian image clustering operation on the new logical unit E corresponding to the pedestrian image a, and perform a pedestrian image clustering operation on the new logical unit F corresponding to the pedestrian image d. Through the above superposition clustering scheme based on logical units divided by multiple rules, more accurate and faster image clustering can be achieved, thereby accelerating the convergence calculation of data.

[0072] Please refer to Figure 3 , Figure 3 which is a processing flow chart for clustering and analyzing pedestrian images based on logical units in an actual application provided by an embodiment of the present application, Figure 3 The scheme shown may include the following steps:

[0073] S301: Divide logical units and classify the logical units to determine the unit level of each logical unit.

[0074] S302: Select the level with the lowest unit level as the current level to be processed.

[0075] S303: Generate a set of logical units to be analyzed, SetToAnalysis, for the logical units at the current level to be processed.

[0076] S304: Select a logical unit from the set of logical units to be analyzed, SetToAnalysis, that has not yet performed the clustering operation.

[0077] S305: Obtain the unclustered pedestrian photos in this logical unit.

[0078] S306: Cluster the unclustered pedestrian photos.

[0079] S307: Determine whether all logical units in the set of logical units to be analyzed, SetToAnalysis, have been processed; if so, proceed to S308; if not, proceed to S304.

[0080] S308: Determine whether the current level to be processed is the highest unit level; if so, end the process; if not, increment the current level to be processed by one level and proceed to S303.

[0081] In this embodiment, the level with the lowest unit level is first used as the current level to be processed, and the logical units at the current level to be processed are clustered in sequence. After the logical units at the current level to be processed are all processed, the current level to be processed is increased until the current level to be processed is the highest unit level. The above process can cluster the pedestrian photos taken within the logical units level by level, which can greatly reduce the uncertainty of the pedestrian images used for comparison and accelerate the convergence speed of clustering.

[0082] The logical unit is a spatial range divided based on a preset space division rule, and the above preset space division rule is to divide the spatial range based on regions; among them, the logical units at the target unit level are covered by the logical units at the unit level one higher. The above logical unit division rule is equivalent to grouping the image capturing devices according to the geographical location information, and the image capturing devices form a closed area geographically, and this closed area is the logical unit.

[0083] Illustrate the process of obtaining logical units by dividing the spatial range based on regions as described above: The cameras that capture images at the entrance and exit of Building 1 form a set of image capture devices. The cameras that capture images at the entrance and exit of Building 1 and the entire building form a closed interval, that is, Building 1 is a logical unit. The cameras that capture images at the entrance and exit of the first floor in Building 1 form a set of image capture devices. The cameras that capture images at the entrance and exit of the first floor and the first floor form a closed interval, that is, the first floor is a logical unit. Similarly, it can be known that each floor can be used as a logical unit. The cameras that capture images at the entrance and exit of a room in Building 1 form a set of image capture devices. The cameras that capture images at the entrance and exit of a room and the room form a closed interval, that is, a room is a logical unit. Similarly, it can be known that each room can be used as a logical unit. Building 1 includes multiple floors, and each floor includes multiple rooms. Therefore, the unit level of Building 1 is higher than the unit level of each floor, and the unit level of the floor is higher than the unit level of the room. Among them, pedestrians passing through the entrance and exit of a room will necessarily appear at the entrance and exit of the floor when leaving the floor; pedestrians passing through the entrance and exit of the floor will necessarily appear at the entrance and exit of Building 1 when leaving the entire building.

[0084] In addition, the above-mentioned preset spatial division rule can also be to divide the spatial range based on paths; among them, the logical units divided based on paths are in a connection relationship, and the unit levels of two mutually connected logical units differ by one level. Further, the cameras can be grouped based on geographical path information. Cameras at the entrance and exit of a path and in the middle of the path can be divided into a group. For example, there are Camera 1 that captures images of pedestrians at the exit of a certain path, Camera 2 that captures images of pedestrians at the entrance, and Camera 3 that captures images of pedestrians in the middle of the path. In this embodiment, Camera 1, Camera 2, and Camera 3 can be configured as image capture devices within the same logical unit, and the shooting directions of each camera can be marked. When dividing logical units based on paths, pedestrians entering and exiting the current logical unit will ultimately converge into a higher-level logical unit. For example, an indoor corridor is connected to a corridor, the corridor is connected to a branch road, and the branch road ultimately converges into the main road.

[0085] Please refer to Figure 4 , Figure 4 which is a flowchart of another processing for clustering pedestrian images based on logical units in an actual application provided by an embodiment of the present application. This embodiment can be applied to scenarios where logical units are obtained by dividing the spatial range based on paths or regions. This embodiment does not limit the spatial division rule, as long as there is a connection relationship between the low-level and high-level spaces after spatial division. This embodiment is a further introduction to Figure 1 S103 in the corresponding embodiment, and a further implementation manner can be obtained by combining this embodiment with Figure 1 the corresponding embodiment. This embodiment may include the following steps:

[0086] S401: Set the lowest unit level as the current level to be processed.

[0087] S402: Generate a set of to-be-processed logic units including all the current to-be-processed logic units at all levels.

[0088] S403: Select a to-be-processed logic unit from the set of to-be-processed logic units.

[0089] S404: Use the logic units that are connected to the to-be-processed logic unit and have a unit level higher than the current processing level as main path logic units.

[0090] S405: Use the logic units that are connected to the main path logic units and have a unit level lower than the main path logic units as branch path logic units.

[0091] S406: Perform a clustering operation on the pedestrian images captured within the main path logic units and the branch path logic units.

[0092] S407: Determine whether there are to-be-processed logic units in the set of to-be-processed logic units on which the clustering operation has not been performed; if so, proceed to S403; if not, proceed to step S408.

[0093] S408: Determine whether the current to-be-processed level is the second highest unit level; if so, end the process; if not, proceed to S409.

[0094] S409: Increase the unit level of the current to-be-processed level by one level to obtain a new current to-be-processed level, and proceed to S402.

[0095] This embodiment proposes a scheme for deep clustering of connected logic units. Since pedestrians entering and exiting the logic units are obtained by partitioning the spatial range based on paths and ultimately converge to higher-level logic units, the trajectories of pedestrians not clustered in the current logic unit can be found in higher-level logic units. Starting from the logic unit UnitA with the smallest unit level, merge the higher-level logic unit UnitB connected to the current logic unit and all the lower-level units connected to UnitB, perform clustering on the unclustered pedestrians in the merged units, and then expand one level and re-cluster until all logic units are processed. Since the movement trajectories of pedestrians are continuous in space, through the above deep clustering scheme, the clustering efficiency of pedestrian images can be improved, and the probability of clustering errors can be reduced.

[0096] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a pedestrian image clustering device provided by an embodiment of the present application. The device may include:

[0097] An image acquisition module 501, configured to acquire pedestrian images captured within a logic unit; wherein, the logic unit is a spatial range divided according to a preset spatial partitioning rule;

[0098] A level determination module 502, configured to determine the unit level of each of the logical units according to the preset space division rule;

[0099] An image clustering module 503, configured to sequentially perform clustering operations on the pedestrian images captured within the logical units in ascending order of the unit levels.

[0100] In this embodiment, first, the space range is divided according to the preset space division rule to obtain a plurality of logical units, and the pedestrian images obtained in each logical unit are images of pedestrians within the logical unit. After determining the unit level of each logical unit, in this embodiment, clustering operations are sequentially performed on the pedestrian images captured within the logical units in ascending order of the unit levels. Since the number of pedestrian images captured within the logical units of a certain unit level is much less than all the pedestrian images, performing clustering operations in ascending order of the unit levels can greatly reduce the uncertainty of the pedestrian images for comparison and speed up the convergence rate of clustering. Thus, it can be seen that this embodiment can improve the clustering speed of pedestrian images and reduce the error rate of clustering results.

[0101] Further, the image clustering module 503 includes:

[0102] A first level determination unit, configured to use the lowest unit level as the current level to be processed;

[0103] A first clustering unit, configured to respectively perform clustering operations on the pedestrian images captured within the logical units of the current level to be processed;

[0104] A first judgment unit, configured to judge whether the current level to be processed is the highest unit level; if not, increase the unit level of the current level to be processed by one level to obtain a new current level to be processed, and start the working process corresponding to the first level determination unit.

[0105] Further, it further includes:

[0106] An unclustered image processing module, configured to, after performing clustering operations on the pedestrian images captured within the logical units of the current level to be processed, judge whether there are unclustered pedestrian images; if so, determine new logical units according to the alternative space division rule, and sequentially perform clustering operations on the unclustered pedestrian images captured within the new logical units in ascending order of the unit levels.

[0107] Further, the preset space division rule is to divide the space range based on paths; wherein, the logical units are in a connection relationship, and the unit levels of two mutually connected logical units differ by one level;

[0108] Alternatively, the preset space division rule is to divide the space range based on regions; among which, the logical units at the target unit level are covered by the logical units at the level one higher than the unit level.

[0109] Further, if there is a connection relationship between the logical units at adjacent unit levels, the image clustering module 503 includes:

[0110] A second-level determination unit, configured to use the lowest unit level as the current level to be processed;

[0111] A set generation unit, configured to generate a set of logical units to be processed including all the logical units at the current level to be processed;

[0112] A logical unit selection unit, configured to select a logical unit to be processed from the set of logical units to be processed; and further configured to use the logical units that are connected to the logical unit to be processed and have a unit level higher than the current processing level as main path logical units; and further configured to use the logical units that are connected to the main path logical units and have a unit level lower than the main path logical units as branch path logical units;

[0113] A second clustering unit, configured to perform a clustering operation on the pedestrian images captured within the main path logical units and the branch path logical units;

[0114] A second judgment unit, configured to judge whether there is a logical unit to be processed in the set of logical units to be processed that has not performed a clustering operation; if there is a logical unit to be processed that has not performed a clustering operation, start the working process corresponding to the logical unit selection unit; if there is no logical unit to be processed that has not performed a clustering operation, judge whether the current level to be processed is the second highest unit level; if so, end the process; if not, increase the unit level of the current level to be processed by one level to obtain a new current level to be processed, and start the working process corresponding to the set generation unit.

[0115] Further, the image clustering module 503 is specifically a module configured to sequentially perform face clustering operations and / or pedestrian re-identification operations on the pedestrian images captured within the logical units in ascending order of the unit level; among which, the pedestrian images include the images captured by a camera and / or the images extracted from a surveillance video.

[0116] Further, it further includes:

[0117] A trajectory generation module, configured to generate pedestrian trajectory information according to the pedestrian image clustering result corresponding to each logical unit after sequentially performing clustering operations on the pedestrian images captured within the logical units in ascending order of the unit level; among which, the pedestrian trajectory information includes the logical units passed by the pedestrian and the time the pedestrian stays in the logical unit.

[0118] Since the embodiments of the apparatus part correspond to those of the method part, for the embodiments of the apparatus part, please refer to the description of the embodiments of the method part, which will not be elaborated here.

[0119] This application also provides a storage medium on which a computer program is stored. When the computer program is executed, the steps provided in the above embodiments can be implemented. The storage medium may include various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

[0120] This application also provides an electronic device, which may include a memory and a processor. When the processor calls the computer program stored in the memory, the steps provided in the above embodiments can be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0121] The embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0122] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the element.

Claims

1. A pedestrian image clustering method, characterized in that, Including: Obtain a pedestrian image captured within a logic unit; wherein, the logic unit is a spatial range divided according to a preset spatial division rule, and there is a connection relationship between logic units at adjacent unit levels; the preset spatial division rule is to divide the spatial range based on a path, the logic units are in a connection relationship, and the unit levels of two mutually connected logic units differ by one level; or, the preset spatial division rule is to divide the spatial range based on a region, and the logic unit at the target unit level is covered by the logic unit at a unit level one higher; Determine the unit level of each of the logic units according to the preset spatial division rule; Perform a clustering operation on the pedestrian images captured within the logic units in ascending order of the unit level.

2. The pedestrian image clustering method according to claim 1, wherein Performing a clustering operation on the pedestrian images captured within the logic units in ascending order of the unit level includes: Take the lowest unit level as the current level to be processed; Perform a clustering operation on the pedestrian images captured within the logic units at the current level to be processed respectively; Judge whether the current level to be processed is the highest unit level; If not, increase the unit level of the current level to be processed by one level to obtain a new current level to be processed, and enter the step of performing a clustering operation on the pedestrian images captured within the logic units at the current level to be processed respectively.

3. The pedestrian image clustering method according to claim 2, wherein After performing a clustering operation on the pedestrian images captured within the logic units at the current level to be processed, it further includes: Judge whether there are unclustered pedestrian images; If so, determine new logic units according to an alternative spatial division rule, and perform a clustering operation on the unclustered pedestrian images captured within the new logic units in ascending order of the unit level.

4. The pedestrian image clustering method according to claim 1, wherein Performing a clustering operation on the pedestrian images captured within the logic units in ascending order of the unit level includes: Take the lowest unit level as the current level to be processed; Generate a set of logic units to be processed including all logic units at the current level to be processed; Select a logic unit to be processed from the set of logic units to be processed; Take the logic unit that is connected to the logic unit to be processed and has a unit level higher than the current processing level as the main road logic unit; Take the logic unit that is connected to the main road logic unit and has a unit level lower than the main road logic unit as the branch road logic unit; Perform a clustering operation on the pedestrian images captured within the main road logic unit and the branch road logic unit; Judge whether there is a logic unit to be processed in the set of logic units to be processed that has not performed a clustering operation; If there is a logic unit to be processed in the set of logic units to be processed that has not performed a clustering operation, perform the operation of selecting a logic unit to be processed from the set of logic units to be processed; If there is no logic unit to be processed in the set of logic units to be processed that has not performed a clustering operation, judge whether the current level to be processed is the second highest unit level; if so, end the process; if not, increase the unit level of the current level to be processed by one level to obtain a new current level to be processed, and enter the operation of generating a set of logic units to be processed including all logic units at the current level to be processed.

5. The pedestrian image clustering method according to claim 1, wherein Perform clustering operations on the pedestrian images captured within the logic unit in ascending order of the unit levels, including: Perform face clustering operations and / or pedestrian re-identification operations on the pedestrian images captured within the logic unit in ascending order of the unit levels; wherein, the pedestrian images include images captured by cameras and / or images extracted from surveillance videos.

6. The pedestrian image clustering method according to any one of claims 1 to 5, characterized in that, After performing clustering operations on the pedestrian images captured within the logic unit in ascending order of the unit levels, it further includes: Generate pedestrian trajectory information based on the pedestrian image clustering results corresponding to each logic unit; wherein, the pedestrian trajectory information includes the logic units passed by the pedestrian and the time the pedestrian stays in the logic unit.

7. A pedestrian image clustering device, characterized in that, It includes: An image acquisition module for acquiring pedestrian images captured within the logic unit; wherein, the logic unit is a spatial range divided according to a preset spatial division rule, and there is a connection relationship between the logic units at adjacent unit levels; the preset spatial division rule is to divide the spatial range based on paths, the logic units are in a connection relationship, and the unit levels of two mutually connected logic units differ by one level; or, the preset spatial division rule is to divide the spatial range based on regions, and the logic units at the target unit level are covered by the logic units at a unit level one higher. A level determination module for determining the unit level of each logic unit according to the preset spatial division rule. An image clustering module for performing clustering operations on the pedestrian images captured within the logic unit in ascending order of the unit levels.

8. An electronic device, characterized in that, It includes a memory and a processor. When the computer program stored in the memory is called by the processor, the steps of the pedestrian image clustering method according to any one of claims 1 to 6 are implemented.

9. A storage medium, characterized in that, Computer-executable instructions are stored in the storage medium. When the computer-executable instructions are loaded and executed by the processor, the steps of the pedestrian image clustering method according to any one of claims 1 to 6 above are implemented.

Citation Information

Patent Citations

  • Face image clustering method and apparatus

    CN105243098A

  • Photo classification method, mobile terminal and readable storage medium

    CN108595600A

  • Multi-camera identification personnel behavior track analysis method

    CN111145223A