A steel sheet defect detection method, storage medium, electronic device, and apparatus

By using a steel sheet defect detection model and image stitching technology, the problem of low efficiency in manual visual inspection has been solved, enabling automated, efficient identification and accurate detection of steel sheet defects, which is suitable for large-scale production.

CN119666854BActive Publication Date: 2026-04-17ZHU HAI YOU TAI HUA GONG YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHU HAI YOU TAI HUA GONG YOU XIAN GONG SI
Filing Date
2024-12-10
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, steel sheet defect detection relies on manual visual inspection, which is inefficient, susceptible to human factors, and costly, making it unsuitable for large-scale production and quality control.

Method used

A defect detection model is used to acquire steel sheet images and identify defect types. By combining pixel-level comparison, structural similarity index, feature matching and histogram comparison, defects such as rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not meeting standards and deformation are identified. Image stitching technology is used to improve detection efficiency.

Benefits of technology

It automates the detection of defects in steel sheets, improves detection efficiency and accuracy, reduces the false positive rate, reduces labor costs, and is suitable for large-scale production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119666854B_ABST
    Figure CN119666854B_ABST
Patent Text Reader

Abstract

This invention relates to the field of printer technology, and more particularly to a method, storage medium, electronic device, and apparatus for detecting defects in steel sheets. The method first acquires an image of the steel sheet to be inspected, obtaining the inspection image. Then, the inspection image is input into a defect detection model for defect type identification, resulting in the corresponding defect type. The training samples of the defect detection model include labeled images of one or more of the following defect types: rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not conforming to standards, and deformation. By acquiring the image of the steel sheet to be inspected and inputting it into the defect detection model for identification, the detection of steel sheet defects is automated, avoiding the tedious steps of manual inspection. This allows for the rapid detection of defects in a large number of steel sheets, thereby improving inspection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of printer technology, and more particularly to a method, storage medium, electronic device, and apparatus for detecting defects in steel sheets. Background Technology

[0002] In modern office environments, laser printers are widely used for their efficient and high-quality print output. One of the core components of a laser printer is the toner cartridge (photosensitive drum), which is responsible for forming an electrostatic latent image and transferring the image onto the paper using toner. To ensure print quality and extend the lifespan of the toner cartridge, it is necessary to regularly remove excess toner and impurities from the surface of the photosensitive drum. This task is primarily accomplished by the toner cartridge doctor blade, especially steel doctor blades, which are widely used due to their excellent wear resistance and cleaning effect.

[0003] A steel scraper is typically installed in the toner cartridge assembly, with a steel blade pressed tightly against the surface of the photosensitive drum. As the drum rotates, the steel blade effectively scrapes away excess toner, ensuring the drum surface remains clean and guaranteeing clear, flawless images with every print. Furthermore, the steel blade helps remove tiny particles and other contaminants from the drum surface, reducing wear on the photosensitive layer and extending the toner cartridge's lifespan. Therefore, the quality of the steel blade directly impacts the overall performance and reliability of the printer.

[0004] The existing steel sheet production process is as follows: 1) Material selection - Selecting suitable stainless steel as the steel sheet; 2) Cutting and forming: Using precision shearing or laser cutting technology, the stainless steel sheet is cut into the required size and shape, and then formed into the designed structure through processes such as stamping and bending; 3) Surface treatment: Cleaning the steel sheet, removing oil, oxides and other impurities, and making the surface of the steel sheet smooth and flat through grinding or polishing. If necessary, applying rust inhibitors or wear-resistant coatings; 4) Quality inspection: Because the quality of the steel sheet directly affects the performance and lifespan of the steel sheet scraper, which in turn leads to printing quality problems or even drum damage, it is necessary to inspect the quality of the steel sheet and select defective products. The existing quality inspection relies on manual visual inspection of the appearance of the steel sheet for defects. Although this method is accurate, it is inefficient, time-consuming, and easily affected by human factors. In addition, manual inspection is costly and not conducive to large-scale production and quality control.

[0005] Therefore, how to improve the efficiency of defect detection in steel sheets and achieve automated, high-precision detection is a technical problem that technicians need to solve. Summary of the Invention

[0006] This invention provides a method, storage medium, electronic device, and apparatus for detecting defects in steel sheets, which solves the technical problem of low detection efficiency caused by manual visual inspection of steel sheet defects in the prior art.

[0007] The first aspect of this invention provides a method for detecting defects in steel sheets, comprising:

[0008] S1: Acquire an image of the steel sheet to be inspected;

[0009] S2: Input the image to be inspected into the defect detection model to identify the defect type and obtain the corresponding defect type. The training samples of the defect detection model include labeled images of one or more of the following defect types: rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not meeting standards, and deformation.

[0010] In the first possible implementation of the steel sheet defect detection method in the first aspect, the method further includes the following steps before S1:

[0011] S01: Obtain images of steel sheet region A and region B, and obtain image A and image B. Region A and region B are symmetrical about the width axis of the steel sheet.

[0012] S02: Compare and analyze image A and image B to obtain the difference K between image A and image B;

[0013] S03: Determine whether K meets the preset standard;

[0014] S04: If it meets the requirements, then repeat S01 to S03. In each cycle, the union of region A and the previous region A does not overlap. In each cycle, the union of region B and the previous region B does not overlap. Continue until the union of all regions A and region B coincides with the welding surface. Then it is considered qualified. The steel sheet is sent to the processing station to execute the next production process.

[0015] S05: If it does not meet the requirements, it is determined that there is a defect, and step S1 is executed.

[0016] In conjunction with the first possible implementation of the steel sheet defect detection method of the first aspect, in the second possible implementation of the steel sheet defect detection method of the first aspect, S05 includes:

[0017] S051: If it does not comply, it is determined that there is a defect;

[0018] S052: Based on the outline of the steel sheet, the order and direction of image acquisition, stitch together image A and image B to obtain stitched image C;

[0019] S053: Acquire image D, which is the image corresponding to the area on the steel sheet that is not covered by region A and region B;

[0020] S1 includes: stitching image C and image D together to obtain the image to be inspected.

[0021] In conjunction with the first possible implementation of the steel sheet defect detection method of the first aspect, in the third possible implementation of the steel sheet defect detection method of the first aspect, S1 includes:

[0022] S11: Obtain an image of the steel sheet to be inspected;

[0023] S12: Determine preliminary defect information of the image to be inspected based on the difference K. The preliminary defect information includes the defect area and / or defect edge.

[0024] S13: Based on the preliminary defect information, preprocess and mark the image to be inspected;

[0025] The defect detection model incorporates an attention mechanism, with the initial defect information serving as input to this mechanism.

[0026] In conjunction with the first possible steel sheet defect detection method of the first aspect, in the fourth possible steel sheet defect detection method of the first aspect, the acquisition directions of image A and image B are opposite or opposite to each other.

[0027] In the fifth possible steel sheet defect detection method of the first aspect, which combines the steel sheet defect detection method of the first aspect, the steel sheet defect detection method of the first aspect (first possible implementation), the steel sheet defect detection method of the first aspect (second possible implementation), the steel sheet defect detection method of the first aspect (third possible implementation), or the steel sheet defect detection method of the first aspect (fourth possible implementation), S02 includes:

[0028] Image A and image B are compared and analyzed using any one or more of the following methods: pixel-level comparison, structural similarity index, feature matching, and histogram comparison, to obtain the difference K between image A and image B.

[0029] In conjunction with the fifth possible steel sheet defect detection method of the first aspect, in the sixth possible steel sheet defect detection method of the first aspect, when a structural similarity index is used, S02 includes:

[0030] S021: Convert image A and image B into grayscale images to obtain grayscale image A and grayscale image B;

[0031] S022: For corresponding positions in grayscale images A and B, calculate local SSIM values ​​using the selected window sliding mechanism;

[0032] S023: Calculate the average of all local SSIM values ​​to obtain the global SSIM value.

[0033] A second aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the steps of any of the possible steel sheet defect detection methods provided in the first aspect.

[0034] The third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the possible implementations of the steel sheet defect detection method provided in the first aspect.

[0035] A fourth aspect of the present invention provides a steel sheet defect detection device, comprising:

[0036] Positioning components are used to fix the steel sheet at the image acquisition station;

[0037] Image acquisition component, used to acquire images of steel sheets;

[0038] Image analysis component for analyzing and processing images.

[0039] As can be seen from the above technical solutions, the present invention has the following advantages:

[0040] The steel sheet defect detection method provided by this invention automates the detection of steel sheet defects by acquiring an image of the steel sheet to be inspected and inputting it into a defect detection model for identification. Automated detection avoids the tedious steps of manual inspection and can quickly detect defects in a large number of steel sheets, thereby improving detection efficiency.

[0041] The defect detection model, after training, can identify various defect types, including rounded corner protrusions, rounded corner concavities, rounded corner cracks, non-standard rounded corner dimensions, and deformation. Compared to manual inspection, the defect detection model, trained on a large number of samples, can more accurately identify defects and reduce the false positive rate. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating a method for detecting defects in steel sheets, as provided in an embodiment of the present invention. Detailed Implementation

[0044] The present invention provides a method, storage medium, electronic device and apparatus for detecting defects in steel sheets, and solves the technical problem that the detection method of detecting defects in steel sheets by manual visual inspection in the prior art is inefficient.

[0045] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0046] In the description of the embodiments of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application. In addition, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0047] In the description of the embodiments of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a replaceable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this application based on the specific circumstances.

[0048] Current quality inspection relies on manual visual inspection of the appearance of steel sheets to check for defects. Although this method is accurate, it is inefficient, time-consuming, and easily affected by human factors. In addition, manual inspection is costly and not conducive to large-scale production and quality control.

[0049] Example 1

[0050] Please see Figure 1 The steel sheet defect detection method provided in this embodiment of the invention includes:

[0051] S1: Acquire an image of the steel sheet to be inspected;

[0052] Specifically, an industrial camera or high-resolution camera is used to acquire images of the steel sheet under suitable lighting conditions. The acquired images are then transmitted to an image processing system for necessary preprocessing, such as image cropping and noise removal, to obtain the image to be inspected. For example: assuming an industrial camera with a resolution of 1920x1080 is used to acquire images of the steel sheet under uniform white light illumination, the original image is obtained. The original image is then transmitted to a computer, where image processing software is used to crop it, removing the background area, resulting in an image to be inspected with a size of 1000x800.

[0053] S2: Input the image to be inspected into the defect detection model to identify the defect type and obtain the corresponding defect type. The training samples of the defect detection model include labeled images of one or more of the following defect types: rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not meeting standards, and deformation.

[0054] Specifically, the steps include:

[0055] Collect and prepare training samples:

[0056] Collect a large number of steel sheet images containing various defect types, such as rounded corner protrusions, rounded corner concave points, rounded corner cracks, non-standard rounded corner dimensions, and deformations (including small edge deformation and planar deformation). Annotate the collected images, clarifying the location and type of defects in each image, to obtain labeled defect type images.

[0057] Building a neural network model: Choose a suitable neural network architecture, such as Convolutional Neural Network (CNN), Deep Residual Network (ResNet), or Dense Network (DenseNet). Adjust the network structure according to specific needs, such as increasing or decreasing the number of convolutional layers, adjusting the kernel size, or introducing skip connections.

[0058] Data preprocessing:

[0059] Preprocessing operations on training samples, such as image scaling (adjusting the image size to the model input size), normalization (scaling pixel values ​​to the range of [0,1] or [-1,1]), and data augmentation (random rotation, flipping, cropping, adding noise, etc.), can improve the model's generalization ability.

[0060] Model training:

[0061] The preprocessed training samples are input into the neural network model for forward propagation to obtain the prediction results. The loss value (e.g., cross-entropy loss, mean squared error loss, etc.) between the prediction results and the true labels is calculated. The backpropagation algorithm calculates the gradient based on the loss value and updates the network parameters (e.g., weights, biases, etc.) to minimize the loss value. This process is repeated until the model's performance on the validation set reaches the expected level (e.g., accuracy exceeding 95%).

[0062] Model evaluation and optimization:

[0063] The trained model is evaluated using an independent test set to test its performance metrics, including accuracy, precision, recall, and F1 score. Based on the evaluation results, the model is optimized by adjusting hyperparameters (learning rate, batch size, etc.), increasing training data, and employing regularization techniques (such as dropout and batch normalization).

[0064] Model saving and application:

[0065] Save the trained model for use in subsequent defect detection tasks. Input the image to be inspected into the trained defect detection model, and the model outputs information such as defect type, location, and confidence level.

[0066] For example: Suppose a Convolutional Neural Network (CNN) is used as the defect detection model. Collect 10,000 images of steel sheets containing various defect types, and label each image to obtain labeled defect type images. Resize the images to 224x224 and normalize them. Employ data augmentation techniques, such as random rotation from 0-360 degrees, random flipping, and random cropping, to increase the diversity of the training data. Construct a CNN model with 5 convolutional layers and 2 fully connected layers, using the ReLU activation function and a softmax classifier. Input the preprocessed training samples into the CNN model, perform forward and backward propagation, and update the network parameters. After 50 epochs of training, the model achieves 96% accuracy on the validation set. Evaluate the model using the test set, obtaining an accuracy of 95.5%, precision of 94.8%, recall of 96.2%, and an F1 score of 95.5%. Save the trained CNN model and apply it to the steel sheet defect detection task. The image to be inspected is input into the CNN model, and the model outputs the defect type as "rounded corner crack" with a confidence level of 0.85.

[0067] The beneficial effects of this embodiment include:

[0068] ① By acquiring images of the steel sheets to be inspected and inputting them into a defect detection model for identification, the detection of defects in steel sheets is automated. Automated inspection avoids the tedious steps of manual inspection and can quickly detect defects in a large number of steel sheets, thereby improving inspection efficiency.

[0069] ② The defect detection model, after training, can identify various defect types, including rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not meeting standards, and deformation. Compared to manual inspection, the defect detection model, trained on a large number of samples, can more accurately identify defects and reduce the false positive rate.

[0070] ③ Automated testing systems can replace a large amount of manual testing work, reducing manpower input and lowering labor costs.

[0071] While the aforementioned detection method can detect defects in steel sheets and classify them into qualified and defective products, further grading defective products is necessary. However, in actual production, the number of qualified steel sheets far exceeds the number of defective sheets. Therefore, if all steel sheets were to undergo defect detection using the aforementioned method, a large number of qualified sheets would require detailed defect analysis, consuming considerable time and impacting overall production efficiency. To improve overall production efficiency, the following steps are added before step S1. These steps achieve preliminary classification of qualified and defective products before detailed defect detection, thereby improving overall production efficiency.

[0072] S01: Obtain images of steel sheet region A and region B, and obtain image A and image B. Region A and region B are symmetrical about the width axis of the steel sheet.

[0073] Specifically, if the steel sheet is defect-free, any two regions symmetrical about its width axis are highly similar. The width axis refers to the axis of symmetry perpendicular to the length of the steel sheet. In this step, two high-resolution cameras or other image acquisition devices are used to photograph regions A and B on the steel sheet that are symmetrical about the width axis, respectively, obtaining image A corresponding to region A and image B corresponding to region B. Acquiring images of the symmetrical regions provides basic data for subsequent comparative analysis. It should be understood that regions A and B can be arbitrarily selected, as long as they are symmetrical about the width axis, such as selecting two regions close to the width axis or two regions far from the width axis. Furthermore, the images A and B obtained by the image acquisition device will contain background images. To avoid interference from the background images, existing image segmentation techniques can be used to preprocess the initially captured images using coordinate or pixel information to remove the images of regions A and B. Alternatively, appropriate workstations can be designed to mask the imaging areas outside the steel sheet, making the background images identical throughout, thus eliminating background interference.

[0074] S02: Compare and analyze image A and image B to obtain the difference K between image A and image B;

[0075] Specifically, in this step, in order to determine how much difference exists between image A and image B, existing image comparison analysis methods are used to compare and analyze image A and image B to obtain the degree of difference between image A and image B. Since different image comparison analysis methods have different comparison indicators, the degree of difference K is specifically determined by the image comparison analysis method used. For example, if the structural similarity index (SSIM) is used, the degree of difference is the global SSIM value of image A and image B.

[0076] S03: Determine whether K meets the preset standard;

[0077] Specifically, by setting a preset standard and comparing the difference obtained in S02 with the preset standard, it is determined whether the difference K is within an acceptable range. The preset standard is the same indicator as the difference K, which can be expressed as a preset value or a preset range, and is determined by the image comparison analysis method used. The preset standard can be set using empirical methods, statistical analysis methods, or experimental adjustment methods. Among them, the empirical method selects a reasonable preset standard based on past experience data; the statistical analysis method conducts statistical analysis on a large number of sample data to find a suitable preset standard; and the experimental adjustment method finds the optimal preset standard through continuous experimentation and adjustment in practical applications. The setting of the preset standard should consider the balance between false alarm rate and false negative rate, that is, to reduce erroneous similarity judgments while avoiding missing truly similar images.

[0078] S04: If it meets the requirements, then repeat S01 to S03. In each cycle, the union of region A and the previous region A does not overlap. In each cycle, the union of region B and the previous region B does not overlap. Continue until the union of all regions A and region B coincides with the welding surface. Then it is considered qualified. The steel sheet is sent to the processing station to execute the next production process.

[0079] Specifically, if the conditions are met, it means that there are no defects in areas A and B. However, the requirement for the steel sheet to be of acceptable quality is that the entire welded surface is free of defects. Therefore, the remaining uninspected areas of the welded surface must continue to be inspected. Each time a new area is inspected, steps S01 to S03 are repeated. If the difference in the newly inspected area also meets the preset standard, the next new area is inspected until the union of all inspected areas coincides with the welded surface, meaning the entire welded surface has been inspected, and the entire steel sheet has been inspected. At this point, the product is considered qualified, and the qualified steel sheet is sent to the next processing station by a robotic arm or other automated equipment to ensure the continuity of the production line and product quality. If the difference between two symmetrical areas does not meet the preset standard, the process proceeds to step S05. In each cycle, it is necessary to ensure that the current inspection area has some uninspected areas compared to the previous inspection area. That is, the current inspection area can intersect with the previously inspected areas, but the area of ​​this intersection must be smaller than the area of ​​the current inspection area. It should be noted that when symmetrical regions A and B have the exact same defect in the same location, and these are the only two defects on the welded surface, there may be a possibility of missed detection. However, the probability of this is extremely low and within an acceptable error range.

[0080] Even better, because there are high-defect-occurrence areas, the steel sheet can be divided into high-defect-occurrence areas and non-defect-occurrence areas. The high-defect-occurrence areas can be used as regions A and B in the initial tests, and the non-defect-occurrence areas as regions A and B in subsequent tests. This improves the efficiency of determining the presence of defects. Furthermore, the areas of regions A and B in the high-defect-occurrence areas can be set smaller, while the areas of regions A and B in the non-defect-occurrence areas can be set larger, further improving detection efficiency.

[0081] Even better, in order to reduce the distance the image acquisition device travels, the acquisition directions of image A and image B can be set to opposite or opposite directions. Opposite means that the image is gradually acquired from the area near the width axis towards the two ends of the steel sheet in the length direction, while opposite means that the image is gradually acquired from the two ends of the steel sheet in the length direction towards the width axis.

[0082] S05: If it does not meet the requirements, it is determined that there is a defect, and step S1 is executed.

[0083] Specifically, if the difference between two symmetrical regions does not meet the preset standard, it means that there is a defect in the two symmetrical regions. Based on the purpose of improving production efficiency, it is to quickly pick out products with qualified welding quality from all the products that have been produced. When it is determined that there is a defect in the two symmetrical regions, it is also determined that there is a defect in the corresponding steel sheet. The defective products are picked out, that is, the classification of qualified products and defective products is completed. Then, step S1 is executed to identify the defect type and defect level of the defective products.

[0084] To improve image acquisition efficiency and reduce the burden on image acquisition equipment, step S05 is optimized as follows:

[0085] S051: If it does not comply, it is determined that there is a defect;

[0086] Specifically, if the difference between two symmetrical regions does not meet the preset standard, it means that there is a defect in the two symmetrical regions.

[0087] S052: Based on the outline of the steel sheet, the order and direction of image acquisition, stitch together image A and image B to obtain stitched image C;

[0088] Specifically, in this step, the goal is to stitch together the detected area of ​​the steel sheet using the acquired images A and B. When a defect is initially identified, two symmetrical region images, denoted as images A and B, have been acquired on either side of the steel sheet's width axis. Images A and B are preprocessed, including denoising, grayscale conversion, and edge enhancement, to improve the stitching quality. Feature point detection algorithms (such as SIFT, SURF, and ORB) are used to detect feature points in images A and B. Taking the contiguous region of images A and B as an example, a feature descriptor matching algorithm (such as the FLANN matcher) is used to find matching feature point pairs in the two images. The RANSAC algorithm is used to calculate the homography matrix between images A and B to eliminate the influence of perspective transformation. Based on the homography matrix, images A and B are stitched together to form a preliminary complete image, denoted as image C. During the stitching process, image fusion techniques (such as multi-band fusion) can be used to reduce stitching seams and brightness differences.

[0089] S053: Acquire image D, which is the image corresponding to the area on the steel sheet that is not covered by region A and region B;

[0090] Specifically, after completing the stitching of S052, the uncovered steel sheet areas in image C are identified, and images of these uncovered areas are acquired and denoted as image D. It is ensured that these images have sufficient overlap with image C. The newly acquired image D is preprocessed, including denoising, grayscale conversion, edge enhancement, etc., to improve the stitching quality.

[0091] Accordingly, S1 is optimized to: stitching together image C and image D to obtain the image to be inspected.

[0092] Specifically, feature point detection and matching algorithms are used to find matching feature points between image C and image D. The homography matrix between image C and the new image is calculated. Image D and image C are then stitched together to form the final complete image to be inspected. Image fusion techniques are used to handle seams and brightness differences.

[0093] Compared to directly re-acquiring a complete image of a steel sheet, obtaining a complete image through image stitching offers the following advantages: By acquiring symmetrical and remaining areas in sections, parallel processing or rapid switching between acquisition areas can be achieved, saving time; the entire steel sheet doesn't need to be moved or the acquisition equipment adjusted during the stitching process, reducing mechanical movement and adjustment time; sectioned acquisition allows the use of lower-resolution cameras because each area's image size is smaller, resulting in a high-resolution complete image through stitching; it reduces reliance on high-resolution, high-performance equipment, extending equipment lifespan and lowering maintenance costs; each area's image can be individually optimized (e.g., denoising, enhancement), improving local image quality and thus enhancing the overall quality of the final stitched image. During the stitching process, preliminary defect detection and analysis can be performed on each area, improving detection accuracy. It can be easily scaled to larger or more complex steel sheet inspection tasks.

[0094] By quickly classifying products into qualified and defective products through defect detection, qualified products are then sent to the next production process for further processing, while defective products are sent to the defect detection station for detailed defect analysis to determine the specific defect type. Compared to the traditional method of performing a complete defect analysis at one station before classification, qualified products can be selected and sent to the next process in a shorter time. By separating the detailed defect analysis from the main processing flow, the impact of defect analysis on processing speed is avoided, thereby improving the overall processing efficiency.

[0095] After initially determining that the steel sheet has defects, using the obtained defect information (such as defect location and type) to guide subsequent image stitching and defect type identification can significantly reduce the difficulty of identifying large models and improve identification efficiency and accuracy. Based on this, step S1 is optimized as follows:

[0096] S11: Obtain an image of the steel sheet to be inspected;

[0097] S12: Determine preliminary defect information of the image to be inspected based on the difference degree K. The preliminary defect information includes the defect area and / or defect edge.

[0098] Specifically, in the initial defect assessment, simple image processing techniques (such as edge detection and thresholding) or rule-based algorithms can be used to roughly locate the defect. For example, to determine the specific region causing the difference K, the pixel difference between image A and image B is calculated, generating a difference map. Each pixel value in the difference map represents the grayscale difference at the corresponding location. The difference map is binarized, marking areas with significant differences as white (or 1) and areas with insignificant differences as black (or 0). Through connected component analysis, all connected regions in the difference map are found; these regions are the defect areas. For example, if abnormal brightness changes are detected in an edge region, it may be initially identified as a defect edge.

[0099] Furthermore, during image stitching, areas containing defects can be prioritized for stitching and analysis. By prioritizing defective areas, computation for non-defective regions is reduced, improving processing speed. Let's assume a preliminary assessment indicates a defect on the left edge of the steel sheet. During image stitching, the region containing the left edge is stitched first to ensure image quality and high resolution in that area. In subsequent processing, the left edge region in the stitched image can be the focus of analysis, reducing computation for other regions.

[0100] S13: Preprocess and mark the image to be inspected based on the preliminary defect information;

[0101] Specifically, based on preliminary defect information, the image preprocessing parameters are adjusted. For example, if the defect is initially identified as a scratch, the edge information of the image can be enhanced; if it is initially identified as surface stains, the contrast and brightness can be adjusted. By adjusting the preprocessing parameters, defect features can be highlighted, improving the recognition accuracy of large models.

[0102] Furthermore, during image stitching, defective regions can be processed more finely, such as using high-resolution stitching algorithms or local optimization algorithms, to reduce stitching errors and improve image quality. Before inputting the image into a large model, the location and type of defective regions can be labeled on the image, providing additional information to aid the model's recognition and helping large models identify defects faster and more accurately. Alternatively, based on preliminary defect information, the stitched complete image can be cropped and scaled to highlight defective regions. For example, if a defect is initially determined to be located in a specific area of ​​the image, that area can be cropped and used as input to the large model. By cropping and scaling, defective regions are highlighted, reducing the size and complexity of the input image and improving the model's computational efficiency.

[0103] Correspondingly, an attention mechanism is introduced into the large model to make the model focus more on the defect region during the recognition process. For example, spatial attention or channel attention can be used to guide the model to focus on specific regions. Preliminary defect information can be used as input to the attention mechanism to guide the model to focus on specific regions. For example, the location information of the preliminary defect can be input into the attention mechanism to guide the model to focus on the defect region. For example, using spatial attention, an attention module can be introduced into the model to generate an attention map that highlights the defect region. Preliminary defect information (such as defect location) can be input into the attention mechanism to guide the model to focus on the defect region. The attention mechanism can make the model focus more on the defect region, improving recognition accuracy. By guiding the model to focus on specific regions, unnecessary computation can be reduced, improving computational efficiency.

[0104] By utilizing preliminary defect information for defect region localization, image preprocessing optimization, large model input optimization, and the introduction of attention mechanisms, the recognition difficulty of large models can be effectively reduced, improving the efficiency and accuracy of defect detection. These methods not only improve image quality and stitching accuracy but also optimize model input and training processes, thereby achieving more efficient and accurate defect detection.

[0105] To improve the accuracy and robustness of the difference calculation, step S02 is optimized as follows: image A and image B are compared and analyzed using any one or more of the following methods: pixel-level comparison, structural similarity index, feature matching, and histogram comparison, to obtain the difference K between image A and image B. K is expressed as different indicators depending on the specific method used.

[0106] Specifically, one method can be used individually for comparative analysis: pixel-level comparison, structural similarity index, feature matching, and histogram comparison. Alternatively, multiple methods can be combined for comprehensive comparative analysis.

[0107] Pixel-level comparison can be performed using either the absolute difference method or the mean squared error (MSE). The specific process for using the absolute difference method is as follows: calculate the difference in RGB values ​​(or grayscale values) of corresponding pixels in image A and image B, and then calculate the average or sum of all differences as the difference measure K. Alternatively, the specific process for using the mean squared error (MSE) method is as follows: calculate the average of the sum of the squares of the differences in RGB values ​​(or grayscale values) of corresponding pixels in image A and image B as the difference measure K.

[0108] The specific process of using the Structural Similarity Index (SSIM) is as follows: Convert images A and B to grayscale images, select a window size (e.g., 7x7 pixels), and slide the window to traverse the entire image. At each window location, calculate the local SSIM value. Calculate the average of all local SSIM values ​​to obtain the global SSIM value.

[0109] Feature matching can employ Scale Invariant Feature Transform (SIFT), Speed-Up Robust Feature Transform (SURF), or Oriented Fast and Rotated BRIEF (ORB), with the dissimilarity K calculated using either the number or quality of matching points. When based on the number of matching points: keypoints and their descriptors are extracted using SIFT, SURF, or ORB algorithms, and the best matching points are found using BFMatcher or other matching algorithms; RANSAC (for SIFT / SURF) or scale testing (for ORB) is used to remove erroneous matching points, retaining high-quality matching points; the number of high-quality matching points ultimately retained is used as the dissimilarity K. A higher number of matching points indicates a higher similarity between the two images; conversely, a lower number of matching points indicates a greater dissimilarity between the two images. When based on match point quality: find the best match point using BFMatcher or other matching algorithms and record the distance of each match point (i.e., the difference between descriptors); remove erroneous match points using RANSAC (for SIFT / SURF) or proportionality test (for ORB), retaining high-quality match points; calculate the average distance of all high-quality match points as the difference K. The smaller the match point distance, the higher the similarity between the two images; conversely, the larger the match point distance, the greater the difference between the two images.

[0110] For example: When using a structural similarity index, S02 includes:

[0111] S021: Convert image A and image B into grayscale images to obtain grayscale image A and grayscale image B;

[0112] Specifically, images A and B are converted to grayscale images, and Gaussian blur or other denoising algorithms are applied to remove noise from the grayscale images to obtain grayscale image A and grayscale image B.

[0113] S022: For corresponding positions in grayscale images A and B, calculate local SSIM values ​​using the selected window sliding mechanism;

[0114] Specifically, a suitable window size (e.g., 7x7 pixels) is selected for SSIM calculation of local regions. For each pair of symmetrical regions, the selected window is used to slide and calculate the local SSIM value at corresponding positions. The formula is as follows:

[0115]

[0116] Where: μ x and μ y These are the local means of two local regions. and C1 and C2 are the local variances of the two local regions, respectively, and C2 is the covariance of the two local regions. C1 and C2 are constants used to stabilize the denominator and prevent division by zero errors.

[0117] S023: Calculate the average of all local SSIM values ​​to obtain the global SSIM value, and use the global SSIM value as the difference K.

[0118] Set an appropriate SSIM threshold based on experimental or empirical data. For example, if the SSIM values ​​of images A and B are higher than 0.95, they are considered to be very similar and without obvious welding defects. If the global SSIM value is lower than the threshold, it indicates that there is a significant difference between the two symmetrical regions and there may be welding defects. Further examination of the local areas with low SSIM values ​​can be conducted to locate the specific defect location.

[0119] Example 2

[0120] An embodiment of the present invention provides a steel sheet defect detection device, comprising:

[0121] The positioning component is used to fix the steel sheet at the image acquisition station. The precise positioning component fixes the steel sheet to ensure that area A and area B are strictly symmetrical in each image capture. The image acquisition component is used to acquire images of the steel sheet. The image analysis component is used to analyze and process the images.

[0122] Specifically, the positioning assembly typically consists of high-precision mechanical clamps or positioning stages that precisely fix the steel sheet, ensuring stable and highly repeatable positioning. Before installation and use, the positioning assembly needs to be calibrated to ensure it accurately fixes the steel sheet in the predetermined position. The calibration process may include methods such as laser alignment and mechanical adjustment. Sensors (such as photoelectric sensors and position sensors) can be used to assist positioning and ensure accurate placement of the steel sheet. For example, the positioning assembly is a precision mechanical clamp that fixes the steel sheet using two adjustable clamping arms. During installation, the position of the clamping arms is adjusted using a laser alignment system to ensure that the area of ​​the steel sheet to be inspected corresponds to the optical axis of the image acquisition device, and that areas A and B are symmetrical about the width axis of the steel sheet.

[0123] The image acquisition component uses a high-resolution industrial camera or other image acquisition device to ensure sufficient image quality to capture minute defects. A suitable light source is needed to obtain a clear image. LED lights or other high-brightness light sources can be used, with a diffuser or ring light source to uniformly illuminate the weld surface. To avoid background interference, image segmentation techniques or methods to mask non-welded areas can be used during image acquisition. For example, a light shield can be designed to expose only the weld surface. An example: Two high-resolution industrial cameras are used, symmetrically placed on either side of the steel sheet. Each camera is equipped with a ring LED light source to ensure uniform illumination of the weld surface. During image acquisition, image segmentation algorithms remove background interference, retaining only the image of the weld surface.

[0124] The image analysis component executes steps S02 to S05 of any of the steel sheet defect detection methods in Embodiment 1, namely, comparing and analyzing image A and image B to obtain the difference K; determining whether K meets a preset standard; if it does, continuing the loop until the entire steel sheet is covered; if it does not, determining that a defect exists. Then, the large model is run to identify the defect type and classify the defect.

[0125] The steel sheet defect detection device provided in this embodiment can significantly improve the efficiency and accuracy of steel sheet defect detection and is suitable for automated detection in actual production environments.

[0126] Example 3

[0127] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steel sheet defect detection method of Embodiment 1. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives). The computer-readable storage medium includes instructions that direct a computing device to execute any of the steel sheet defect detection methods provided in Embodiment 1 or Embodiment 2.

[0128] Example 4

[0129] This invention also provides an electronic device, including a memory and a processor, i.e., a computer program stored in the memory;

[0130] The processor executes a computer program to implement the steel sheet defect detection method in Example 1.

[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, other working processes of the method described above can be referred to the corresponding processes in the foregoing embodiments, and will not be repeated here.

[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.

[0133] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0134] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0135] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of detecting defects in a steel sheet, characterized by, include: S01: Obtain images of steel sheet region A and region B, and obtain image A and image B. Region A and region B are symmetrical about the width axis of the steel sheet. S02: Compare and analyze image A and image B to obtain the difference K between image A and image B; S03: Determine whether K meets the preset standard; S04: If it meets the requirements, then repeat S01 to S03. In each cycle, the union of region A and the previous region A does not overlap. In each cycle, the union of region B and the previous region B does not overlap. Continue until the union of all regions A and region B coincides with the welding surface. Then it is considered qualified. The steel sheet is sent to the processing station to execute the next production process. S051: If it does not comply, it is determined that there is a defect; S052: Based on the outline of the steel sheet, the order and direction of image acquisition, stitch together image A and image B to obtain stitched image C; S053: Acquire image D, which is the image corresponding to the area on the steel sheet that is not covered by region A and region B; S1: Stitch together images C and D to obtain the image to be inspected; S2: Input the image to be inspected into the defect detection model to identify the defect type and obtain the corresponding defect type. The training samples of the defect detection model include labeled images of one or more of the following defect types: rounded corner protrusions, rounded corner concave points, rounded corner cracks, rounded corner dimensions not meeting standards, and deformation. The defect detection model is equipped with an attention mechanism, and the difference K is used to determine the preliminary defect information of the image to be inspected. The preliminary defect information includes the defect region and / or defect edge, and serves as the input to the attention mechanism.

2. The method of claim 1, wherein the step of detecting a defect in the steel sheet is characterized by, S1 includes: S11: Obtain an image of the steel sheet to be inspected; S12: Determine preliminary defect information of the image to be inspected based on the difference degree K, wherein the preliminary defect information includes defect regions and / or defect edges; S13: Preprocess and mark the image to be inspected based on the preliminary defect information.

3. The method for detecting defects in steel sheets according to claim 1, characterized in that: Image A and image B were acquired from opposite or opposite directions.

4. A method of detecting defects in a steel sheet according to any one of claims 1 to 3, characterized in that, S02 includes: Image A and image B are compared and analyzed using any one or more of the following methods: pixel-level comparison, structural similarity index, feature matching, and histogram comparison, to obtain the difference K between image A and image B.

5. A method of detecting defects in a steel sheet according to claim 4, wherein When using a structural similarity index, S02 includes: S21: Convert image A and image B into grayscale images to obtain grayscale image A and grayscale image B; S22: For corresponding positions in grayscale images A and B, calculate local SSIM values ​​using the selected window sliding mechanism; S23: Calculate the average of all local SSIM values ​​to obtain the global SSIM value.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the steel sheet defect detection method according to any one of claims 1 to 5.

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

8. A steel sheet defect detection apparatus characterized by comprising: The method for performing the steel sheet defect detection method according to any one of claims 1 to 5 includes: Positioning components are used to fix the steel sheet at the image acquisition station; Image acquisition component, used to acquire images of steel sheets; Image analysis component for analyzing and processing images.

Citation Information

Patent Citations

  • Detection method and device, detection equipment and storage medium

    CN112950563A

  • OLED display screen quality detection method based on artificial intelligence

    CN117173168A