A cutting workpiece defect detection method and system based on image feature feedback

By building a hardware system and optimizing the inspection process, the problems of visual blind spots and feature extraction difficulties in the inspection of cut workpieces have been solved, enabling efficient and accurate defect detection of complex workpieces and adapting to complex working conditions.

CN120747040BActive Publication Date: 2025-11-28苏州艾克夫电子有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511151847.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2025-11-28
Estimated Expiration
2045-08-18

AI Technical Summary

Technical Problem

Existing methods for detecting defects in machined workpieces are not adaptable to workpieces with complex shapes. Image acquisition is prone to visual blind spots, and uneven lighting makes it difficult to extract defect features. It is difficult to cover the entire area to be detected, and the feature extraction is not targeted enough, leading to false detections or missed detections.

Method used

By acquiring the process characteristics of the workpiece, a hardware system is built, image acquisition parameters and feature extraction dimensions are initialized, adaptive filtering and the CLAHE algorithm are used to enhance contrast, edge segmentation is used to extract the ROI, the Relief-F algorithm is used to filter features, an SVM model is constructed for defect detection, and the detection process is optimized through feedback signals.

Benefits of technology

It achieves full coverage inspection of complex workpieces, reduces false detections and missed detections, improves the accuracy and efficiency of inspection, adapts to complex working conditions, and maintains stable inspection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747040B_ABST
    Figure CN120747040B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on image feature feedback's cutting workpiece defect detection method and system, it is related to image processing technical field, the method includes: obtaining cutting workpiece process characteristics, constructs preset defect type library, builds hardware system and initializes parameter;Synchronous acquisition multi-view original image, storage and association mark information;Original image is denoised, contrast is enhanced, and region of interest ROI is extracted;Texture, shape, edge and gray scale features are extracted from ROI, and the optimal feature subset is obtained by Relief-F algorithm screening;It is input into SVM model reasoning, and effective defect detection result is screened;Evaluation index is calculated and feedback signal is generated, and iteration optimization is adjusted after parameter.The system includes acquisition, main control, data processing and display module.The application improves the precision, efficiency and long-term adaptability of complex cutting workpiece defect detection through the precise design and closed-loop feedback of whole process, meets the industrial quality control demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a method and system for detecting defects in cut workpieces based on image feature feedback. Background Technology

[0002] In modern manufacturing, machining, as one of the core processes for workpiece forming, directly determines the performance, reliability, and service life of products. Especially in high-end fields such as aerospace, automotive manufacturing, and precision instruments, defects on the surface and inside of machined workpieces (such as cracks, burrs, and dimensional deviations) can lead to serious safety hazards and economic losses. With the development of intelligent manufacturing, traditional defect detection methods relying on manual visual inspection are no longer sufficient to meet the demands of high-efficiency, high-precision, and automated production. Machine vision-based inspection technology has become the mainstream trend due to its advantages such as non-contact operation, high speed, and quantifiability. Among these, image feature feedback-based detection methods, by extracting key features from workpiece images and forming a closed-loop optimization mechanism, can dynamically adapt to complex working conditions, further improving detection stability. Therefore, they have significant application value in the quality control of machined workpieces.

[0003] Existing methods and systems for detecting defects in machined workpieces are not adaptable to workpieces with complex shapes (such as deep cavities, multi-curved surfaces, and porous structures). Image acquisition is prone to visual blind spots, and uneven illumination makes it difficult to extract defect features, making it difficult to cover the entire area to be detected. At the same time, the feature extraction is not targeted enough, often relying on a single or limited feature dimension (such as focusing only on texture or shape features), which is insufficient in distinguishing between different types of defects (such as micro-cracks and macro-burrs), and is prone to false detections or missed detections. Therefore, there is a need to provide a method and system for detecting defects in machined workpieces based on image feature feedback to solve the above-mentioned problems. Summary of the Invention

[0004] To address the aforementioned technical problems, this paper provides a method and system for detecting defects in machined workpieces based on image feature feedback. This technical solution solves the problems of insufficient adaptability of existing methods and systems for detecting defects in machined workpieces with complex shapes (such as deep cavities, multi-curved surfaces, and porous structures) in the background art, the tendency for visual blind spots to appear in image acquisition, and the difficulty in extracting defect features due to uneven illumination, making it difficult to cover the entire area to be detected. At the same time, the feature extraction is not targeted enough, often relying on a single or limited feature dimension (such as focusing only on texture or shape features), and has insufficient differentiation between different types of defects (such as micro-cracks and macro-burrs), which easily leads to false detections or missed detections.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A method for detecting defects in machined workpieces based on image feature feedback, comprising:

[0007] The process characteristics of the workpiece are obtained, a preset defect type library is constructed simultaneously, and a hardware system including an acquisition module, mechanical structure and computing unit is built. Based on the performance parameters of the hardware system and the defect type characteristics, the image acquisition parameters, preprocessing parameters, feature extraction dimensions and detection model thresholds are initialized.

[0008] Based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system, the original images of the cutting workpiece are acquired synchronously from multiple perspectives. According to the acquisition time of the original image and the workpiece ID, the original image is stored in the database and associated with the annotation information.

[0009] Based on the original images stored in the database, an adaptive filtering algorithm is used to denoise the original images to obtain a denoised image. According to the gray-level distribution characteristics of the denoised image, the CLAHE algorithm is used to enhance the image contrast to obtain an enhanced image. Then, an edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece.

[0010] Based on the extracted Region of Interest (ROI), texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used to filter features and obtain the optimal feature subset.

[0011] The optimal feature subset is input into the detection model for inference, and the preliminary detection results of the defects are output, including the location coordinates, type and confidence of the defects. A preset defect confidence threshold is set, and the preliminary detection results are filtered to obtain the effective defect detection results.

[0012] Determine the evaluation indicators, compare them with the defect confidence threshold, locate the problematic links in the detection process, and generate corresponding feedback signals.

[0013] Based on the generated feedback signal, the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters are adjusted respectively. Based on the adjusted parameters, the process from image acquisition to defect detection and classification is repeated to output the final detection result and achieve iterative optimization of the detection model and feature extraction method.

[0014] In an optional embodiment, the steps of acquiring the cutting workpiece process characteristics, simultaneously constructing a preset defect type library, and building a hardware system including an acquisition module, mechanical structure, and computing unit, and initializing image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds based on the performance parameters of the hardware system and defect type characteristics, specifically include:

[0015] Obtain the machining process characteristics of the workpiece and call the specific definitions and characteristic parameters of surface defects, dimensional defects and morphological defects from the preset defect type library;

[0016] Determine the performance requirements of the acquisition module, and build an image acquisition subsystem using an industrial camera, a lens adapted to the workpiece size, and a coaxial light source;

[0017] Based on the size and shape complexity of the workpiece, a workpiece positioning stage with rotation / translation axes and a triggering device linked with the production line are designed to construct a mechanical structure subsystem. The angular accuracy of the rotation axis meets α≤0.1°, and the displacement accuracy of the translation axis meets β≤0.01mm.

[0018] Based on the real-time requirements of image processing and model inference, GPU servers are configured as computing units to ensure that their floating-point operation capability is ≥10 TFLOPS;

[0019] Based on the performance parameters of the hardware system, initialize the image acquisition parameters, including: exposure time t0, which is calculated according to the reflectivity of the workpiece surface as t0=k×(1 / ρ), where k is the illumination coefficient, ρ is the surface reflectivity, and the value range is 0.2≤ρ≤0.8. The gain g0 is set to the initial value of 1.0.

[0020] Based on the scale range of the defect characteristics, initialize the filter window size s0 in the preprocessing parameters, satisfying s0=2×floor (d / 2)+1, where d is the estimated diameter of the minimum defect, and floor (・) is the floor function.

[0021] Based on the feature dimension of the defect, the feature extraction dimension m0 is initialized, which includes the number of texture features m1, the number of shape features m2, the number of edge features m3 and the number of grayscale features m4, satisfying m0=m1+m2+m3+m4, and m1≥5, m2≥3, m3≥2, m4≥2.

[0022] The initial confidence threshold θ0 = 0.8 is set for the detection model to initially screen the defect detection results.

[0023] In an optional embodiment, based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system, the original images of the workpiece being cut are synchronously acquired from multiple perspectives. According to the acquisition time of the original images and the workpiece ID, the original images are stored in a database and associated with annotation information. Specifically, this includes:

[0024] Based on the cycle time T of the production line, the interval time Δt=T for image acquisition is set by the triggering device to ensure synchronization with the workpiece conveying rhythm;

[0025] When the workpiece arrives at the inspection station, the triggering device sends a trigger signal to the acquisition module to start the multi-view image acquisition process;

[0026] The rotating shaft in the control mechanical structure subsystem drives the workpiece to rotate at an angle θ. iImages are acquired at points i × (360° / n), where i = 1, 2, ..., n, and n is the number of viewpoints, satisfying 3 ≤ n ≤ 6;

[0027] At each viewpoint, the industrial camera acquires the original image according to the initial exposure time t0 and gain g0, and the image format is set to BMP or TIFF to preserve the original pixel information.

[0028] During the collection process, through The image sharpness evaluation index Q is monitored in real time, where For the image in The gray value at point Q < Q min At that time, the exposure time t = t0 + Δt is automatically adjusted until Q ≥ Q. min Q min Set a preset resolution threshold;

[0029] The acquired multi-view raw images are named according to the naming rule of workpiece ID - view number - acquisition time;

[0030] Based on the database storage specifications, the original images are stored in a distributed database, and an index is established to associate the workpiece ID with the image file path.

[0031] Add annotation information to each original image, including the material of the workpiece, the type of processing technology, the tool model, the cutting parameters, and the ambient temperature and humidity at the time of acquisition, to form complete image metadata.

[0032] In an optional embodiment, the original image stored in the database is denoised using an adaptive filtering algorithm to obtain a denoised image. Based on the grayscale distribution characteristics of the denoised image, the image contrast is enhanced using the CLAHE algorithm to obtain an enhanced image. Then, an edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece, specifically including:

[0033] Read the original image I from the database and calculate the noise type judgment index N of the image;

[0034] The formula for calculating the noise type judgment index N is as follows: The median (・) function is used to calculate the median. When N < N1, it is considered as slight noise. When N ≥ N1, it is considered as impulse noise. N1 is a preset noise threshold.

[0035] For minor noise, a Gaussian filtering algorithm is used for noise reduction: the filtering kernel function is... , where σ is the Gaussian standard deviation, with a value of σ = 0.5 × s0, and s0 is the initial filter window size, resulting in a denoised image I1 = I * G, where * represents convolution operation;

[0036] If the noise is impulse, a median filtering algorithm can be used for denoising.

[0037] The denoised image I1(x,y) = median (I (xs:x+s,ys:y+s)), where s = floor (s0 / 2), is obtained.

[0038] Calculate the gray-level histogram H(k) of the denoised image I1, k=0,1,...,255, where H(k) is the number of pixels with a gray-level value of k;

[0039] If the image grayscale distribution is concentrated, the CLAHE algorithm is used to enhance contrast, and the cumulative distribution function is calculated. ,in This represents the total number of pixels in the image.

[0040] The enhanced grayscale value k' = floor (255 × CDF (k)) is used to obtain the enhanced image I2;

[0041] If the image has insufficient local contrast, the CLAHE algorithm is used to enhance the contrast. The image is divided into 8×8 sub-blocks, and a histogram is calculated for each sub-block and then truncated. The truncation threshold T = α × mean (H (k)), where α is an adjustment coefficient with a value of 1.0 ≤ α ≤ 3.0, and mean (・) is the mean function. The enhanced image I2 is obtained by stitching the sub-blocks together through bilinear interpolation.

[0042] The OTSU threshold segmentation algorithm is used to separate the background of the enhanced image I2, and the inter-class variance is calculated: ,in , These represent the pixel ratios of the foreground and background, respectively. , The image is divided into foreground and background by finding the threshold t corresponding to the maximum inter-class variance, based on the mean gray levels of the foreground and background respectively.

[0043] Combining edge segmentation algorithms, the Canny operator is used to extract the edge contours of the foreground region;

[0044] Among them, the high threshold T for edge detection H =0.3×max(G), low threshold T L =0.15×max(G), where G is the image gradient magnitude. The region of interest (ROI) of the workpiece is determined by the edge contour. The coordinate range of the ROI is (xmin, xmax, ymin, ymax).

[0045] In an optional embodiment, based on the extracted region of interest (ROI), texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used for feature selection to obtain the optimal feature subset, specifically including:

[0046] Within the Region of Interest (ROI), texture features are extracted, and texture parameters are calculated using the Gray-Level Co-occurrence Matrix (GLCM). For distance d=1, angle... GLCM matrix Calculate energy characteristics Entropy features Contrast characteristics Correlation characteristics ,in , The mean of rows and columns. , The standard deviation of rows and columns;

[0047] The LBP algorithm is used to extract local binary pattern features, and the texture feature vector F1=[E,Ent,Con,Cor,...] is obtained by statistically analyzing the LBP histogram.

[0048] Extract shape features, extract contours of candidate defect regions within the ROI, and then... Calculate the area of ​​the contour, where R is the defect region;

[0049] pass Determine the perimeter of the contour, where x(i) and y(i) are the coordinates of the contour points, and m is the number of contour points;

[0050] The circularity of the profile is determined by C=4πA / L², and the aspect ratio of the profile is determined by R=W / H, where W and H are the width and height of the circumscribed rectangle of the defect, respectively, thus obtaining the shape feature vector F2=[A,L,C,R,...];

[0051] Extract edge features and apply the Sobel operator to the ROI to calculate the horizontal and vertical gradients. , gradient magnitude gradient direction The edge direction features are obtained by statistically analyzing the gradient direction histogram, and the edge continuity features are calculated. ,in The length of the continuous edge segment. The edge feature vector is obtained by determining the number of edge segments. , The average gradient magnitude. The mode of the gradient direction;

[0052] Extracting grayscale features, through Calculate the mean gray value within the ROI. This represents the number of pixels within the ROI.

[0053] pass Determine the grayscale variance;

[0054] pass Determine the gray-level entropy, where p(k) is the probability of gray-level value k within the ROI, and obtain the gray-level feature vector. ;

[0055] Texture feature F1, shape feature F2, edge feature F3, and grayscale feature F4 are concatenated into a multidimensional feature matrix. The dimension is m0×1, where m0 is the initial feature extraction dimension;

[0056] The Relief-F algorithm is used to calculate the weight w(j) of each feature, and then iteratively updated: ;in, , For samples of the same type, the nearest neighbor sample For the nearest neighbor samples of the different class, n is the number of samples, p(c) is the prior probability of class c, and the selection weight w(j)≥w min The optimal feature subset is composed of features, w min This is the weight threshold.

[0057] In an optional embodiment, the step of inputting the optimal feature subset into the detection model for inference and outputting preliminary defect detection results, including the defect's location coordinates, type, and confidence level, setting a preset defect confidence threshold, and filtering the preliminary detection results to obtain valid defect detection results specifically includes:

[0058] Based on the optimal feature subset X' obtained by screening, a detection sample set is constructed, where positive samples are feature vectors containing defects and negative samples are feature vectors without defects. The ratio of the number of samples satisfies 1:1≤positive samples:negative samples≤3:1.

[0059] The SVM model is selected for training, and the kernel function is constructed as follows: K (x,y)=exp (-γ||xy||²); where γ is the kernel parameter. The optimal parameters C and γ are determined by cross-validation, where C is the penalty coefficient, with a value of 1≤C≤100 and γ has a value of 0.01≤γ≤10.

[0060] The classification hyperplane is obtained by training the SVM model: ;in, For Lagrange multipliers, For sample labels, For bias terms, The number of support vectors;

[0061] The optimal feature subset X' is input into the trained SVM model, and the predicted defect category is output. The decision value d and the confidence level c = 1 / (1 + exp (-d)) are used to obtain the preliminary detection results;

[0062] Extract the confidence level c from the preliminary detection results and compare it with the preset defect confidence threshold θ0;

[0063] When c≥θ0, it is determined to be a valid defect, and the location coordinates, type and confidence information of the defect are retained;

[0064] When c < θ0, it is judged as an invalid defect and is removed;

[0065] Summarize the information of all valid defects to form a list of valid defect detection results. Each defect entry includes a unique identifier ID, location coordinates (x, y), type label t, size parameters (s1, s2), and confidence level c.

[0066] Furthermore, a defect detection system for cut workpieces based on image feature feedback is proposed to implement any of the detection methods described above, including:

[0067] The acquisition module is used to acquire the process characteristics of the workpiece being cut, and simultaneously build a preset defect type library. It is used to acquire original images of the workpiece being cut from multiple perspectives based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system.

[0068] The main control module is used to initialize image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds based on the performance parameters of the hardware system and the characteristics of the defect type. It is used to input the optimal feature subset into the detection model for inference, output the preliminary detection results of the defects, including the location coordinates, type, and confidence level of the defects, preset the defect confidence threshold, filter the preliminary detection results to obtain valid defect detection results, determine the evaluation index, compare the evaluation index with the defect confidence threshold, locate the problematic links in the detection process, generate corresponding feedback signals, and adjust the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters based on the generated feedback signals. According to the adjusted parameters, the process from image acquisition to defect detection and classification is repeated to output the final detection results and realize the iterative optimization of the detection model and feature extraction method.

[0069] The data processing module is used to store the original image in a database and associate it with annotation information based on the acquisition time and workpiece ID of the original image. It then uses an adaptive filtering algorithm to denoise the original image stored in the database to obtain a denoised image. Furthermore, it uses the CLAHE algorithm to enhance the image contrast based on the grayscale distribution characteristics of the denoised image to obtain an enhanced image. Next, it uses an edge segmentation algorithm to extract the region of interest (ROI) of the workpiece. Based on the extracted ROI, it extracts texture features, shape features, edge features, and grayscale features. Finally, it uses the Relief-F algorithm to filter features based on the extracted multidimensional features to obtain the optimal feature subset.

[0070] The display module is used to present the process and results of defect detection of the cut workpiece to the user.

[0071] In an optional embodiment, the acquisition module includes:

[0072] The first acquisition unit is used to acquire the process characteristics of the cutting workpiece and simultaneously build a preset defect type library.

[0073] The second acquisition unit is used to synchronously acquire original images of the workpiece from multiple perspectives based on initialized image acquisition parameters and the acquisition module and triggering device in the hardware system.

[0074] In an optional embodiment, the main control module includes:

[0075] An initialization management unit is used to initialize image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds based on the performance parameters and defect type characteristics of the hardware system.

[0076] The detection unit is used to input the optimal feature subset into the detection model for inference, output the preliminary detection results of the defects, including the location coordinates, type and confidence level of the defects, preset the defect confidence level threshold, and filter the preliminary detection results to obtain the effective defect detection results.

[0077] The feedback unit is used to determine the evaluation index, compare the evaluation index with the defect confidence threshold, locate the problem link in the detection process, and generate the corresponding feedback signal.

[0078] An optimization unit is used to adjust the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters based on the generated feedback signal. According to the adjusted parameters, the process from image acquisition to defect detection and classification is repeated to output the final detection result and realize the iterative optimization of the detection model and feature extraction method.

[0079] In an optional embodiment, the data processing module includes:

[0080] A data storage unit is used to store the original image in a database and associate it with annotation information based on the acquisition time of the original image and the workpiece ID;

[0081] A preprocessing unit is used to perform denoising processing on the original image based on the original image stored in the database using an adaptive filtering algorithm to obtain a denoised image.

[0082] The feature processing unit is used to enhance the image contrast using the CLAHE algorithm based on the grayscale distribution characteristics of the denoised image to obtain an enhanced image. Then, the edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece. Based on the extracted ROI, texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used to filter features and obtain the optimal feature subset.

[0083] Compared with the prior art, the beneficial effects of the present invention are:

[0084] This solution proposes a defect detection method for machined workpieces based on image feature feedback. By acquiring the process characteristics of the machined workpiece and building a suitable hardware system, and initializing key parameters such as image acquisition and preprocessing, it achieves a precise match between the detection system and the workpiece characteristics. This ensures that both the hardware and parameter settings meet the defect detection requirements of the machined workpiece, providing a stable and reliable foundation for subsequent full-process inspection. By synchronously acquiring original images from multiple perspectives based on the production line cycle time, dynamically adjusting the exposure time based on the sharpness, and standardizing image naming and storage, it achieves high efficiency and completeness in image acquisition, covering the complex surface of the workpiece while retaining the original pixel information, providing high-quality data support for defect feature extraction.

[0085] This proposal presents a method for detecting defects in machined workpieces based on image feature feedback. By distinguishing noise types and employing targeted filtering algorithms, combined with the CLAHE algorithm to enhance contrast, and then using OTSU segmentation and the Canny operator to extract the ROI, it achieves effective elimination of image noise and significant enhancement of defect features. It accurately focuses on the workpiece detection area, reduces the impact of background interference on subsequent analysis, and achieves comprehensive capture and efficient simplification of defect features by extracting four types of features: texture, shape, edge, and grayscale, and using the Relief-F algorithm to select the optimal subset. This method covers the multiple attributes of defects and eliminates redundant information, thereby improving the feature's ability to distinguish defects.

[0086] This solution proposes a defect detection method for machined workpieces based on image feature feedback. By constructing a balanced sample set to train an SVM model and combining it with a confidence threshold to filter the detection results, it achieves accurate identification and effective judgment of defects, reducing misjudgments caused by sample imbalance. At the same time, it retains multi-dimensional information about defects, providing complete data for subsequent analysis. By calculating indicators such as accuracy, false detection rate, and false negative rate and generating targeted feedback signals, it achieves scientific evaluation of detection results and precise problem localization, providing a clear direction for system optimization and promoting continuous improvement of the detection process. By analyzing the feedback signals, it dynamically adjusts parameters such as image acquisition, feature extraction, and model training, and ensures that the indicators meet the standards through iterative verification. This achieves closed-loop iterative optimization of the detection system, enabling the system to adapt to complex working conditions and maintain stable detection performance over a long period of time. Attached Figure Description

[0087] Figure 1 This is a flowchart of a method for detecting defects in cut workpieces based on image feature feedback proposed in this invention;

[0088] Figure 2 This is a flowchart of the data initialization process in this invention;

[0089] Figure 3 This is a flowchart of the image acquisition process in this invention;

[0090] Figure 4 This is a system framework diagram of a cutting workpiece defect detection system based on image feature feedback proposed in this invention. Detailed Implementation

[0091] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0092] Reference Figure 1 - Figure 4 As shown, a method for detecting defects in machined workpieces based on image feature feedback includes:

[0093] The process characteristics of the workpiece are obtained, a preset defect type library is constructed simultaneously, and a hardware system including an acquisition module, mechanical structure and computing unit is built. Based on the performance parameters of the hardware system and the defect type characteristics, the image acquisition parameters, preprocessing parameters, feature extraction dimensions and detection model thresholds are initialized.

[0094] Based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system, the original images of the cutting workpiece are acquired synchronously from multiple perspectives. According to the acquisition time of the original image and the workpiece ID, the original image is stored in the database and associated with the annotation information.

[0095] Based on the original images stored in the database, an adaptive filtering algorithm is used to denoise the original images to obtain a denoised image. According to the gray-level distribution characteristics of the denoised image, the CLAHE algorithm is used to enhance the image contrast to obtain an enhanced image. Then, an edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece.

[0096] Based on the extracted Region of Interest (ROI), texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used to filter features and obtain the optimal feature subset.

[0097] The optimal feature subset is input into the detection model for inference, and the preliminary detection results of the defects are output, including the location coordinates, type and confidence of the defects. A preset defect confidence threshold is set, and the preliminary detection results are filtered to obtain the effective defect detection results.

[0098] Determine the evaluation indicators, compare them with the defect confidence threshold, locate the problematic links in the detection process, and generate corresponding feedback signals.

[0099] Based on the generated feedback signal, the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters are adjusted respectively. Based on the adjusted parameters, the process from image acquisition to defect detection and classification is repeated to output the final detection result and achieve iterative optimization of the detection model and feature extraction method.

[0100] Furthermore, the process characteristics of the workpiece being cut are acquired, a pre-defined defect type library is simultaneously constructed, and a hardware system including an acquisition module, mechanical structure, and computing unit is built. Based on the performance parameters of the hardware system and the characteristics of the defect types, image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds are initialized, specifically including:

[0101] Obtain the machining process characteristics of the workpiece and call the specific definitions and characteristic parameters of surface defects, dimensional defects and morphological defects from the preset defect type library;

[0102] Determine the performance requirements of the acquisition module, and build an image acquisition subsystem using an industrial camera, a lens adapted to the workpiece size, and a coaxial light source;

[0103] Based on the size and shape complexity of the workpiece, a workpiece positioning stage with rotation / translation axes and a triggering device linked with the production line are designed to construct a mechanical structure subsystem. The angular accuracy of the rotation axis meets α≤0.1°, and the displacement accuracy of the translation axis meets β≤0.01mm.

[0104] Based on the real-time requirements of image processing and model inference, GPU servers are configured as computing units to ensure that their floating-point operation capability is ≥10 TFLOPS;

[0105] Based on the performance parameters of the hardware system, initialize the image acquisition parameters, including: exposure time t0, calculated as t0 = k×(1 / ρ) according to the surface reflectivity of the workpiece, where k is the light coefficient and ρ is the surface reflectivity, with the value range 0.2 ≤ ρ ≤ 0.8, and the gain g0 is set to the initial value of 1.0;

[0106] According to the scale range of the defect features, initialize the filtering window size s0 in the preprocessing parameters, satisfying s0 = 2×floor (d / 2)+1, where d is the estimated diameter of the smallest defect and floor (・) is the floor function;

[0107] Based on the feature dimensions of the defects, initialize the feature extraction dimension m0, including the number of texture features m1, the number of shape features m2, the number of edge features m3, and the number of grayscale features m4, satisfying m0 = m1 + m2 + m3 + m4, and m1 ≥ 5, m2 ≥ 3, m3 ≥ 2, m4 ≥ 2;

[0108] Set the initial confidence threshold θ0 = 0.8 of the detection model for preliminary screening of the defect detection results.

[0109] Specifically, obtain the process characteristics of the machined workpiece, synchronously construct a preset defect type library, and build a hardware system including an acquisition module, a mechanical structure, and a computing unit. According to the performance parameters of the hardware system and the characteristics of the defect types, initialize the image acquisition parameters, preprocessing parameters, feature extraction dimension, and detection model threshold, realizing the comprehensive construction of the defect detection system for the machined workpiece and the initialization of key parameters, laying a solid foundation for the subsequent efficient and accurate defect detection process. In terms of system construction, based on the process characteristics of the machined workpiece and the preset defect type library, obtain the definitions and characteristic parameters of various defects such as surface, size, and morphology, and then clarify the required performance of the image acquisition module to build a suitable image acquisition subsystem; based on the size and shape complexity of the workpiece, design a mechanical structure subsystem with high-precision rotation / translation axes and construct a triggering device that can be linked with the production line; at the same time, configure a GPU server with powerful floating-point computing power as the computing unit according to the real-time requirements, realizing the full-range construction of the hardware system from image acquisition, workpiece positioning to data operation and processing.

[0110] The advantages are as follows: In terms of parameter initialization, image acquisition parameters are scientifically initialized based on hardware performance. For example, the exposure time is accurately calculated based on the reflectivity of the workpiece surface, and the gain is set reasonably. The size of the preprocessing filter window is initialized according to the defect feature scale to ensure effective handling of defects of different scales. Based on the defect feature dimension, the feature extraction dimension is reasonably planned, covering multiple features such as texture, shape, edge, and grayscale, and the initial confidence threshold of the detection model is set. The implementation of these functions has significant advantages, enabling the entire detection system to be highly adaptable to the characteristics and detection requirements of the workpiece being cut, improving image acquisition quality, enhancing the accuracy and comprehensiveness of defect feature extraction, optimizing the initial screening effect of the detection model, thereby greatly improving the accuracy and efficiency of defect detection, reducing the probability of false detection and missed detection, and effectively guaranteeing the quality inspection of the workpiece being cut.

[0111] Furthermore, based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system, original images of the workpiece being cut are simultaneously acquired from multiple perspectives. According to the acquisition time of the original images and the workpiece ID, the original images are stored in the database and associated with annotation information, specifically including:

[0112] Based on the cycle time T of the production line, the interval time Δt=T for image acquisition is set by the triggering device to ensure synchronization with the workpiece conveying rhythm;

[0113] When the workpiece arrives at the inspection station, the triggering device sends a trigger signal to the acquisition module to start the multi-view image acquisition process;

[0114] The rotating shaft in the control mechanical structure subsystem drives the workpiece to rotate at an angle θ. i Images are acquired at points i × (360° / n), where i = 1, 2, ..., n, and n is the number of viewpoints, satisfying 3 ≤ n ≤ 6;

[0115] At each viewpoint, the industrial camera acquires the original image according to the initial exposure time t0 and gain g0, and the image format is set to BMP or TIFF to preserve the original pixel information.

[0116] During the collection process, through The image sharpness evaluation index Q is monitored in real time, where For the image in The gray value at point Q < Q min At that time, the exposure time t = t0 + Δt is automatically adjusted until Q ≥ Q. min Q min Set a preset resolution threshold;

[0117] The acquired multi-view raw images are named according to the naming rule of workpiece ID - view number - acquisition time;

[0118] Based on the database storage specifications, the original images are stored in a distributed database, and an index is established to associate the workpiece ID with the image file path.

[0119] Add annotation information to each original image, including the material of the workpiece, the type of processing technology, the tool model, the cutting parameters, and the ambient temperature and humidity at the time of acquisition, to form complete image metadata.

[0120] Specifically, it achieves precise control and standardized management of the entire process of image acquisition for cutting workpieces. Regarding acquisition timing, based on the production line cycle time, the image acquisition interval is precisely controlled by a triggering device, ensuring that the acquisition rhythm is synchronized with workpiece conveying and that acquisition occurs as soon as the workpiece arrives. For multi-view acquisition, the rotating axis of the mechanical structure subsystem is used to acquire images at specific angular intervals (θ). i =i×(360° / n), 3≤n≤6) Rotate the workpiece to acquire multi-dimensional perspective images, covering different surface areas of the workpiece; when the acquisition parameters are executed, the industrial camera works according to the initial exposure time t0 and gain g0, retaining the original pixel information in BMP or TIFF format, and passing the sharpness evaluation index. The image grayscale value (I(x,y)) is monitored in real time, and the exposure time is dynamically adjusted to ensure image clarity. In the image management stage, the original images from multiple perspectives are named according to rules, stored in a distributed database, and an association index between workpiece ID and path is established. The images are also supplemented with annotation information such as material, process, cutting parameters, and environmental data to build a complete metadata system.

[0121] Its advantages lie in its focus on accurate data acquisition, guaranteed image quality, and standardized data. The acquisition rhythm is synchronized with the production line, utilizing triggering devices and cycle time adaptation to avoid missed or incorrect acquisitions, meeting the high-efficiency inspection needs of industrial production lines. Multi-view acquisition combined with mechanical rotation control overcomes the limitations of a single viewpoint, covering complex workpiece surfaces and providing comprehensive image data for subsequent defect detection, reducing the risk of missed detections due to missing viewpoints. Regarding image quality, by executing initialization parameters and dynamically adjusting sharpness, it balances the requirements for preserving original information and clear imaging. BMP / TIFF formats retain pixel details, and real-time monitoring and exposure adjustment address interference from workpiece surface reflections and motion blur. Standardized data management, including naming rules, database storage, and metadata annotation, ensures traceable and easily searchable image data, linking it to the entire workpiece process information, aiding in subsequent defect analysis and process optimization, laying the foundation for data interoperability between the inspection system and the production management system, and improving overall quality control efficiency.

[0122] Furthermore, based on the original images stored in the database, an adaptive filtering algorithm is used to denoise the original images, resulting in a denoised image. According to the grayscale distribution characteristics of the denoised image, the CLAHE algorithm is used to enhance the image contrast, resulting in an enhanced image. Then, an edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece, specifically including:

[0123] Read the original image I from the database and calculate the noise type judgment index N of the image;

[0124] The formula for calculating the noise type judgment index N is as follows: The median (・) function is used to calculate the median. When N < N1, it is considered as slight noise. When N ≥ N1, it is considered as impulse noise. N1 is a preset noise threshold.

[0125] For minor noise, a Gaussian filtering algorithm is used for noise reduction: the filtering kernel function is... , where σ is the Gaussian standard deviation, with a value of σ = 0.5 × s0, and s0 is the initial filter window size, resulting in a denoised image I1 = I * G, where * represents convolution operation;

[0126] If the noise is impulse, a median filtering algorithm can be used for denoising.

[0127] The denoised image I1(x,y) = median (I (xs:x+s,ys:y+s)), where s = floor (s0 / 2), is obtained.

[0128] Calculate the gray-level histogram H(k) of the denoised image I1, k=0,1,...,255, where H(k) is the number of pixels with a gray-level value of k;

[0129] If the image grayscale distribution is concentrated, the CLAHE algorithm is used to enhance contrast, and the cumulative distribution function is calculated. ,in This represents the total number of pixels in the image.

[0130] The enhanced grayscale value k' = floor (255 × CDF (k)) is used to obtain the enhanced image I2;

[0131] If the image has insufficient local contrast, the CLAHE algorithm is used to enhance the contrast. The image is divided into 8×8 sub-blocks, and a histogram is calculated for each sub-block and then truncated. The truncation threshold T = α × mean (H (k)), where α is an adjustment coefficient with a value of 1.0 ≤ α ≤ 3.0, and mean (・) is the mean function. The enhanced image I2 is obtained by stitching the sub-blocks together through bilinear interpolation.

[0132] The OTSU threshold segmentation algorithm is used to separate the background of the enhanced image I2, and the inter-class variance is calculated:

[0133] ,in , These represent the pixel ratios of the foreground and background, respectively. , The image is divided into foreground and background by finding the threshold t corresponding to the maximum inter-class variance, based on the mean gray levels of the foreground and background respectively.

[0134] Combining edge segmentation algorithms, the Canny operator is used to extract the edge contours of the foreground region;

[0135] Among them, the high threshold T for edge detection H =0.3×max(G), low threshold T L =0.15×max(G), where G is the image gradient magnitude. The region of interest (ROI) of the workpiece is determined by the edge contour. The coordinate range of the ROI is (xmin, xmax, ymin, ymax).

[0136] Specifically, based on the original images stored in the database, an adaptive filtering algorithm is used to denoise the original images to obtain denoised images. According to the gray-level distribution characteristics of the denoised images, the CLAHE algorithm is used to enhance the image contrast to obtain enhanced images. Then, an edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece. This realizes the preprocessing of the workpiece image and the extraction of the region of interest (ROI). The core is to eliminate interference, enhance defect features and focus on the detection target through multi-step processing. Specifically, the process includes: first, reading the original image from the database; then, distinguishing between slight noise and impulse noise by calculating the noise type judgment index N (based on the sum of differences between pixel gray levels and the median); and performing targeted denoising using Gaussian filtering (based on a specific kernel function and standard deviation) and median filtering (based on the initial window size) to obtain a denoised image; next, using gray-level histogram analysis, images with concentrated gray-level distribution or insufficient local contrast are enhanced using the CLAHE algorithm (the former directly calculates the cumulative distribution function, while the latter divides the image into sub-blocks and truncates the histogram) to generate an enhanced image; finally, using the OTSU threshold segmentation algorithm (which determines the optimal threshold by calculating the inter-class variance) to separate the foreground and background, and combining this with the Canny operator (based on high and low thresholds of gradient magnitude) to extract edge contours, ultimately determining the ROI coordinate range of the workpiece.

[0137] The advantages are as follows: First, it achieves both targeted and accurate preprocessing, laying a high-quality data foundation for subsequent feature extraction and defect detection. Second, it employs adaptive denoising, using a matching filtering algorithm based on noise type to preserve edge details (median filtering for impulse noise) while smoothing high-frequency interference (Gaussian filtering for minor noise), avoiding feature loss caused by a single denoising method. Third, it intelligently enhances contrast; the CLAHE algorithm combines global and local processing logic, improving the overall concentrated grayscale distribution while addressing insufficient local contrast through sub-block truncation and interpolation, effectively amplifying the grayscale difference between defects (such as cracks and burrs) and normal areas. Fourth, it accurately locates the ROI; the combination of OTSU segmentation and Canny edge detection efficiently separates the workpiece from the background, eliminating interference from fixtures, worktables, etc., ensuring that subsequent analysis focuses on the effective area and reducing the impact of redundant information on detection accuracy.

[0138] Furthermore, based on the extracted Region of Interest (ROI), texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used for feature selection to obtain the optimal feature subset, specifically including:

[0139] Within the Region of Interest (ROI), texture features are extracted, and texture parameters are calculated using the Gray-Level Co-occurrence Matrix (GLCM). For distance d=1, angle... GLCM matrix Calculate energy characteristics Entropy features Contrast characteristics Correlation characteristics ,in , The mean of rows and columns. , The standard deviation of rows and columns;

[0140] The LBP algorithm is used to extract local binary pattern features, and the texture feature vector F1=[E,Ent,Con,Cor,...] is obtained by statistically analyzing the LBP histogram.

[0141] Extract shape features, extract contours of candidate defect regions within the ROI, and then... Calculate the area of ​​the contour, where R is the defect region;

[0142] pass Determine the perimeter of the contour, where x(i) and y(i) are the coordinates of the contour points, and m is the number of contour points;

[0143] The circularity of the profile is determined by C=4πA / L², and the aspect ratio of the profile is determined by R=W / H, where W and H are the width and height of the circumscribed rectangle of the defect, respectively, thus obtaining the shape feature vector F2=[A,L,C,R,...];

[0144] Extract edge features and apply the Sobel operator to the ROI to calculate the horizontal and vertical gradients. , gradient magnitude gradient direction The edge direction features are obtained by statistically analyzing the gradient direction histogram, and the edge continuity features are calculated. ,in The length of the continuous edge segment. The edge feature vector is obtained by determining the number of edge segments. , The average gradient magnitude. The mode of the gradient direction;

[0145] Extracting grayscale features, through Calculate the mean gray value within the ROI. This represents the number of pixels within the ROI.

[0146] pass Determine the grayscale variance;

[0147] pass Determine the gray-level entropy, where p(k) is the probability of gray-level value k within the ROI, and obtain the gray-level feature vector. ;

[0148] Texture feature F1, shape feature F2, edge feature F3, and grayscale feature F4 are concatenated into a multidimensional feature matrix. The dimension is m0×1, where m0 is the initial feature extraction dimension;

[0149] The Relief-F algorithm is used to calculate the weight w(j) of each feature, and then iteratively updated: ;in, , For samples of the same type, the nearest neighbor sample For the nearest neighbor samples of the different class, n is the number of samples, p(c) is the prior probability of class c, and the selection weight w(j)≥w min The optimal feature subset is composed of features, w min This is the weight threshold.

[0150] Specifically, this step achieves comprehensive extraction and optimized screening of defect features in the cut workpiece. The core is to extract features from the Region of Interest (ROI) that effectively distinguish between defective and normal areas, and then use algorithms to select the most distinctive feature subset. Specifically, this includes: within the ROI, calculating texture features such as energy, entropy, contrast, and correlation using the Gray-Level Co-occurrence Matrix (GLCM), and extracting local binary pattern features using the LBP algorithm to form a texture feature vector; extracting shape features such as area, perimeter, roundness, and aspect ratio using contour extraction to form a shape feature vector; obtaining gradient information using the Sobel operator and calculating edge features such as edge direction and continuity to form an edge feature vector; extracting gray-level features using parameters such as gray-level mean, variance, and entropy to form a gray-level feature vector; concatenating the four types of features into a multi-dimensional feature matrix, and then using the Relief-F algorithm to iteratively calculate the weights of each feature, selecting features with weights greater than or equal to a threshold to form the optimal feature subset.

[0151] The advantages are: comprehensive feature extraction and targeted screening, providing high-quality input for the defect detection model. The feature dimensions are diverse, covering four categories: texture (reflecting surface roughness and uniformity), shape (distinguishing defect geometry), edge (capturing contour features such as cracks and burrs), and grayscale (reflecting regional brightness differences), adaptable to the physical characteristics of different types of defects (such as oxide spots, cracks, and burrs). Meanwhile, algorithms such as GLCM, LBP, and Sobel are highly targeted, accurately capturing subtle defect features (such as the edge continuity of micro-cracks and the aspect ratio of burrs). The Relief-F algorithm iteratively updates feature weights, retaining features highly correlated with defect classification, eliminating redundant information, reducing subsequent model computation, and improving the robustness and accuracy of defect identification.

[0152] Furthermore, the optimal feature subset is input into the detection model for inference, and the preliminary defect detection results are output, including the defect's location coordinates, type, and confidence level. A preset defect confidence threshold is used to filter the preliminary detection results to obtain valid defect detection results, specifically including:

[0153] Based on the optimal feature subset X' obtained by screening, a detection sample set is constructed, where positive samples are feature vectors containing defects and negative samples are feature vectors without defects. The ratio of the number of samples satisfies 1:1≤positive samples:negative samples≤3:1.

[0154] The SVM model is selected for training, and the kernel function is constructed as follows: K (x,y)=exp (-γ||xy||²); where γ is the kernel parameter. The optimal parameters C and γ are determined by cross-validation, where C is the penalty coefficient, with a value of 1≤C≤100 and γ has a value of 0.01≤γ≤10.

[0155] The classification hyperplane is obtained by training the SVM model: ;in, For Lagrange multipliers, For sample labels, For bias terms, The number of support vectors;

[0156] The optimal feature subset X' is input into the trained SVM model, and the predicted defect category is output. The decision value d and the confidence level c = 1 / (1 + exp (-d)) are used to obtain the preliminary detection results;

[0157] Extract the confidence level c from the preliminary detection results and compare it with the preset defect confidence threshold θ0;

[0158] When c≥θ0, it is determined to be a valid defect, and the location coordinates, type and confidence information of the defect are retained;

[0159] When c < θ0, it is judged as an invalid defect and is removed;

[0160] Summarize the information of all valid defects to form a list of valid defect detection results. Each defect entry includes a unique identifier ID, location coordinates (x, y), type label t, size parameters (s1, s2), and confidence level c.

[0161] Specifically, this step enables the detection and screening of defects in machined workpieces. The core of this process is to utilize an SVM model to classify and infer the optimal feature subset, outputting valid defect results. Specifically, this includes: constructing a detection sample set based on the optimal feature subset, controlling the ratio of positive (containing defects) to negative (without defects) samples between 1:1 and 3:1; selecting an SVM model, constructing a Gaussian kernel function K(x,y)=exp(-γ||xy||²), and determining the penalty coefficient C (1≤C≤100) and kernel parameter γ (0.01≤γ≤10) through cross-validation, and training to obtain a classification hyperplane; inputting the optimal feature subset into the trained model, outputting the defect prediction category, decision value d, and confidence level c=1 / (1+exp(−d)); filtering the results using a pre-set confidence threshold θ0, retaining valid defects with confidence levels greater than θ0, and eliminating invalid defects, ultimately forming a result list containing defect ID, location, type, size, and confidence level.

[0162] The advantages lie in the pertinence of the detection model and the reliability of the results, providing an accurate basis for defect determination. By controlling the balance of the positive and negative sample ratios, it avoids the bias of the model caused by sample imbalance and improves the sensitivity to defects in recognition; at the same time, the model has strong adaptability. The SVM combined with the Gaussian kernel function can effectively handle the high-dimensional feature space, optimize the parameters through cross-validation, and enhance the classification ability for complex defect features (such as multi-class defect mixing scenarios); based on the confidence threshold, the results with low confidence are eliminated to reduce false detections, while retaining the multi-dimensional information (position, type, etc.) of the defects, providing complete data support for subsequent analysis and feedback, and enhancing the practical value of the detection results.

[0163] Furthermore, determine the evaluation metrics, compare the evaluation metrics with the defect confidence threshold, locate the problem links in the detection process, and generate corresponding feedback signals, specifically including:

[0164] Collect the known real defect data in the production line as a benchmark, including the number of real defects, location, type, and size information;

[0165] Based on the effective defect detection results, count the number of real defects detected , that is, the number of cases where the position error between the detection result and the real defect is less than ε and the types are the same, where ε is the position error threshold, satisfying 0.05mm ≤ ε ≤ 0.1mm;

[0166] Count the number of false detected defects , that is, the number of cases where there is no corresponding real defect in the detection result;

[0167] Count the number of missed detected defects ; Calculate the detection accuracy , where Acc ∈ [0, 100%];

[0168] Calculate the false positive rate , where is the total number of detection results;

[0169] Calculate the false negative rate ;

[0170] Furthermore, set the preset thresholds for the evaluation metrics: accuracy threshold Acc0 = 99%, false positive rate threshold FPR0 = 1%, false negative rate threshold FNR0 = 1% (which can be preset by experienced personnel);

[0171] When Acc < Acc0 and FNR ≥ FNR0, analyze the reasons for missed detections. If the missed detected defects are mostly detailed features such as micro cracks, it is determined that the image quality is insufficient, and a feedback signal S1 of "Adjust the image acquisition parameters" is generated;

[0172] When FPR>FPR0, analyze the reasons for false detection. If the false detection is mostly due to insufficient feature discrimination, it is determined that there is redundancy in the feature extraction process, and a feedback signal S2 for "optimizing feature extraction dimension" is generated.

[0173] When the detection accuracy of a specific type of defect is consistently below 80%, it is determined that the detection model has insufficient generalization ability for this type of defect, and a feedback signal S3 is generated to "increase defect sample training".

[0174] When there are duplicate or missed detection areas in the multi-view image, it is determined that the image acquisition view is insufficient, and a feedback signal S4 is generated to "adjust the multi-view acquisition parameters".

[0175] When the preprocessed image still has obvious noise interference in feature extraction, it is determined that the preprocessing parameters are set inappropriately, and a feedback signal S5 for "optimizing preprocessing filter parameters" is generated.

[0176] The generated feedback signals are summarized to form a feedback signal set S={S1,S2,S3,S4,S5}, where each signal contains the problem type, severity, and suggested adjustment direction.

[0177] Specifically, this step achieves quantitative evaluation of the defect detection results of the cut workpiece and generation of targeted feedback signals. The core is to locate the weak links of the system and output optimization instructions by comparing the detection results with real defect data. Specifically, it includes: using the real defect data (quantity, location, type, size) of the production line as a benchmark, statistically analyzing the number of real defects detected (position error ≤ ε and consistent type, ε is 0.05-0.1mm), the number of false detections (detection results without corresponding real defects), and the number of missed detections (real defects not detected); calculating three types of indicators based on the statistical results: accuracy (Acc), false detection rate (FPR), and missed detection rate (FNR), and comparing them with preset thresholds (Acc0=99%, FPR0=1%, ​​FNR0=1%); analyzing the reasons for non-compliance, such as image quality problems corresponding to missed micro-cracks, and insufficient feature discrimination corresponding to false detections, and generating five types of feedback signals, such as adjusting image acquisition parameters (S1), optimizing feature extraction (S2), and increasing sample training (S3), and finally forming a signal set S containing problem types and optimization suggestions.

[0178] The advantages are: the evaluation indicators are quantitative and comprehensive, measuring system performance through multiple dimensions such as accuracy, false positive rate, and false negative rate, avoiding the one-sidedness caused by a single indicator, and the thresholds can be preset by experienced personnel to adapt to the needs of different production scenarios; the feedback signals are highly targeted, and through the correlation analysis between defect types and detection results, the problem is accurately located to specific links such as image acquisition, feature extraction, and model training, providing a clear direction for subsequent parameter adjustments and avoiding blind optimization; a closed-loop quality control is formed, and the dynamic comparison between real defect data and detection results drives the continuous iteration of the system, which is especially suitable for mass production scenarios of complex cutting workpieces, and can effectively reduce production losses caused by false negatives and false negatives.

[0179] Furthermore, based on the generated feedback signal, the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters are adjusted respectively. According to the adjusted parameters, the process from image acquisition to defect detection and classification is repeated, outputting the final detection result and achieving iterative optimization of the detection model and feature extraction method. Specifically, this includes:

[0180] Analyze the feedback signal set S to determine the type and direction of the parameters that need to be adjusted;

[0181] If feedback signal S1 exists (adjust image acquisition parameters), adjust the exposure time according to the grayscale characteristics of the missed defect. ,in The target grayscale mean is... This is the average grayscale value of the currently missed detection area; if the image is blurry, reduce the gain. And increase the light source intensity L1 = L0 × 1.2, where L0 is the initial light source intensity;

[0182] If there is a feedback signal S2 (optimizing the feature extraction dimension), based on the feature weights of the Relief-F algorithm, increase the number of features with weights w(j)≥0.8 and decrease the number of features with weights w(j)<0.2. The adjusted feature extraction dimension m1=m0+Δm, where Δm=2×count(w(j)≥0.8)-count(w(j)<0.2).

[0183] If feedback signal S3 exists (increase defect sample training), collect the defect images and feature data of missed or false detections, expand the training sample set, and the number of new samples meets the requirement. , The original sample size is used; the detection model is updated using transfer learning, the backbone network parameters are frozen, the head network parameters are fine-tuned, the learning rate is set to 1 / 10 of the original learning rate, and the number of training iterations is increased by 50 rounds.

[0184] If feedback signal S4 exists (adjust multi-view acquisition parameters), increase the number of views corresponding to the missed detection area, and adjust the rotation axis angle interval Δθ=360° / (n+Δn). view ), where Δn view To increase the number of viewpoints, 1 ≤ Δn view ≤2; Optimize the synchronization timing of the triggering device to ensure clear image acquisition in areas with high defect incidence;

[0185] If a feedback signal S5 exists (optimize the preprocessing filtering parameters), adjust the filtering window size s1 according to the noise type. For impulse noise, s1 = s0 + 2; for Gaussian noise, increase the Gaussian standard deviation σ1 = 1.2 × σ0; adjust the truncation threshold α1 = α0 + 0.5 of the CLAHE algorithm to enhance local contrast.

[0186] Based on the adjusted parameters, the image acquisition steps are executed again to acquire new multi-view original images;

[0187] The newly acquired raw images are preprocessed, feature extracted, defect detected and classified to obtain updated effective defect detection results;

[0188] Calculate the updated evaluation metrics Acc1, FPR1, and FNR1, and compare them with the preset thresholds. If Acc1 ≥ Acc0 and FPR1 ≤ FPR0 ​​and FNR1 ≤ FNR0, then save the adjusted parameters; otherwise, repeat the parameter adjustment process until the evaluation metric requirements are met.

[0189] Output the final inspection results, displaying the defect location markings in a visual format with an image and text report, including the workpiece ID, inspection time, defect statistics (quantity, type percentage) and judgment result (pass / fail).

[0190] Establish a parameter adjustment log to record the parameter name, values ​​before and after adjustment, feedback signal type, and changes in evaluation indicators for each adjustment, which will be used for subsequent process analysis. Iterate and optimize the detection model and feature extraction method regularly (e.g., weekly), incorporating new defect types and process change data to ensure the long-term stability of the detection system.

[0191] Specifically, it realizes dynamic optimization and closed-loop iteration of detection system parameters based on feedback signals. The core is to accurately adjust system parameters by analyzing the feedback signal set and to ensure that the detection performance meets the standards through iterative verification. Specifically, this includes: analyzing the feedback signal set S to identify the types and directions of parameters that need adjustment; taking targeted measures for different signals—S1 adjusting image acquisition parameters (e.g., optimizing exposure time, gain, and light source intensity based on the grayscale characteristics of the missed detection area), S2 optimizing feature extraction dimensions (increasing or decreasing the number of features based on Relief-F weights), S3 expanding the sample and updating the model through transfer learning (increasing missed / false detection samples and fine-tuning network parameters), S4 adjusting multi-view acquisition parameters (increasing the number of views and optimizing the rotation angle interval), and S5 optimizing preprocessing filtering parameters (adjusting window size, standard deviation, and contrast enhancement threshold according to noise type); after adjustment, re-executing the image acquisition, preprocessing, feature extraction, and detection process, calculating the updated evaluation metrics (Acc1, FPR1, FNR1), comparing them with the preset thresholds, and repeating adjustments until the requirements are met if they are not met; finally, outputting visualized detection results, establishing a parameter adjustment log, and periodically iterating the model and feature extraction methods to adapt to new defect types and process changes.

[0192] The advantages are as follows: A closed-loop optimization mechanism of "feedback-adjustment-verification" is constructed to ensure the detection system continuously adapts to production needs. First, parameter adjustments are highly targeted, directly locating problem areas (such as image quality and feature dimensions) through feedback signals. Adjustment measures are closely linked to defect characteristics (such as missed grayscale and noise type), avoiding blind optimization. Second, the verification mechanism is rigorous, ensuring quantifiable and traceable adjustment effects by repeatedly executing the entire process and comparing evaluation indicators, guaranteeing stable and compliant system performance. Third, it has strong long-term adaptability; parameter adjustment logs provide data support for process analysis, and the periodic iteration mechanism incorporates new defect types and process changes, enabling the system to maintain long-term robustness in the inspection of complex cut workpieces, effectively balancing detection accuracy and production efficiency.

[0193] Furthermore, a defect detection system for cut workpieces based on image feature feedback is proposed to implement any of the detection methods described above, including:

[0194] The acquisition module is used to acquire the process characteristics of the workpiece being cut, and simultaneously build a preset defect type library. Based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system, it is used to simultaneously acquire the original images of the workpiece being cut from multiple perspectives.

[0195] The main control module initializes image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds based on the hardware system's performance parameters and defect type characteristics. It inputs the optimal feature subset into the detection model for inference, outputting preliminary defect detection results, including defect location coordinates, type, and confidence level. It also presets a defect confidence threshold, filters the preliminary detection results to obtain valid defect detection results, determines evaluation indicators, compares these indicators with the defect confidence threshold, identifies problematic steps in the detection process, and generates corresponding feedback signals. Furthermore, based on the generated feedback signals, it adjusts the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters. According to the adjusted parameters, it repeatedly executes the process from image acquisition to defect detection and classification, outputting the final detection result and iteratively optimizing the detection model and feature extraction method.

[0196] The data processing module stores the original image in a database and associates it with annotation information based on the acquisition time and workpiece ID. It then uses an adaptive filtering algorithm to denoise the original image stored in the database, obtaining a denoised image. Furthermore, it enhances the image contrast using the CLAHE algorithm based on the grayscale distribution characteristics of the denoised image, obtaining an enhanced image. Finally, it uses an edge segmentation algorithm to extract the region of interest (ROI) of the workpiece. Based on the extracted ROI, it extracts texture features, shape features, edge features, and grayscale features. Finally, it uses the Relief-F algorithm to filter features based on the extracted multidimensional features, obtaining the optimal feature subset.

[0197] The display module is used to present the process and results of defect detection of the cut workpiece to the user.

[0198] Furthermore, the data acquisition module includes:

[0199] The first acquisition unit is used to acquire the process characteristics of the workpiece being cut and simultaneously build a preset defect type library.

[0200] The second acquisition unit is used to synchronously acquire original images of the workpiece from multiple perspectives based on the initialized image acquisition parameters and the acquisition module and triggering device in the hardware system.

[0201] Furthermore, the main control module includes:

[0202] The initialization management unit is used to initialize image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model thresholds based on the performance parameters and defect type characteristics of the hardware system.

[0203] The detection unit is used to input the optimal feature subset into the detection model for inference and output the preliminary detection results of defects, including the location coordinates, type and confidence of the defects. The unit presets the defect confidence threshold and filters the preliminary detection results to obtain the effective defect detection results.

[0204] The feedback unit is used to determine the evaluation index, compare the evaluation index with the defect confidence threshold, locate the problem link in the detection process, and generate the corresponding feedback signal.

[0205] The optimization unit is used to adjust the image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters based on the generated feedback signal. According to the adjusted parameters, the process from image acquisition to defect detection and classification is repeated to output the final detection result and realize the iterative optimization of the detection model and feature extraction method.

[0206] Furthermore, the data processing module includes:

[0207] The data storage unit is used to store the original image into the database and associate it with annotation information based on the acquisition time of the original image and the workpiece ID.

[0208] The preprocessing unit is used to denoise the original image based on the original image stored in the database using an adaptive filtering algorithm to obtain a denoised image.

[0209] The feature processing unit is used to enhance the image contrast using the CLAHE algorithm based on the grayscale distribution characteristics of the denoised image to obtain an enhanced image. Then, the edge segmentation algorithm is used to extract the region of interest (ROI) of the workpiece. Based on the extracted ROI, texture features, shape features, edge features, and grayscale features are extracted respectively. Based on the extracted multidimensional features, the Relief-F algorithm is used to filter features and obtain the optimal feature subset.

[0210] The advantages of this invention are as follows: from hardware setup to parameter initialization, it is tailored to the process characteristics and defect types of the cutting workpiece; multi-view synchronous acquisition combined with production line cycle time ensures image integrity; adaptive denoising, CLAHE enhancement, and ROI extraction improve data quality; multi-dimensional features such as texture, shape, edge, and grayscale are extracted through operators such as GLCM, LBP, and Sobel; the optimal subset is selected by the Relief-F algorithm; and accurate detection is achieved by combining the SVM model and confidence threshold; and targeted feedback signals are generated to dynamically adjust parameters by evaluating indicators such as accuracy, false detection rate, and false negative rate, forming a closed loop of "detection-evaluation-optimization". This invention has the advantages of being systematic, accurate, and adaptable in the long term, and can effectively meet the defect detection needs of complex cutting workpieces.

[0211] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for detecting defects in a workpiece based on image feature feedback, the method comprising: The method comprises the following steps: acquiring process characteristics of the cutting workpiece, synchronously constructing a preset defect type library, and building a hardware system comprising a collection module, a mechanical structure, and a calculation unit; initializing image collection parameters, preprocessing parameters, feature extraction dimensions, and detection model threshold values according to performance parameters of the hardware system and defect type characteristics; synchronously collecting original images of the cutting workpiece under multiple perspectives based on the initialized image collection parameters and the collection module and triggering device in the hardware system, and storing the original images in a database and associating label information according to the collection time and the workpiece ID of the original images; based on the original images stored in the database, performing denoising processing on the original images by using an adaptive filtering algorithm to obtain denoised images, enhancing the contrast of the denoised images by using a CLAHE algorithm according to the gray distribution characteristics of the denoised images, and then extracting a region of interest (ROI) of the workpiece by using an edge segmentation algorithm; based on the extracted ROI, extracting texture features, shape features, edge features, and gray features respectively, and obtaining an optimal feature subset by using a Relief-F algorithm according to the extracted multi-dimensional features; inputting the optimal feature subset into a detection model for inference to output preliminary detection results of defects, including position coordinates, types, and confidence of the defects, and performing screening on the preliminary detection results by using a preset defect confidence threshold to obtain effective defect detection results; determining evaluation indexes, comparing the evaluation indexes with the defect confidence threshold, locating problem links in the detection process, and generating corresponding feedback signals; based on the generated feedback signals, adjusting image collection parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters respectively, and repeatedly executing the process from image collection to defect detection and classification according to the adjusted parameters to output final detection results and realize iterative optimization of the detection model and the feature extraction method; wherein the determination of the evaluation indexes, the comparison of the evaluation indexes with the defect confidence threshold, the location of the problem links in the detection process, and the generation of the corresponding feedback signals specifically comprise: based on the effective defect detection results, counting the number of real defects, the number of false positives, and the number of missed defects to determine detection accuracy, false positive rate, and missed detection rate as evaluation indexes; simultaneously setting preset thresholds of the evaluation indexes, including accuracy threshold, false positive rate threshold, and missed detection rate threshold; locating the problem links by the difference between the evaluation indexes and the preset thresholds, generating parameter adjustment feedback signals for the problem links, and the feedback signals containing problem types, severity, and recommended adjustment directions.

2. The method of claim 1, wherein, The acquisition of the process characteristics of the cutting workpiece, the synchronous construction of the preset defect type library, and the building of the hardware system comprising the collection module, the mechanical structure, and the calculation unit, and the initialization of the image collection parameters, the preprocessing parameters, the feature extraction dimensions, and the detection model threshold values according to the performance parameters of the hardware system and the defect type characteristics specifically comprise: acquiring process characteristics of the cutting workpiece, and calling specific definitions and characteristic parameters of surface defects, size defects, and morphological defects from the preset defect type library; Determine the performance requirements of the acquisition module, use an industrial camera, a lens suitable for the size of the workpiece, and a coaxial light source to build an image acquisition subsystem; Based on the size and shape complexity of the workpiece, design a workpiece positioning table with rotating / translation axes and a trigger device linked to the production line, and build a mechanical structure subsystem, where the angle accuracy of the rotating axis satisfies α ≤ 0.1°, and the displacement accuracy of the translation axis satisfies β ≤ 0.01mm; According to the real-time requirements of image processing and model inference, configure a GPU server as the computing unit to ensure its floating-point operation capability ≥ 10TFLOPS; Based on the performance parameters of the hardware system, initialize the image acquisition parameters, including: exposure time t0, calculated as t0=k×(1 / ρ) according to the surface reflectivity of the workpiece, where k is the illumination coefficient and ρ is the surface reflectivity, with a value range of 0.2≤ρ≤0.8, and the gain g0 is set to the initial value 1.0; According to the scale range of the defect features, initialize the filter window size s0 in the preprocessing parameters, which satisfies s0=2×floor(d / 2)+1, where d is the estimated diameter of the smallest defect, and floor(・) is the floor function; Based on the feature dimension of the defect, initialize the feature extraction dimension m0, which includes the number of texture features m1, the number of shape features m2, the number of edge features m3, and the number of grayscale features m4, satisfying m0=m1+m2+m3+m4, and m1≥5, m2≥3, m3≥2, m4≥2; Set the initial confidence threshold θ0=0.8 of the detection model for preliminary screening of the defect detection results.

3. The method of claim 1, wherein, Based on the initialized image acquisition parameters and the acquisition module and trigger device in the hardware system, synchronize the acquisition of the original images of the cutting workpiece under multiple viewing angles, store the original images in the database and associate the labeling information according to the acquisition time and workpiece ID of the original images, specifically including: Based on the beat time T of the production line, set the interval time Δt=T of image acquisition through the trigger device to ensure synchronization with the workpiece conveying rhythm; When the workpiece reaches the detection station, the trigger device sends a trigger signal to the acquisition module to start the multi-view image acquisition process; The rotating shaft in the control mechanical structure subsystem drives the workpiece to rotate at an angle θ i =i×(360° / n) where i=1, 2,..., n, n is the number of viewing angles, and 3≤n≤6. At each viewing angle, the industrial camera acquires the original image according to the initialized exposure time t0 and gain g0, and the image format is set to BMP or TIFF to preserve the original pixel information; During the collection process, through The image sharpness evaluation index Q is monitored in real time, where For the image in The gray value at point Q < Q min At that time, the exposure time t = t0 + Δt is automatically adjusted until Q ≥ Q. min Q min Set a preset resolution threshold; Name the acquired multi-view original images according to the naming rule of workpiece ID-viewing angle number-acquisition time; Based on the storage specification of the database, store the original images in the distributed database and establish an associated index of workpiece ID and image file path; Add labeling information to each original image, including the material of the workpiece, the type of processing technology, the model of the tool, the cutting parameters, and the environmental temperature and humidity at the time of acquisition, to form complete image metadata.

4. The method of claim 1, wherein, Based on the original images stored in the database, use an adaptive filtering algorithm to denoise the original images to obtain denoised images, enhance the contrast of the denoised images through the CLAHE algorithm according to their grayscale distribution characteristics, and then extract the region of interest (ROI) of the workpiece using an edge segmentation algorithm, specifically including: Read the original image I from the database, calculate the noise type judgment index N of the image; wherein the calculation formula of the noise type judgment index N is , median( ) is a median calculation function, when N < N1, it is determined as slight noise, when N ≥ N1, it is determined as impulse noise, and N1 is a preset noise threshold. If it is slight noise, use Gaussian filter algorithm for denoising processing: The filter kernel function is wherein σ is a Gaussian standard deviation, and σ = 0.5xs0 is taken, s0 is an initialized filter window size, a denoising image I1=I*G is obtained, and * represents convolution operation. If it is impulse noise, use median filter algorithm for denoising processing: Denoising image I1(x,y)=median (I (x-s:x+s,y-s:y+s)), wherein s=floor (s0 / 2), get denoising image I1; Calculate the gray histogram H (k) of the denoising image I1, k=0, 1,..., 255, wherein H (k) is the number of pixels with gray value k; If the image gray scale distribution is concentrated, the CLAHE algorithm is used to enhance the contrast, and the cumulative distribution function is calculated wherein is the total number of image pixels; Enhanced gray value k'=floor (255×CDF (k)), get enhanced image I2; If the image has insufficient local contrast, use CLAHE algorithm to enhance the contrast, divide the image into 8×8 sub-blocks, calculate the histogram of each sub-block and perform truncation processing, the truncation threshold T=α×mean (H (k)), α is an adjustment coefficient, take value 1.0≤α≤3.0, mean (・) is the mean function, get enhanced image I2 by bilinear interpolation splicing sub-blocks; Use OTSU threshold segmentation algorithm to separate the background of the enhanced image I2, calculate the inter-class variance: wherein , are foreground and background pixel ratio, respectively, , are foreground and background gray mean, respectively, find the threshold t corresponding to the maximum inter-class variance, and divide the image into foreground and background. Combined with edge segmentation algorithm, use Canny operator to extract the edge contour of the foreground region; wherein the high threshold T H = 0.3 x max(G) and the low threshold T L = 0.15 x max(G), G being the image gradient magnitude, the region of interest ROI of the workpiece being determined by the edge contour, the coordinate range of the ROI being (xmin, xmax, ymin, ymax).

5. The method of claim 1, wherein, Based on the extracted region of interest ROI, extract texture features, shape features, edge features and gray features respectively, according to the extracted multi-dimensional features, use Relief-F algorithm for feature screening to get the optimal feature subset, which specifically includes: In the region of interest ROI, texture features are extracted, and texture parameters are calculated using the gray level co-occurrence matrix GLCM. For the GLCM matrix with distance d = 1 and angle , the energy feature , the entropy feature , the contrast feature , and the correlation feature are calculated, where , are the row and column means, , are the row and column standard deviations. Use LBP algorithm to extract local binary pattern feature, calculate LBP histogram to get texture feature vector F1=[E,Ent,Con,Cor,...]; The shape feature is extracted, the contour of the defect candidate region in the ROI is extracted, and the area of the contour is calculated , wherein R is the defect region. By , the contour perimeter is determined, wherein x(i), y(i) are the contour point coordinates, and m is the number of contour points. Determine the circularity of the contour by C=4πA / L², and simultaneously determine the aspect ratio of the contour by R=W / H, wherein W and H are the width and height of the outer rectangle of the defect respectively, to get shape feature vector F2=[A,L,C,R,...]; Extracting edge features, applying Sobel operator to ROI to calculate horizontal and vertical direction gradient , , gradient amplitude , gradient direction , counting gradient direction histogram to obtain edge direction feature, calculating edge continuity feature , wherein is the length of continuous edge segment, is the number of edge segments, obtaining edge feature vector , is the mean of gradient amplitude, is the mode of gradient direction; extracting the gray scale feature, calculating the average gray scale value in the ROI by N is the number of pixels in the ROI.​ By , determining a gray scale variance; By , determine the gray entropy, wherein p (k) is the probability of the gray value k in the ROI, and obtain the gray feature vector ; The texture feature F1, the shape feature F2, the edge feature F3 and the gray scale feature F4 are spliced into a multi-dimensional feature matrix with a dimension of m0x1, and m0 is an initialized feature extraction dimension. The Relief-F algorithm is used to calculate the weight w(j) of each feature, and the weight is updated through iteration: ; wherein, , is a same-class nearest neighbor sample, is a different-class nearest neighbor sample, n is the number of samples, p(c) is a prior probability of the class c, and the feature with the weight w(j)≥w min is selected to form an optimal feature subset, and w min is a weight threshold value.

6. The method of claim 1, wherein, Input the optimal feature subset into the detection model for reasoning, output the preliminary detection result of the defect, including the position coordinates, type and confidence of the defect, preset the defect confidence threshold, screen the preliminary detection result to get the effective defect detection result, which specifically includes: Based on the optimal feature subset X' obtained by screening, construct a detection sample set, wherein the positive sample is a feature vector containing a defect, and the negative sample is a feature vector without a defect, and the sample quantity ratio satisfies 1:1≤positive sample:negative sample≤3:1; Select SVM model for training, construct kernel function: K (x,y)=exp (-γ||x-y||²); In the formula, γ is the kernel parameter, and the optimal parameters C and γ are determined by cross validation, wherein C is the penalty coefficient, and the value is 1≤C≤100, and the value of γ is 0.01≤γ≤10; Training the SVM model to get the classification hyperplane: ; where, is the Lagrange multiplier, is the sample label, is the bias term, is the number of support vectors; Inputting the optimal feature subset X' into the trained SVM model, outputting a predicted category of the defect and a decision value d, a confidence c = 1 / (1+exp (-d)), obtaining a preliminary detection result; Extract the confidence c in the preliminary detection result, and compare it with the preset defect confidence threshold θ0; When c≥θ0, it is determined as an effective defect, and the position coordinates, type and confidence information of the defect are retained. When c < θ0, it is determined as an invalid defect, and it is rejected; The information of all valid defects is summarized to form a valid defect detection result list, wherein each defect entry contains a unique identifier ID, position coordinates (x, y), a type label t, size parameters (s1, s2), and a confidence c.

7. A system for detecting defects in a workpiece based on feedback of image features for implementing the method of any one of claims 1 to 6, characterized in that, Comprise: The acquisition module is used to acquire the process characteristics of the cutting workpiece, and a preset defect type library is constructed synchronously, and the original images of the cutting workpiece under multiple viewing angles are synchronously collected based on the initialized image acquisition parameters and the acquisition module and the triggering device in the hardware system; The main control module is used to initialize the image acquisition parameters, the preprocessing parameters, the feature extraction dimension and the detection model threshold value according to the performance parameters of the hardware system and the defect type characteristics, to input the optimal feature subset into the detection model for reasoning, and to output the preliminary detection result of the defect, including the position coordinates, the type and the confidence of the defect, to screen the preliminary detection result by taking the preset defect confidence threshold value, to obtain the valid defect detection result, to determine the evaluation index, to compare the evaluation index with the defect confidence threshold value, to locate the problem link in the detection process, to generate the corresponding feedback signal, and to adjust the image acquisition parameters, the preprocessing parameters, the feature extraction dimension and the detection model parameters based on the generated feedback signal, to repeatedly execute the process from image acquisition to defect detection and classification according to the adjusted parameters, to output the final detection result and to realize the iterative optimization of the detection model and the feature extraction method; The data processing module is used to store the original images to the database and associate the labeling information according to the acquisition time of the original images and the workpiece ID, to adopt the adaptive filtering algorithm to perform denoising processing on the original images based on the original images stored in the database to obtain denoised images, to enhance the contrast of the images by the CLAHE algorithm according to the gray distribution characteristics of the denoised images to obtain enhanced images, and then to extract the ROI of the workpiece by the edge segmentation algorithm, to extract the texture features, the shape features, the edge features and the gray features based on the extracted ROI, to obtain the optimal feature subset by the Relief-F algorithm according to the extracted multi-dimensional features; The display module is used to present the process and the result of the cutting workpiece defect detection to the user.

8. The system for detecting defects in a workpiece based on image feature feedback of claim 7, wherein, The acquisition module comprises: The first acquisition unit is used to acquire the process characteristics of the cutting workpiece, and a preset defect type library is constructed synchronously; The second acquisition unit is used to synchronously collect the original images of the cutting workpiece under multiple viewing angles based on the initialized image acquisition parameters and the acquisition module and the triggering device in the hardware system.

9. The system for detecting defects in a workpiece based on image feature feedback of claim 7, wherein, The main control module comprises: The initialization management unit is used to initialize the image acquisition parameters, the preprocessing parameters, the feature extraction dimension and the detection model threshold value according to the performance parameters of the hardware system and the defect type characteristics; The detection unit is configured to input the optimal feature subset into a detection model for reasoning, output a preliminary detection result of the defect, and include position coordinates, a type, and a confidence of the defect. The feedback unit is configured to determine an evaluation index, compare the evaluation index with the defect confidence threshold, locate a problem link in the detection process, and generate a corresponding feedback signal. The optimization unit is configured to adjust image acquisition parameters, preprocessing parameters, feature extraction dimensions, and detection model parameters based on the generated feedback signal, repeatedly execute the image acquisition to defect detection and classification process according to the adjusted parameters, output a final detection result, and realize iterative optimization of the detection model and the feature extraction method.

10. The system for detecting defects in a workpiece based on image feature feedback of claim 7, wherein, The data processing module includes: The data storage unit is configured to store the original image in a database and associate the annotation information according to the acquisition time and the workpiece ID of the original image. The preprocessing unit is configured to perform denoising processing on the original image by using an adaptive filtering algorithm based on the original image stored in the database to obtain a denoised image. The feature processing unit is configured to enhance the contrast of the image by using a CLAHE algorithm according to the gray distribution feature of the denoised image to obtain an enhanced image, extract a region of interest (ROI) of the workpiece by using an edge segmentation algorithm, extract texture features, shape features, edge features, and gray features based on the extracted ROI, perform feature screening by using a Relief-F algorithm according to the extracted multi-dimensional features, and obtain an optimal feature subset.

Citation Information

Patent Citations

  • Casting defect identification method based on Adaboost model of SVM

    CN110533083A

  • Main journal defect detection method based on feature fusion

    CN113298798A