Image clustering method, electronic device and storage medium

By dividing the spatial and temporal space in image clustering and lowering the threshold, and using the degree of bayonet correlation to divide the spatial domain, the problem of low recall in the prior art is solved, and the accuracy of recall and clustering results is improved without affecting the accuracy.

CN113869372BActive Publication Date: 2025-08-29ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111034186.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-03
Publication Date
2025-08-29
Estimated Expiration
2041-09-03

AI Technical Summary

Technical Problem

The existing image clustering method has low recall without reducing the accuracy, which affects the effectiveness of clustering results.

Method used

By dividing the bayonet and time into space-time domains for clustering, the clustering threshold is lowered to improve the recall rate, and the spatial domain is divided by the degree of correlation between the bayonets, improving the accuracy and recall rate of clustering results.

Benefits of technology

Without affecting the accuracy of clustering results, the recall rate is significantly improved and the accuracy of clustering results is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113869372B_ABST
    Figure CN113869372B_ABST
Patent Text Reader

Abstract

This application discloses an image clustering method, electronic device, and computer-readable storage medium. The method comprises: obtaining a target image set, the target image set comprising multiple target images captured at a predetermined area within a predetermined time period at a predetermined number of camera ports; dividing the camera ports into a first predetermined number of groups based on the degree of correlation between the different camera ports; and dividing the predetermined time period into a plurality of time domains, wherein each camera port group belongs to a spatial domain, and a time domain and a spatial domain constitute a spatiotemporal domain; dividing the target image set according to the spatiotemporal domains to obtain a plurality of target image subsets; and clustering each target image subset to obtain a clustering result. This method improves the recall rate of the clustering result while maintaining the accuracy of the clustering result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image clustering method, an electronic device, and a computer-readable storage medium. Background Art

[0002] Through image clustering technology, images taken by checkpoints within a preset time and preset area can be clustered to form files of different objects (which can be people or other living things) to help public security departments better control objects.

[0003] Existing image clustering methods, based on deep learning techniques, extract features from objects in images and cluster them based on these features. Due to variations in shooting conditions, the similarity between images of the same object can sometimes fall slightly below the clustering threshold, resulting in omissions of images in the archive and a low recall rate for the clustering results. However, lowering the clustering threshold can affect the accuracy of the clustering results. Therefore, improving the recall rate of clustering results while maintaining accuracy remains an urgent challenge. Summary of the Invention

[0004] The present application provides an image clustering method, an electronic device, and a computer-readable storage medium, which can improve the recall rate of clustering results without affecting the accuracy of clustering results.

[0005] To solve the above technical problems, the present application adopts a technical solution: providing an image clustering method. The method comprises: obtaining a target image set, the target image set comprising multiple target images captured at a plurality of camera ports in a preset area within a preset time; dividing the plurality of camera ports into a first preset number of groups based on the degree of association between different camera ports, and dividing the preset time into a plurality of time domains, wherein each group of camera ports belongs to a spatial domain, and a time domain and a spatial domain constitute a spatiotemporal domain; dividing the target image set according to the spatiotemporal domains to obtain a plurality of target image subsets; and clustering each target image subset to obtain a clustering result.

[0006] To solve the above technical problems, another technical solution adopted in this application is: to provide an electronic device, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.

[0007] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium storing program instructions, which can implement the above method when executed.

[0008] Through the above method, the present application performs clustering in the spatiotemporal domain (target image subset) as a unit. Compared with directly clustering the target image set, since the probability of similar objects existing in the target image subset is reduced, the accuracy of the clustering results can be improved. Secondly, since the present application divides the spatial domain of several checkpoints based on the degree of correlation between different checkpoints, the degree of correlation between the checkpoints corresponding to the spatiotemporal domain composed of the spatial domain and the time domain can be made higher, further improving the accuracy of the clustering results. On this basis, by lowering the clustering threshold, the recall rate of the clustering results can be improved without affecting the accuracy of the clustering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a flow chart of an embodiment of an image clustering method provided by the present application;

[0010] Figure 2 It is a schematic diagram of the space-time domain of this application;

[0011] Figure 3 This is a flowchart of another embodiment of the image clustering method provided by the present application;

[0012] Figure 4 yes Figure 3 Specific process diagram of S22;

[0013] Figure 5 This is a flowchart of another embodiment of the image clustering method provided by the present application;

[0014] Figure 6 It is a schematic diagram of the bayonet diagram of this application;

[0015] Figure 7 This is a flowchart of another embodiment of the image clustering method provided by the present application;

[0016] Figure 8 yes Figure 7 Specific process diagram of S42;

[0017] Figure 9 This is a structural diagram of an embodiment of an electronic device of the present application;

[0018] Figure 10 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

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

[0020] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically specified.

[0021] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments unless there is a conflict.

[0022] Figure 1 It is a flow chart of an embodiment of the image clustering method provided by this application. It should be noted that if there are substantially the same results, this embodiment does not use Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:

[0023] S11: Acquire a target image set.

[0024] The target image set includes multiple target images captured by several camera ports in a preset area within a preset time.

[0025] The target image is accompanied by corresponding identification information, which identifies the capture time and camera mount of the target image. A target image can be understood as an image of the subject passing through the camera mount at the capture time. All target images in the target image set were captured within a preset timeframe and at a preset camera mount area. The preset timeframe can be in units of hours, days, months, etc. For example, the preset timeframe is one day.

[0026] S12: Based on the correlation degree between different checkpoints, the checkpoints are divided into a first preset number of groups, and the preset time is divided into a plurality of time domains.

[0027] Each group of checkpoints belongs to a spatial domain, and a time domain and a spatial domain constitute a spatiotemporal domain. Thus, a first preset number of spatiotemporal domains can be obtained. Figure 2 is a schematic diagram of the space-time domain. Figure 2 As shown in the figure, the horizontal axis represents the preset time (T), and the horizontal axis represents the preset region (R). The preset time is divided into 6 time domains, namely T1, T2, T3, T4, T5, and T6. The preset region is divided into 5 spatial domains, namely R1, R2, R3, R4, and R5. Therefore, the time domain and spatial domain can constitute a total of 6*5=30 time-space domains, which can be recorded as (Tx, Ry).

[0028] You can set a time domain threshold to divide the preset time into several time domains according to the time domain threshold. For example, if the preset time is one day and the time domain threshold is 2 hours, the preset time is divided into 12 time domains, each of which is 2 hours long.

[0029] By grouping checkpoints based on their degree of correlation, we can group highly correlated checkpoints into the same group, ensuring that checkpoints in the same spatial or spatiotemporal domains have a high degree of correlation. The degree of correlation between two checkpoints indirectly reflects the likelihood that the same object passed through them sequentially. Therefore, subsequent clustering based on the spatiotemporal domain can improve the accuracy of clustering results.

[0030] S13: Divide the target image set according to the spatiotemporal domain to obtain several target image subsets.

[0031] One spatiotemporal domain corresponds to one target image subset.

[0032] S14: Cluster each target image subset to obtain a clustering result.

[0033] It is understandable that similar objects can interfere with clustering. Compared to a preset time and preset area (target image set), the probability of similar objects appearing in the same spatiotemporal domain (target image subset) is lower. Therefore, clustering in the spatiotemporal domain can improve clustering accuracy.

[0034] In this step, for each target image subset, the target image subset can be clustered to obtain a corresponding number of second files. The files (first files / second files) involved in this application can be composed of corresponding target images or features of objects in the target images.

[0035] As one implementation, the second file can be directly used as the clustering result. As another implementation, considering that the target may pass through different time domains within the same spatial domain, or may pass through different spatial domains within the same time domain, in order to improve the recall rate of the clustering result, the second file can be merged and the merged result can be used as the clustering result.

[0036] Through the implementation of this embodiment, the present application performs clustering in the spatiotemporal domain (target image subset) as a unit. Compared with directly clustering the target image set, the probability of similar objects existing in the target image subset is reduced, and thus the accuracy of the clustering results can be improved. Secondly, since the present application divides the spatial domain of several checkpoints based on the degree of correlation between different checkpoints, the degree of correlation between the checkpoints corresponding to the spatiotemporal domain composed of the spatial domain and the time domain can be made higher, further improving the accuracy of the clustering results. On this basis, by lowering the clustering threshold, the recall rate of the clustering results can be improved without affecting the accuracy of the clustering results.

[0037] Before the above S12, it is necessary to determine the degree of correlation between different bayonet ports. The details can be as follows:

[0038] Figure 3 It is a flow chart of another embodiment of the image clustering method provided by this application. It should be noted that if there are substantially the same results, this embodiment does not use Figure 3 The process sequence shown is limited. Figure 3 As shown, this embodiment may include:

[0039] S21: Clustering the target image set to obtain a plurality of first files.

[0040] Each first file corresponds to an object.

[0041] S22: Determine the degree of association between different checkpoints based on the checkpoint trajectories of the plurality of first files.

[0042] The target images in the first file are arranged in the order of shooting time. After the arrangement, the shooting times corresponding to the target images in the first file can constitute a time sequence (time trajectory), and after the arrangement, the shooting mounts corresponding to the target images in the first file can constitute a mount sequence (mount trajectory).

[0043] For example, the first file includes five target images {F1, F2, F3, F4, F5}, the shooting time of F1 is 1:30, the shooting mount is C j , the shooting time of F2 is 1:15, the shooting mount is C j , the shooting time of F3 is 1:00, the shooting mount is C j , the shooting time of F4 is 1:20, the shooting mount is Ck , the shooting time of F5 is 1:45, the shooting mount is C l After the arrangement, the first file is F = {F3, F2, F4, F1, F5}, the time track is T = {1:00, 1:15, 1:20, 1:30, 1:45}, and the bayonet track is C = {C j ,C j ,C k ,C j ,C l}.

[0044] As an implementation manner, the degree of association between different checkpoints may be determined directly based on the original checkpoint trajectory of the first file.

[0045] It is understandable that if adjacent bayonet ports in the bayonet track are the same, it will affect the calculation efficiency and may also cause invalid calculations. Therefore, as another implementation method, the original bayonet port track of the first file can also be deduplicated first, and then the correlation between different bayonet ports can be determined based on the bayonet port track after deduplication. The deduplication process is for adjacent repeated bayonet ports in the bayonet track, and the order of deduplication is the order of shooting time. That is, if two adjacent bayonet ports are repeated, the bayonet with the earlier shooting time will be removed. For example, for C={C j ,C j ,C k ,C j ,C l}After deduplication, we get C′={C j ,C k ,C j ,C l}.

[0046] See also Figure 4 , S22 may include the following sub-steps:

[0047] S221: Determine the number of times each bayonet pair has been passed. A bayonet pair consists of two adjacent bayonet pairs in the bayonet track.

[0048] A pair of bayonet holes consisting of two identical bayonet holes is an identical bayonet hole pair. For example, bayonet hole track C′={C a ,C b ,C a ,C c}The corresponding bayonet pair is {C a ,C b},{C b ,C a},{C a ,C c},{C a ,C b} and {Cb ,C a} are the same bayonet pair.

[0049] S222: Based on the number of times each pair of bayonet ports is passed, obtain the degree of association between different bayonet ports.

[0050] The number of times a bayonet pair is passed can also be referred to as the number of times the bayonet pair appears in the bayonet tracks of all first files.

[0051] Each checkpoint can be used as a target checkpoint. The target checkpoint can be paired with each other checkpoint to form a target checkpoint pair. The ratio of the number of times a target checkpoint pair has been passed by the target checkpoint to the total number of times the target checkpoint has been passed by the target checkpoint pair can be used as the correlation level of the target checkpoint pair. The total number of times a target checkpoint has been passed by the target checkpoint pair is the sum of the number of times all checkpoint pairs containing the target checkpoint have been passed by the target checkpoint pair.

[0052] The correlation degree of the target bayonet pair is the correlation degree between the two bayonet included in the target bayonet pair. The bayonet pair including the target bayonet is the bayonet pair composed of the target bayonet.

[0053] For example, the number of times each pair of checkpoints is passed is obtained by counting the checkpoint trajectories in the first file: the number of times the checkpoint pair {C1, C2} is passed is x1, the number of times the checkpoint pair {C1, C3} is passed is x2, the number of times the checkpoint pair {C1, C4} is passed is x3, the number of times the checkpoint pair {C2, C3} is passed is x4, the number of times the checkpoint pair {C2, C4} is passed is x5, and the number of times the checkpoint pair {C3, C4} is passed is x6. These numbers are denoted as {{C1, C2}:x1,{C1, C3}:x2,{C1, C4}:x3,{C2, C3}:x4,{C2, C4}:x5,{C3, C4}:x6}.

[0054] Taking C1 as the target bayonet, the bayonet pairs including the target bayonet are {C1, C2}, {C1, C3} and {C1, C4}, and the total number of times the target bayonet is passed is x1+x2+x3; taking C2 as the target bayonet, the bayonet pairs including the target bayonet are {C1, C2}, {C2, C3} and {C2, C4}, and the total number of times the target bayonet is passed is x1+x4+x5...; and so on.

[0055] From this, we can get the degree of correlation between different bayonet ports:

[0056]

[0057]

[0058]

[0059]

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068] Among them, P(C m / C n ) indicates bayonet C m and Mount C n The degree of correlation between them.

[0069] Figure 5 It is a flow chart of another embodiment of the image clustering method provided by this application. It should be noted that if there are substantially the same results, this embodiment does not use Figure 5 The process sequence shown is limited. This embodiment is a further extension of S12. Figure 5 As shown, this embodiment may include:

[0070] S31: sequentially connecting two bayonet ports whose association degrees meet a preset condition to form a bayonet port diagram.

[0071] Under the constraints of preset conditions (thresholds), two bayonet ports with a correlation degree greater than the correlation degree threshold can be connected.

[0072] Alternatively, for each bayonet, the bayonet pairs formed by it and each other bayonet can be arranged in order of correlation from large to small. Under the constraints of the preset conditions (ranking), the two bayonet pairs contained in the top-ranked specified number of bayonet pairs are connected in sequence. For example, the specified number is 2. For bayonet C1, when x1>x2>x3, the bayonet pairs formed by C1 and other bayonet pairs are arranged in order of correlation from large to small as follows: {C1, C2}, {C1, C3}, {C1, C4}, connecting C1 and C2, and connecting C1 and C3. The processing process for bayonet ports other than C1 is similar and will not be repeated here. The specified number can be determined based on the number of spatial domains to be divided (the first preset number), and the specified number is negatively correlated with the first preset number. That is, the more the specified number, the more connection relationships between the bayonet ports included in the bayonet map, and the more difficult it is to split the bayonet map by removing the connection relationships.

[0073] S32: removing the connection relationships of the second preset number of bayonet pairs in the bayonet graph, so that the product of the number of bayonet corresponding to the first preset number of bayonet sub-graphs obtained after the removal is maximized.

[0074] The number of checkpoints corresponding to each checkpoint sub-graph is less than a quantity threshold, and each checkpoint sub-graph corresponds to a group of checkpoints.

[0075] Removing the connection between a pair of ports means splitting the connecting line segments between the two ports in the port pair. After this splitting / removal, the port graph can be divided into several independent parts (port subgraphs). This removal / splitting process can be understood as removing the associations between pairs of ports with low correlation within the port graph, thereby reducing the correlation between ports in different port subgraphs and increasing the correlation between ports in the same port subgraph.

[0076] The second preset number can be specified manually or calculated by the system. The second preset number can be regarded as the optimal number of cuts for the checkpoint map. The optimal number of cuts is the minimum number of cuts that can "cut the checkpoint map into the first preset number of checkpoint sub-maps, and the number of checkpoints corresponding to each checkpoint sub-map is less than the number threshold." That is, if cutting x line segments can "cut the checkpoint map into the first preset number of checkpoint sub-maps, and the number of checkpoints corresponding to each checkpoint sub-map is less than the number threshold," and cutting x-1 lines cannot "cut the checkpoint map into the first preset number of checkpoint sub-maps, and the number of checkpoints corresponding to each checkpoint sub-map is less than the number threshold," then x is the optimal number of cuts.

[0077] The maximum product of the number of bayonets corresponding to the bayonet subgraph can be recorded as Where S represents the product, X represents the number of bayonet subgraphs, and S iRepresents the number of checkpoints corresponding to the i-th checkpoint subgraph. The product of the number of checkpoints corresponding to the checkpoint subgraph is positively correlated with the degree of association between the different checkpoints corresponding to the checkpoint subgraph. Therefore, when the product of the number of checkpoints corresponding to the checkpoint subgraph obtained after removal is maximized, the degree of association between the different checkpoints corresponding to the checkpoint subgraph obtained under the optimal number of segmentations can be maximized. Later in this application, the segment segmented when the product of the number of checkpoints corresponding to the checkpoint subgraph is maximized is referred to as the optimal segmentation segment.

[0078] Combine Figure 6 An example is given to illustrate this step. Figure 6 It is a schematic diagram of the bayonet diagram, such as Figure 6 As shown, the bayonet graph consists of bayonet A~H and the association / connection relationship / connecting line segments between them. The optimal number of splits is 1, that is, the bayonet graph only needs to be split once. When the split line segment is AD, one bayonet subgraph is obtained, which corresponds to 8 bayonet (A~H), and the product is 8; when the split line segment is DG, two bayonet subgraphs are obtained, one bayonet subgraph corresponds to 5 bayonet (A~E), and the other bayonet subgraph corresponds to 3 bayonet (F~H), and the product is 5*3=15; when the split line segment is GF, two bayonet subgraphs are obtained, one bayonet subgraph corresponds to 7 bayonet (A~E, G, H), and the other bayonet subgraph corresponds to 1 bayonet (F), and the product is 7*1=7; .... Therefore, the optimal split line segment is DG, and by splitting DG, the bayonet A~H can be divided into two groups, one group includes A~E, and the other group includes F~H.

[0079] If the second file needs to be further merged in the above S14, S14 can be expanded as follows:

[0080] Figure 7 It is a flow chart of another embodiment of the image clustering method provided by this application. It should be noted that if there are substantially the same results, this embodiment does not use Figure 7 The process sequence shown is limited. This embodiment is a further extension of S12. Figure 7 As shown, this embodiment may include:

[0081] S41: Clustering each target image subset to obtain a plurality of second files corresponding to each target image subset.

[0082] Each second file corresponds to an object.

[0083] S42: Merge the plurality of second files to obtain a clustering result.

[0084] It is understandable that the same object may pass through a critical spatial domain in the same time domain. Therefore, the second files corresponding to the critical spatial domain in the same time domain can be combined. In this way, in combination with reference to Figure 8 , S42 may include the following sub-steps:

[0085] S421: Based on the checkpoint trajectories of the plurality of first files, determine the spatial domain that each first file passes through.

[0086] S422: Obtain a critical checkpoint pair set based on the spatial domain passed by the first file.

[0087] The critical checkpoint pair set includes several critical checkpoint pairs, and the critical checkpoint pair is composed of the last checkpoint of the previous spatial domain passed by the first file and the first checkpoint of the next spatial domain.

[0088] The former spatial domain and the latter spatial domain can be regarded as critical spatial domains, so the two checkpoints contained in the critical checkpoint pair have a high degree of correlation.

[0089] After executing this step, you can directly enter S423.

[0090] Alternatively, to improve the accuracy of the combined results, denoising can be performed on the critical checkpoint pair set before proceeding to S423. Specifically, the number of times each critical checkpoint pair has been passed can be determined; then, from the critical checkpoint pair set, any critical checkpoint pairs whose number of passes is less than a threshold can be removed. For example, if the threshold is set to P, then any critical checkpoint pairs whose number of passes is less than P can be removed.

[0091] S423: Combining the second files that pass through the critical checkpoint pair in the same time domain in sequence.

[0092] Merging the second files that passed through a critical checkpoint pair in the same time domain involves merging the second file that passed through one of the checkpoints in the critical checkpoint pair with the second file that passed through the other checkpoint in the critical checkpoint pair. That is, for a critical checkpoint pair = (checkpoint 1, checkpoint 2), the second file that passed through checkpoint 1 and the second file that passed through checkpoint 2 in the same time domain are merged.

[0093] For example, first combine the second file of points 0 to 2 passing through gate 1 and the second file of points 2 to 3 passing through gate 1 and the second file of points 2 to 4 passing through gate 2, and so on.

[0094] Since the two checkpoints in a critical checkpoint pair are highly correlated, merging the second files that pass through the critical checkpoint pair in the same time domain can improve the recall rate of the clustering results.

[0095] In addition, in this step, before S423, the second files corresponding to adjacent time domains in the same spatial domain can be merged in sequence. For example, the second files corresponding to 0-2 o'clock and the second files corresponding to 2-4 o'clock in the same spatial domain can be merged, and then the merged second files corresponding to 2-4 o'clock and the files corresponding to 4-6 o'clock can be merged, and so on. Therefore, S423 is performed based on the results of merging the second files corresponding to adjacent time domains in the same spatial domain, and the recall rate of the clustering results can be further improved by expanding the activity time range of the same object.

[0096] In addition, considering that the same object may appear in different spatial domains under different time domains, in order to further improve the recall rate of the clustering results, in this step, after S423, all the different second files can be merged, that is, all the files obtained after the merging in S423 can be merged.

[0097] Figure 9 This is a schematic diagram of the structure of an embodiment of the electronic device of the present application. Figure 9 As shown, the electronic device includes a processor 51 and a memory 52 coupled to the processor 51 .

[0098] The memory 52 stores program instructions for implementing the method of any of the above embodiments; the processor 51 is used to execute the program instructions stored in the memory 52 to implement the steps of the above method embodiments. The processor 51 can also be called a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip with signal processing capabilities. The processor 51 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0099] Figure 10 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of the present application. Figure 10As shown, the computer-readable storage medium 60 of the embodiment of the present application stores program instructions 61, and when the program instructions 61 are executed, the method provided in the above embodiment of the present application is implemented. Among them, the program instructions 61 can form a program file and be stored in the above-mentioned computer-readable storage medium 60 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of the various embodiments of the present application. The aforementioned computer-readable storage medium 60 includes: 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 disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0100] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0101] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. The above is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An image clustering method, characterized in that: include: Acquire a target image set, the target image set including a plurality of target images captured at a plurality of camera ports in a preset area within a preset time; Clustering the target image set to obtain a plurality of first files; Determine the number of times each bayonet pair in the bayonet tracks of the plurality of first files has been passed, wherein a bayonet pair is composed of two adjacent bayonet pairs in the bayonet track; Obtaining the degree of association between different bayonet ports based on the number of times each bayonet port pair has been passed, including: taking each bayonet port as a target bayonet port; respectively combining the target bayonet port with each other bayonet port to form a target bayonet port pair, and using the ratio of the number of times the target bayonet port pair has been passed to the total number of times the target bayonet port has been passed as the degree of association between the target bayonet ports, wherein the total number of times the target bayonet port has been passed is the sum of the number of times all bayonet ports pairs including the target bayonet port have been passed; Based on the degree of association between different checkpoints, the plurality of checkpoints are divided into a first preset number of groups, and the preset time is divided into a plurality of time domains, wherein each group of checkpoints belongs to a spatial domain, and one of the time domains and one of the spatial domains constitute a spatiotemporal domain, including: sequentially connecting two checkpoints whose association degree meets a preset condition to form a checkpoint graph; removing the connection relationships of a second preset number of checkpoint pairs in the checkpoint graph so that the product of the number of checkpoints corresponding to the first preset number of checkpoint subgraphs obtained after the removal is maximized, wherein the number of checkpoints corresponding to each of the checkpoint subgraphs is less than a quantity threshold, and each of the checkpoint subgraphs corresponds to a group of the checkpoints; Dividing the target image set according to the spatiotemporal domain to obtain a plurality of target image subsets; Clustering is performed on each of the target image subsets to obtain a clustering result.

2. The method according to claim 1, characterized in that Before determining the number of times each checkpoint pair in the checkpoint trajectories of the plurality of first files has been passed, the method further includes: Deduplication processing is performed on the checkpoints in the checkpoint tracks of the plurality of first files respectively.

3. The method according to claim 1, characterized in that Clustering each of the target image subsets to obtain a clustering result includes: Clustering each of the target image subsets to obtain a plurality of second files corresponding to each of the target image subsets; The plurality of second files are combined to obtain a clustering result.

4. The method according to claim 3, characterized in that Combining the plurality of second files to obtain a clustering result includes: determining, based on the bayonet trajectories of the plurality of first files, a spatial domain through which each of the first files passes; Based on the spatial domain through which the first file passes, a critical checkpoint pair set is obtained, where the critical checkpoint pair set includes a plurality of critical checkpoint pairs, each consisting of the last checkpoint in a previous spatial domain and the first checkpoint in a subsequent spatial domain through which the first file passes; The second files that pass through the critical checkpoint pair in the same time domain are merged in sequence.

5. The method according to claim 4, characterized in that Before combining the two second files that respectively pass through the two checkpoints constituting the critical checkpoint pair in the same time domain, the method further includes: Determining the number of times each of the critical bayonet pairs has been passed; Remove the critical checkpoint pairs from the critical checkpoint pair set whose number of passes is less than a threshold number.

6. The method according to claim 4, characterized in that Before combining the two second files that respectively pass through the two checkpoints constituting the critical checkpoint pair in the same time domain, the method further includes: The second files corresponding to adjacent time domains under the same spatial domain are merged in sequence.

7. The method according to claim 6, characterized in that After sequentially combining the second files that pass through the critical checkpoint pair in the same time domain, the method further includes: Fully merge different second files.

8. An electronic device, characterized in that: comprising a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Vehicle passing record processing method and device

    CN106846538A

  • Face clustering method and device based on spatio-temporal trajectory data and storage medium

    CN112818149A