A method, device and medium for region segmentation based on defect data

By segmenting defect data into regions based on circumscribed circle radii and coordinate gaps, the method enhances computing speed and efficiency in cluster defect calculations for semiconductor wafers.

CN117454222BActive Publication Date: 2025-01-03PENGXI SEMICONDUCTOR TECHNOLOGY (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311415437.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2025-01-03
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

Current methods for calculating cluster defects in semiconductor wafers are inefficient due to the lack of data region division, leading to slow computing speeds and resource wastage when determining cluster distances.

Method used

A method for region segmentation of defect data that involves calculating the circumscribed circle radius of each defect, determining coordinate gaps, and using these gaps to divide the data into segments for parallel cluster calculations.

Benefits of technology

This approach improves computing speed and efficiency by reducing the need to calculate distances between all defects, allowing for parallel processing in separate data areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117454222B_ABST
    Figure CN117454222B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and medium for regional segmentation based on defect data, including the steps: S1: obtaining a defect data source; S2: calculating the radius of the circumscribed circle of the defect; S3: respectively calculating the difference before and after sorting the x-axis coordinate values ​​and the difference before and after sorting the y-axis coordinate values ​​corresponding to the defect; S4: respectively calculating the labels to which the x-axis coordinate values ​​and y-axis coordinate values ​​corresponding to the defect belong, and filtering the x-axis and y-axis coordinate values ​​according to the labels to form a coordinate set; S5: defining a regional block function belonging to the x-axis direction or the y-axis direction, which is used to classify each defect sample in the axial direction; S6: merging and integrating the coordinate regions to obtain the segmented region labels to which each defect belongs. After data region segmentation and division, regional blocks whose distances between clusters do not affect each other are formed, and parallel cluster calculations can be implemented in different regional blocks, saving computing resources and improving computing speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of semiconductor wafer defect detection, and in particular to a method for segmenting wafer defect data regions. Background Art

[0002] Various defects will occur in the semiconductor manufacturing process, among which cluster defects are a common defect type on the lithography mask. It refers to the situation where multiple defects appear in continuous or adjacent areas in the lithography pattern. Analyzing cluster defects helps to determine the root cause of the defect and take appropriate measures to solve it. Before analyzing cluster defects, we need to calculate the cluster category. However, each defect is an irregular two-dimensional shape. The radius of the defect circumscribed circle must be considered when calculating cluster defects. DBSCAN clustering cannot be performed using point coordinates alone. Therefore, after adding the radius factor, a custom function is used to perform DBSCAN calculations. However, when the number of defects on a wafer is large, such as above 10,000, the calculation of the cluster considering the radius will become very slow. It is necessary to find a way to achieve regional division of defect data and then perform parallel calculations to speed up the calculation.

[0003] Currently, when performing cluster calculations on wafer defects, data area division is usually not done in advance, but cluster calculations are performed directly. As a result, all defects must calculate whether their distances to each other are within the cluster range during the calculation process, resulting in a waste of computing resources and slow computing speeds. Summary of the invention

[0004] One purpose of the present application is to provide a method, device and medium for region segmentation based on defect data, at least to solve the problem in the prior art that in the cluster calculation of traditional wafer defects, the data region is not divided, resulting in slow cluster calculation speed.

[0005] To achieve the above purpose, the present application provides a defect data area segmentation method, comprising the steps of:

[0006] S1: Get the defect data source; the center coordinates of the defect are (x, y), the shape size value of the defect is (XSIZE, YSIZE), and the threshold required by the defect cluster is tolerance;

[0007] S2: Calculate the radius r of the circumscribed circle of each defect;

[0008] S3: Calculate the difference x_gap before and after sorting the x-axis coordinate values ​​corresponding to each defect and the difference y_gap before and after sorting the corresponding y-axis coordinate values;

[0009] S4: Based on the size relationship between the x_gap and the y_gap and tolerance, the labels to which the x-axis coordinate values ​​and the y-axis coordinate values ​​corresponding to each defect belong are calculated respectively, and a group of x-axis coordinate values ​​and a group of y-axis coordinate values ​​are obtained by screening based on the labels to be attributed, and they are sorted to form a coordinate set x_split and a coordinate set y_split respectively, wherein the value of the coordinate set x_split divides the x-axis direction into len(x_split)+1 interval segments, and the value of the coordinate set y_split divides the y-axis direction into len(y_split)+1 interval segments, wherein len(x_split) is the number of coordinates in x_split, and len(y_split) is the number of coordinates in y_split;

[0010] S5: define the region block function of the x-axis direction and the y-axis direction, the region block function is used to determine the interval segment of the x-axis direction of the current sample in the len(x_split)+1 interval segments and the interval segment of the y-axis direction of the current sample in the len(y_split)+1 interval segments, and return the corresponding value as the segmentation label of the x-axis coordinate value and the segmentation label of the y-axis coordinate value according to the interval segment;

[0011] S6: Generate segmentation labels of x-axis coordinate values ​​and y-axis coordinate values ​​corresponding to each defect by using the region block function and the label set, merge and integrate the segmentation labels, and obtain the segmentation region label to which each defect belongs.

[0012] Optionally, the calculation formula for the circumscribed circle radius r of each defect is:

[0013]

[0014] Optionally, step S3 includes:

[0015] S31: sorting the x-axis coordinate values ​​corresponding to all defects in the x-axis direction in ascending order;

[0016] S32: For each sample, calculate the difference x_diff between the sorted x-axis coordinate value and the x-coordinate value that is sorted before the x-coordinate value;

[0017] S33: Calculate the maximum circumscribed circle radius value r_max among all defects;

[0018] S34: For each sample, calculate the gap value before and after the x-axis direction;

[0019] S35: sorting the y-axis coordinate values ​​corresponding to all defects in the y-axis direction in ascending order;

[0020] S36: For each sample, calculate the difference y_diff between the sorted y-axis coordinate value and the y-coordinate value that is sorted before the y-coordinate value;

[0021] S37: For each sample, calculate the gap value before and after the y-axis direction.

[0022] Optionally, when calculating the gap values ​​in the x-axis direction and the y-axis direction, the influence of the defect size is taken into consideration, and the calculation formulas are x_gap=x_diff-r_max*2, y_gap=y_diff-r_max*2.

[0023] Optionally, step S4 includes:

[0024] S41: Compare the x_gap with the tolerance. If x_gap>tolerance, determine that the x-direction label of the current sample is 1, otherwise it is 0.

[0025] S42: label determination on the x-axis direction;

[0026] S43: Find the x value of the sample label 1 in the x-axis direction, and sort them from small to large to form a coordinate set corresponding to the x-axis coordinate value;

[0027] S44: Compare the size of the y_gap and the tolerance, if the y_gap>tolerance, determine that the y direction label of the current sample is 1, otherwise it is 0;

[0028] S45: label determination on the y-axis direction;

[0029] S46: Find the x value of the sample label 1 in the y-axis direction, and sort them from small to large to form a coordinate set corresponding to the y-axis coordinate value.

[0030] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0031] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0032] The computer-readable medium may be included in the device described above, or may exist independently without being assembled into the device. The computer-readable medium carries one or more computer-readable instructions, which may be executed by a processor to implement the steps of the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0033] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0034] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0035] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0036] Compared with the prior art, the solution provided in the present application divides the defects into data areas to form regional blocks whose distances between clusters do not affect each other, and parallel cluster calculations can be implemented in different regional blocks, which saves computing resources and improves the computing speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flow chart of a defect data area segmentation method provided in this application;

[0038] Figure 2 This is a schematic diagram of the data area separation result when the tolerance provided by this application is 200;

[0039] Figure 3 This is a schematic diagram of the data area separation result when the tolerance provided in this application is 5200. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not 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 this application.

[0041] like Figure 1 As shown, some embodiments of the present application propose a method for segmenting wafer defect data regions. Wherein, defect data represents defect data. For ease of understanding, the present application embodiment uses a python pandas script for calculation description as an example for explanation. Specifically, in some examples, the method may include the following steps:

[0042] Step S1: Get the defect data source;

[0043] Specifically, in some examples, data processing can be performed on all defect data on a wafer to obtain source data and establish a data set data of the source data; wherein, optionally, the representation of the source data in the data set data can be as follows: Assume that the center coordinates of the defect are (x, y), and the shape size value of the defect is (XSIZE, YSIZE). The threshold of cluster can be, but is not limited to, 200, that is, tolerance = 200, and tolerance is used to measure the distance between defect clusters. If the distance is less than tolerance, it is judged to be the same cluster.

[0044] Step S2: Calculate the circumscribed circle radius r of each defect. In some examples, the circumscribed circle radius r of each defect can be calculated by the following calculation formula. However, in some other examples, as long as the implementation method of calculating the circumscribed circle radius r of each defect is within the protection scope of the embodiments of the present application:

[0045]

[0046] Step S3: Calculate the difference x_gap and y_gap before and after sorting the x-axis coordinate value and y-axis coordinate value corresponding to each defect respectively;

[0047] Optionally, in some embodiments of the present application, step S3 may specifically include:

[0048] S31: In the x-axis direction, the x-axis coordinate values ​​corresponding to all defects are sorted in ascending order;

[0049] S32: For each sample, calculate the difference x_diff between the sorted x-axis coordinate value and the x-coordinate value that is sorted before the x-coordinate value;

[0050] S33: Considering the influence of the defect size, first calculate the maximum circumscribed circle radius value r_max among all defects; r_max=max(ri), ri is the vector composed of the circumscribed circle radius of each defect, i∈[1,n], n is the total number of defects.

[0051] S34: Considering the influence of defect size, for each sample, calculate the gap value before and after the x direction, and the calculation formula is: x_gap = x_diff-r_max*2;

[0052] S35: In the y-axis direction, sort the y-axis coordinate values ​​corresponding to all defects in ascending order;

[0053] S36: For each sample, calculate the difference y_diff between the sorted y-axis coordinate value and the y-coordinate value that is sorted before the y-coordinate value;

[0054] S37: After considering the influence of the defect size, for each sample, calculate the gap value before and after the y direction, y_gap = y_diff-r_max*2.

[0055] Step S4: Based on the size relationship between x_gap and y_gap and tolerance, the label to which the x-axis coordinate value and the label to which the y-axis coordinate value corresponding to each defect belong are calculated respectively, and a group of x-axis coordinate values ​​and a group of y-axis coordinate values ​​are screened based on the belonging labels, and they are sorted to form a coordinate set x_split and a coordinate set y_split respectively. The value of the coordinate set x_split divides the x-axis direction into len(x_split)+1 interval segments, and the value of the coordinate set y_split divides the y-axis direction into len(y_split)+1 interval segments, wherein len(x_split) is the number of coordinates in x_split, and len(y_split) is the number of coordinates in y_split;

[0056] In some examples, the specific method of forming a label set can be: compare the size of x_gap, y_gap and tolerance. If x_gap or y_gap is greater than tolerance, the current defect x-direction or y-direction sample label is judged to be 1, otherwise it is 0. Taking the python pandas script as an example, the specific calculation is:

[0057] Label judgment for the x direction:

[0058] data['x_label']=data['x_gap'].apply(lambda x:1if x>tolerance else 0)

[0059] Label judgment for the y direction:

[0060] data['y_label']=data['y_gap'].apply(lambda y:1if y>tolerance else 0)

[0061] Find the x value of the sample label 1 in the x direction and sort them from small to large:

[0062] x_split=np.sort(data[data.x_label==1]['x'].values)

[0063] Find the y value of the sample label 1 in the y direction and sort them from small to large:

[0064] y_split=np.sort(data[data.y_label==1]['y'].values).

[0065] The sorted x_split and y_split are a one-dimensional array consisting of values ​​from small to large. The number of numbers in the x_split array is len(x_split), and the corresponding array ids are 0, 1, 2, 3, ... len(x_split)-1 from small to large. The numbers corresponding to the ids are x_split[0], x_split[1], x_split[2] ... x_split[len(x_split)-1]. The number of numbers in the y_split array is len(y_split), and the corresponding array ids are 0, 1, 2, 3, ... len(y_split)-1 from small to large. The numbers corresponding to the ids are y_split[0], y_split[1], y_split[2] ... y_split[len(y_split)-1]. The values ​​in x_split and y_split can be understood as the segmentation points in the X and Y axis directions, respectively, which are used to classify each defect data sample in the axis direction (used in the next step).

[0066] Step S5: define the region block function of the x-axis direction and the y-axis direction, the region block function is used to determine the interval segment to which the x-axis direction of the current sample belongs in the len(x_split)+1 interval segments and the interval segment to which the coordinate value of the y-axis direction of the current sample belongs in the len(y_split)+1 interval segments, and return the corresponding value as the segmentation label of the x-axis coordinate value and the segmentation label of the y-axis coordinate value according to the interval segment;

[0067] Preferably, taking the definition of the region block function belonging to the x-axis direction as an example, split_list is equivalent to x_split:

[0068] def get_label(x,split_list):

[0069] for iin range(len(split_list)): / / i is used to traverse each value in the array split_list

[0070] if i == 0 and x < split_list[i]: / / When i equals 0 and the x value of the defective data sample is less than split_list[0], that is, less than the first value in the split_list array

[0071] return str(i) + 'a' / / Return 0a as the x - direction segmentation label for the current defective sample

[0072] if i > 0 and i < len(split_list) - 1 and x < split_list[i] and x >= split_list[i - 1]: / / When i is greater than 0 and less than len(split_list) - 1, if the x value of the defective data sample satisfies x >= split_list[i - 1] and x < split_list[i]

[0073] return str(i) + 'b' / / Then return ib as the x - direction segmentation label for the current defective sample

[0074] if i == len(split_list) - 1 and x < split_list[i] and x >= split_list[i - 1]: / / When i equals len(split_list) - 1, if the x value of the defective data sample satisfies x >= split_list[i - 1] and x < split_list[i]

[0075] return str(i) + 'c' / / Then return ic as the x - direction segmentation label for the current defective sample

[0076] if i == len(split_list) - 1 and x >= split_list[i]: / / When i equals len(split_list) - 1, if the x value of the defective data sample satisfies x >= split_list[i]

[0077] return str(i) + 'd' / / Then return id as the x - direction segmentation label for the current defective sample

[0078] Similarly, for the function of the region block in the y - axis direction, the parameter x in the above get_label function corresponds to the y - coordinate value of the defective sample, and split_list is equivalent to y_split. The process of calling the get_label(x, split_list) function is described in detail in S61 and S62 later.

[0079] Step S6: Using the region block function in step S5 and the coordinate set in step S4, generate segmentation labels corresponding to the x-axis coordinate value and the y-axis coordinate value of each defect, merge and integrate the segmentation labels to obtain the segmentation region label to which each defect belongs.

[0080] Optionally, in some embodiments of the present application, step S6 may include:

[0081] S61: First, a segmentation label is added in the x direction, and the region block function get_label() method in step S5 and the x_split obtained in step S4 are referenced to obtain the segmentation label x_split_label corresponding to the x-axis coordinate value.

[0082] The specific calculation formula is as follows:

[0083] data['x_split_label']=data['x'].apply(lambda x:get_label(x,split_list=x_split));

[0084] S62: Next, a segmentation label is added in the y direction, and the region block function get_label() method in step S6 and S5 is referenced, as well as the y_split obtained in step S4, to obtain y_split_label

[0085] The specific calculation formula is as follows:

[0086] data['y_split_label']=data['y'].apply(lambda y:get_label(y,split_list=y_split))

[0087] S63: The final segmentation region label split_label set is obtained by combining the segmentation labels in the x direction and the y direction.

[0088] The formula is as follows:

[0089] data['split_label']=data[['x_split_label','y_split_label']].apply(lambda v:v[0]+v[1],axis=1), that is, combine the split labels in the x direction and the y direction.

[0090] Finally, split_label is deduplicated to obtain the final segmented region label. split_label forms a label set for all defects. Multiple defect points correspond to one label, so after deduplication, a unique label set is obtained, that is, the segmented region set.

[0091] like Figure 2 As shown in the figure, in some embodiments of the present application, when the tolerance value is 200, the defect data is segmented, and the defects in each data area block meet the tolerance range and do not affect each other. Based on the segmentation result, parallel cluster calculation can be implemented in different data area blocks, which greatly improves the calculation rate and saves computing resources.

[0092] In order to see the data segmentation more clearly, in some other embodiments of the present application, the tolerance value is 5200. Figure 3 This is a schematic diagram of the defect data after segmentation. You can clearly see the various data segmentation area blocks.

[0093] As another aspect, an embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the above method when executing the computer program.

[0094] As another aspect, the embodiments of the present application further provide a computer-readable medium, which may be included in the device described in the above embodiments; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer-readable instructions, which may be executed by a processor to implement the steps of the methods and / or technical solutions of the above multiple embodiments of the present application.

[0095] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0096] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0097] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0098] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A defect data region segmentation method, characterized in that: The following steps are involved: S1: Get the defect data source; the center coordinates of the defect are (x, y), the shape size value of the defect is (XSIZE, YSIZE), and the threshold required by the defect cluster is tolerance; S2: Calculate the radius r of the circumscribed circle of each defect; S3: Calculate the difference x_gap after sorting the x-axis coordinate values ​​and the difference y_gap after sorting the y-axis coordinate values ​​corresponding to each defect respectively; S4: Based on the size relationship between the x_gap and the y_gap and tolerance, the labels to which the x-axis coordinate values ​​and the y-axis coordinate values ​​corresponding to each defect belong are calculated respectively, and a group of x-axis coordinate values ​​and a group of y-axis coordinate values ​​are obtained by screening based on the labels to be attributed, and they are sorted to form a coordinate set x_split and a coordinate set y_split respectively, wherein the value of the coordinate set x_split divides the x-axis direction into len(x_split)+1 interval segments, and the value of the coordinate set y_split divides the y-axis direction into len(y_split)+1 interval segments, wherein len(x_split) is the number of coordinates in x_split, and len(y_split) is the number of coordinates in y_split; S5: define the region block function of the x-axis direction and the y-axis direction, the region block function is used to determine the interval segment of the x-axis direction of the current sample in the len(x_split)+1 interval segments and the interval segment of the y-axis direction of the current sample in the len(y_split)+1 interval segments, and return the corresponding value as the segmentation label of the x-axis coordinate value and the segmentation label of the y-axis coordinate value according to the interval segment; S6: using the region block function and the coordinate set, generating segmentation labels of the x-axis coordinate value and the y-axis coordinate value corresponding to each defect, merging and integrating the segmentation labels to obtain a segmentation region label to which each defect belongs; The step S3 comprises: S31: sorting the x-axis coordinate values ​​corresponding to all defects in the x-axis direction in ascending order; S32: for each sample, calculating a difference x_diff between the x-axis coordinate value after the x-axis coordinate value is sorted and the x-coordinate value of the defect sorted before the x-coordinate value of the defect in the current sample; S33: Calculate the maximum circumscribed circle radius value r_max among all defects; S34: For each sample, calculate the gap value x_gap=x_diff-r_max*2 before and after the x-axis direction; S35: sorting the y-axis coordinate values ​​corresponding to all defects in the y-axis direction in ascending order; S36: For each sample, calculate the difference y_diff between the sorted y-axis coordinate value and the y-coordinate value of the defect sorted before the y-coordinate value of the defect in the current sample; S37: For each sample, calculate the gap value y_gap=y_diff-r_max*2 before and after the y-axis direction.

2. The method according to claim 1, characterized in that The calculation formula for calculating the circumscribed circle radius r of each defect in step S2 is as follows:

3. The method according to claim 1, characterized in that The said step S4 includes: S41: Compare the magnitudes of the said x_gap and the said tolerance. If x_gap > tolerance, then determine that the x-direction label of the current sample is 1; otherwise, it is 0. S42: Conduct label determination for the x-axis direction. S43: Find the x values where the sample labels in the x-axis direction are 1, and sort them in ascending order to form a coordinate set corresponding to the x-axis coordinate values. S44: Compare the magnitudes of the said y_gap and the said tolerance. If y_gap > tolerance, then determine that the y-direction label of the current sample is 1; otherwise, it is 0. S45: Conduct label determination for the y-axis direction. S46: Find the x values where the sample labels in the y-axis direction are 1, and sort them in ascending order to form a coordinate set corresponding to the y-axis coordinate values.

4. According to the method described in claim 1, the value of the said tolerance is 200.

5. The method according to claim 1, characterized in that: The said step S6 includes: S61: Mark a segmentation label on the x-axis direction. By referring to the said regional block function method and the said coordinate set x_split, obtain x_split_label. The specific steps are as follows: Take the split_list parameter as x_split. A is defined as 0 ≤ i ≤ len(split_list). If i == 0 and x < split_list[i], return 0a as the x-direction segmentation label of the current defective sample x; B If 0 < i < len(split_list) – 1 and the x value of the defective data sample satisfies split_list[i - 1] ≤ x < split_list[i], then return ib as the x-direction segmentation label of the current defective sample. C If i = len(split_list) - 1 and the x value of the defective data sample satisfies split_list[i - 1] ≤ x < split_list[i], then return ic as the x-direction segmentation label of the current defective sample. D If i = len(split_list) - 1 and the x value of the defective data sample satisfies x >= split_list[i], then return id as the x-direction segmentation label of the current defective sample. S62: Mark a segmentation label on the y-axis direction. By referring to the said regional block function method and the said coordinate set y_split, obtain y_split_label. The specific steps are as follows: Take the split_list parameter as y_split. A is defined as 0 ≤ i ≤ len(split_list). If i == 0 and y < split_list[i], return 0a as the y-direction segmentation label of the current defective sample; B If 0 < i < len(split_list) – 1 and the y value of the defective data sample satisfies split_list[i - 1] ≤ y < split_list[i], then return ib as the y-direction segmentation label of the current defective sample. C If i = len(split_list) - 1 and the y value of the defective data sample satisfies split_list[i - 1] ≤ y < split_list[i], then return ic as the y-direction segmentation label of the current defective sample. D If i = len(split_list) - 1 and the y value of the defective data sample satisfies y >= split_list[i], then return id as the y-direction segmentation label of the current defective sample. S63: The segmentation labels in the x-axis direction and the y-axis direction are combined to obtain a segmentation region label set.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Medical image segmentation algorithm

    CN103426169A

  • Building curve turning point extraction method and system, computer and readable storage medium

    CN116152280A