Object clustering method, device, electronic device and storage medium
By clustering and dynamic position range division of images in the monitoring system, the problem of inaccurate object recognition in the monitoring system is solved, and more accurate object clustering and trajectory determination are achieved.
Patent Information
- Application Number
- CN202210145823.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-02-17
AI Technical Summary
In the monitoring system, due to the acquisition environment, the image clustering effect is poor, resulting in inaccurate object recognition and it is difficult to accurately determine the object trajectory.
By clustering images to be processed and historically acquired images, dynamically divide the target position range, and clustering objects within the same position range and time period to improve the clustering effect.
It realizes more accurate object clustering, improves the accuracy of object recognition, and ensures accurate determination of object trajectory.
Smart Images

Figure CN114548252B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an object clustering method, device, electronic device and storage medium. Background Art
[0002] With the development of science and technology, various monitoring devices are becoming more and more popular. By installing monitoring devices at locations that need to be monitored, the monitoring devices collect images, analyze and process these images, and determine the trajectory of the object.
[0003] In the related art, clustering is performed directly based on the collected images, and the trajectory of the object is determined according to the position of the same object at different times.
[0004] However, in practical applications, affected by factors such as the collection environment, the clustering effect is prone to be poor, resulting in inaccurate object recognition, and it is difficult to accurately determine the trajectory of the object. Summary of the invention
[0005] The embodiments of the present application provide an object clustering method, device, electronic device and storage medium for accurately clustering objects.
[0006] In a first aspect, an embodiment of the present application provides an object clustering method, the method comprising:
[0007] After receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets, wherein the plurality of target images include the collected images to be processed and the historical collected images;
[0008] For any image set, determining a target position range of the image set based on a capture position of a target image in the image set;
[0009] For any sequence of images, object clustering is performed on the collected images to be processed in the sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
[0010] The above scheme, after receiving the acquired images to be processed, performs image clustering on the acquired images to be processed and the historical acquired images to obtain multiple image sets, and then determines the target position range of the image set based on the acquisition position of the image in each image set; that is, whenever a new acquired image is received, the position range will be re-divided, so that the position range obtained by dynamic division is more reasonable; object clustering is performed on the acquired images to be processed in the same target position range and in the same preset time period, and the clustering effect is better, so that a more accurate object set is obtained after clustering.
[0011] In some optional implementation manners, after obtaining the object set of the sequence image, the method further includes:
[0012] For any object set, comparing target information of objects in the object set with target information of objects in other object sets;
[0013] Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
[0014] In the above scheme, after obtaining the object set, the target information of objects in different object sets is compared, and the objects are "merged" based on the comparison result, that is, the objects in one object set are placed in another object set. After correcting the clustering result, the objects in the object set are enriched, and the accuracy of subsequent object recognition is further improved.
[0015] In some optional implementations, if the target information includes a collection location, comparing the target information of the object in the object set with the target information of the object in other object sets includes:
[0016] Determine whether the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and determine whether there is a preset association relationship between the collection position of the first object and the collection position of the second object; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0017] Based on the comparison result, determining the target object to be placed in the object set from other object sets includes:
[0018] If the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object, the second object is determined as the target object.
[0019] In the above scheme, if the distance between the collection position of the first object and the collection position of the second object is less than the preset distance, it means that the collection positions of the two objects are very close; if there is a preset association relationship between the collection position of the first object and the collection position of the second object, it means that the collection positions of the two objects have a certain correlation; when the first object and the second object meet the above two conditions at the same time, the first object and the second object are likely to be the same object, and therefore, the second object is determined as the target object.
[0020] In some optional implementations, if the target information includes a collection time, comparing the target information of the object in the object set with the target information of the object in other object sets includes:
[0021] Determine whether the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0022] Based on the comparison result, determining the target object to be placed in the object set from other object sets includes:
[0023] If the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval, the second object is determined as the target object.
[0024] In the above scheme, if the interval between the acquisition time of the first object and the acquisition time of the second object is less than the preset time interval, it means that the acquisition time of the two objects is very close, and the first object and the second object are likely to be the same object, so the second object is determined as the target object.
[0025] In some optional implementation manners, before placing the target object into the object set, the method further includes:
[0026] Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
[0027] The above scheme determines that the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity, so that only objects in other object sets that are the same as the objects in the object set are subsequently placed in the object set, avoiding interference of different objects on subsequent object recognition.
[0028] In some optional implementations, the collected image to be processed is a collected image filtered based on a preset filtering rule.
[0029] The above scheme filters out the acquired images with poor quality through preset filtering rules to prevent such acquired images from affecting subsequent object clustering.
[0030] In a second aspect, an embodiment of the present application further provides an object clustering device, including:
[0031] An image clustering module, configured to perform image clustering on a plurality of target images to obtain a plurality of image sets after receiving the collected images to be processed, wherein the plurality of target images include the collected images to be processed and the historical collected images;
[0032] A position region determination module, configured to determine, for any image set, a target position range of the image set based on a capture position of a target image in the image set;
[0033] The object clustering module is used to perform object clustering on the collected images to be processed in any sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
[0034] In some optional implementation manners, after obtaining the object set of the sequence image, the object clustering module is further used to:
[0035] For any object set, comparing target information of objects in the object set with target information of objects in other object sets;
[0036] Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
[0037] In some optional implementation manners, if the target information includes a collection location, the object clustering module is specifically configured to:
[0038] Determine whether the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and determine whether there is a preset association relationship between the collection position of the first object and the collection position of the second object; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0039] If the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object, the second object is determined as the target object.
[0040] In some optional implementation manners, if the target information includes a collection time, the object clustering module is specifically configured to:
[0041] Determine whether the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0042] If the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval, the second object is determined as the target object.
[0043] In some optional implementation manners, before placing the target object into the object set, the object clustering module is further configured to:
[0044] Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
[0045] In some optional implementations, the collected image to be processed is a collected image filtered based on a preset filtering rule.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any object clustering method described in the first aspect.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by an electronic device, wherein when the program runs on the electronic device, the electronic device executes the object clustering method described in any one of the first aspects above.
[0048] In addition, the technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A schematic diagram of a flow chart of a first object clustering method provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a flow chart of a second object clustering method provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a flow chart of a third object clustering method provided in an embodiment of the present application;
[0053] Figure 4A schematic diagram of a fourth object clustering method provided in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of the structure of an object clustering device provided in an embodiment of the present application;
[0055] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0057] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0058] The term "spatial domain" refers to a specific position range in space; the term "temporal domain" refers to a specific period of time; object clustering is isolated between the acquired images to be processed in different "spatial domains" and "temporal domains".
[0059] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0060] By installing monitoring equipment such as checkpoints at locations that need to be monitored, the monitoring equipment collects images, and then analyzes and processes these images to determine the trajectory of the object.
[0061] In the related art, clustering is performed directly based on the collected images, and the trajectory of the object is determined according to the position of the same object at different times.
[0062] However, in practical applications, affected by factors such as the acquisition environment, such as object occlusion and poor image clarity, the clustering effect is prone to poor results. Especially in scenarios where the features of different objects are similar (such as clustering of similar parts or components), clustering errors often occur.
[0063] In some embodiments, multiple time periods and multiple position ranges are preset, and images in the same time period and the same position range are clustered. However, the divided position ranges may not be reasonable, which will still affect the clustering effect.
[0064] In view of this, an embodiment of the present application proposes an object clustering method, device, electronic device and storage medium, the method comprising: after receiving a to-be-processed acquired image, performing image clustering on a plurality of target images to obtain a plurality of image sets, wherein the plurality of target images include the to-be-processed acquired image and historical acquired images; for any image set, determining a target position range of the image set based on the acquisition position of the target image in the image set; for any sequence of images, performing object clustering on the to-be-processed acquired images in the sequence of images to obtain an object set of the sequence of images; wherein the acquisition positions of the to-be-processed acquired images in the same sequence of images are within the same target position range, and the acquisition times of the to-be-processed acquired images in the same sequence of images are within the same preset time period.
[0065] After receiving the acquired images to be processed, this embodiment performs image clustering on the acquired images to be processed and the historical acquired images to obtain multiple image sets, and then determines the target position range of the image set based on the acquisition position of the image in each image set; that is, whenever a new acquired image is received, the position range is re-divided, so that the position range obtained by dynamic division is more reasonable; object clustering is performed on the acquired images to be processed within the same target position range and within the same preset time period, and the clustering effect is better, so that a more accurate object set is obtained after clustering.
[0066] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0067] The present application embodiment provides a first object clustering method, such as Figure 1 As shown, the following steps are included:
[0068] Step S101: after receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets.
[0069] The multiple target images include the acquired images to be processed and historical acquired images.
[0070] During implementation, multiple monitoring devices collect images in real time, and multiple collected images to be processed sent by multiple monitoring devices are obtained within a period of time.
[0071] The above-mentioned collected images to be processed are collected images that have not been clustered; and the above-mentioned historical collected images are collected images that have been clustered.
[0072] In order to make the location range division more reasonable, this embodiment performs image clustering on the new acquired images to be processed and the historical acquired images to obtain multiple image sets after receiving the new acquired images to be processed, and then redetermines the target location range based on each image set, that is, dynamically updates the "spatial domain".
[0073] Step S102: for any image set, based on the acquisition position of the target image in the image set, determine the target position range of the image set.
[0074] In this embodiment, after image clustering, the target images in the same image set have high similarity. Therefore, based on the acquisition position of the target images in the image set, the target position range of the image set, that is, the "spatial domain" corresponding to the image set, can be determined.
[0075] In this embodiment, the target position range of each image set may be determined by, but not limited to, the following methods:
[0076] 1) Determine the minimum position range of the acquisition position of the target image in the image set as the target position range of the image set;
[0077] 2) The position range of the acquisition positions of the target images that contain a preset proportion in the image set is determined as the target position range of the image set.
[0078] The above two methods are only exemplary descriptions. Other methods may also be used to determine the target position range of each image set during implementation, which will not be described in detail here.
[0079] Step S103: for any sequence of images, clustering the collected images to be processed in the sequence of images is performed to obtain an object set of the sequence of images.
[0080] The acquisition positions of the to-be-processed acquired images in the same sequence of images are within the same target position range, and the acquisition times of the to-be-processed acquired images in the same sequence of images are within the same preset time period.
[0081] In this embodiment, the acquired images to be processed in different "spatial domains" and "time domains" usually do not contain the same objects. Therefore, the object clustering between the acquired images to be processed in different "spatial domains" and "time domains" is isolated, that is, the acquired images to be processed in the same target position range and in the same preset time period are clustered, thereby improving the clustering effect.
[0082] The above-mentioned preset time periods can be set according to actual application scenarios. For example, in the object clustering of travel scenarios, according to the travel time distribution of objects, 22:00-5:00 with fewer objects is set as a preset time period, 7:00-9:00 during the morning rush hour is set as a preset time period, 6:00 to 8:00 during the evening rush hour is set as a preset time period, and every two hours at other times is set as a preset time period.
[0083] The above-mentioned preset time period is only an exemplary description and is not specifically limited in this embodiment.
[0084] The above scheme, after receiving the collected images to be processed, performs image clustering on the collected images to be processed and the historical collected images to obtain multiple image sets, and then determines the target position range of the image set based on the collection position of the image in each image set; that is, whenever a new collected image is received, the position range will be re-divided, so that the position range obtained by dynamic division is more reasonable; object clustering is performed on the collected images to be processed in the same target position range and in the same preset time period, and the clustering effect is better, so that a more accurate object set is obtained after clustering, and the object recognition is subsequently accurately realized, and the trajectory of the object is accurately determined.
[0085] In some optional implementations, the above-mentioned collected images to be processed are collected images filtered based on preset filtering rules.
[0086] In practice, due to some natural factors (such as night, rainy days, etc.) or shooting angles, some collected images may have poor quality, which may affect object clustering. Based on this, the collected images can be filtered based on preset filtering rules.
[0087] This embodiment does not limit the specific implementation method of the preset filtering rules. For example, it filters the captured images whose pixels are smaller than the preset pixels, filters the captured images containing specific obstructions, etc.
[0088] The above scheme filters out the acquired images with poor quality through preset filtering rules to prevent such acquired images from affecting subsequent object clustering.
[0089] The present application embodiment provides a second object clustering method, such as Figure 2 As shown, the following steps are included:
[0090] Step S201: after receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets.
[0091] Step S202: for any image set, based on the acquisition position of the target image in the image set, determine the target position range of the image set.
[0092] Step S203: for any sequence of images, clustering objects of the collected images to be processed in the sequence of images is performed to obtain an object set of the sequence of images.
[0093] The specific implementation of steps S201 to S203 may refer to the above embodiment and will not be described in detail here.
[0094] Step S204: for any object set, compare the target information of the objects in the object set with the target information of the objects in other object sets.
[0095] During implementation, there may be situations where the acquired images to be processed in different "spatial domains" and "temporal domains" contain the same objects. Based on this, after obtaining the object set, this embodiment needs to compare the target information of objects in different object sets, and "merge" the objects based on the comparison results, that is, place the objects in one object set in another object set.
[0096] Step S205: Based on the comparison result, determine the target object that needs to be placed in the object set from other object sets, and place the target object in the object set.
[0097] In the above scheme, after obtaining the object set, the target information of objects in different object sets is compared, and the objects are "merged" based on the comparison result, that is, the objects in one object set are placed in another object set. After correcting the clustering result, the objects in the object set are enriched, and the accuracy of subsequent object recognition is further improved.
[0098] The present application embodiment provides a third object clustering method, such as Figure 3 As shown, the following steps are included:
[0099] Step S301: after receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets.
[0100] Step S302: for any image set, based on the acquisition position of the target image in the image set, determine the target position range of the image set.
[0101] Step S303: for any sequence of images, clustering the collected images to be processed in the sequence of images is performed to obtain an object set of the sequence of images.
[0102] The specific implementation of steps S301 to S303 can refer to the above embodiment and will not be described again here.
[0103] Step S304: determining whether the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and determining whether there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object.
[0104] The first object is an object in the object set, and the second object is an object in another object set.
[0105] In this embodiment, if the distance between the collection position of the first object and the collection position of the second object is less than the preset distance, it means that the collection positions of the two objects are very close; and there is a preset association relationship between the collection position of the first object and the collection position of the second object, it means that the collection positions of the two objects have a certain association. If the first object and the second object meet the above two conditions at the same time, then the first object and the second object are likely to be the same object.
[0106] Based on this, it is necessary to first determine whether the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and whether there is a preset correlation relationship between the acquisition position of the first object and the acquisition position of the second object.
[0107] This embodiment does not limit the setting method of the above-mentioned preset association relationship. For example, the above-mentioned preset association relationship can be set based on historically collected images. The following is an explanation with a specific example:
[0108] If the trajectories of multiple objects (the number of objects reaches a preset number) determined based on historical collected images always go directly from collection position 1 to collection position 2 (without passing through other collection positions in between), a preset association relationship is set between collection position 1 and collection position 2.
[0109] The above-mentioned preset distance can be set according to the actual application scenario, and this embodiment does not make any specific limitation to this. For example, in the object clustering of the travel scenario, the preset distance is set according to the moving speed of the object.
[0110] Step S305: If the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and there is a preset association relationship between the collection position of the first object and the collection position of the second object, the second object is determined as the target object, and the target object is placed in the object set.
[0111] As described above, if the distance between the collection position of the first object and the collection position of the second object is less than the preset distance, and there is a preset association relationship between the collection position of the first object and the collection position of the second object, then the first object and the second object are likely to be the same object. Based on this, when the first object and the second object meet the above two conditions at the same time, the second object is determined as the target object.
[0112] In the above scheme, if the distance between the collection position of the first object and the collection position of the second object is less than the preset distance, it means that the collection positions of the two objects are very close; if there is a preset association relationship between the collection position of the first object and the collection position of the second object, it means that the collection positions of the two objects have a certain correlation; when the first object and the second object meet the above two conditions at the same time, the first object and the second object are likely to be the same object, and therefore, the second object is determined as the target object.
[0113] The application embodiment provides a fourth object clustering method, such as Figure 4 As shown, the following steps are included:
[0114] Step S401: after receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets.
[0115] Step S402: for any image set, based on the acquisition position of the target image in the image set, determine the target position range of the image set.
[0116] Step S403: for any sequence of images, clustering the collected images to be processed in the sequence of images is performed to obtain an object set of the sequence of images.
[0117] The specific implementation of steps S401 to S403 may refer to the above embodiment and will not be described in detail here.
[0118] Step S404: Determine whether the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval.
[0119] The first object is an object in the object set, and the second object is an object in another object set.
[0120] In this embodiment, if the interval between the acquisition time of the first object and the acquisition time of the second object is less than the preset time interval, it means that the acquisition times of the two objects are very close, and the first object and the second object are likely to be the same object.
[0121] Based on this, it is necessary to first determine whether the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval.
[0122] The above-mentioned preset time interval can be set according to the actual application scenario, and this embodiment does not make any specific limitation to this. For example, in the object clustering of the travel scenario, the preset time interval is set according to the moving speed of the object.
[0123] Step S405: If the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval, the second object is determined as the target object, and the target object is placed in the object set.
[0124] As described above, if the interval between the acquisition time of the first object and the acquisition time of the second object is less than the preset time interval, then the first object and the second object are likely to be the same object. Based on this, when the first object and the second object meet the above conditions, the second object is determined as the target object.
[0125] In the above scheme, if the interval between the acquisition time of the first object and the acquisition time of the second object is less than the preset time interval, it means that the acquisition time of the two objects is very close, and the first object and the second object are likely to be the same object, so the second object is determined as the target object.
[0126] In implementation, the target information may include the acquisition location and acquisition time, and the object clustering may refer to the above Figure 3 Examples and Figure 4 Embodiment. It can be understood that this embodiment does not limit the specific order of the above-mentioned two steps of determining the target object based on the acquisition position and determining the target object based on the acquisition time. The step of determining the target object based on the acquisition position can be performed first, and then the step of determining the target object based on the acquisition time can be performed; the step of determining the target object based on the acquisition time can be performed first, and then the step of determining the target object based on the acquisition position can be performed; the step of determining the target object based on the acquisition position and the step of determining the target object based on the acquisition time can also be performed simultaneously.
[0127] The following is a specific example:
[0128] There are 5 first objects (A1, A2, A3, A4 and A5) in object set A. Based on the acquisition position and acquisition time, second objects B1, B2 and B3 are determined as target objects. After B1, B2 and B3 are placed in object set A, object set A includes A1, A2, A3, A4, A5, B1, B2 and B3.
[0129] In some optional implementation manners, before placing the target object into the object set, the following steps are further performed:
[0130] Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
[0131] In this embodiment, if objects in other object sets that are different from the objects in the object set are placed in the object set, subsequent object recognition will be affected. Therefore, only objects in other object sets that are the same as the objects in the object set need to be placed in the object set.
[0132] If the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity, it means that the objects in the two object sets are likely to be the same objects, so the target object in the other object set can be placed in this object set.
[0133] This embodiment does not specifically limit the method for determining the above-mentioned central vector. Exemplarily, the mean of the feature vectors of all objects in the object set may be determined as the central vector of the object set.
[0134] The above scheme determines that the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity, so that only objects in other object sets that are the same as the objects in the object set are subsequently placed in the object set, avoiding interference of different objects on subsequent object recognition.
[0135] Based on the same inventive concept, the present application embodiment provides an object clustering device, see Figure 5 As shown, the object clustering device 500 includes:
[0136] An image clustering module 501 is used to perform image clustering on a plurality of target images to obtain a plurality of image sets after receiving the collected images to be processed, wherein the plurality of target images include the collected images to be processed and the historical collected images;
[0137] A position region determination module 502 is used to determine, for any image set, a target position range of the image set based on a collection position of a target image in the image set;
[0138] The object clustering module 503 is used to perform object clustering on the collected images to be processed in any sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
[0139] In some optional implementation manners, after obtaining the object set of the sequence image, the object clustering module 503 is further used to:
[0140] For any object set, comparing target information of objects in the object set with target information of objects in other object sets;
[0141] Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
[0142] In some optional implementation manners, if the target information includes a collection location, the object clustering module 503 is specifically configured to:
[0143] Determine whether the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and determine whether there is a preset association relationship between the collection position of the first object and the collection position of the second object; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0144] If the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object, the second object is determined as the target object.
[0145] In some optional implementation manners, if the target information includes the acquisition time, the object clustering module 503 is specifically used to:
[0146] Determine whether the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0147] If the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval, the second object is determined as the target object.
[0148] In some optional implementation manners, before placing the target object into the object set, the object clustering module 503 is further configured to:
[0149] Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
[0150] In some optional implementations, the collected image to be processed is a collected image filtered based on a preset filtering rule.
[0151] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0152] Based on the same technical concept, the embodiment of the present application also provides an electronic device 600, such as Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to the at least one processor. The specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 For example, the processor 601 and the memory 602 are connected via a bus 603. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0153] Among them, the processor 601 is the control center of the electronic device, and various interfaces and lines can be used to connect various parts of the electronic device, and data processing can be realized by running or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes the issued instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0154] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the object clustering method can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0155] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 602 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0156] In the embodiment of the present application, the memory 602 stores a computer program. When the program is executed by the processor 601, the processor 601 executes:
[0157] After receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets, wherein the plurality of target images include the collected images to be processed and the historical collected images;
[0158] For any image set, determining a target position range of the image set based on a capture position of a target image in the image set;
[0159] For any sequence of images, object clustering is performed on the collected images to be processed in the sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
[0160] In some optional implementation manners, after obtaining the object set of the sequence of images, the processor 601 further executes:
[0161] For any object set, comparing target information of objects in the object set with target information of objects in other object sets;
[0162] Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
[0163] In some optional implementation manners, if the target information includes a collection location, the processor 601 specifically executes:
[0164] Determine whether the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and determine whether there is a preset association relationship between the collection position of the first object and the collection position of the second object; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0165] If the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object, the second object is determined as the target object.
[0166] In some optional implementation manners, if the target information includes the acquisition time, the processor 601 specifically executes:
[0167] Determine whether the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval; wherein the first object is an object in the object set, and the second object is an object in another object set;
[0168] If the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval, the second object is determined as the target object.
[0169] In some optional implementation manners, before placing the target object into the object set, the processor 601 further executes:
[0170] Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
[0171] In some optional implementations, the collected image to be processed is a collected image filtered based on a preset filtering rule.
[0172] Since the electronic device is the electronic device in the method in the embodiment of the present application, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0173] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the steps of the above-mentioned object clustering method.
[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0178] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0179] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An object clustering method, characterized in that: The method includes: After receiving the collected images to be processed, performing image clustering on a plurality of target images to obtain a plurality of image sets, wherein the plurality of target images include the collected images to be processed and the historical collected images; For any image set, determining a target position range of the image set based on a capture position of a target image in the image set; For any sequence of images, object clustering is performed on the collected images to be processed in the sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
2. The method according to claim 1, characterized in that After obtaining the object set of the sequence image, the method further includes: For any object set, comparing target information of objects in the object set with target information of objects in other object sets; Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
3. The method according to claim 2, characterized in that If the target information includes a collection location, comparing the target information of the object in the object set with the target information of the object in other object sets includes: Determine whether the distance between the collection position of the first object and the collection position of the second object is less than a preset distance, and determine whether there is a preset association relationship between the collection position of the first object and the collection position of the second object; wherein the first object is an object in the object set, and the second object is an object in another object set; Based on the comparison result, determining the target object to be placed in the object set from other object sets includes: If the distance between the acquisition position of the first object and the acquisition position of the second object is less than a preset distance, and there is a preset association relationship between the acquisition position of the first object and the acquisition position of the second object, the second object is determined as the target object.
4. The method according to claim 2, characterized in that If the target information includes the collection time, comparing the target information of the object in the object set with the target information of the objects in other object sets includes: Determine whether the interval between the collection time of the first object and the collection time of the second object is less than a preset time interval; wherein the first object is an object in the object set, and the second object is an object in another object set; Based on the comparison result, determining the target object to be placed in the object set from other object sets includes: If the interval between the acquisition time of the first object and the acquisition time of the second object is less than a preset time interval, the second object is determined as the target object.
5. The method according to any one of claims 2 to 4, characterized in that: Before placing the target object into the object set, the method further includes: Determine whether the similarity between the central vector of the object set and the central vector of other object sets reaches a preset similarity; wherein the central vector is determined based on the feature vector of the object in the corresponding object set.
6. The method according to claim 1, characterized in that The collected image to be processed is a collected image filtered based on a preset filtering rule.
7. An object clustering device, characterized in that: include: An image clustering module, configured to perform image clustering on a plurality of target images to obtain a plurality of image sets after receiving the collected images to be processed, wherein the plurality of target images include the collected images to be processed and the historical collected images; A position region determination module, configured to determine, for any image set, a target position range of the image set based on a capture position of a target image in the image set; The object clustering module is used to perform object clustering on the collected images to be processed in any sequence of images to obtain an object set of the sequence of images; wherein the collection positions of the collected images to be processed in the same sequence of images are within the same target position range, and the collection times of the collected images to be processed in the same sequence of images are within the same preset time period.
8. The device according to claim 7, characterized in that After obtaining the object set of the sequence image, the object clustering module is further used to: For any object set, comparing target information of objects in the object set with target information of objects in other object sets; Based on the comparison result, a target object that needs to be placed in the object set is determined from other object sets, and the target object is placed in the object set.
9. An electronic device, characterized in that: The method comprises at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image file gathering method and device, electronic equipment and storage medium
CN114357218A
Image file gathering method and device, electronic equipment and storage medium
CN114549882A
Image processing method and apparatus, and computer device
WO2025036023A1