CN117975071A - Image clustering method, computer device and storage medium - Google Patents

Image clustering method, computer device and storage medium Download PDF

Info

Publication number
CN117975071A
CN117975071A CN202410365464.6A CN202410365464A CN117975071A CN 117975071 A CN117975071 A CN 117975071A CN 202410365464 A CN202410365464 A CN 202410365464A CN 117975071 A CN117975071 A CN 117975071A
Authority
CN
China
Prior art keywords
image
target object
shooting
points
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410365464.6A
Other languages
Chinese (zh)
Inventor
高圣兴
周明伟
陈立力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202410365464.6A priority Critical patent/CN117975071A/en
Publication of CN117975071A publication Critical patent/CN117975071A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The present application relates to the field of image data processing technology, and in particular, to an image clustering method, a computer device, and a storage medium. The application provides an image clustering method, which comprises the steps of carrying out primary clustering on first images to be clustered to obtain at least one target object image set corresponding to target objects one by one, setting first images which are failed to be clustered as second images, wherein the first images comprise position marks and shooting time, and the position marks correspond to shooting points outputting the first images one by one; acquiring a position mark and shooting time of a first image in a target object image set, and calculating to generate a moving track of a target object; and responding to the abnormal points of the moving track, acquiring a second image from shooting points near the abnormal points, and performing secondary clustering on the target object image set. By the method, the images near the abnormal positions of the moving tracks are subjected to secondary clustering, and the efficiency and recall rate of the secondary clustering process are improved.

Description

Image clustering method, computer device and storage medium
Technical Field
The present application relates to the field of image data processing technology, and in particular, to an image clustering method, a computer device, and a storage medium.
Background
In order to facilitate management of target objects such as goods and vehicles, a large number of images including the target objects are required to be clustered to obtain moving tracks belonging to different target objects, but the moving tracks obtained by primary clustering may be omitted, so that secondary clustering, namely track recall, is usually performed on the remaining images of the primary clustering at present so as to improve the integrity of the moving tracks.
However, even if only the images remaining from the primary clustering are subjected to secondary clustering, the data size for performing secondary clustering calculation is too large, and a large amount of calculation resources are required. And because the number of images is large, the similarity threshold of the secondary clustering needs to be set higher, so that the moving track after clustering is still more likely to be lost, and the efficiency and recall rate of the clustering process are not facilitated.
Disclosure of Invention
To solve the above problems, a main object of the present application is to provide an image clustering method, a computer device, and a computer-readable storage medium for improving the efficiency of image secondary clustering.
The application provides an image clustering method, which comprises the steps of carrying out primary clustering on first images to be clustered to obtain at least one target object image set corresponding to target objects one by one, setting first images which are failed to be clustered as second images, wherein the first images comprise position marks and shooting time, and the position marks correspond to shooting points outputting the first images one by one; acquiring a position mark and shooting time of a first image in a target object image set, and calculating to generate a moving track of a target object; and responding to the abnormal points of the moving track, acquiring a second image from shooting points near the abnormal points, and performing secondary clustering on the target object image set.
The present application provides a computer device comprising a memory, a processor, the memory being coupled to the processor, the memory being for storing a computer program executable on the processor, the processor executing the computer program to implement a method as described in any one of the above.
The present application provides a computer readable storage medium storing a computer program which when executed in a computer processor implements a method as any one of the above.
The beneficial effects of the application are as follows: compared with the prior art, the application discloses an image clustering method, computer equipment and a computer-readable storage medium, which can determine the position of the abnormal movement track of a target object, perform secondary clustering on images shot by shooting points near the position, reduce the range of the secondary clustering and improve the efficiency of the secondary clustering; and when the calculated data volume of the secondary clustering is reduced, the requirement for similarity is correspondingly reduced, and the recall rate of the secondary clustering can be improved to a certain extent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow chart of an embodiment of an image clustering method of the present application.
FIG. 2 is a flow chart of an embodiment of secondary clustering in the image clustering method of the present application.
FIG. 3 is a flow chart of another embodiment of secondary clustering in the image clustering method of the present application.
FIG. 4 is a flow chart of an embodiment of an image clustering method of the present application.
FIG. 5 is a flow chart of an embodiment of an image clustering method according to the present application.
FIG. 6 is a schematic diagram of an interaction flow of an embodiment of an image clustering method of the present application.
FIG. 7 is a schematic diagram of an interaction flow of an embodiment of an image clustering method of the present application.
FIG. 8 is a schematic diagram of an interaction flow of an embodiment of an image clustering method of the present application.
Fig. 9 is a schematic circuit diagram of an embodiment of the computer device of the present application.
Fig. 10 is a schematic circuit configuration diagram of an embodiment of a computer-readable storage medium of the present application.
FIG. 11 is a schematic diagram of a moving track of a target object obtained by the image clustering method of the present application.
Detailed Description
In order that the above objects, features and advantages of the application will be readily understood, a more particular description of the application will be rendered by reference to the appended drawings. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," and the like in this disclosure are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "include," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
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 application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
With the rapid development of image capturing equipment and image processing technology, target object images captured by a camera can be clustered, and moving tracks belonging to different target objects can be obtained by utilizing a camera network formed by the camera, so that the target objects can be managed according to the moving tracks of the target objects. When clustering the target object images, due to the fact that the number of images is large and the quality is uneven, single clustering is easy to miss, the formed moving track is incomplete in a large probability, and therefore secondary clustering, namely track recall, is carried out on the images left by primary clustering on the basis of the moving track, so that the moving track is perfected, and the target object can be managed conveniently.
However, the number of images left in the primary clustering is still large, so that the data size is large when calculation is performed, and a lot of time is spent and a lot of calculation resources are occupied. And because the number of images is large, the image quality is lower than that of images forming a moving track by primary clustering, a higher similarity threshold is needed when recall is carried out, but the number of images which can pass recall is rare due to the higher similarity threshold, the recall rate is lower, and the moving track still has the problem of incomplete moving track.
Based on the problems and inconveniences occurring in the current image clustering process, the inventors of the present application have long studied, and in order to improve or solve the above technical problems, the present application proposes at least the following embodiments.
FIG. 1 is a flow chart of an embodiment of an image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 1. As shown in fig. 1, the present embodiment includes:
s100: and clustering the first images to be clustered once to obtain at least one target object image set corresponding to the target objects one by one, and setting the first images which fail to be clustered as second images.
The image clustering method can be operated on the equipment system of the server and/or the client. The client may be a desktop, a mobile terminal, or a tablet running client software, which when running generates a man-machine interface on which a user may operate using a man-machine interface such as a touch screen, a mouse, a keyboard, or the like. In this embodiment, server software is used as an execution main body for running the image clustering method of the present application.
The data transmission between the electronic device where the server software is located and the electronic device and/or the image pickup device where the client software is located can be completed through means such as Ethernet (local area network), WLAN (wireless local area network) and the like. The step of clustering the first images to be clustered once may be performed automatically by the server software, for example: and in response to receiving the first image sent by the camera equipment, the server software clusters the first image to be clustered once.
After the server software performs primary clustering, at least one target object image set corresponding to the target objects one by one is obtained, the first images passing through the primary clustering are included in each target object image set, and the first images failing to be clustered are set as second images by the server software.
Wherein each first image comprises a position mark and a shooting time. The position marks are in one-to-one correspondence with shooting points capable of outputting the first image, and specifically may be geographic coordinates, such as longitude and latitude information, of the shooting points for shooting the first image. The photographing time may be a time when the first image is photographed or outputted by the photographing point.
Alternatively, the target object may be a vehicle, a device, a cargo, or the like having identifiable characteristics and having management requirements. The image clustering method can be applied to scenes such as roads, factories and warehouses so as to manage the positions and states of things conveniently.
For example, when the target object is a vehicle, the image clustering method can be applied to scenes such as garage, road and the like. When the target object is goods, the image clustering method can be applied to scenes such as wharfs, warehouses, markets and the like. When the target object is equipment, the image clustering method can be applied to scenes such as factories, workshops, equipment storage warehouses and the like.
Optionally, the license plate and/or appearance of the target object can be identified when the target object is a vehicle, the bar code, the two-dimensional code and/or the label and other characteristics of the target object can be identified when the target object is a cargo, and the appearance and/or the nameplate of the target cargo can be identified when the target cargo is equipment.
Specifically, when the target object is a vehicle, the primary clustering can be used for carrying out license plate recognition on the first images by the server software, the first images with the same license plate are stored as a target object image set of the same target object, and the first images without the same license plate cannot be added into the target object image set, namely, the first images without the same license plate do not pass through the primary clustering and can be automatically set as the second images.
Optionally, the first image with abnormal license plate digits obtained after license plate recognition may be directly set as the second image, and waiting for secondary clustering. For example, the real license plate is mostly seven-digit, and when a license plate is recognized by a certain first image to be not seven-digit, the first image is larger in recognition error probability, and the recognized license plate is lower in reference value than the license plate with normal digits.
Alternatively, the first image in which no license plate is recognized in license plate recognition cannot be normally compared with the license plate, and may be directly set as the second image.
Alternatively, when the identified license plate appears only once and/or only at one shooting point within a period of time, the probability of misrecognition is high, and the first image for identifying the license plate can be set as the second image.
S200: and acquiring the position mark and the shooting time of the first image in the target object image set, and calculating to generate the moving track of the target object.
The server software obtains the position marks and the shooting time of the first images in the target object image set to calculate, so that the moving track of the target object is generated based on the difference of the shooting time and the position marks of the first images in the same target object image set.
Specifically, the movement trajectory may be represented as a line between respective photographing points through which the target object passes in time series, which does not necessarily coincide with a road in reality, since there may be a loss of the movement trajectory.
S300: and responding to the abnormal points of the moving track, acquiring a second image from shooting points near the abnormal points, and performing secondary clustering on the target object image set.
And the server software responds to the abnormal points in the moving track of the target object, acquires a second image from shooting points near the abnormal points, and performs secondary clustering on the target object image set.
Alternatively, the shooting points near the abnormal point may be shooting points whose geographic distance from the abnormal point is smaller than a threshold value, or shooting points adjacent to the abnormal point in the road.
According to the method provided by the embodiment, abnormal points where the target object track is lost can be obtained through calculation according to the information contained in each first image in the target object image set obtained through primary clustering, and then clustering is carried out on second images from shooting points near the abnormal points, so that the purposes of reducing clustering circumference and calculating data quantity are achieved, the similarity threshold requirement can be reduced to a certain extent, and the efficiency and recall rate of secondary clustering are improved.
Further, the image quality of the output images of different shooting points is uneven, the worse the image quality is, the more difficult the image quality is to be identified, the lower the identification rate is when the image is clustered for one time, and the more easily the moving track of the target object is lost at the shooting points with poor output image quality. When the server software performs secondary clustering, shooting points can be distinguished according to the image quality/recognition rate of the output first image, and secondary clustering is mainly or preferentially performed on the second images output by the shooting points with lower image quality/recognition rate, so that the secondary clustering efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart of an embodiment of secondary clustering in the image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 2. As shown in fig. 2, the present embodiment includes:
S310: it is determined whether or not the photographing points near the abnormal point include a low-quality photographing point.
The server software judges whether the shooting points near the abnormal point comprise low-quality shooting points.
The server software can divide the shooting points into common shooting points and low-quality shooting points, and the output rate of the second image of the low-quality shooting points in one-time clustering is larger than a first threshold value.
Alternatively, the output rate of the second image may be a ratio of the number of second images from the photographing point to the total number of first images to be clustered output by the photographing point.
S311: if yes, performing secondary clustering on the target object image set by using the second image from the low-quality shooting point.
If the shooting points near the abnormal point comprise low-quality shooting points, the server software utilizes a second image from the low-quality shooting points near the abnormal point to perform secondary clustering on the target object image set.
S312: if the second image clustering from the low-quality shooting points fails, the second image from the rest shooting points near the abnormal points is used for carrying out secondary clustering on the target object image set.
If the secondary clustering of the second image from the low-quality shooting point fails, the method indicates that the moving track is lost from the low-quality shooting point near the abnormal point in a large probability, and the server software performs secondary clustering on the target object image set by using the second image from the shooting point except the low-quality shooting point near the abnormal point.
Optionally, if the secondary clustering is successful by using the second image from a certain shooting point, the recall of the moving track at the abnormal point can be considered to be completed, the secondary clustering process can be directly stopped, the clustered second image is added into the corresponding target object image set, and the shooting point of the second image is complemented and output in the moving track of the target object.
FIG. 3 is a flow chart of another embodiment of secondary clustering in the image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 3. As shown in fig. 3, the present embodiment includes:
s210: and calculating by using all the moving tracks to obtain the relation among a plurality of shooting points, wherein the relation comprises the communication degree of the two shooting points.
After the moving track of the target object is generated in step S200, the server software may also calculate by using all the moving tracks, so as to obtain the relationship between the plurality of shooting points. The relationship may include a degree of communication between any two photographing points, where a higher degree of communication between two photographing points indicates a higher probability that the target object passes through one of the photographing points and then goes to the other photographing point.
S320: and sequencing the shooting points according to the order of the communication degree from high to low, and sequentially carrying out secondary clustering by using the second image from each shooting point.
After the communication degree is calculated, in step S300, the server software may sort the plurality of shooting points near the abnormal point in order from high to low according to the communication degree, and sequentially perform secondary clustering by using the second image from each shooting point.
Specifically, the abnormal point is located in the moving track of the target object, and the server software can order from high to low by using the communication degree between the shooting points near the abnormal point and the at least two shooting points.
Alternatively, when the degree of communication between two photographing points is greater than a fixed threshold, the two photographing points may be said to be in communication, and the photographing point near the abnormal point may be a photographing point in communication with both of the at least two photographing points.
Optionally, if the secondary clustering is successful by using the second image from a certain shooting point, the recall of the moving track at the abnormal point can be considered to be completed, the secondary clustering process can be directly stopped, the clustered second image is added into the corresponding target object image set, and the shooting point of the second image is complemented and output in the moving track of the target object.
The higher the communication degree is, the greater the probability that the target object passes through the shooting point at the position is, the greater the probability that the moving track of the target object is lost at the shooting point is, and the shooting points with high communication degree can be clustered secondarily preferentially by using the method provided by the embodiment, so that the second image meeting the requirements can be found more quickly, and the secondary clustering efficiency is improved.
Further, referring to fig. 4, fig. 4 is a schematic flow chart of an embodiment of the image clustering method according to the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 4. As shown in fig. 4, the present embodiment includes:
S211: and acquiring the times that the shooting point and the other shooting point are taken as two adjacent shooting points to appear in the moving track, and acquiring the total number of the first images to be clustered output by one shooting point.
In step S211, the server software may acquire the number of times that the shooting point and the other shooting point appear in the moving track as two adjacent shooting points, and acquire the total number of the first images to be clustered output by one of the shooting points.
Alternatively, when the number of the first images to be clustered outputted by the two photographing points is different, the total number may be selected from the total number of the first images to be clustered outputted by one photographing point in which the number of the first images to be clustered outputted is larger.
S212: calculating the ratio of the times to the total number to obtain the communication degree between the two shooting points.
The server software calculates the ratio of the times to the total number, thereby obtaining the communication degree between the two shooting points.
Alternatively, when the photographing point is a low quality photographing point, the degree of communication between the photographing point and other photographing points is not truly reflected by the calculation performed in steps S211 and S212, and thus the degree of communication of the photographing point may be calculated according to the length of a road connecting the photographing point and other photographing points or the straight line distance between the photographing point and other photographing points.
The linear distance between the shooting point and other shooting points can be calculated based on longitude and latitude information of the shooting point and the earth radius by utilizing a spherical distance formula.
For example: the communication degree is between 0 and 1, the communication degree of the shooting points with the road length between the low-quality shooting points within ten meters can be 1, the communication degree of the shooting points with the road length between the low-quality shooting points within hundred meters is 0.5, and the longer the road length between the shooting points with the low-quality shooting points is, the lower the communication degree between the shooting points with the low-quality shooting points is.
Optionally, when the communication degree is calculated, after the target object is determined to pass through two shooting points successively, the speed of the target object running between the two shooting points can be judged by combining the road condition between the two shooting points, and when the target object reaches from one shooting point to the other shooting point at an excessively high or excessively low speed, the movement track of the target object can be considered to be wrong, and the clustering result of the target object image set is wrong.
Further, it may be determined whether the moving track between any two adjacent shooting points is lost based on the degree of communication between any two adjacent shooting points in the moving track of the target object after one-time clustering, so as to determine the position of the abnormal point. Referring specifically to fig. 5, fig. 5 is a schematic flow chart of an embodiment of an image clustering method according to the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 5. As shown in fig. 5, the present embodiment includes:
S321: and determining that an abnormal point exists between any two adjacent shooting points in the moving track in response to the communication degree of the two adjacent shooting points being smaller than a second threshold value.
The server software detects the communication degree between any two adjacent shooting points in the moving track, and in response to the communication degree between any two adjacent shooting points in the moving track being smaller than a second threshold, the communication degree between the two adjacent shooting points can be considered to be poor, the target object is unlikely to directly go to the other shooting point through one shooting point, and the moving track between the two shooting points has other shooting points with high probability so as to indirectly connect the two shooting points, so that the abnormal point can be determined to exist between the two adjacent shooting points.
S322: and acquiring a plurality of shooting points which are communicated with two adjacent shooting points of the abnormal point.
In response to the existence of the abnormal point, the server software acquires a plurality of shooting points which are communicated with two shooting points adjacent to the abnormal point.
Further, there may be more than one shooting point between two shooting points adjacent to the abnormal point, there may be a case where the movement track is continuously lost at two or even more than two shooting points, and a plurality of shooting points communicating with any one of the two shooting points adjacent to the abnormal point may be acquired.
S320: and sequencing the shooting points according to the order of the communication degree from high to low, and sequentially carrying out secondary clustering by using the second image from each shooting point.
The server software orders the plurality of shooting points acquired in the step S322 according to the order of the communication degree from high to low, and the second image from each shooting point is used for secondary clustering in sequence.
Optionally, if the secondary clustering is successful by using the second image from a certain shooting point, the recall of the moving track at the abnormal point can be considered to be completed, the secondary clustering process can be directly stopped, the clustered second image is added into the corresponding target object image set, and the shooting point of the second image is complemented and output in the moving track of the target object.
Alternatively, for the case where it is considered that there is more than one shooting point between two shooting points adjacent to an abnormal point, the server software acquires a plurality of shooting points communicating with any one of the two shooting points adjacent to the abnormal point, the server software may perform step S320 similarly on the second images from these shooting points, and then may perform steps S321, S322, S320 on the shooting points from which the second images passed through the clustering come, thereby determining the movement track condition between the two shooting points adjacent to the abnormal point.
Alternatively, a path search algorithm may also be used directly to obtain an reachable path from one to the other of the two shooting points adjacent to the outlier.
Alternatively, in order to prevent the number of shooting points involved from being excessive, the calculation consumes too much resources and time, it is possible to take three steps to reach, i.e. to reach one shooting point within the three shooting points. In practical use, the path search algorithm can be selectively used and parameters reachable in several steps can be set according to the situation.
Optionally, on the basis of identifying the target object, a sub-object included in the target object may also be identified.
Alternatively, when the target object is a vehicle, the sub-object may be a portrait snapshot in the vehicle, which may be a portrait of the driver of the vehicle or a portrait of the passenger. The sub-objects of the vehicle may also be features of the appearance or interior of the vehicle, such as license plates, colors, models, decorations, annual inspection stickers, etc. of the vehicle.
The secondary clustering process of step S300 may refer to fig. 6, and fig. 6 is a schematic diagram of an interaction flow of an embodiment of the image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 6. As shown in fig. 6, the present embodiment includes:
S330: and acquiring a second image from a shooting point near the abnormal point, and comparing the sub-object identified from the second image with the sub-object of the target object in sub-object similarity.
The server software can specifically acquire a second image from a shooting point near the abnormal point, and compare the sub-object identified from the second image with the sub-object corresponding to the target object image set in sub-object similarity.
Optionally, when the target object is a vehicle, the sub-object may be a license plate, and the content of the similarity comparison of the sub-objects may be a license plate number, a license plate color, and/or license plate character content.
S341: and in response to the second image which is subjected to the sub-object similarity comparison, performing object similarity comparison on the second image and any first image in the object image set.
And in response to the second image subjected to the sub-object similarity comparison, the server software performs target object similarity comparison on the second image and any one of the first images in the target object image set.
Alternatively, for the case of a vehicle, the content of the target object similarity comparison may be the target object appearance, the target object brand, the appearance of passengers in the target object, and/or the number of passengers in the target object, etc.
S342: and adding the second image into the target object image set in response to the target object similarity comparison result being greater than the first similarity threshold.
And in response to the result of the target object similarity comparison being greater than the first similarity threshold, the target object similarity comparison is considered to pass, the server software adds the second image into the target object image set, and supplements and outputs the shooting point of the second image in the moving track of the target object, thereby completing the secondary clustering process.
By using the method provided by the embodiment, the characteristics of the target object except the sub-object can be further compared after the sub-objects are compared, so that the accuracy of the secondary clustering process is improved.
FIG. 7 is a schematic diagram of an interaction flow of an embodiment of an image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 7. As shown in fig. 7, the present embodiment includes:
S351: and in response to the absence of the second images subjected to the sub-object similarity comparison, obtaining a representative image in the target object image set, and performing target object similarity comparison on the representative image and all the second images from shooting points near the abnormal point.
After step S330, in response to the absence of the second images that pass the sub-object similarity comparison, the server software obtains a representative image in the target object image set, and performs target object similarity comparison on the representative image and all the second images from the shooting points near the outlier.
Optionally, the representative image may be an image actively selected by the user and capable of clearly showing the characteristics of the target object, or the server software may automatically use the clustering center of the target object image set obtained after the primary clustering as the representative image.
S352: and comparing the target object similarity between a certain second image and any first image in the target object image set in response to the result of comparing the target object similarity between the second image and the representative image being greater than a second similarity threshold.
And in response to the result of the similarity comparison of a certain second image and the target object of the representative image being greater than a second similarity threshold, the server software compares the second image with the similarity of the target object of any first image in the target object image set.
S353: and adding the second image into the target object image set in response to the target object similarity comparison result being greater than a third similarity threshold.
And in response to the result of the target object similarity comparison being greater than a third similarity threshold, the target object similarity comparison is considered to pass, and the server software can add the second image into the target object image set and supplement and output the shooting point of the second image in the moving track of the target object, thereby completing the secondary clustering process. The first similarity threshold is smaller than the second similarity threshold, and the second similarity threshold is smaller than or equal to the third similarity threshold.
By using the method provided by the embodiment, the secondary clustering can be realized on the second image which cannot be clearly identified to the sub-object. And when the target object similarity is compared, a lower similarity threshold is set for the second image which is compared with the sub-object similarity, and a higher similarity threshold is set for the second image which cannot be compared with the sub-object similarity, so that the recall rate is improved, and the accuracy of secondary clustering is ensured to a certain extent.
And for the second image which cannot pass through sub-object similarity comparison, after the second image passes through the target object similarity comparison with the representative image with stronger representativeness in the target object image set, the second image is randomly compared with the first image in the target object image set to further improve the accuracy of secondary clustering.
FIG. 8 is a schematic diagram of an interaction flow of an embodiment of an image clustering method of the present application. It should be noted that, if there are substantially the same results, the present embodiment is not limited to the flow sequence shown in fig. 8. As shown in fig. 8, the present embodiment includes:
S361: a sub-object snapshot within the target object of the second image that joins the target object image set is acquired.
The server software obtains a sub-object snapshot in the target object of the second image added to the target object image set. The second image can be further identified based on the sub-object snapshot, so that accuracy of secondary clustering is improved.
Further, the server software may send the sub-object snapshot to the client software, and a man-machine interface connected by the client software is presented to the user, and the user manually determines whether the second image actually belongs to the target object image set according to the sub-object snapshot.
S362: and responding to the selection result of the sub-object snapshot by the user, and moving the second image corresponding to the sub-object snapshot which is not selected by the user out of the target object image set.
And responding to a selection result of the sub-object snapshot by the user, and moving the second image corresponding to the sub-object snapshot which is not selected by the user out of the target object image set by the server software, wherein the moving track of the target object image set is not lost at a shooting point for outputting the second image.
FIG. 11 is a schematic diagram of a moving track of a target object obtained by the image clustering method of the present application. It should be noted that the present embodiment is not limited to the movement track shown in fig. 11 if the same results are substantially achieved. As shown in fig. 11, the present embodiment may generate corresponding display content by the client software or the server software, and present the display content to the user by the display device connected to the client software. The display content may include a road 13, a plurality of shooting points, a first moving track 12 of a target object obtained by primary clustering, and a second moving track 14 of a target object obtained by secondary clustering.
The shooting points may be disposed along the road 13, in particular, may be disposed at intersections of the roads 13 with different directions, so as to shoot the target objects passing through the road 13 to obtain the first image to be clustered. The first moving track 12 and the second moving track 14 may be a line between a plurality of photographing points through which the target object passes. The connection lines can be connected specifically according to the actual direction of the road 13.
Specifically, the plurality of photographing points may be classified into a low quality photographing point and a normal photographing point, and the low quality is a photographing point having a high probability of the output first image becoming the second image. The normal photographing points in fig. 11 include a first photographing point 1, a second photographing point 2, a third photographing point 3, a fifth photographing point 5, a sixth photographing point 6, a seventh photographing point 7, and a ninth photographing point 9. The low quality photographing points include a fourth photographing point 4, an eighth photographing point 8, and an eleventh photographing point 11. The first moving track 12 obtained by one-time clustering points to the third shooting point 3 from the second shooting point 2, points to the seventh shooting point 7 from the third shooting point 3, and the target object is shot by the three shooting points along the first moving track 12 in sequence and is output as a first image.
After judging the communication degree between the second shooting point 2 and the third shooting point 3, and between the third shooting point 3 and the seventh shooting point 7 which are adjacent in the first moving track 12, it is found that no communication exists between the second shooting point 2 and the third shooting point 3, and between the third shooting point 3 and the seventh shooting point 7, and abnormal points exist, so that the target object image set of the target object can be clustered secondarily.
Alternatively, the second image output by the shooting points which are communicated with at least two shooting points adjacent to the abnormal point can be acquired for secondary clustering. For example: inquiring a first shooting point 1 communicated with a second shooting point 2 and a third shooting point 3, and acquiring a second image output by the first shooting point 1; when the second image output by the first imaging point 1 is successfully clustered, the first imaging point 1 may be determined as an imaging point through which the target object passes. Further, the first imaging point 1 can be supplemented between the second imaging point 2 and the third imaging point 3, and a partial second movement locus 14 from the second imaging point 2 to the first imaging point 1 and from the first imaging point 1 to the third imaging point 3 can be formed.
Optionally, a plurality of shooting points adjacent to shooting points on two sides of the abnormal point can be obtained by using a path searching algorithm, an reachable path which can reach another shooting point on two sides of the abnormal point by passing through the shooting points on two sides of the abnormal point is calculated, and secondary clustering is carried out on a second image output by the shooting points on the reachable path.
In this case, the number of shooting points on the reachable path may be limited, for example, the number of shooting points may be set to be lower than or equal to two.
For example: the first, fourth, fifth, eighth, and ninth photographing points 1, 4, 5, 8, and 9 adjacent to the outlier are retrieved using a path retrieval algorithm for outliers between the third and seventh photographing points 3 and 7. After the number of shooting points on the reachable path is set to be at most two, a fourth shooting point 4 and a fifth shooting point 5 can be selected from the shooting points; when the second images output from the fourth imaging point 4 and the fifth imaging point 5 are successfully clustered, the fourth imaging point 4 and the fifth imaging point 5 may be determined as imaging points through which the target object passes. Further, the fourth imaging point 4 and the fifth imaging point 5 can be supplemented between the third imaging point 3 and the seventh imaging point 7, and a partial second movement locus 14 from the third imaging point 3 to the fourth imaging point 4, from the fourth imaging point 4 to the fifth imaging point 5, and from the fifth imaging point 5 to the seventh imaging point 7 can be formed.
After the secondary clustering, a second moving track 14 as shown in fig. 11 can be formed on the basis of the first moving track 12, and recall of the moving track of the target object is completed.
Alternatively, when the movement locus of the target object is presented to the user, the first movement locus 12 may be set to a dotted line, grayed out, or directly deleted after completion of recall of the movement locus of the target object to obtain the second movement locus 14, thereby highlighting the second movement locus 14.
Optionally, shooting points recalled through secondary clustering can be marked, and a second image output by the shooting points through secondary clustering is displayed nearby the shooting points, so that a user can further judge whether the second image belongs to the target object according to display content.
Further, the user may also remove a second image not belonging to the target object from the target object image set through the display content.
Further, when the user can further judge whether the second image belongs to the target object according to the display content, the representative image or any first image in the target object image set can be synchronously displayed near the shooting point for comparison reference by the user.
Further, when the image capturing device of the shooting point has a video recording function, after the user selects a certain shooting point in a certain moving track, the video of the target object when passing through the shooting point can be displayed, so that the user can know the running condition of the target object at the shooting point, or further compare the video to judge whether the target object actually passes through the shooting point.
Optionally, the second image passing through the sub-object similarity comparison and the second image not passing through the sub-object similarity are marked in a distinguishing mode so as to prompt a user.
Alternatively, the low-quality shooting points and the general shooting points can be marked differently, so that the user is reminded of improving the situation of the low-quality shooting points. For example, the probability that the shooting point outputs the second image, the geographical position of the shooting point, are displayed near the shooting point. For example, an alarm for the shooting point is displayed, and the shooting point can be automatically selected by the user triggering the alarm.
Optionally, when the user actively selects a certain shooting point, a connection line can be displayed between the shooting point and other shooting points communicated with the shooting point, so as to remind the user that the target object possibly goes to the shooting point after passing through the shooting point.
Optionally, when the user actively selects a certain shooting point, the geographic position of the shooting point, the probability of outputting the second image and/or the latest output first image to be clustered can be displayed near the shooting point, so that the user can know the current condition of the shooting point to a certain extent.
As shown in fig. 9, the computer device described in the embodiment of the computer device of the present application may be the server 10 described above. The computer device may include a processor 110, a memory 120, and a communication circuit 130.
The Memory 120 is used to store a computer program, and may be a ROM (Read-Only Memory), a RAM (random access Memory ), or other type of storage device. In particular, the memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory is used to store at least one piece of program code.
The processor 110 is used to control the operation of the computer device, and the processor 110 may also be referred to as a CPU (Central Processing Unit ). The processor 110 may be an integrated circuit chip with signal processing capabilities. Processor 110 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The general purpose processor may be a microprocessor or the processor 110 may be any conventional processor or the like.
The processor 110 is configured to execute a computer program stored in the memory 120 to implement the image clustering method described in several embodiments of the present application.
The computer device may also include a communication circuit 130, the communication circuit 130 being a device or circuit with which the computer device is communicatively coupled to an external device to enable the processor 110 to interact with external devices via the communication circuit 130.
For detailed descriptions of functions and execution processes of each functional module or component in the embodiment of the computer device of the present application, reference may be made to the descriptions of the image clustering method in the above embodiments of the present application, which are not repeated herein.
In several embodiments provided by the present application, it should be understood that the disclosed computer device and image clustering method may be implemented in other manners. For example, the embodiments of a computer device described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Referring to fig. 10, the above-described integrated units, if implemented in the form of software functional units and sold or used as independent products, may be stored in the computer-readable storage medium 200. Based on such understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product or all or part of the technical solution, which is stored in a storage medium, and includes several instructions/computer programs to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media such as a USB flash disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and electronic terminals such as a computer, a mobile phone, a notebook computer, a tablet computer, a camera, and the like having the storage media.
The description of the execution of the program data in the computer-readable storage medium may be described with reference to several embodiments of the image clustering method of the present application, which are not repeated herein.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.

Claims (10)

1. An image clustering method, comprising:
clustering the first images to be clustered once to obtain at least one target object image set corresponding to target objects one by one, setting the first images which are failed to be clustered as second images, wherein the first images comprise position marks and shooting time, and the position marks are corresponding to shooting points outputting the first images one by one;
acquiring the position mark and the shooting time of the first image in the target object image set, and calculating to generate a moving track of the target object;
and responding to the abnormal point of the moving track, acquiring the second image from the shooting point near the abnormal point, and performing secondary clustering on the target object image set.
2. The image clustering method of claim 1, wherein the setting the first image, which fails to be clustered, as the second image comprises:
Acquiring the position mark of the second image, and setting the shooting point of which the output rate of the second image is greater than a first threshold value as a low-quality shooting point;
the acquiring the second image from the shooting point near the abnormal point to perform secondary clustering on the target object image set includes:
Judging whether the shooting points near the abnormal point comprise the low-quality shooting points or not;
If yes, performing secondary clustering on the target object image set by using the second image from the low-quality shooting point;
And if the second image clustering from the low-quality shooting points fails, performing secondary clustering on the target object image set by using the second images from the shooting points remaining near the abnormal points.
3. The image clustering method of claim 1, wherein the generating the movement trajectory of the target object further comprises:
Calculating by using all the moving tracks to obtain a plurality of relations among the shooting points, wherein the relations comprise the communication degree of the two shooting points;
the acquiring the second image from the shooting point near the abnormal point to perform secondary clustering on the target object image set includes:
And sequencing a plurality of shooting points according to the sequence of the communication degree from high to low, and sequentially utilizing the second image from each shooting point to perform secondary clustering.
4. The image clustering method according to claim 3, wherein said calculating a relationship between the plurality of photographing points using all the movement trajectories includes:
Acquiring the times of the shooting points and the other shooting point serving as two adjacent shooting points appearing on the moving track, and acquiring the total number of the first images to be clustered output by one of the shooting points;
calculating the ratio of the times to the total number to obtain the degree of communication between the two shooting points.
5. The image clustering method of claim 4, wherein said responding to the presence of the outlier in the movement trajectory comprises:
Determining that an abnormal point exists between any two adjacent shooting points in the moving track in response to the communication degree of the two adjacent shooting points in the moving track being smaller than a second threshold;
after the abnormal points exist in the response to the movement track, before the imaging points are ordered in the order from high to low according to the communication degree, the method further comprises the following steps:
and acquiring a plurality of shooting points which are communicated with two adjacent shooting points of the abnormal point.
6. The image clustering method of claim 1, wherein the acquiring the second image from the shooting point near the outlier to secondarily cluster the target object image set comprises:
Acquiring the second image from the shooting point near the abnormal point, and comparing the sub-object identified from the second image with the sub-object of the target object in sub-object similarity;
In response to the second image subjected to the sub-object similarity comparison, performing object similarity comparison on the second image and any one of the first images in the object image set;
And adding the second image into the target object image set in response to the result of the target object similarity comparison being greater than a first similarity threshold.
7. The image clustering method according to claim 6, wherein the comparing the sub-object identified from the second image with the sub-object of the target object for sub-object similarity includes:
obtaining a representative image in the target object image set in response to the second image passing through the sub-object similarity comparison does not exist, and comparing the representative image with all the second images from the shooting points near the abnormal point;
responding to the result of the similarity comparison of a certain second image and the target object of the representative image to be larger than a second similarity threshold value, and comparing the second image with any one of the first images in the target object image set to perform the similarity comparison of the target object;
Adding the second image into the target object image set in response to the target object similarity comparison result being greater than a third similarity threshold;
wherein the first similarity threshold is less than the second similarity threshold, which is less than or equal to the third similarity threshold.
8. The image clustering method of claim 7, wherein said adding the second image to the target object image set, thereafter comprises:
Acquiring a snapshot of the sub-objects within the target object joining the second image of the target object image set;
And responding to a selection result of the user on the snapshot of the sub-object, and moving the second image corresponding to the snapshot of the sub-object which is not selected by the user out of the target object image set.
9. A computer device comprising a memory, a processor, the memory being connected to the processor, the memory being for storing a computer program executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 8 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed in a computer processor implements the method of any one of claims 1 to 8.
CN202410365464.6A 2024-03-28 2024-03-28 Image clustering method, computer device and storage medium Pending CN117975071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410365464.6A CN117975071A (en) 2024-03-28 2024-03-28 Image clustering method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410365464.6A CN117975071A (en) 2024-03-28 2024-03-28 Image clustering method, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN117975071A true CN117975071A (en) 2024-05-03

Family

ID=90849835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410365464.6A Pending CN117975071A (en) 2024-03-28 2024-03-28 Image clustering method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN117975071A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286781A1 (en) * 2016-04-05 2017-10-05 Omni Al, Inc. Trajectory cluster model for learning trajectory patterns in videos data
CN113570635A (en) * 2021-06-03 2021-10-29 浙江大华技术股份有限公司 Target motion trajectory reduction method and device, electronic equipment and storage medium
CN113592901A (en) * 2021-06-15 2021-11-02 阿里云计算有限公司 Image processing method, image processing device, computer equipment and computer readable storage medium
WO2021259007A1 (en) * 2020-06-24 2021-12-30 平安科技(深圳)有限公司 Data pushing method and system based on behavior trajectory, and computer device
CN113962326A (en) * 2021-11-10 2022-01-21 浙江商汤科技开发有限公司 Clustering method, device, equipment and computer storage medium
CN114155576A (en) * 2021-11-15 2022-03-08 浙江大华技术股份有限公司 Image processing method and device
WO2022057302A1 (en) * 2020-09-17 2022-03-24 浙江商汤科技开发有限公司 Clustering method and apparatus, electronic device, and storage medium
CN116168222A (en) * 2023-03-15 2023-05-26 浙江大华技术股份有限公司 Track recognition method and device, storage medium and electronic equipment
WO2023196661A1 (en) * 2022-04-08 2023-10-12 Percipient.Ai, Inc. Systems and methods for monitoring trailing objects

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286781A1 (en) * 2016-04-05 2017-10-05 Omni Al, Inc. Trajectory cluster model for learning trajectory patterns in videos data
WO2021259007A1 (en) * 2020-06-24 2021-12-30 平安科技(深圳)有限公司 Data pushing method and system based on behavior trajectory, and computer device
WO2022057302A1 (en) * 2020-09-17 2022-03-24 浙江商汤科技开发有限公司 Clustering method and apparatus, electronic device, and storage medium
CN113570635A (en) * 2021-06-03 2021-10-29 浙江大华技术股份有限公司 Target motion trajectory reduction method and device, electronic equipment and storage medium
CN113592901A (en) * 2021-06-15 2021-11-02 阿里云计算有限公司 Image processing method, image processing device, computer equipment and computer readable storage medium
CN113962326A (en) * 2021-11-10 2022-01-21 浙江商汤科技开发有限公司 Clustering method, device, equipment and computer storage medium
CN114155576A (en) * 2021-11-15 2022-03-08 浙江大华技术股份有限公司 Image processing method and device
WO2023196661A1 (en) * 2022-04-08 2023-10-12 Percipient.Ai, Inc. Systems and methods for monitoring trailing objects
CN116168222A (en) * 2023-03-15 2023-05-26 浙江大华技术股份有限公司 Track recognition method and device, storage medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李思宇;向隆刚;张彩丽;龚健雅;: "基于低频出租车轨迹的城市路网交叉口提取研究", 地球信息科学学报, no. 12, 25 December 2019 (2019-12-25) *
雷李辉;高志鹏;尤俊生;: "基于图像识别的计算机自动锁屏系统的研究", 保密科学技术, no. 01, 10 January 2015 (2015-01-10) *

Similar Documents

Publication Publication Date Title
CN108491827B (en) Vehicle detection method and device and storage medium
CN108875542B (en) Face recognition method, device and system and computer storage medium
US8995714B2 (en) Information creation device for estimating object position and information creation method and program for estimating object position
CN115439831A (en) Method and device for reducing loss of passenger-related goods
Ciberlin et al. Object detection and object tracking in front of the vehicle using front view camera
CN112434566A (en) Passenger flow statistical method and device, electronic equipment and storage medium
CN110544268B (en) Multi-target tracking method based on structured light and SiamMask network
CN111310728A (en) Pedestrian re-identification system based on monitoring camera and wireless positioning
CN111400550A (en) Target motion trajectory construction method and device and computer storage medium
CN116310656A (en) Training sample determining method and device and computer equipment
CN113160272B (en) Target tracking method and device, electronic equipment and storage medium
CN114299030A (en) Object detection model processing method, device, equipment and storage medium
CN112631333B (en) Target tracking method and device of unmanned aerial vehicle and image processing chip
CN113065425B (en) Method and system for reminding objects left in vehicle based on environmental information and storage medium
CN112654999B (en) Method and device for determining labeling information
CN112150508A (en) Target tracking method, device and related equipment
CN117975071A (en) Image clustering method, computer device and storage medium
CN114897987B (en) Method, device, equipment and medium for determining vehicle ground projection
CN113593297B (en) Parking space state detection method and device
CN116129523A (en) Action recognition method, device, terminal and computer readable storage medium
CN112232317B (en) Target detection method and device, equipment and medium for target orientation recognition
CN114255321A (en) Method and device for collecting pet nose print, storage medium and electronic equipment
CN114385993A (en) Identity detection method, device and readable medium
CN113837977A (en) Object tracking method, multi-target tracking model training method and related equipment
CN114648572A (en) Virtual positioning method and device and virtual positioning system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination