Steel plate defect collection method and system based on improved DBSCAN and regional distance

Through the improved DBSCAN algorithm and area distance technology, the problem of defect collection in steel plate surface defect detection is solved, efficient defect collection and the reduction of non-defect areas in the rectangular frame are achieved, and the accuracy and efficiency of detection are improved.

CN119295787APending Publication Date: 2025-01-10YANSHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411530205.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the detection of steel plate surface defects, traditional full-supervised or semi-supervised methods are difficult to effectively collect adjacent defects, resulting in an increase in the number of subsequent polishing times and the non-defect areas in the rectangular frame are difficult to reduce.

Method used

The improved DBSCAN algorithm is used to combine regional distances, and the defects are processed through regional distances, and the intervals with different density are divided. The distance information is extracted using the K-dist graph in each interval, and the Eps parameters are adaptively generated for clustering, and finally according to the pre-pre- Suppose the rules assign noise points to the corresponding cluster.

Benefits of technology

It realizes efficient collection of steel plate surface defects, reduces the number of subsequent polishing times, ensures that the non-defect areas in the rectangular frame are as small as possible, and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295787A_ABST
    Figure CN119295787A_ABST
Patent Text Reader

Abstract

The invention discloses a steel plate defect collection method and system based on improved DBSCAN and regional distance, and relates to the field of steel plate defect collection, and the method comprises the following steps: collecting image data of a steel plate with defects; a steel plate defect collection model is constructed, the steel plate defect collection model firstly adopts regional distance to process defects, then utilizes DBSCAN to perform preliminary clustering on data, divides intervals with different densities, and utilizes a K-dist graph to extract distance information in each interval; then, generating Eps for clustering according to distance information in the interval; and finally, distributing the noise points in each interval to corresponding clusters according to a preset rule. And completing defect collection of the steel plate in the image data by using the steel plate defect collection model. The invention provides a steel plate defect collection method based on improved DBSCAN (Density-Based Spatial Clustering of Applications with Noise) and regional distance. The steel plate defect collection method shows excellent clustering performance when processing complex and intensively distributed defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of steel plate defect clustering, and in particular to a steel plate defect clustering method and system based on improved DBSCAN and regional distance. Background Art

[0002] In modern industrial production, steel plates, as a basic raw material, are widely used in the fields of construction, automobiles, aerospace, etc., and their surface quality directly affects the performance and safety of the final product. Various surface defects such as cracks, scratches, dents and rust often occur in the production process of steel plates. These defects not only affect the appearance of the steel plates, but may also have a negative impact on their mechanical properties and service life. Therefore, timely and accurate detection and treatment of steel plate surface defects has become an important task in industrial production.

[0003] In recent years, with the advancement of image processing technology and data analysis methods, automatic inspection systems based on computer vision have gradually become mainstream. However, when dealing with surface defects of steel plates, how to group adjacent defects with an external rectangular frame to reduce the number of subsequent grinding times. At the same time, ensuring that the non-defective area within the rectangular frame is minimized is a challenge that needs to be solved urgently. Summary of the invention

[0004] Due to the randomness and lack of regularity of steel plate surface defects, traditional fully supervised or semi-supervised methods are difficult to apply in clustering. At the same time, unsupervised learning with universal applicability can more effectively solve the problem of steel plate surface defect clustering. The present invention will focus on effectively clustering steel plate surface defects from the perspective of unsupervised clustering algorithm.

[0005] To achieve the above object, the present invention provides a steel plate defect classification method based on improved DBSCAN and regional distance, the steps comprising:

[0006] Collect image data of steel plates with defects;

[0007] A steel plate defect clustering model is constructed. The steel plate defect clustering model first uses regional distance to process defects, then uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses K-dist graph to extract distance information in each interval; then, Eps is generated according to the distance information in the interval for clustering; finally, the noise points in each interval are assigned to the corresponding cluster according to the preset rules;

[0008] The steel plate defect classification model is used to complete the defect classification of steel plates in image data.

[0009] Preferably, the method of using DBSCAN to perform preliminary clustering of data includes: setting parameters Eps and MinPts, if a certain point x jIf the number of points contained in the ∈-neighborhood of is not less than MinPts, then x is called j is a core point, and all core points are obtained by traversing all points; then, the core point x j Marked as visited, from core point x j Starting from, all points found in the ∈-neighborhood are classified into the same cluster and added to the Seed set; visit all unvisited points in the Seed set. If x i If the number of points contained in the ∈-neighborhood of is not less than MinPts, then x i is a core point, and all points in its neighborhood are the same as point x i A cluster is found and added to the Seed set, otherwise no operation is performed until all points in the Seed set are visited; finally, new core points are continuously searched and expanded to form new clusters until all points are visited.

[0010] Preferably, the method of extracting distance information using a K-dist graph includes: calculating the distance between each data point in the data set and its Kth nearest neighbor point, and then displaying these distances in the form of a scatter plot.

[0011] Preferably, the method for clustering by generating Eps according to the distance information in the interval includes: calculating the relationship between the one-dimensional data value in the K-dist graph and the mean and variance of the entire data, setting a threshold to remove interference points, selecting the largest value as the Eps parameter, and then clustering to divide the boundaries between clusters. The formula includes:

[0012]

[0013]

[0014] In the formula, i and N are both natural numbers, x i represents the i-th data value, μ represents the mean of the total data, σ represents the variance of the total data, and Z represents the relationship between each data value and the mean and variance of the total data.

[0015] Preferably, the method for processing defects using a new distance measurement method includes: based on the distance relationship between data frames, each frame is abstracted as a point to simplify complex spatial relationships.

[0016] Preferably, the method of allocating noise points in each interval to corresponding clusters according to preset rules includes: after local clustering, merging the noise points in the interval according to regional distance, determining the cluster to which these noise points belong in the interval, and then classifying these noise points into corresponding clusters.

[0017] The present invention also provides a steel plate defect collection system based on improved DBSCAN and regional distance, the system is used to implement the above method, including: a collection module, a construction module and a collection module;

[0018] The acquisition module is used to acquire image data of defective steel plates;

[0019] The construction module is used to construct a steel plate defect clustering model. The steel plate defect clustering model first uses regional distance to process defects, then uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses the K-dist graph to extract distance information in each interval; then, Eps is generated according to the distance information in the interval for clustering; finally, the noise points in each interval are assigned to the corresponding cluster according to the preset rules;

[0020] The collection module is used to complete the defect collection of the steel plate in the image data using the steel plate defect collection model.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] 1. This invention proposes a new distance metric, namely, regional distance, to solve the problem that clustering algorithms cannot be applied to data frames.

[0023] 2. The present invention proposes a new interval-based clustering algorithm (DB-DBSCAN algorithm) to solve the problem that DBSCAN has poor clustering effect on uneven data density distribution.

[0024] 3. The present invention proposes a new evaluation index IoUSC to evaluate the effect of defect aggregation after RD+DB-DBSCAN processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of the DBSCAN clustering principle of an embodiment of the present invention;

[0027] Figure 2 Schematic diagram of RD algorithm of an example of the present invention;

[0028] Figure 3 It is the pseudo code of RD distance metric of the present invention example;

[0029] Figure 4 It is a K-dist graph of an embodiment of the present invention;

[0030] Figure 5 This is a flow chart of the RD+DB-DBSCAN algorithm of an example of the present invention. DETAILED DESCRIPTION

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

[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Before explaining, the existing DBSCAN algorithm is first explained.

[0034] The DBSCAN algorithm mainly relies on two important parameters: the neighborhood radius (Eps) and the minimum number of points in the neighborhood (MinPts). Assuming that the sample set is D = (x1, x2, ..., x m ), the basic concept of DBSCAN algorithm is described as follows:

[0035] ∈-neighborhood: for x j ∈D, the area whose radius is not greater than ∈ is called point x j Its ∈-neighborhood contains the sample set N ∈ (x j ), the formula is as follows:

[0036] N ∈ (x j )={x i |distance(x i , x j )≤∈}, (1)

[0037] Core object: For any sample x j ∈D, if its ∈-neighborhood corresponds to at least MinPts data points, that is, if |N ∈ (x j )|≥MinPts, then x j Is the core object.

[0038] Density direct access: If x i Located at x j ∈-neighborhood and is a core object, then x is called i By x j Density direct.

[0039] The density can be reached: for x i and x j , if there exists a sequence of data points p1, p2, ..., p n , satisfying p1=x i , p n =x j , and for every point p t to p t+1 If the density reaches (t≥1), it is said to be reachable by the density.

[0040] In the above characters, D represents the set of all clustering data, N ∈ (x j ) indicates that in x j is the collection of data within a radius not greater than Eps, distance(x i ,x j ) represents x j to x i The distance, x i Represents the i-th data.

[0041] Embodiment 1

[0042] The following is a steel plate defect classification method based on improved DBSCAN and regional distance provided in this embodiment, and the steps include:

[0043] S1. Collect image data of a steel plate with defects.

[0044] In this embodiment, the collected image data includes an artificial data set and a UCI data set, wherein the artificial data set includes a steel plant defect data set and four representative artificial data sets, which have uneven density and steel plant data set characteristics. The steel plant defect data set is a data set consisting of representative images with more than 40 defects in a single image, which is screened out from 17,548 image data sets of the steel plant, and includes a total of 119 data sets.

[0045] S2. Construct a steel plate defect classification model.

[0046] Since defects appear in the form of data frames on steel plates, clustering algorithms cannot be applied to data with areas. In order to solve this problem, a new distance metric, RD distance metric, is proposed. RD distance metric focuses on the distance relationship between data frames, that is, calculating the distance between different data frames and constructing defect data frame data through regional distance. The density distribution of steel plant defect data is usually uneven, and the DBSCAN algorithm sets the global density parameter, so it performs poorly when processing data with uneven density. To solve this problem, an interval-based clustering algorithm (DB-DBSCAN) is proposed. The algorithm first uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses the K-dist graph to extract distance information in each interval. Subsequently, appropriate Eps are adaptively generated for clustering based on the distance information in the interval. Finally, the noise points in each interval are assigned to the corresponding cluster according to certain rules. By combining regional distance and DB-DBSCAN, a clustering model (RD+DB-DBSCAN) for processing surface defects of steel plates is formed.

[0047] S201. Use regional distance to process defects, and then use DBSCAN to perform preliminary clustering on the data to divide the intervals with different densities.

[0048] The steps to implement the DBSCAN algorithm are as follows:

[0049] 1. Find the core point: Given the parameters Eps and MinPts, if a point x j If the number of points contained in the ∈-neighborhood of is not less than MinPts, then x is called j is a core point. All core points are obtained by traversing all points.

[0050] 2. Traverse the field: put the core point x j Marked as visited. Starting from this point, all points found in the ∈-neighborhood (including other core points and boundary points) are classified into the same cluster and added to the Seed set.

[0051] 3. Expand the cluster: Visit all unvisited points in the Seed set. If x i If the number of points contained in the ∈-neighborhood of is not less than MinPts, then x i is a core point, and all points in its neighborhood are the same as point x i A cluster is found and added to the Seed set, otherwise no operation is performed until all points in the Seed set are visited.

[0052] 4. Clustering: The algorithm continuously searches for new core points and expands to form new clusters until all points are visited. At this point, the algorithm terminates and outputs all clustering results. Figure 1 shown.

[0053] This embodiment adopts a unique distance measurement method, namely, regional distance, to construct defect data frame data.

[0054] Common similarity indices used to measure the distance between groups include Euclidean distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, etc., and their definitions are shown in Table 1. These indices can be simply regarded as the spatial coordinate distance (a i -b i ) as the core distance concept, and mainly considers the distance between points, but is not applied to data frames with area.

[0055] Table 1

[0056]

[0057] Among them, AB represents two sets of n-dimensional vectors, d AB represents the distance between A and B, a i and b i denotes the i-th element of A and B respectively, S AB represents the covariance matrix of A and B.

[0058] This embodiment proposes a new distance measurement method RD (Region Distance), the core idea of ​​which is to break through the limitations of traditional distance measurement on data frame clustering and focus on the distance relationship between data frames. By abstracting each frame as a point, the complex spatial relationship is effectively simplified. This innovative method not only transcends the limitations of traditional distance measurement, but also provides a revolutionary solution to the data frame clustering problem.

[0059] There are two types of relationships between data frames: intersecting and non-intersecting. In the case of intersection, the distance between data frames is 0. In the case of non-intersection, there are multiple cases, and the shortest distance between frames needs to be calculated. The basic concept of the algorithm is described as follows:

[0060] Horizontal distance: When two rectangles do not intersect but partially overlap in the Y-axis direction, the horizontal distance is the distance between the right line of the left rectangle and the left line of the right rectangle.

[0061] Vertical distance: When two rectangles do not intersect but partially overlap in the X-axis direction, the vertical distance is the distance between the lower edge of the upper rectangle and the upper edge of the lower rectangle.

[0062] Diagonal distance: When two rectangles do not intersect and do not overlap in any direction, the diagonal distance, i.e. the minimum distance, is the distance between the two closest vertices. The algorithm diagram is as follows Figure 2 As shown, the algorithm pseudo code is as follows Figure 3 shown.

[0063] S202. Extract distance information in each interval using the K-dist graph.

[0064] Specifically, the basic idea of ​​the above K-dist graph is to calculate the distance between each data point in the data set and its Kth nearest neighbor, and then display these distances in the form of a scatter plot. In the K-dist graph, the horizontal axis represents the serial number of the data point, and the vertical axis represents the distance to the Kth nearest neighbor. Connecting these points can form a K-dist graph, such as Figure 4 As shown in the figure, the curves for k=4 and k=6 are shown. The two curves present similar shapes. First, there is a slowly rising area, which indicates that the distribution of the corresponding data points is relatively dense. Then the curve rises sharply. This rapidly rising part indicates that the distance between the corresponding data points suddenly increases, which is considered to be a noise point or the boundary between clusters. Therefore, by accurately locating the value of the inflection point in the curve, the boundary between clusters can be effectively divided. According to research, when the k value is greater than 4, the K-dist curve is almost the same as the curve when k=4. In practical applications, k=4 is generally preferred.

[0065] S203. Generate Eps for clustering based on the distance information within the interval.

[0066] By using intervals, the entire data point is divided into multiple different regions, where the data in each local region is more evenly distributed than the entire data. Due to the heterogeneity of density in each interval, it is necessary to adjust the parameters according to the characteristics of the data in each interval. Through the K-dist graph, the distance distribution in each interval can be observed, and then the appropriate distance parameter can be selected to achieve density adaptive clustering for each independent interval.

[0067] The Eps parameter selection method of the traditional DBSCAN algorithm is determined by calculating the maximum curvature point of the K-dist curve, that is, the maximum curvature point is used as the Eps parameter. However, this method depends on the selection of the fitting function, the amount of data, and the distribution, which makes it inaccurate when processing unevenly distributed data sets. In addition, for data sets containing noise or outliers, the stability of parameter selection will also be affected. Therefore, this paper proposes a method for setting a threshold. By calculating the relationship between the one-dimensional data value in the K-dist graph and the mean and variance of the entire data, a threshold is set to remove interference points, and the largest value is selected as the Eps parameter. Then, clustering is performed to effectively divide the boundaries between clusters. The threshold setting method is used to generate Eps for clustering based on the distance information in the interval. The formula includes:

[0068]

[0069] In the formula, i and N are both natural numbers, x irepresents the i-th data value, μ represents the mean of the total data, σ represents the variance of the total data, and Z represents the relationship between each data value and the mean and variance of the total data.

[0070] S204. Allocate the noise points in each interval to corresponding clusters according to preset rules.

[0071] After local clustering is completed, some noise points may appear in each interval. These noise points are just the edges of each cluster, not real noise points, because the noise points have been segmented out after the first clustering. This requires merging these noise points in the interval after local clustering, determining which cluster these noise points belong to in the interval, and then classifying them into that cluster.

[0072] S205. Steel plate defect clustering model based on improved DBSCAN and regional distance.

[0073] In order to effectively classify the complex and concentrated defects on the steel plate for subsequent grinding, a new method is proposed - a steel plate defect classification model based on improved DBSCAN and regional distance. This model combines regional distance with DB-DBSCAN and uses the coordinates of the defect box as the input of the algorithm. When the DB-DBSCAN algorithm calculates the distance, the distance between the defect boxes is calculated in combination with the regional distance. The specific process is as follows Figure 5 shown.

[0074] S3. Use the steel plate defect classification model to complete the defect classification of the steel plate in the image data.

[0075] Embodiment 2

[0076] The advantages of the present invention compared with the prior art will be described in detail below in conjunction with this embodiment.

[0077] This embodiment proposes a new evaluation index IoUSC to evaluate the effect of defect aggregation after RD+DB-DBSCAN processing.

[0078] This embodiment is based on the image data in Example 1 S1, and four clustering algorithms, DB-DBSCAN, DBSCAN, OPDICS, and DP-OPDICS, are selected for experimental analysis. The DBSCAN algorithm is a classic density-based clustering algorithm, the OPDICS algorithm is an improved clustering algorithm based on DBSCAN, and the DP-OPDICS is a clustering algorithm based on OPTICS and K-means. Therefore, the comparative experiment with the above algorithms can well reflect the effectiveness of the method of this embodiment. The detailed parameters of the algorithm are shown in Table 2. The selected experimental data sets include artificial data sets and UCI data sets, among which the artificial data sets include steel plant defect data sets and 4 representative artificial data sets. These data sets have uneven density and have the characteristics of steel plant data sets. The specific attribute description of each data set is shown in Table 3:

[0079] Table 2

[0080]

[0081] Table 3

[0082]

[0083] This embodiment is experimented on a Windows computer with an Intel(R) Core(TM) i5-9300H CPU @ 2.40 GHz and 20 GB memory, and is implemented by programming in the Conda environment using Python language.

[0084] In order to enhance the persuasiveness of the experiment, this embodiment uses two evaluation indicators, ARI (Adjusted Rand Index) and NMI (Normalized Mutual Information), to comprehensively analyze the clustering results. These evaluation indicators can effectively measure the performance of the clustering algorithm and the quality of the clustering results, and provide a reliable basis for the objective evaluation of the experimental results.

[0085] ARI (Adjusted Rand Index) is an indicator used to measure the consistency between clustering results and true labels. The value range of ARI is between [-1,1], where ARI = 1 means that the cluster assignment and class label are completely consistent, ARI = 0 means random consistency, and negative values ​​mean that the consistency is lower than expected by chance. The formula is as follows:

[0086]

[0087] Where a is the number of point pairs with the same class label and belonging to the same cluster; b is the number of point pairs with different class labels and belonging to different clusters; n is the total number of points; E[RI] is the expectation of RI; RI is an indicator for evaluating the similarity of clustering algorithm results; Represents the total number of pairs.

[0088] NMI (Normalized Mutual Information) is an indicator used to measure the similarity between two data distributions. It is often used to evaluate the consistency between clustering results and true labels. The NMI value range is between [0,1]. When NMI is close to 1, it means that the clustering result is highly consistent with the true label; when NMI is close to 0, it means that the clustering result has nothing to do with the true label. The formula is as follows:

[0089]

[0090] Where p(x) is the marginal probability of the clustering result being x, p(y) is the marginal probability of the clustering result being y, p(x, y) is the joint probability of the clustering results being x and y, X represents the non-repeated value of the true label, Y represents the non-repeated value of the clustering label, H(X) is the entropy of X, H(Y) is the entropy of Y, and MI is an indicator used to measure the mutual dependence between two random variables.

[0091] In addition to the above two general clustering result evaluation indicators, this paper proposes an evaluation indicator of steel plate defect clustering effect based on effective area ratio, IoUSC (IoUSilhouetteCoefficient), which is used to measure the compactness and separation degree of each defect data frame after clustering. The value range of IoUSC is between (-1,1]. The closer the result is to 1, the better the clustering is, and the closer it is to -1, the worse the clustering is. The formula is as follows:

[0092]

[0093] In formula (9), area(x i ) represents x i The area, area(x j ) represents x j The area, area(x i , x j ) represents x i , x j The area of ​​the circumscribed rectangle, d(x i , x j ) represents x i to x j The distance takes into account the shape and size of the defect box.

[0094] In formula (10), (11), (12), (13), a(x i ) represents x i The average distance to other defect boxes in the same cluster, b(x i ) represents the average distance to other defect boxes in the nearest cluster, s(x i ) represents xi The closeness to the same cluster and the separation of different clusters, sI represents the distance between all defect boxes s(x i ), n represents the number of N, N represents x i The natural cluster set of M does not contain x i other natural clusters, K represents the number of all data.

[0095] Embodiment 3

[0096] The present invention also provides a steel plate defect clustering system based on improved DBSCAN and regional distance, comprising: an acquisition module, a construction module and a clustering module; the acquisition module is used to acquire image data of defective steel plates; the construction module is used to construct a steel plate defect clustering model, the steel plate defect clustering model first uses regional distance to process defects, then uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses K-dist graph to extract distance information in each interval; then, Eps is generated according to the distance information in the interval for clustering; finally, the noise points in each interval are assigned to corresponding clusters according to preset rules; the clustering module is used to complete the defect clustering of steel plates in image data using the steel plate defect clustering model.

[0097] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A steel plate defect classification method based on improved DBSCAN and regional distance, characterized in that the steps include: Collect image data of steel plates with defects; A steel plate defect clustering model is constructed, wherein the steel plate defect clustering model first uses regional distance to process defects, then uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses a K-dist graph to extract distance information in each interval; Subsequently, Eps is generated for clustering based on the distance information within the interval; finally, the noise points in each interval are assigned to the corresponding cluster according to the preset rules; The steel plate defect classification model is used to complete the defect classification of steel plates in image data.

2. The steel plate defect classification method based on improved DBSCAN and regional distance according to claim 1, characterized in that: The method of using DBSCAN to perform preliminary clustering of data includes: setting parameters Eps and MinPts, if a point x j If the number of points contained in the ∈-neighborhood of is not less than MinPts, then x is called j is a core point, and all core points are obtained by traversing all points; then, the core point x j Marked as visited, from core point x j Starting from, all points found in the ∈-neighborhood are classified into the same cluster and added to the Seed set; visit all unvisited points in the Seed set. If x i If the number of points contained in the ∈-neighborhood of is not less than MinPts, then x i is a core point, and all points in its neighborhood are the same as point x i A cluster is found and added to the Seed set, otherwise no operation is performed until all points in the Seed set are visited; finally, new core points are continuously searched and expanded to form new clusters until all points are visited.

3. The steel plate defect classification method based on improved DBSCAN and regional distance according to claim 1, characterized in that: The method of extracting distance information using the K-dist graph includes: calculating the distance between each data point in the data set and its K-th nearest neighbor point, and then displaying these distances in the form of a scatter plot.

4. The steel plate defect classification method based on improved DBSCAN and regional distance according to claim 1, characterized in that: The method of generating Eps for clustering based on the distance information in the interval includes: calculating the relationship between the one-dimensional data value in the K-dist graph and the mean and variance of the entire data, setting a threshold to remove interference points, selecting the largest value as the Eps parameter, and then clustering to divide the boundaries between clusters. The formula includes: In the formula, i and N are both natural numbers, x i represents the i-th data value, μ represents the mean of the total data, σ represents the variance of the total data, and Z represents the relationship between each data value and the mean and variance of the total data.

5. The steel plate defect classification method based on improved DBSCAN and regional distance according to claim 1, characterized in that: The method of processing defects by using a new distance measurement method includes: based on the distance relationship between data frames, each frame is abstracted as a point to simplify complex spatial relationships.

6. The steel plate defect classification method based on improved DBSCAN and regional distance according to claim 1, characterized in that: The method for allocating noise points in each interval to corresponding clusters according to preset rules includes: after local clustering, merging the noise points in the interval according to regional distance, determining the cluster class of these noise points in the interval, and then classifying these noise points into corresponding clusters.

7. A steel plate defect collection system based on improved DBSCAN and regional distance, the system is used to implement the method according to any one of claims 1 to 6, characterized in that: include: Acquisition module, construction module and collection module; The acquisition module is used to acquire image data of defective steel plates; The construction module is used to construct a steel plate defect clustering model, which first uses regional distance to process defects, then uses DBSCAN to perform preliminary clustering on the data, divides the intervals with different densities, and uses a K-dist graph to extract distance information in each interval; Subsequently, Eps is generated for clustering based on the distance information within the interval; finally, the noise points in each interval are assigned to the corresponding cluster according to the preset rules; The clustering module is used to complete the defect clustering of the steel plate in the image data using the steel plate defect clustering model.