CN114462533A - Clustering object clustering method - Google Patents

Clustering object clustering method Download PDF

Info

Publication number
CN114462533A
CN114462533A CN202210117476.8A CN202210117476A CN114462533A CN 114462533 A CN114462533 A CN 114462533A CN 202210117476 A CN202210117476 A CN 202210117476A CN 114462533 A CN114462533 A CN 114462533A
Authority
CN
China
Prior art keywords
clustering
frame
frames
box
minimum
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.)
Granted
Application number
CN202210117476.8A
Other languages
Chinese (zh)
Other versions
CN114462533B (en
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.)
Nanjing Zhenshi Intelligent Technology Co Ltd
Original Assignee
Nanjing Zhenshi Intelligent 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 Nanjing Zhenshi Intelligent Technology Co Ltd filed Critical Nanjing Zhenshi Intelligent Technology Co Ltd
Priority to CN202210117476.8A priority Critical patent/CN114462533B/en
Publication of CN114462533A publication Critical patent/CN114462533A/en
Application granted granted Critical
Publication of CN114462533B publication Critical patent/CN114462533B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a clustering method for clustered objects, which relates to the technical field of data mining and solves the technical problem that the existing clustering algorithm is not flexible enough. Initializing a cluster central point randomly; the clustering quantity does not need to be specified, and the use is more flexible; and distance degrees are introduced in the clustering process, and the distance of the relative distance of the object is reasonably analyzed.

Description

Clustering object clustering method
Technical Field
The application relates to the technical field of data mining, in particular to a clustering method for clustered objects.
Background
In some clustering tasks, attention needs to be paid to the dynamic of clustered targets and the correlation of similar targets, such as putting, pursuing, car accidents, etc., in which objects are not present by example, but a plurality of objects are present at the same time and have certain relation. When analyzing behaviors, attributes and states of these objects having a certain relation, the objects need to be combined according to a certain rule.
When the Kmeans clustering algorithm is used for solving the problem, the coordinates of the central points of all objects are generally clustered, the width and the height of the objects cannot be considered, and the clustering box at least needs to surround all the objects of the class, so that the maximum probability of surrounding the clustering box can contain the objects of other classes, and real clustering is not achieved.
Disclosure of Invention
The application provides a clustering object clustering method, which aims to make the clustering method more flexible, avoid initializing a clustering central point, introduce a distance degree in the clustering process and reasonably analyze the distance of relative distances of objects.
The technical purpose of the application is realized by the following technical scheme:
a clustered object clustering method, comprising:
step 1: acquiring a minimum bounding box set A of n objects, wherein A is { a ═ a }1,a2...,anGiving a search radius J at the same time; wherein n is>1;
Step 2: calculating the central point of each smallest enclosing frame in A as c1,c2,...,cn
And step 3: traversing and calculating the straight-line distance between the central point of each minimum surrounding frame and the central points of the rest smallest surrounding frames in the step A, and acquiring the minimum value of the straight-line distances between the central points of each minimum surrounding frame and the rest smallest surrounding frames, wherein the minimum value is d1,d2,…,dnDividing the minimum value by the maximum value of the width and the height of the current minimum bounding box to obtain a distance b, wherein the calculation formula of b is as follows:
Figure BDA0003497037940000011
and 4, step 4: sorting the minimum bounding boxes in the A from small to large according to the corresponding b values to obtain a box set M, and setting M to { M ═ M1,m2,…,mn};
And 5: establishing a clustering frame empty set Q;
step 6: establish an empty set L and join m1While M rejects M1(ii) a Go through M, first with M1Center point mc1As a central point K, taking J as a search radius, finding all frames in the range, adding L, and then removing all frames meeting the conditions from M;
And 7: traversing the L, calculating the average value of the center points of all frames in the L, and updating the center point K; then repeating the step 6 until L is not updated; traversing the boundary coordinates of all frames in the L to obtain the minimum value and the maximum value of the boundary coordinates, wherein the minimum value and the maximum value are x respectivelymin、ymin、xmax、ymaxIf so, the coordinate is the boundary coordinate of the clustering frame q;
and 8: and (3) calculating the area ratio iou of the rest frame and the clustering frame q in the M in a traversing way, wherein the area ratio iou is expressed as:
Figure BDA0003497037940000021
when frame mnWhen the area ratio iou is not less than 0.8, the frame m is setnAdding the obtained data into a clustering box q, and updating the boundary range of the clustering box q to completely surround mnThen put the frame mnRemoving the M, emptying the set L, and adding all the cluster frames into a set Q, wherein the finally obtained cluster frames are the final current clustering result;
wherein the inter represents a frame mnArea intersection with the clustering box q, areanA representation frame mnThe area of (d);
and step 9: traversing the rest M, repeating the steps 6 to 8 until the M is empty, obtaining all clustering frames, and updating a set Q ═ Q1,q2,…,qj},j≤n。
The beneficial effect of this application lies in: according to the clustering object clustering method, more reasonable distance degree is introduced to judge the relative distance between objects, the dense center is used as an initial clustering center, surrounding adjacent objects are gradually merged, and the boundaries of clustering frames are updated. Initializing a cluster central point randomly; the clustering quantity does not need to be specified, and the use is more flexible; and distance degrees are introduced in the clustering process, and the distance of the relative distance of the object is reasonably analyzed.
Drawings
FIG. 1 is a flow chart of a method described herein;
FIG. 2 is a schematic diagram of the clustering effect of clustering by the method of the present application.
Detailed Description
The technical solution of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method according to the present application, as shown in fig. 1, the method comprising:
step 1: acquiring a minimum bounding box set A of n objects, wherein A is { a ═ a }1,a2...,anGiving a search radius J at the same time; wherein n is>1。
Step 2: calculating the central point of each smallest enclosing frame in A as c1,c2,...,cn
And step 3: traversing and calculating the straight-line distance between the central point of each minimum surrounding frame and the central points of the rest smallest surrounding frames in the step A, and acquiring the minimum value of the straight-line distances between the central points of each minimum surrounding frame and the rest smallest surrounding frames, wherein the minimum value is d1,d2,…,dnDividing the minimum value by the maximum value of the width and the height of the current minimum bounding box to obtain a distance b, wherein the calculation formula of b is as follows:
Figure BDA0003497037940000022
and 4, step 4: sorting the minimum bounding boxes in the A from small to large according to the corresponding b values to obtain a box set M, and setting M to { M ═ M1,m2,…,mn}。
And 5: and establishing a clustering frame empty set Q.
Step 6: establish an empty set L and join m1While M rejects M1(ii) a Go through M, first with M1Center point mc1And taking J as a search radius as a central point K, finding all frames in the range, adding L, and then removing all frames meeting the conditions from M.
And 7: traversing the L, calculating the average value of the center points of all frames in the L, and updating the center point K; then repeating the step 6 until L is not updated; traversing the boundary coordinates of all frames in L to obtain the minimum value and the maximum value of the boundary coordinates, wherein the minimum value and the maximum value are x respectivelymin、ymin、xmax、ymaxAnd then the coordinate is the boundary coordinate of the clustering box q.
And 8: and (3) calculating the area ratio iou of the rest frame and the clustering frame q in the M in a traversing way, wherein the area ratio iou is expressed as:
Figure BDA0003497037940000031
when the frame mnWhen the area ratio iou is not less than 0.8, the frame m is setnAdding the obtained data into a clustering box q, and updating the boundary range of the clustering box q to completely surround mnThen put the frame mnRemoving the M, finally emptying the set L, and adding all the clustering frames into a set Q, wherein the finally obtained clustering frame is the final current clustering result;
wherein the inter represents a frame mnArea intersection with the clustering box q, areanA representation frame mnThe area of (a).
And step 9: traversing the rest M, repeating the steps 6 to 8 until the M is empty, obtaining all clustering frames, and updating a set Q ═ Q1,q2,…,qj},j≤n。
The distance degree attribute of each clustering box Q in the clustering box set Q finally obtained in the step 9 is different m in the step 61The distance degree of (c). The distance degree represents the relative distance between objects. When a plurality of frames exist in one clustered frame, the distance degree of the clustered frame is the minimum value of the plurality of frames, namely the distance degree of m1, and the use is that if 10 frames are clustered, only 3 frames are needed, and 3 clustered frames are selected according to the distance degree.
And selecting the clustering frames according to the sequence, wherein the sequence of the clustering frames is the sequence of the relation distances among the objects from near to far, selecting the frames which are most likely to have aggregation and contact states according to the sequence, and selecting the first frames by self-definition and then accessing the subsequent algorithm processing or business.
Fig. 2 is a schematic diagram of a clustering effect of clustering by the method of the present application, where (a) in fig. 2 is an object frame before clustering, and (b) in fig. 2 is an object frame after clustering and converted into a square, and a number at the center of the frame indicates a distance degree of the frame. Converting the clustering frame into a square object frame, specifically comprising: keeping the central point of the clustering frame unchanged, and enabling the side length of the square to be equal to the maximum value of the width and the height of the clustering frame.
The foregoing is an exemplary embodiment of the method described herein, and the scope of protection is defined by the claims and their equivalents.

Claims (2)

1. A clustering method for clustered objects, comprising:
step 1: acquiring a minimum bounding box set A of n objects, wherein A is { a ═ a }1,a2...,anGiving a search radius J at the same time; wherein n is>1;
Step 2: calculating the central point of each smallest enclosing frame in A as c1,c2,...,cn
And step 3: traversing and calculating the straight-line distance between the central point of each minimum surrounding frame and the central points of the rest smallest surrounding frames in the step A, and acquiring the minimum value of the straight-line distances between the central points of each minimum surrounding frame and the rest smallest surrounding frames, wherein the minimum value is d1,d2,…,dnDividing the minimum value by the maximum value of the width and the height of the current minimum bounding box to obtain a distance b, wherein the calculation formula of b is as follows:
Figure FDA0003497037930000011
and 4, step 4: sorting the minimum bounding boxes in the A from small to large according to the corresponding b values to obtain a box set M, and setting M to { M ═ M1,m2,…,mn};
And 5: establishing a clustering frame empty set Q;
step 6: establish an empty set L and join m1While M rejects M1(ii) a Go through M, first with M1Center point mc1Taking J as a search radius as a central point K, finding out all frames in the range, adding L, and then removing all frames meeting the conditions from M;
and 7: traversing the L, calculating the average value of the center points of all frames in the L, and updating the center point K;then repeating the step 6 until L is not updated; traversing the boundary coordinates of all frames in the L to obtain the minimum value and the maximum value of the boundary coordinates, wherein the minimum value and the maximum value are x respectivelymin、ymin、xmax、ymaxIf so, the coordinate is the boundary coordinate of the clustering frame q;
and 8: and (3) calculating the area ratio iou of the rest frame and the clustering frame q in the M in a traversing way, wherein the area ratio iou is expressed as:
Figure FDA0003497037930000012
when the frame mnWhen the area ratio iou is not less than 0.8, the frame m is setnAdding the obtained data into a clustering box q, and updating the boundary range of the clustering box q to completely surround mnThen put the frame mnRemoving the M, emptying the set L, and adding all the cluster frames into a set Q, wherein the finally obtained cluster frames are the final current clustering result;
wherein the inter represents a frame mnArea intersection with the clustering box q, areanA representation frame mnThe area of (d);
and step 9: traversing the rest M, repeating the steps 6 to 8 until the M is empty, obtaining all clustering frames, and updating a set Q ═ Q1,q2,…,qj},j≤n。
2. The clustering method according to claim 1, wherein converting the cluster boxes in the cluster box set Q into squares comprises: keeping the central point of the clustering frame unchanged, wherein the side length of the square is equal to the maximum value of the width and the height of the clustering frame.
CN202210117476.8A 2022-02-08 2022-02-08 Clustered object clustering method Active CN114462533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210117476.8A CN114462533B (en) 2022-02-08 2022-02-08 Clustered object clustering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210117476.8A CN114462533B (en) 2022-02-08 2022-02-08 Clustered object clustering method

Publications (2)

Publication Number Publication Date
CN114462533A true CN114462533A (en) 2022-05-10
CN114462533B CN114462533B (en) 2024-06-25

Family

ID=81411926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210117476.8A Active CN114462533B (en) 2022-02-08 2022-02-08 Clustered object clustering method

Country Status (1)

Country Link
CN (1) CN114462533B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130297141A1 (en) * 2012-05-04 2013-11-07 Chungbuk National University Industry-Academic Cooperation Foundation Apparatus and method for monitoring abnormal state of vehicle using clustering technique
CN104143009A (en) * 2014-08-22 2014-11-12 河海大学 Competition and cooperation clustering method based on maximum clearance segmentation of dynamic bounding box
WO2018224634A1 (en) * 2017-06-08 2018-12-13 Renault S.A.S Method and system for identifying at least one moving object
CN110909792A (en) * 2019-11-21 2020-03-24 安徽大学 Clustering analysis method based on improved K-means algorithm and new clustering effectiveness index

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130297141A1 (en) * 2012-05-04 2013-11-07 Chungbuk National University Industry-Academic Cooperation Foundation Apparatus and method for monitoring abnormal state of vehicle using clustering technique
CN104143009A (en) * 2014-08-22 2014-11-12 河海大学 Competition and cooperation clustering method based on maximum clearance segmentation of dynamic bounding box
WO2018224634A1 (en) * 2017-06-08 2018-12-13 Renault S.A.S Method and system for identifying at least one moving object
CN110909792A (en) * 2019-11-21 2020-03-24 安徽大学 Clustering analysis method based on improved K-means algorithm and new clustering effectiveness index

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张晓滨;母玉雪;: "改进的方差优化初始中心的K-medoids算法", 计算机技术与发展, no. 07, 10 July 2020 (2020-07-10) *

Also Published As

Publication number Publication date
CN114462533B (en) 2024-06-25

Similar Documents

Publication Publication Date Title
WO2014174932A1 (en) Image processing device, program, and image processing method
CN114926699B (en) Indoor three-dimensional point cloud semantic classification method, device, medium and terminal
CN111640089A (en) Defect detection method and device based on feature map center point
CN110188763B (en) Image significance detection method based on improved graph model
WO2022077863A1 (en) Visual positioning method, and method for training related model, related apparatus, and device
CN108764726B (en) Method and device for making decision on request according to rules
CN111460234A (en) Graph query method and device, electronic equipment and computer readable storage medium
CN111583274A (en) Image segmentation method and device, computer-readable storage medium and electronic equipment
CN112634457B (en) Point cloud simplification method based on local entropy of Hausdorff distance and average projection distance
CN113436223B (en) Point cloud data segmentation method and device, computer equipment and storage medium
CN111522968A (en) Knowledge graph fusion method and device
CN111738040A (en) Deceleration strip identification method and system
CN110706238A (en) Method and device for segmenting point cloud data, storage medium and electronic equipment
CN114359632A (en) Point cloud target classification method based on improved PointNet + + neural network
CN113674425B (en) Point cloud sampling method, device, equipment and computer readable storage medium
CN115100099A (en) Point cloud data processing method, device, equipment and medium
CN114417095A (en) Data set partitioning method and device
CN113887630A (en) Image classification method and device, electronic equipment and storage medium
CN112906652A (en) Face image recognition method and device, electronic equipment and storage medium
CN115686379B (en) Method and system for optimizing management of hollow white data area in flash memory
CN114462533A (en) Clustering object clustering method
Kharinov et al. Object detection in color image
CN114511862B (en) Form identification method and device and electronic equipment
CN116363416A (en) Image de-duplication method and device, electronic equipment and storage medium
CN116109649A (en) 3D point cloud instance segmentation method based on semantic error correction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: 568 Longmian Avenue, Gaoxinyuan, Jiangning District, Nanjing City, Jiangsu Province

Applicant after: Xiaoshi Technology (Jiangsu) Co.,Ltd.

Address before: 568 Longmian Avenue, Gaoxinyuan, Jiangning District, Nanjing City, Jiangsu Province

Applicant before: NANJING ZHENSHI INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant