YOLOv8-based electrical steel finished product online defect detection and quality judgment method
By using a YOLOv8-based deep learning model and image processing algorithm, the efficiency and accuracy issues of defect detection in electrical steel products were resolved. This enabled accurate identification and real-time feedback of multi-dimensional defects, improving the scientific nature of quality assessment and the robustness of the system.
Patent Information
- Application Number
- CN202511700016.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-10
AI Technical Summary
Existing methods for detecting defects in electrical steel products suffer from low efficiency and insufficient accuracy in manual inspection, while existing automatic inspection methods cannot comprehensively detect multi-dimensional defects, making it difficult to achieve accurate identification and real-time feedback.
A YOLOv8-based deep learning model combined with dedicated image preprocessing and post-processing algorithms is used to detect surface defects and determine the quality of finished electrical steel products. A weighted scoring mechanism combined with magnetic property data is used for comprehensive evaluation.
It enables rapid and accurate identification and classification of electrical steel products, improves detection efficiency and accuracy, provides scientific and reliable quality assessment, and supports model adaptive capabilities to cope with production changes.
Smart Images

Figure CN121504883A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection and quality assessment technology, and in particular to an online defect detection and quality assessment method for electrical steel finished products based on YOLOv8. Background Technology
[0002] In the production of electrical steel, the stability of product quality is a key factor determining its market competitiveness. With the rise of intelligent manufacturing technology, enterprises have gradually realized that relying on traditional manual quality inspection is not only time-consuming and labor-intensive, but also carries the risk of missed or incorrect inspections, making it difficult to meet the high-quality requirements of modern electrical steel product production. Electrical steel products are widely used in the manufacture of motors and transformers, and have extremely high requirements for their surface quality and magnetic properties, thus necessitating more precise and efficient quality inspection methods. Although existing technologies have introduced some automated inspection equipment, most methods are limited to the detection of single defects and lack the ability to classify and quantify complex defects. Furthermore, traditional rule-based quality judgment methods struggle to cope with the constantly changing operating conditions during production, making it difficult to achieve accurate defect identification and real-time feedback. Summary of the Invention
[0003] To address the above issues, this invention provides an online defect detection and quality assessment method for finished electrical steel products based on YOLOv8. This method solves the problems of low efficiency and insufficient accuracy of manual inspection in the existing defect detection process for electrical steel products, as well as the inability of existing automatic inspection methods to comprehensively detect multi-dimensional defects and accurately locate them. This improves the level of product quality management and meets the needs of personalized quality control.
[0004] A method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 includes the following steps: S1, acquires surface images of finished electrical steel products using an industrial camera and preprocesses the images; S2, use the YOLOv8 model to detect and classify defects in the preprocessed image, and output the detection results; S3, make a comprehensive judgment on product quality based on the detected defect information, and give the judgment result according to the preset quality standards; S4 records the characteristic parameters of each detected defect and uploads the detection results to the manufacturing execution system.
[0005] Furthermore, S3 specifically includes: Each type of defect is weighted, and a total defect score is calculated to determine product quality. The specific formula is as follows: ; in, Defect weights are set based on defect type and severity. Defect severity; Based on the total defect score, and combined with the magnetic property data of the finished electrical steel products, the product quality grades are classified.
[0006] By assigning weights to different defects and calculating the total defect score, quality judgment shifts from qualitative to quantitative, resulting in more objective and accurate evaluation results. Combining magnetic performance data with grade classification enables a multi-dimensional and scientific evaluation of the overall product quality, which better meets the actual application needs of electrical steel products.
[0007] Furthermore, based on the total defect score and the magnetic property data of the finished electrical steel products, the product quality grades are classified, specifically including: Preliminary screening is conducted based on the magnetic properties data of the finished electrical steel products; If the magnetic properties do not meet the preset requirements, the finished electrical steel product is directly judged as unqualified; if the magnetic properties meet the standards, the quality grade is then classified based on the surface defect information.
[0008] Using magnetic performance data for preliminary screening can quickly eliminate fundamentally unqualified products, avoiding unnecessary defect analysis of invalid products in the future, and significantly improving the overall processing efficiency and resource utilization of the system.
[0009] Furthermore, the image preprocessing specifically includes: A weighted median filtering algorithm is used to eliminate noise in the image; A camera imaging model was established using the checkerboard calibration method, and the parameters of the model were optimized using the least squares method to eliminate radial and tangential distortion of the image. Histogram equalization expands the grayscale range of an image, enhancing the contrast between defects and the background.
[0010] Through a series of image preprocessing operations, the interference of noise, lens distortion and uneven illumination on the detection results is effectively eliminated, providing high-quality and high-fidelity input images for the YOLOv8 model.
[0011] Furthermore, for each detected defect, its characteristic parameters are recorded, specifically including: Defect locations are marked using the minimum bounding matrix algorithm; The length and width of the defect are obtained by calculating the length and width of the circumscribed matrix; Calculate the defect area based on the defect length and width; The depth of the defect is obtained by using a laser rangefinder or ultrasonic measurement technology, and the three-dimensional information of the defect is extracted by combining image processing algorithms.
[0012] By recording various geometric feature parameters and three-dimensional information of defects, a digital and comprehensive characterization of defects is achieved. This not only provides detailed basis for quality judgment, but also provides accurate data support and traceability for subsequent production process optimization and equipment maintenance.
[0013] Furthermore, the method also includes: The YOLOv8 model was retrained using the latest production data; transfer learning and incremental learning were used to update and adjust the model.
[0014] By continuously retraining the model using the latest production data, the YOLOv8 model acquires self-learning and adaptive capabilities, enabling it to adapt to changes in production conditions and identify new defect types. This effectively prevents model performance from degrading over time and ensures the accuracy and robustness of the system's long-term operation.
[0015] Furthermore, different defect types detected by the YOLOv8 model undergo subsequent processing, including: For pore defects, corrosion and expansion operations are used to enhance boundary detection; To address coating defects, threshold segmentation and color analysis techniques are used to calculate the average color difference value of the coating, in order to evaluate the color uniformity of the coating and ensure that the average color difference value is below the standard threshold. To address emulsion stain defects, a local image analysis method, combined with texture analysis and gray-level co-occurrence matrix, is used to detect irregular changes on the surface.
[0016] For different types of defect characteristics, specific post-processing algorithms are used for precise analysis, which significantly improves the identification accuracy and quantification precision of complex defects such as holes, poor coatings, and emulsion stains.
[0017] Furthermore, the YOLOv8 model uses CSPDarknet as its backbone network.
[0018] By using CSPDarknet as the backbone network, the feature extraction capability of the model can be enhanced while maintaining high inference speed (computational efficiency). It is suitable for deployment in production line environments that require real-time processing, achieving a good balance between speed and accuracy.
[0019] Furthermore, the YOLOv8 model handles multi-scale defects using image pyramid technology.
[0020] Image pyramid technology enables the model to be sensitive to defects of different sizes, effectively capturing both obvious macroscopic defects and minute microscopic defects, greatly improving the generalization ability and reliability of the detection system.
[0021] Furthermore, the sampling interval of magnetic performance data is dynamically adjusted according to the production line speed.
[0022] By dynamically adjusting the magnetic energy sampling interval according to the production line speed, the optimal allocation of detection resources is achieved. While ensuring the real-time performance and accuracy of the data, it avoids the data redundancy or insufficient sampling problems that may be caused by fixed interval sampling, making the system run more intelligently and efficiently.
[0023] Compared with existing technologies, the beneficial effects of this invention are as follows: By employing the YOLOv8 deep learning model and combining it with dedicated image preprocessing and post-processing algorithms, the system can quickly and accurately identify and classify various surface defects, including holes, poor coatings, and emulsion stains, effectively overcoming the problems of low efficiency and easy omissions and false detections in traditional manual inspection, and significantly improving inspection efficiency and accuracy; By combining the quantitative analysis results of surface defects with the core magnetic performance parameters of the product, and through a scientific weighted scoring mechanism and grading judgment criteria, a comprehensive and objective evaluation of product quality is achieved, significantly improving the scientificity and reliability of quality judgment; It supports model retraining based on the latest production data, and can continuously optimize detection performance through transfer learning and incremental learning to adapt to new defect types and changes in production conditions. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this drawing or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this drawing. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0025] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments provided by this invention without inventive effort are within the scope of protection of this invention.
[0027] like Figure 1 As shown, this invention provides an online defect detection and quality assessment method for finished electrical steel products based on YOLOv8, specifically including the following steps: S1 acquires surface images of finished electrical steel products using an industrial camera and preprocesses the images.
[0028] A high-resolution industrial camera and dedicated light source are used to ensure lighting and imaging quality for the finished electrical steel products, enabling stable acquisition of clear images in various environments. Specific parameters are as follows: An industrial camera with high dynamic range (HDR) was selected, with a resolution of 1920×1080 and a frame rate of 30fps to ensure fast capture of moving workpieces and avoid motion blur. The light source uses LED lights with an illuminance of 1000 Lux. The light source type is uniformly distributed white light to improve the visibility of defects. A light source with a color temperature of 5500K is selected to obtain true color representation.
[0029] Industrial cameras are used to capture image data of finished electrical steel products, and the images are transmitted to a processing unit for real-time analysis.
[0030] Specifically, high-efficiency data transmission protocols, such as GigE Vision or USB 3.0, are used to ensure that the image transmission speed is maintained above 1Gbps to ensure real-time performance and avoid detection errors caused by latency.
[0031] The acquired images are stored in real time using high-speed SSD storage devices with a read speed of no less than 500MB / s to ensure timely image review and analysis.
[0032] This invention also features an automatic calibration function to ensure the stability of image processing during long-term operation; Specifically, the positions of industrial cameras and light sources are calibrated regularly to ensure the stability of the equipment. The calibration frequency is set to once a week, and laser alignment technology is used to detect deviations. During the calibration process, an automatic calibration tool is used in conjunction with visual calibration software to perform position correction based on a preset template, and the deviation must be controlled within 0.1mm.
[0033] To avoid synchronization problems during data transmission, this invention employs a Precision Time Protocol (PTP) to ensure that the time accuracy error of image acquisition and processing does not exceed 1ms.
[0034] For products with different thicknesses and coating types, this invention automatically adjusts the camera focal length and light source intensity to ensure image clarity and the visibility of defects.
[0035] The image preprocessing process of this invention includes: A weighted median filtering algorithm was used for denoising, with the filter size set to 3*3, to remove salt-and-pepper noise, reduce interference with subsequent analysis, and further enhance the noise suppression effect.
[0036] A camera imaging model was established using the checkerboard calibration method, and the parameters of the model were optimized using the least squares method to eliminate radial and tangential distortion of the image.
[0037] Histogram equalization expands the grayscale range of an image, enhancing the contrast between defects and the background, making defect features more prominent. The equalization formula is: ; in, These are the original pixel values; The mean; Standard deviation; These are the pixel values after equalization.
[0038] In image processing, contrast-limited adaptive histogram equalization (CLAHE) is introduced to avoid artifacts caused by over-enhancement, while optimizing block size and contrast-limiting parameters to improve enhancement results.
[0039] S2 uses the YOLOv8 model to detect and classify defects in the preprocessed image and outputs the detection results.
[0040] Specifically, a pre-trained YOLOv8 model is used to perform object detection on the pre-processed image, identifying the types of defects in the image, including holes, poor coating, emulsion stains, color differences, and scratches.
[0041] The training dataset contains over 10,000 labeled images covering a variety of defect types to ensure the model's generalization ability; the dataset should include various lighting conditions and angles to improve the model's robustness.
[0042] The model's evaluation metrics must achieve precision ≥ 95% and recall ≥ 90% to ensure the reliability of the detection; cross-validation is used to evaluate the model's performance to ensure consistency of evaluation across different datasets.
[0043] The YOLOv8 model uses CSPDarknet as its backbone network and employs an improved ResNet module to ensure enhanced feature extraction capabilities without sacrificing computational efficiency.
[0044] Image pyramid technology can effectively handle defects of different sizes, with feature scale scaling factors of 1 / 2, 1 / 4, 1 / 8, etc.
[0045] To improve the real-time performance of the detection method, a GPU-accelerated YOLOv8 model was used to optimize inference speed.
[0046] The model is accelerated using an NVIDIA Tesla T4 GPU and CUDA 11.0, with inference speed kept within 10ms, meeting the real-time requirements of the production line.
[0047] TensorRT was used to optimize the model, reducing redundant computations and improving inference efficiency. The number of model parameters was kept to around 5M to ensure that the lightweight model could run smoothly in high-load environments.
[0048] To improve the detection accuracy of this invention, the model is updated and retrained periodically.
[0049] The YOLOv8 model is retrained quarterly using the latest production data to ensure its adaptability; transfer learning techniques are used to fine-tune the original model, and incremental learning algorithms are used when updating the model to avoid overfitting and degradation; it is integrated with the manufacturing execution system of the production line, and the detection results can be directly transmitted to the MES system to help adjust the process and production plan.
[0050] For different defect types detected by the YOLOv8 model, targeted follow-up processing is carried out: For void defects, mathematical morphology (erosion and dilation) is used to enhance boundary detection; To address coating defects, threshold segmentation and color analysis techniques are used to calculate the average color difference value of the coating, in order to evaluate the color uniformity of the coating and ensure that the average color difference value is below the standard threshold. To address emulsion stain defects, a local image analysis method, combined with texture analysis and gray-level co-occurrence matrix, is used to detect irregular changes on the surface.
[0051] S3 makes a comprehensive judgment on product quality based on the detected defect information and gives the judgment result according to the preset quality standards.
[0052] Specifically, based on the test results and combined with magnetic performance data from the production process, the quality grade is assessed. The specific steps are as follows: Determine the preset quality standards, including but not limited to magnetic performance parameters (P1.5 / 50, P1.0 / 400, J5000), and set corresponding thresholds. The specific values should be set according to industry standards and product specifications. The formulation of standards should be based on the latest industry standards.
[0053] Each type of defect is weighted, and a total defect score is calculated to determine product quality. The specific formula is as follows: ; in, Defect weights are set based on defect type and severity. This represents the severity of the defect.
[0054] The weights of each defect type can be changed according to the user's quality standards or the company's standards, such as: holes (W1=0.4), poor coating (W2=0.3), scratches (W3=0.2), and color difference (W4=0.1).
[0055] Based on the total defect score, and combined with the magnetic property data of the finished electrical steel products, the product quality grades are classified.
[0056] First, a preliminary screening is performed based on the magnetic property data of the finished electrical steel products. If the magnetic properties do not meet the preset requirements, the product is directly judged as unqualified; if the magnetic properties meet the standards, the system further classifies the quality level based on surface defect information. The specific classification is as follows: First-class product: The magnetic properties fully meet the standards and the surface quality has no obvious defects. The product is judged as first-class product. Second-class product: The magnetic properties meet the standards, but there are slight defects on the surface that do not affect the main use. The product is judged as a second-class product. Grade 3: The magnetic properties meet the standards, but there are many surface defects. The product needs to be closely monitored and used in specific applications. The product is judged as Grade 3. Grade 4: Although the magnetic properties meet the standards, the surface defects are more serious. The specific defect types and quantities need to be recorded and classified as Grade 4.
[0057] Sampling interval for magnetic property data: Set to collect data once every 100 meters, using online magnetic property detection equipment to ensure that the measurement error of the equipment does not exceed ±2%.
[0058] In addition, the sampling interval and detection frequency can be dynamically adjusted according to production needs. Specific control parameters are specified using the formula: ; in, L is the sampling time interval, and L is the sampling interval distance. To ensure production line speed, real-time performance, and data accuracy.
[0059] S4 records the characteristic parameters of each detected defect and uploads the detection results to the manufacturing execution system.
[0060] For each detected defect, its characteristic parameters are recorded, including: Defect location (coordinate system X, Y): marked using the minimum bounding rectangle algorithm, calculated as follows: .
[0061] Defect length (L) and width (W): These are obtained by calculating the length and width of the circumscribed rectangle. If necessary, edge detection algorithms, such as Canny edge detection, are used to improve measurement accuracy.
[0062] Defect area (A): (using the formula) calculate.
[0063] Defect depth (D): Obtained using laser rangefinder or ultrasonic measurement technology. The depth measurement error must be controlled within ±0.1mm. Three-dimensional information is extracted by combining image processing algorithms.
[0064] After obtaining the inspection results, a defect report is automatically generated, including the defect type, location, quantity, and quality level, and the information is promptly fed back to the on-site operators. The report format includes: Report number and timestamp; Various defect statistics and corresponding location markings are used to visualize the defect distribution using heatmaps, which are generated based on the frequency and severity of defects. The quality level assessment results and detailed rectification recommendations, including solutions for different defects.
[0065] Based on defect reports, operators can adjust production processes and optimize production flow according to real-time feedback information to avoid the generation of defective products; regular quality analysis meetings are held to analyze production line problems based on defect statistics, optimize process parameters, and the meeting minutes should be kept for follow-up; the accuracy and stability of the system judgment results and manual judgment results are cross-compared monthly, and the evaluation indicators include false detection rate and false negative rate, and improvement measures are formulated.
[0066] To ensure the flexibility and scalability of the method, parameter tuning functionality is implemented, specifically including: Based on different product specifications and quality standards, adjust the threshold parameters of the YOLOv8 model and update the model regularly to adapt to new defect types; regularly update the defect feature database, add new types of defects and corresponding handling measures to ensure continuous data updates, and manage database updates through version control methods; allow users to customize defect evaluation standards and alarm mechanisms to improve the adaptability and flexibility of the production process.
[0067] This invention also provides an online defect detection and quality assessment system for finished electrical steel products based on YOLOv8, specifically including the following modules: The image acquisition module is used to acquire high-definition images of the surface of finished electrical steel products. It supports high frame rate and high definition image capture to ensure that every tiny defect can be accurately captured. The data processing module performs defect detection and classification on image data based on the YOLOv8 deep learning model and outputs the detection results; The defect recording module is used to record information such as the type, location, quantity, area, and distribution density of each defect, which facilitates subsequent statistical analysis and tracking. The quality assessment module is used to make a comprehensive assessment of product quality based on the detected defect information and to give the assessment result according to the preset quality standards. The early warning module automatically issues an early warning when a serious defect is detected or the number of defects exceeds a preset threshold, and notifies the production line operators to take countermeasures. The data storage module is used to store test results and quality judgment data. It supports long-term data storage and can be retrieved based on keywords such as time, volume number, and defect type. The communication module is used to upload test results, quality judgment information and defect reports to the manufacturing execution system or other remote management platforms for quality inspectors and managers to view and analyze.
[0068] This invention also provides hardware for implementing an online defect detection and quality assessment method for finished electrical steel products based on YOLOv8, comprising: An image processor is used to process the acquired image data in real time and perform defect detection and classification using the YOLOv8 model. Data transmission equipment transmits the detection results and judgment information to the MES method or cloud platform via the network, realizing full-process information management.
[0069] It should be noted that the present invention is not limited to the above-described embodiments. The above embodiments are merely examples, and any embodiments that have the same structure and perform the same effects as the technical concept within the scope of the present invention are included within the scope of the present invention. Furthermore, various modifications that can be conceived by those skilled in the art to the embodiments, and other ways of constructing by combining some of the constituent elements of the embodiments, without departing from the spirit of the present invention, are also included within the scope of the present invention.
Claims
1. A method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8, characterized in that, Includes the following steps: S1, acquires surface images of finished electrical steel products using an industrial camera and preprocesses the images; S2, use the YOLOv8 model to detect and classify defects in the preprocessed image, and output the detection results; S3, make a comprehensive judgment on product quality based on the detected defect information, and give the judgment result according to the preset quality standards; S4 records the characteristic parameters of each detected defect and uploads the detection results to the manufacturing execution system.
2. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, S3 specifically includes: Each type of defect is weighted, and a total defect score is calculated to determine product quality. The specific formula is as follows: ; in, Defect weights are set based on defect type and severity. Defect severity; Based on the total defect score, and combined with the magnetic property data of the finished electrical steel products, the product quality grades are classified.
3. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 2, characterized in that, Based on the total defect score and the magnetic property data of the finished electrical steel products, the product quality grades are classified, specifically including: Preliminary screening is conducted based on the magnetic properties data of the finished electrical steel products; If the magnetic properties do not meet the preset requirements, the finished electrical steel product is directly judged as unqualified; if the magnetic properties meet the standards, the quality grade is then classified based on the surface defect information.
4. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, The image preprocessing specifically includes: A weighted median filtering algorithm is used to eliminate noise in the image; A camera imaging model was established using the checkerboard calibration method, and the parameters of the model were optimized using the least squares method to eliminate radial and tangential distortion of the image. Histogram equalization expands the grayscale range of an image, enhancing the contrast between defects and the background.
5. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, For each detected defect, its characteristic parameters are recorded, specifically including: Defect locations are marked using the minimum bounding matrix algorithm; The length and width of the defect are obtained by calculating the length and width of the circumscribed matrix; Calculate the defect area based on the defect length and width; The depth of the defect is obtained by using a laser rangefinder or ultrasonic measurement technology, and the three-dimensional information of the defect is extracted by combining image processing algorithms.
6. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, The method further includes: The YOLOv8 model was retrained using the latest production data; transfer learning and incremental learning were used to update and adjust the model.
7. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, For different defect types detected by the YOLOv8 model, subsequent processing is performed, including: For pore defects, corrosion and expansion operations are used to enhance boundary detection; To address coating defects, threshold segmentation and color analysis techniques are used to calculate the average color difference value of the coating, in order to evaluate the color uniformity of the coating and ensure that the average color difference value is below the standard threshold. To address emulsion stain defects, a local image analysis method, combined with texture analysis and gray-level co-occurrence matrix, is used to detect irregular changes on the surface.
8. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, The YOLOv8 model uses CSPDarknet as its backbone network.
9. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 1, characterized in that, The YOLOv8 model uses image pyramid technology to handle multi-scale defects.
10. The method for online defect detection and quality assessment of finished electrical steel products based on YOLOv8 as described in claim 2, characterized in that, The sampling interval of magnetic performance data is dynamically adjusted according to the production line speed.