Defect detection method for solid thick-wall section bar processing die
Through image processing and machine learning methods, local oxidation and cracks of solid thick-walled section profile processing molds are detected, which improves detection accuracy and solves the problem of low detection accuracy in the prior art to ensure mold quality and safety.
Patent Information
- Application Number
- CN202510732949.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The prior art cannot accurately detect local oxidation and crack defects of solid thick-walled section profile processing molds, resulting in low detection accuracy, and the inability to promptly check the causes of defects, which poses safety hazards.
The mold surface image was collected by the camera, preprocessing and local enhancement were performed, edge skeletons were extracted, irregular shape areas were screened using spectral coefficients and low-frequency energy concentration, and defect distinction values were constructed based on gradient direction and curvature characteristics, and defect detection was performed using the U-Net algorithm.
It improves the detection accuracy of local oxidation and crack defects, can quickly distinguish and detect defects, avoid defect problems in subsequent manufacturing processes, and ensure mold quality and safety.
Smart Images

Figure CN120259289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a method for defect detection of a processing die for a solid thick-walled section profile. Background Art
[0002] The processing die for a solid thick-walled section profile is a key component in industrial manufacturing and is widely used in the production of high-strength structural components in fields such as aerospace, rail transit, and automotive manufacturing. Such dies are usually made of high-hardness alloy steel or special materials and have complex geometric shapes and strict dimensional tolerance requirements to ensure the accuracy and surface quality of the formed workpieces in the extrusion, forging, or casting processes. With the increasing demand for lightweight and high-strength components in modern industry, the processing accuracy and durability of the dies face higher challenges. During the industrial manufacturing process of the processing die for a solid thick-walled section profile, due to situations such as machine aging, tool wear, or abnormal parameters, the produced dies may have process problems. Common surface defects mainly include local oxidation and cracks. These defects will directly affect the die performance and may lead to more serious damage after long-term use, thus triggering serious safety hazards. In recent years, with the popularization of high-precision numerical control processing technology, the die structure has become increasingly complex and is widely used in industry. In order to avoid defects such as local oxidation and cracks in the processing die for a solid thick-walled section profile caused by problems during the manufacturing process, resulting in industrial safety hazard problems, using artificial intelligence technology to perform defect detection on the processing die for a solid thick-walled section profile produced in industrial production is a commonly used solution at present.
[0003] Currently, defect detection in the field of computer vision cannot accurately detect and distinguish different defects, so it is impossible to promptly investigate the causes leading to the corresponding defects, resulting in low defect detection accuracy. Summary of the Invention
[0004] To solve the technical problem of low defect detection accuracy, this application provides a method for defect detection of a processing die for a solid thick-walled section profile. The specific technical solutions adopted are as follows: This application proposes a method for defect detection of a processing die for a solid thick-walled section profile, and the method includes the following steps: Collect the surface image of the processing die for a solid thick-walled section profile through a camera and preprocess it to obtain a target image; Divide the target image into rectangular blocks for local enhancement to obtain an enhanced image; detect the edges of the enhanced image to obtain contour regions, and for each contour region, obtain a contour skeleton; for all pixel points of the contour skeleton, obtain the spectral coefficients of the spectral components through frequency domain analysis; obtain the low-frequency energy concentration based on the proportion of the spectral coefficients of the spectral components with the smallest preset number of spectral coefficients in the spectral coefficients of the non-redundant overall spectral components; screen the irregular shape regions through the low-frequency energy concentration; In an irregular-shaped area, the pixel points with the largest gray values among a preset number on the contour skeleton are denoted as target points; the direction concentration degree of the irregular-shaped area is obtained based on the dispersion degree of the neighborhood pixel points of all the target points in the gradient direction; the bending degree of the contour skeleton is obtained based on the arc length of the contour skeleton, the curvature of all the pixel points, and the radian increment between adjacent pixel points; the defect discrimination value is obtained based on the bending degree of the contour skeleton and the direction concentration degree of the corresponding irregular-shaped area; the oxidation defects and crack defects are screened through the defect discrimination value; Two types of defect markings are used to train a defect detection model through network training, and the defect detection model is used to perform real-time defect detection on the solid thick-wall section profile processing die.
[0005] In the above solution, the present application constructs a judgment index by combining the direction concentration index and the average absolute curvature. Considering the characteristic differences between local oxidation and cracks among the defects existing on the outer surface of the solid thick-wall section profile processing die, compared with the traditional defect detection that can only detect local defect areas, the present application determines the defects according to the concentration degree of the gradient direction and the sudden change of the edge curvature during the gray value change of oxidation and cracks, effectively classifying the local oxidation and crack defects that may appear on the outer surface of the solid thick-wall section profile processing die, thereby quickly troubleshooting the corresponding defects, improving the detection accuracy of the two types of defects, efficiently solving the problems occurring during processing, and further avoiding the defect problems during the subsequent manufacture of the solid thick-wall section profile processing die.
[0006] In one embodiment, the method for locally enhancing the target image by dividing it into rectangular blocks to obtain an enhanced image is as follows: The target image is divided into a number of rectangular blocks, and histogram equalization is performed on each rectangular block by the method of limiting contrast to obtain the enhanced image, which is denoted as the enhanced image.
[0007] In one embodiment, all the pixel points on the contour skeleton form a sequence, and discrete Fourier transform is performed on each sequence to obtain the spectral coefficients corresponding to each spectral component.
[0008] In one embodiment, the method for obtaining the low-frequency energy concentration degree according to the proportion of the spectral coefficients of the spectral components with the smallest preset number of spectral coefficients in the spectral coefficients of the non-redundant overall spectral components is as follows: , represents the spectral coefficient of the kth spectral component, N represents the total number of spectral components, represents the low-frequency energy concentration degree, and B is the number of spectral coefficients selected.
[0009] In one embodiment, the method for screening the irregular-shaped area through the low-frequency energy concentration degree is as follows: Calculate the low-frequency energy concentration of all contour skeletons, use the Otsu threshold method to calculate the maximum inter-class variance, and obtain the optimal segmentation threshold T. When R≥T, it is determined that the contour region corresponding to the contour skeleton is a regular shape region; conversely, when R<T, it is determined that the region is an irregular shape region.
[0010] In one embodiment, the method for obtaining the direction concentration of the irregular shape region based on the dispersion degree of the neighborhood pixel points of all target points in the gradient direction is as follows: , represents the variance of the gradient directions of the eight-neighborhood pixel points of the i-th target point, represents the number of target points, represents the direction concentration.
[0011] In one embodiment, the method for obtaining the bending degree of the contour skeleton based on the arc length of the contour skeleton, the curvature of all pixel points, and the radian increment between adjacent pixel points is as follows: For the pixel points on the contour skeleton, calculate its curvature and radian on the contour skeleton based on the coordinates of the pixel point. Take the number of all pixel points on the contour skeleton as the total arc length, and record the radian increment from the previous pixel point to the next pixel point as the radian increment; The bending degree of the contour skeleton is negatively correlated with the total arc length of the contour skeleton, and is negatively correlated with the radian increment between all pixel points and adjacent pixel points and the curvature of all pixel points.
[0012] In one embodiment, the defect discrimination value is positively correlated with the bending degree and negatively correlated with the direction concentration.
[0013] In one embodiment, the method for screening oxidation defects and crack defects through the defect discrimination value is as follows: Calculate the corresponding defect discrimination value for all irregular shape regions, calculate the inter-class variance through the Otsu threshold segmentation method to obtain the optimal threshold, determine the irregular shape regions with defect discrimination values greater than or equal to the optimal threshold as crack regions, and record the irregular shape regions with defect discrimination values less than the optimal threshold as oxidation regions.
[0014] In one embodiment, the method for training the defect detection model by marking the two types of defects through a network is as follows: Label the images containing oxidation regions and crack regions, and perform model training through the U-net algorithm, where a spatial attention mechanism is introduced; the loss function during training is the Dice loss and the cross-entropy loss; the Adam algorithm is used during the optimization process, and the defect detection model is obtained through a preset number of iterations.
[0015] The beneficial effects of this application are: This application constructs a judgment index by combining the direction concentration index and the average absolute curvature. Considering the characteristic differences between local oxidation and cracks in the defects existing on the outer surface of the processing die for solid thick-walled section profiles, compared with the traditional defect detection that can only detect local defect areas, this application determines defects based on the concentration degree of the gradient direction and the sudden change of the edge curvature during the gray-scale change of oxidation and cracks, effectively classifying the local oxidation and crack defects that may appear on the outer surface of the processing die for solid thick-walled section profiles, thereby quickly troubleshooting corresponding problems, improving the detection accuracy of the two types of defects, efficiently solving the problems occurring during processing, and further avoiding defect problems when manufacturing the processing die for solid thick-walled section profiles subsequently. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] To more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 It is a flowchart of a method for detecting defects of a processing die for solid thick-walled section profiles provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To further elaborate on the technical means and effects adopted by the present application to achieve the intended invention purpose, the following will, in conjunction with the drawings and preferred embodiments, detail the specific implementation manners, structures, features, and effects of a method for detecting defects of a processing die for solid thick-walled section profiles proposed according to the present application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs.
[0020] An embodiment of a method for detecting defects of a processing die for solid thick-walled section profiles: The following will specifically describe the specific solution of a method for detecting defects of a processing die for solid thick-walled section profiles provided by the present application in conjunction with the drawings.
[0021] Please refer to Figure 1 , which shows a flowchart of a method for detecting defects of a processing die for solid thick-walled section profiles provided by an embodiment of the present application. The method includes the following steps: Step S001, obtain the target image of the solid thick-walled section profile processing die.
[0022] Prepare a high-resolution industrial camera to capture the image of the outer surface of the solid thick-walled section profile processing die with defects. The image of the outer surface of the solid thick-walled section profile processing die captured in the industrial environment may be affected by the surrounding complex environment. For example, dust may cause more noise in the image. Therefore, it is necessary to preprocess the image to reduce noise interference.
[0023] First, perform grayscale processing on the obtained image to reduce the subsequent calculation amount. The grayscale processing can adopt any one of the average method, maximum method, minimum method, and weighted average method. In this embodiment, the weighted average method is used, which can better retain the surface texture and fine defects. Then, perform median filtering noise reduction processing on the output grayscale image. In the industrial environment, the camera sensor may generate random black and white noise points (salt-and-pepper noise) due to electromagnetic interference or dust. Using median filtering can directly filter out these isolated noise points, thereby reducing the interference of noise on the image. Thus, the preprocessing of the image is completed, and the preprocessed image is recorded as the target image.
[0024] So far, the target image has been obtained.
[0025] Step S002, perform local division on the target image and perform local enhancement; extract the edge skeleton of the enhanced image, obtain its spectral coefficients, determine the low-frequency energy concentration based on the spectral coefficients, and then screen the irregular shape areas.
[0026] In the industrial manufacturing process, high requirements are placed on the processing accuracy and durability of the solid thick-walled section profile processing die. Facing the possible local oxidation, cracks and other quality defects on the outer surface of the die product, continuing to use may cause industrial safety problems. Such situations need to be avoided as much as possible during the industrial production process. Therefore, it is necessary to detect the defects of the solid thick-walled section profile processing die.
[0027] Since the illumination distribution may be uneven due to the existence of defects when capturing the outer surface image of the solid thick-walled section profile processing die, resulting in local over-brightness or local over-darkness. Therefore, image enhancement processing is performed on the target image.
[0028] In this application, the target image is divided into several rectangular blocks. In this embodiment, the size of each rectangular block is 16×16. For each rectangular block, histogram equalization is performed by the method of limiting contrast, and the obtained enhanced image is recorded as the enhanced image. Adaptive histogram equalization with limited contrast is a well-known technology, and the specific calculation process will not be elaborated here.
[0029] Edge detection algorithm is used to extract edges from the enhanced image. In the outer surface image of the solid thick-walled section profile processing die, the die itself and the part structures above the die mainly exist in regular shapes. For the possible defects on the outer surface of the die, local oxidation mainly exists in irregular sheet forms, while cracks mainly appear in the form of slender strip main branches and many tree-branch-like branches. In this embodiment, the Canny edge detection algorithm is used for the edge detection algorithm.
[0030] Multiple contour regions are obtained through the edge detection algorithm. The enhanced image after edge detection is converted into a binary image, in which the gray values of all edge pixel points are set to 255, which is the white foreground, and the gray values of the remaining pixel points are set to 0, which is the black background.
[0031] For the generated binary image, the generated binary image is input, and the Guo-Hall algorithm is used to iteratively delete edge pixels. The 8-neighborhood direction pixel points are traversed and checked, and the pixels that maintain topology (the crossing number is 1) and are not endpoint pixels are retained. Different boundary directions are alternately processed in two stages, and a single-pixel-wide and topology-preserving contour skeleton is output for each contour region. The Guo-Hall algorithm is a well-known technology, and the specific calculation process will not be elaborated too much. According to the difference between the defects and the regular shape structures in the die, the Fourier descriptor is used for further distinction.
[0032] For each contour skeleton, the pixel points on the contour skeleton form a set of pixel points. Each set of pixel points is regarded as a sequence, and the discrete Fourier transform is performed on each sequence to obtain the spectral coefficients corresponding to each pixel point. The spectral coefficients are sorted from low to high. The lowest spectral coefficient corresponds to the centroid of the contour region. The low-frequency components reflect the overall shape, and the high-frequency components reflect the details. According to the principle of energy concentration, the energy distribution of regular shapes is mainly in the low-frequency components, while the energy of complex irregular shapes will be scattered into the high-frequency components. Therefore, a preset number of low-frequency components with the top spectral coefficients except the centroid are selected as shape descriptors, and the number is denoted as B. In this embodiment, the first 10 low-frequency components except the centroid are selected as shape descriptors.
[0033] Based on the above-obtained shape descriptors, the low-frequency energy concentration is calculated. The more the low-frequency spectral components account for the total spectral components, the more it indicates the concentration of low-frequency energy.
[0034] The expression of the low-frequency energy concentration is: , represents the spectral coefficient of the k-th spectral component, N represents the total number of spectral components, represents the low-frequency energy concentration, and B is the number of selected spectral coefficients.
[0035] According to the symmetry of the discrete Fourier transform, the latter Some of the spectral components are redundant, and only the first part of the spectral components need to be calculated. Therefore, the overall spectral components of this application are calculated through the first part.
[0036] Calculate the low-frequency energy concentration of all contour skeletons, use the Otsu threshold method to calculate the maximum inter-class variance, and obtain the optimal segmentation threshold T. When R≥T, it is determined that the contour corresponding to the contour skeleton is a regular-shaped area. Conversely, when R<T, it is determined that the area is an irregular-shaped area. Initially screen out local oxidation and crack areas.
[0037] So far, the irregular-shaped areas are obtained by initially screening the defect areas.
[0038] Step S003, in the irregular-shaped area, based on the degree of dispersion of the gradient directions of the pixel points around the target point, combined with the arc length of the contour skeleton, the curvature of all pixel points, and the radian increment between adjacent pixel points, obtain the defect discrimination value, and then screen out oxidation defects and crack defects.
[0039] After the above initial screening, for the further differentiation of the irregular-shaped areas, local oxidation and crack defects may occur on the outer surface of the solid thick-walled section profile processing die during the manufacturing process. Among them, local oxidation will have a relatively wide transition area between the oxide layer and the matrix, slow change in edge gray value, relatively blurred boundary, and no obvious directionality when the gray value changes; while the crack edge is sharp and obvious, and the gray value transformation directionality is relatively concentrated.
[0040] Based on the above analysis, in the irregular-shaped area, a preset number of pixel points with the largest gray values are selected from each contour skeleton and recorded as target points. Calculate the gradient directions of the eight-neighbor pixel points of the target points, and obtain the direction concentration based on the degree of dispersion of the gradient directions of the pixel points around the target point. In this embodiment, 10 pixel points with the largest gray values are selected, and the method for obtaining the gradient direction is the Sobel operator.
[0041] Preferably, in this embodiment, the expression of the direction concentration is: , represents the variance of the gradient directions of the eight-neighbor pixel points of the i-th target point, represents the number of target points, represents the direction concentration.
[0042] Since the diffusion of the oxidation area is relatively strong, the gradient directions of the pixel points are relatively dispersed, while the gradient directions of the cracks are relatively concentrated. By evaluating the concentration of the gradient directions of the pixel points in the neighborhood directions of different pixel points, the two defect situations are initially distinguished.
[0043] Considering that the oxidized edge is affected by uneven oxidation rate and will exhibit a natural corrosion morphology, the edge curvature fluctuation is relatively gentle; while cracks mainly extend along the stress direction, the main crack edge is straight, the branched cracks are tree-shaped, and there will be sudden changes in the local curvature of the edge.
[0044] Based on this, according to the local curvature changes of the two types of defects, the mean absolute curvature is constructed to quantify the bending degree of the edge contour.
[0045] For the pixel points on the contour skeleton, calculate the curvature and radian of the pixel point on the contour skeleton based on its coordinates. The calculation methods of the curvature and radian are both existing methods and will not be elaborated in detail in this application. Take the number of all pixel points on the contour skeleton as the total arc length, and record the increase in radian from the previous pixel point to the next pixel point as the radian increment.
[0046] Obtain the bending degree of the contour skeleton based on the total arc length of the contour skeleton, the radian increments of all pixel points and adjacent pixel points, and the curvature of all pixel points.
[0047] The bending degree of the contour skeleton is negatively correlated with the total arc length of the contour skeleton, and is negatively correlated with the radian increments of all pixel points and adjacent pixel points, and the curvature of all pixel points.
[0048] It should be noted that positive correlation means that when one variable increases, the other variable also increases, and the change directions of the two variables are the same. When one variable changes from large to small or from small to large, the other variable also changes from large to small or from small to large; the specific relationship is determined by the actual application and is not specially restricted in this application.
[0049] It should be noted that negative correlation means that when one variable increases, the other variable decreases, and the change directions of the two variables are opposite. When one variable changes from large to small or from small to large, the other variable also changes from small to large or from large to small; the specific relationship is determined by the actual application and is not specially restricted in this application.
[0050] Preferably, in this embodiment, the expression of the bending degree is: , represents the curvature of the o-th pixel point, represents the radian between the o-th pixel point and the next adjacent pixel point, represents the total arc length of the contour skeleton, represents the bending degree of the contour skeleton.
[0051] The higher the calculated MAC value, the sharper the edge part, there are obvious sudden changes in curvature, which is more in line with the situation of crack appearance; the lower the calculated MAC value, the flatter the edge part, the curvature change is gentle, and it is relatively more in line with the situation of oxidation appearance.
[0052] When local oxidation occurs on the outer surface of the processing die for solid thick-walled section profiles, according to the characteristics that the gradient of the edge part of the local oxidation is relatively gentle, the edge presents a natural corrosion morphology, the gradient directions of the pixel points are relatively discrete, and at the same time the curvature fluctuation is relatively gentle. When cracks appear, according to the fact that when cracks appear, the gradient directions of the pixel points are relatively concentrated, and at the same time, due to the existence of branched cracks, it will cause a sudden change in the edge curvature.
[0053] Therefore, the bending degree and direction concentration obtained are normalized, and the defect discrimination value is obtained according to the difference between the two.
[0054] The defect discrimination value has a positive correlation with the bending degree and a negative correlation with the direction concentration.
[0055] Preferably, in this embodiment, the defect discrimination value of each irregular shape region is the ratio of the bending degree and direction concentration of the corresponding contour skeleton.
[0056] Based on the difference between the two, the characteristic difference between local oxidation and cracks is enhanced. For all irregular shape regions, calculate their corresponding defect discrimination values, obtain the optimal threshold by calculating the between-class variance through the Otsu threshold segmentation method, determine the irregular shape regions with defect discrimination values greater than the optimal threshold as crack regions, and record the irregular shape regions smaller than the optimal threshold as oxidation regions.
[0057] Thus, oxidation defects and crack defects are distinguished.
[0058] Step S004, label the training model for the two types of defects and perform real-time defect detection through the model.
[0059] For the images containing oxidation regions and crack regions, use the annotation tool LabelMe for data annotation to make a defect dataset for the processing die of solid thick-walled section profiles. Use the U-Net algorithm for model training. Introduce the CBAM spatial attention mechanism in the algorithm, which can effectively suppress background noise and enhance the response of the oxidation diffusion edge and crack bifurcation points. During training, combine the Dice loss and cross-entropy loss to alleviate the problem of class imbalance. The optimization process uses the Adam algorithm to dynamically adjust the learning rate, and prevent overfitting through the early stopping strategy. The number of training rounds is set to 100 rounds. After training, obtain the defect detection model, and use the defect detection model to perform real-time defect detection on the processing die of solid thick-walled section profiles. For the different defects detected, the problem can be investigated in time to avoid the recurrence of defect problems.
[0060] Thus, the defect detection of the processing die is completed.
[0061] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
[0062] The various embodiments in this specification are described in a progressive manner. For the same or similar parts between the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A defect detection method for a processing die of a solid thick-walled section profile, characterized in that, The method includes the following steps: Collect the surface image of the solid thick-walled section profile processing die by a camera and preprocess it to obtain a target image; Divide the target image into rectangular blocks for local enhancement to obtain an enhanced image; detect the edges of the enhanced image to obtain the contour regions, and for each contour region, obtain the contour skeleton; for all pixel points of the contour skeleton, obtain the spectral coefficients of the spectral components through frequency domain analysis; obtain the low-frequency energy concentration based on the proportion of the spectral coefficients of the spectral components with the smallest preset number of spectral coefficients in the spectral coefficients of the non-redundant overall spectral components; screen the irregular shape regions through the low-frequency energy concentration; In the irregular shape regions, mark the preset number of pixel points with the largest gray values on the contour skeleton as target points; obtain the direction concentration of the irregular shape regions based on the dispersion degree of the neighborhood pixel points of all target points in the gradient direction; obtain the bending degree of the contour skeleton based on the arc length of the contour skeleton, the curvature of all pixel points, and the radian increment between adjacent pixel points; obtain the defect discrimination value based on the bending degree of the contour skeleton and the direction concentration of the corresponding irregular shape regions; screen the oxidation defects and crack defects through the defect discrimination value; Mark the two types of defects and train a defect detection model through a network, and perform real-time defect detection on the solid thick-walled section profile processing die through the defect detection model.
2. The defect detection method of a solid thick-walled section profile processing die according to claim 1, characterized in that, The method of dividing the target image into rectangular blocks for local enhancement to obtain an enhanced image is as follows: Divide the target image into several rectangular blocks, perform histogram equalization on each rectangular block by the method of limiting contrast, and obtain the enhanced image denoted as the enhanced image.
3. The defect detection method of a solid thick-walled section profile processing die according to claim 1, characterized in that, All pixel points on the contour skeleton form a sequence, and perform discrete Fourier transform on each sequence to obtain the spectral coefficients corresponding to each spectral component.
4. A method for defect detection of a processing die for a solid thick-walled section profile as described in claim 1, characterized in that, The method of obtaining the low-frequency energy concentration based on the proportion of the spectral coefficients of the spectral components with the smallest preset number of spectral coefficients in the spectral coefficients of the non-redundant overall spectral components is as follows: , represents the spectral coefficient of the k-th spectral component, N represents the total number of spectral components, represents the low-frequency energy concentration, and B is the number of selected spectral coefficients.
5. The defect detection method of a solid thick-walled cross-section profile processing die according to claim 4, characterized in that, The method of screening the irregular shape regions through the low-frequency energy concentration is as follows: Calculate the low-frequency energy concentration of all contour skeletons, perform the maximum inter-class variance calculation using the Otsu threshold method to obtain the optimal segmentation threshold T. When R≥T, determine that the contour region corresponding to the contour skeleton is a regular shape region; otherwise, when R<T, determine that the region is an irregular shape region.
6. The defect detection method for a processing die of a solid thick-walled section profile as described in claim 1, characterized in that, The method of obtaining the direction concentration of the irregular shape regions based on the dispersion degree of the neighborhood pixel points of all target points in the gradient direction is as follows: , represents the variance of the gradient directions of the eight-neighborhood pixels of the i-th target point, represents the number of target points, represents the direction concentration.
7. The defect detection method of a solid thick-walled section profile processing die according to claim 1, characterized in that, The method of obtaining the bending degree of the contour skeleton based on the arc length of the contour skeleton, the curvature of all pixel points, and the radian increment between adjacent pixel points is as follows: For the pixel points on the contour skeleton, calculate its curvature and radian on the contour skeleton based on the coordinates of the pixel point, use the number of all pixel points on the contour skeleton as the total arc length, and denote the radian increment from the previous pixel point to the next pixel point as the radian increment; The bending degree of the contour skeleton is negatively correlated with the total arc length of the contour skeleton, and is negatively correlated with the radian increment between all pixel points and adjacent pixel points and the curvature of all pixel points.
8. The defect detection method of a solid thick-walled section profile processing die according to claim 1, characterized in that The defect discrimination value is positively correlated with the bending degree and negatively correlated with the direction concentration.
9. The defect detection method of a solid thick-walled cross-section profile processing die according to claim 1, characterized in that, The method for screening oxidation defects and crack defects through defect discrimination values is as follows: For all irregular-shaped regions, calculate their corresponding defect discrimination values. Obtain the optimal threshold by calculating the between-class variance through the Otsu thresholding method. Determine the irregular-shaped regions with defect discrimination values greater than or equal to the optimal threshold as crack regions, and record the irregular-shaped regions with defect discrimination values less than the optimal threshold as oxidation regions.
10. A method for defect detection of a processing die for a solid thick-walled section profile as described in claim 1, characterized in that, The method for training a defect detection model by using the two types of defect markings through a network is as follows: Annotate the images containing oxidation regions and crack regions, and perform model training through the U-net algorithm, in which a spatial attention mechanism is introduced; the loss function during training is the Dice loss and the cross-entropy loss; the Adam algorithm is used during the optimization process, and a defect detection model is obtained through a preset number of iterations.
Citation Information
Patent Citations
Construction method of leaf image recognition model
CN111860567A
Paper product printing defect detection method
CN117541588A
PE pipe crack defect detection method and system
CN117593300A
Bearing defect detection method and system based on computer vision
CN118799706A
Welding quality comprehensive evaluation method and system
CN119672025A
Cited By
Visual-assisted screw cleaning quality visual quality inspection method
CN120543561A