Steel sheet scraper defect detection method, storage medium, electronic equipment and device

Through machine vision and deep learning technology, the welding defects of steel blade scrapers are automatically identified, which solves the problems of low efficiency and insufficient accuracy of manual visual inspection, and achieves efficient and accurate defect detection, improving production efficiency and product quality.

CN119693339AActive Publication Date: 2025-03-25ZHU HAI YOU TAI HUA GONG YOU XIAN GONG SI

Patent Information

Application Number
CN202411803145.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-25
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

In the prior art, the welding defects of the steel blade scraper are manually inspected, resulting in low production efficiency and difficult to detect minor defects, which affects the printing quality.

Method used

Using machine vision and deep learning technology, by obtaining the welded surface image of the steel blade scraper, inputting the defect detection model for defect type identification, realizing automated and high-precision defect detection.

Benefits of technology

It improves the efficiency and accuracy of steel blade scraper defect detection, can identify small defects, reduce labor costs, improve overall production efficiency, and ensure the quality of steel blade scraper.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693339A_ABST
    Figure CN119693339A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of printers, in particular to a steel sheet scraper defect detection method, a storage medium, electronic equipment and device.The steel sheet scraper defect detection method comprises the steps that firstly, an image of a steel sheet welding face of a to-be-detected steel sheet scraper is obtained, and a to-be-detected image is obtained; and inputting the to-be-detected image into a defect detection model which is trained by taking the marked defect type image as a training sample to carry out defect type identification, so as to obtain a corresponding defect type and realize defect detection of the steel sheet scraper. Through the machine vision and deep learning technology, automatic detection of the welding quality of the steel sheet scraper is achieved, the tedious process of manual visual inspection is avoided, dependence on manpower is reduced, the labor cost is reduced, a large amount of image data can be processed in a short time, real-time detection is achieved, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of printers, and in particular to a steel scraper defect detection method, storage medium, electronic equipment and device. Background Art

[0002] In modern office environments, laser printers are widely used for their high efficiency 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 to paper through toner. In order to ensure the print quality and extend the service life of the toner cartridge, it is necessary to regularly remove excess toner and impurities on the surface of the photosensitive drum. This task is mainly completed by the toner cartridge scraper, especially the steel scraper, which is widely used due to its good wear resistance and cleaning effect.

[0003] The scraper blade is usually installed in the drum assembly, with its working end close to the surface of the photosensitive drum. When the photosensitive drum rotates, the scraper blade can effectively scrape off excess toner, ensuring that the surface of the photosensitive drum remains clean, thus ensuring that every print can produce a clear, flawless image. In addition, the scraper blade can also help remove tiny particles and other contaminants on the surface of the photosensitive drum, reduce wear on the photosensitive layer, and extend the service life of the drum. Therefore, the quality of the scraper blade directly affects the performance and reliability of the entire printer.

[0004] The existing production process of steel scrapers is as follows: 1) Material selection - select suitable stainless steel materials as the working part of the scraper; select suitable metal materials as the bracket to provide sufficient support and fixation; 2) Cutting and forming: use precision shearing or laser cutting technology to cut the stainless steel sheet into the required size and shape, and use stamping, bending and other processes to form the bracket material into the structure required by the design; 3) Surface treatment: clean the steel sheet, remove impurities such as oil, oxides, etc., make the surface of the steel sheet smooth and flat by grinding or polishing, and apply rust inhibitor or wear-resistant coating if necessary; 4) Laser welding 1) Connection: Precisely position the steel sheet on the bracket and fix it with a clamp. Use laser welding technology to firmly weld the steel sheet to the bracket to ensure high precision and small heat-affected zone. Adjust parameters such as laser power and welding speed to ensure welding quality; 5) Cleaning and trimming: Remove welding slag and grind or polish the welding area to make it smooth and flat; 6) Quality inspection: Since welding quality directly affects the performance and life of the steel scraper, welding defects may cause the scraper to loosen, fail early, have printing quality problems, and even damage the toner cartridge. Therefore, it is necessary to inspect the welding quality and select defective products. Existing steel scraper defect detection mainly relies on manual visual inspection. Although this method is accurate, it is inefficient, time-consuming, and easily affected by human factors. Manual visual inspection is difficult to detect minor defects, such as tiny cracks or burrs in the weld, which may lead to subsequent printing quality problems. In addition, manual inspection is costly and is not conducive to large-scale production and quality control.

[0005] Therefore, how to improve the defect detection efficiency of steel scrapers and realize automated and high-precision detection is a technical problem that technicians currently need to solve. Summary of the invention

[0006] The present invention provides a steel scraper defect detection method, storage medium, electronic equipment and device, which are used to solve the technical problem of low production efficiency caused by the detection method of steel scraper welding defects through manual visual inspection in the prior art.

[0007] A first aspect of the present invention provides a method for detecting defects in a steel scraper, comprising:

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

[0009] S2: The image to be inspected is input into a defect detection model for defect type identification to obtain a corresponding defect type. The training samples of the defect detection model include one or more annotated images of the following defect types: burn-through, solder joint bulging, solder joint diameter not meeting the standard, solder joint burrs, and irregular weld pool shape.

[0010] In a first possible implementation of the steel scraper defect detection method of the first aspect, the defect detection model includes:

[0011] Input layer: receiving the image to be inspected and preprocessing the image to be inspected to obtain a preprocessed image, wherein the preprocessing includes resizing, normalization and data enhancement;

[0012] Feature extraction layer: extract multi-scale features from the preprocessed image and generate feature maps of different scales;

[0013] Feature fusion and enhancement layer: Feature pyramid network (FPN) and path aggregation network (PAN) are used to fuse feature maps of different scales to obtain a fused feature map;

[0014] Object detection and classification layer: Perform object detection and classification on the fused feature map, and output the defect bounding box, confidence level, and category probability;

[0015] Defect classification layer: classifies and grades the detected defects according to the bounding box, the confidence level and the category probability, and outputs the detection results.

[0016] In combination with a steel scraper defect detection method of the first aspect or a first possible implementation of the steel scraper defect detection method of the first aspect, in a second possible implementation of the steel scraper defect detection method of the first aspect, before S1, the following is further included:

[0017] S01: Acquire images of region A and region B to obtain image A and image B, where region A and region B are two non-overlapping regions on the welding surface of the steel sheet;

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

[0019] S03: Determine whether K meets a preset standard, where the preset standard is determined based on the difference in the number of solder joints between area A and area B;

[0020] S04: If not, it is determined that there is a defect.

[0021] In combination with the second possible implementation of the steel scraper defect detection method of the first aspect, in a third possible implementation of the steel scraper defect detection method of the first aspect, after S04, the following steps are further included:

[0022] S05: If it meets the requirements, then loop S01 to S03. The area A corresponding to each loop does not overlap with the union of the previous area A, and the area B corresponding to each loop does not overlap with the union of the previous area B. Until the union of all areas A and B coincides with the welding surface, it is judged to be qualified, and the steel scraper is sent to the processing station to execute the next production process.

[0023] In combination with the second possible implementation of the steel scraper defect detection method of the first aspect, in a fourth possible implementation of the steel scraper defect detection method of the first aspect, the width direction of the region A is the same as the width direction of the welding surface, and the width of the region A is equal to the width of the welding surface;

[0024] The acquisition direction of image A and image B is perpendicular to the welding surface of the steel sheet.

[0025] In combination with the second possible implementation of the steel scraper defect detection method of the first aspect, in a fifth possible implementation of the steel scraper defect detection method of the first aspect, S02 includes:

[0026] Image A and image B are analyzed using a pixel-level comparison method or a frequency-domain-based image comparison method to obtain the difference K between image A and image B.

[0027] In combination with the fifth possible implementation of the steel scraper defect detection method of the first aspect, in a sixth possible implementation of the steel scraper defect detection method of the first aspect, when the structural similarity index is used, S02 includes:

[0028] S021: Preprocessing image A and image B, including denoising and alignment;

[0029] S022: Calculate the pixel-level difference between image A and image B to generate a difference image;

[0030] S023: Calculate the total difference degree K of the difference image.

[0031] The second aspect of the present invention provides an electronic device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any possible steel scraper defect detection method provided in the first aspect.

[0032] A 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 possible steel scraper defect detection method provided in the first aspect.

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

[0034] A positioning component, used to fix the steel scraper at the image acquisition station;

[0035] An image acquisition component, used for acquiring images of the welding surface of the steel sheet;

[0036] Image analysis component, used to analyze and process images.

[0037] It can be seen from the above technical solutions that the present invention has the following advantages:

[0038] ① The steel scraper defect detection method provided by the present invention first obtains an image of the steel sheet welding surface of the steel scraper to be detected to obtain an image to be detected; then the image to be detected is input into a defect detection model trained by using a marked defect type image as a training sample to identify the defect type, obtain the corresponding defect type, and realize the defect detection of the steel scraper. Through machine vision and deep learning technology, the automatic detection of the welding quality of the steel scraper is realized, avoiding the tedious process of manual visual inspection, reducing dependence on manual labor, reducing labor costs, and being able to process a large amount of image data in a short time, realizing real-time detection, and improving detection efficiency.

[0039] ② The deep learning model can identify tiny defects that are difficult to detect with human vision, thereby improving the accuracy of defect detection. The model detection results are not affected by human factors and have high consistency and reliability.

[0040] ③Through high-precision defect detection, the quality of the steel scraper can be effectively guaranteed, thereby improving the overall performance and service life of the laser printer.

[0041] ④This method can be applied to the detection of steel scrapers of different models and specifications. It has strong adaptability and scalability, and can be integrated with the existing production line to achieve seamless connection and improve overall production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0043] Figure 1 A schematic flow chart of a steel scraper defect detection method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The embodiments of the present invention provide a steel scraper defect detection method, storage medium, electronic device and device, which are used to solve the technical problem that the detection method of steel scraper welding defects through manual visual inspection in the prior art leads to low production efficiency.

[0045] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

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

[0047] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a replaceable connection, or an integral connection, it can be a mechanical connection, it can be an electrical connection, it can be a direct connection, it can be indirectly connected through an intermediate medium, and it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0048] The existing steel scraper welding quality inspection relies on manual visual inspection of the quality of the welding part. Although this inspection method has high inspection accuracy, it has low inspection efficiency and is not conducive to improving production efficiency and reducing production costs.

[0049] Embodiment 1

[0050] See also Figure 1 The steel scraper defect detection method provided by the embodiment of the present invention comprises:

[0051] S1: Acquire the welding surface image of the steel scraper to be inspected to obtain the image to be inspected;

[0052] Specifically, an industrial camera or a high-resolution camera is used to capture images of the welding surface of the steel scraper under appropriate lighting conditions. The captured image is transmitted to the image processing system, and necessary preprocessing is performed, such as image cropping, noise removal, etc., to obtain the image to be inspected. Exemplary: Assume that an industrial camera with a resolution of 1920x1080 is used to capture images of the welding surface of the steel scraper under uniform white light illumination to obtain the original image. The original image is transmitted to a computer, and the image processing software is used to crop it, remove the background area, and obtain 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 one or more annotated images of the following defect types: burn-through, solder joint bulge, solder joint diameter not meeting the standard, solder joint burr and irregular weld pool shape.

[0054] Specifically, the step includes:

[0055] Collect and prepare training samples:

[0056] Collect a large number of steel scraper welding surface images containing various defect types, such as burn-through, weld bulge, weld diameter not meeting the standard (weld diameter is too small and weld diameter is too large), weld burrs, irregular weld pool shape, etc. Annotate the collected images, clarify the location, type and other information of the defects in each image, and obtain labeled defect type images.

[0057] Build a neural network model: Select a suitable neural network architecture, such as convolutional neural network (CNN), deep residual network (ResNet), dense network (DenseNet), etc. Adjust the network structure according to specific needs, such as increasing or decreasing the number of convolutional layers, adjusting the size of the convolution kernel, introducing skip connections, etc.

[0058] Data preprocessing:

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

[0060] Model training:

[0061] The preprocessed training samples are input into the neural network model and forward propagation is performed to obtain the prediction results. The loss value between the prediction result and the true label (such as cross entropy loss, mean square error loss, etc.) is calculated. The back propagation algorithm calculates the gradient according to the loss value and updates the network parameters (such as weights, biases, etc.) to minimize the loss value. Repeat the above process until the performance of the model on the validation set reaches the expected value (for example, the accuracy rate reaches more than 95%).

[0062] Model evaluation and optimization:

[0063] Use an independent test set to evaluate the trained model and test the model's performance indicators such as accuracy, precision, recall, F1 score, etc. Optimize the model based on the evaluation results, such as adjusting hyperparameters (learning rate, batch size, etc.), increasing training data, and using regularization techniques (such as dropout, batch normalization, etc.).

[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.

[0066] Exemplary: Assume that a convolutional neural network (CNN) is used as a defect detection model: 10,000 images of steel scraper welding surfaces containing various defect types are collected, and each image is annotated to obtain a labeled defect type image. The image size is adjusted to 224x224, and the image is normalized. Data enhancement techniques are used, such as random rotation of 0-360 degrees, random flipping, random cropping, etc., to increase the diversity of training data. A CNN model containing 5 convolutional layers and 2 fully connected layers is constructed, and the ReLU activation function and softmax classifier are used. The preprocessed training samples are input into the CNN model, and forward propagation and back propagation are performed to update the network parameters. After 50 epochs of training, the accuracy of the model on the validation set reached 96%. The model was evaluated using the test set, and the accuracy, precision, recall and F1 score were 95.5%, 94.8%, 96.2%, and 95.5%. The trained CNN model is saved and applied to the steel scraper welding surface defect detection task. The image to be inspected is input into the CNN model, and the model outputs the defect type as "burrs on the solder joint" with a confidence level of 0.85.

[0067] The beneficial effects of this embodiment include:

[0068] ① Through machine vision and deep learning technology, the automatic detection of steel scraper welding quality is realized, avoiding the tedious process of manual visual inspection, reducing dependence on manual labor, reducing labor costs, and being able to process a large amount of image data in a short time, realizing real-time detection and improving detection efficiency.

[0069] ② The deep learning model can identify tiny defects that are difficult to detect with human vision, thereby improving the accuracy of defect detection. The model detection results are not affected by human factors and have high consistency and reliability.

[0070] ③Through high-precision defect detection, the quality of the steel scraper can be effectively guaranteed, thereby improving the overall performance and service life of the laser printer.

[0071] ④This method can be applied to the detection of steel scrapers of different models and specifications. It has strong adaptability and scalability, and can be integrated with the existing production line to achieve seamless connection and improve overall production efficiency.

[0072] Specifically, in order to design a model that can identify steel scraper defects and classify and grade them according to the defect type and degree, the following is a detailed model design scheme that combines the convolutional neural network (CNN) architecture in deep learning and the target detection algorithm.

[0073] 1. Input layer: The input layer is used to receive the image to be inspected and preprocess it to obtain the preprocessed image. The preprocessing includes resizing, normalization and data enhancement. More specifically, the processing includes: resizing, adjusting the image to be inspected to the uniform size required by the model, and then normalizing, normalizing the pixel values ​​of the resized image to the range of [0,1] to accelerate training and improve model stability, and then performing data enhancement, applying random flipping, rotation, scaling and other data enhancement techniques to improve the generalization ability of the model.

[0074] 2. Feature extraction layer: extract multi-scale features from the preprocessed image and generate feature maps of different scales. Specifically, the YOLOv5s network architecture is used, including the focus layer, convolution block 1, convolution block 2, convolution block 3, CSPNet block 1 and CSPNet block 2. YOLOv5s is a lightweight target detection model, and its network architecture includes the following parts: Backbone: feature extraction network, responsible for extracting image features, using the CSPDarknet53 architecture; Neck: feature fusion network, responsible for fusing feature maps of different scales, using FPN and PAN architecture; Head: target detection and classification network, responsible for outputting detection results, including bounding boxes, confidence levels and category probabilities. The present invention uses YOLOv5s as a defect detection model, and its feature extraction layer corresponds to the Backbone part, as follows:

[0075] Focus Layer

[0076] The Focus layer is a unique layer in YOLOv5s, which is used to increase the number of channels in the initial stage of the network while retaining spatial information. The core idea of ​​the Focus layer is to increase the number of channels of the input image from 3 (RGB) to a higher dimension (such as 32) through slicing operations, thereby providing more feature information for subsequent convolution operations.

[0077] Focus layer workflow:

[0078] 1. Slicing operation: The input image is sliced ​​into multiple small blocks, each of which contains multiple adjacent pixels.

[0079] 2. Channel expansion: The sliced ​​image blocks are rearranged to form new channels. For example, a 3x3 slicing operation can expand a 3-channel RGB image to 32 channels.

[0080] 3. Convolution operation: The expanded feature map is processed through a convolution layer to extract higher-level features.

[0081] Conv Block 1

[0082] It contains multiple convolutional layers (Conv), batch normalization layers (Batch Normalization, BN) and activation functions (such as Leaky ReLU) to extract preliminary features of the image.

[0083] CSPNet Block 1

[0084] The CSPNet structure is used to divide the feature map into two parts, one part undergoes convolution operation, and the other part is directly concatenated with the convolved feature map, which enhances the feature representation capability and reduces the amount of calculation.

[0085] CSPNet workflow:

[0086] 1. Feature map segmentation: The input feature map is divided into two parts.

[0087] 2. Convolution operation: A portion of the feature map is processed through a series of convolutional layers.

[0088] 3. Feature fusion: The processed feature map is concatenated with the unprocessed feature map to form a new feature map.

[0089] 4. Repeated operation: The above steps are repeated in multiple stages to form the complete structure of CSPNet.

[0090] Conv Block 2 and CSPNet Block 2 repeat the above processes of Conv Block 1 and CSPNet Block 1 respectively to further extract more advanced features.

[0091] Conv Block 3

[0092] Through deeper convolution operations, deeper features of the image are extracted and multi-scale feature maps are generated, such as P3, P4, P5, P6, etc. Among them:

[0093] -P3: The feature map size is 1 / 8 of the input image, with less semantic information but rich spatial information;

[0094] -P4: The feature map size is 1 / 16 of the input image, and the semantic information is richer;

[0095] -P5: The feature map size is 1 / 32 of the input image, and the semantic information is rich;

[0096] -P6: The feature map size is 1 / 64 of the input image, with the richest semantic information but less spatial information.

[0097] These multi-scale feature maps are used in the subsequent feature fusion and enhancement layers. Under the action of FPN and PAN, feature maps of different scales are fused to generate fused feature maps for target detection and classification.

[0098] 3. Feature fusion and enhancement layer: Feature pyramid network (FPN) and path aggregation network (PAN) are used to fuse feature maps of different scales to obtain fused feature maps, where: FPN fuses high-level semantic information with low-level spatial information through a top-down path; PAN introduces a bottom-up path based on FPN to form a bidirectional connection with FPN, further enhancing the expressiveness of feature maps and the efficiency of information transmission. Its main function is to enhance the expressiveness of feature maps and improve the model's ability to detect targets of different sizes. The following is a detailed analysis of the specific functions, workflows, and relationships between FPN and PAN:

[0099] FPN (Feature Pyramid Network)

[0100] The main function of FPN is to establish lateral connections between feature maps of different scales, thereby fusing feature information at different levels. FPN combines high-level semantic information with low-level spatial information through a top-down path, allowing the model to simultaneously use features of different scales for target detection.

[0101] FPN workflow:

[0102] 1. Multi-scale feature extraction: In the feature extraction layer (Backbone), after the image passes through multiple convolutional layers, feature maps of different scales will be generated. For example, YOLOv5s will generate feature maps of multiple scales such as P3, P4, P5, and P6.

[0103] 2. Top-down path: Starting from the feature map of the highest layer, its size is enlarged to the same size as the feature map of the next layer through upsampling operations (such as bilinear interpolation).

[0104] 3. Horizontal connection: perform element-wise addition on the upsampled feature map and the feature map of the next layer to fuse feature information of different scales.

[0105] 4. Repeated operation: The above steps are repeated at multiple levels to form a pyramid-shaped feature graph structure.

[0106] Advantages of FPN:

[0107] Multi-scale feature fusion: By fusing feature maps of different scales, the model can better detect objects of different sizes. Enhance semantic information: High-level feature maps contain richer semantic information. Through a top-down path, this information is passed to low-level feature maps, enhancing the expressiveness of feature maps. Improve detection accuracy: FPN can effectively improve the accuracy of target detection, especially when dealing with multi-scale targets.

[0108] PAN (Path Aggregation Network)

[0109] PAN further enhances the transmission path of feature maps based on FPN. PAN introduces a bottom-up path to form a bidirectional connection with the top-down path of FPN, thereby further enhancing the expressiveness of feature maps and the efficiency of information transmission.

[0110] PAN workflow:

[0111] 1. Bottom-up path: After the top-down path of FPN is completed, PAN introduces a bottom-up path to pass the low-level feature map to the high-level feature map through convolution and upsampling operations.

[0112] 2. Feature fusion: The bottom-up feature map is fused with the top-down feature map to form a richer feature representation.

[0113] 3. Repeated operation: The above steps are repeated at multiple levels to form a bidirectional feature transfer path.

[0114] Advantages of PAN:

[0115] Bidirectional feature transfer: Through the bidirectional path from top to bottom and bottom to top, PAN can transfer and fuse feature information more effectively. Enhanced feature expression: The bidirectional path enables the feature map to retain more detailed information and semantic information during the transfer process, improving the expressiveness of the feature map. Improved detection performance: PAN can further improve the performance of target detection, especially when dealing with complex scenes and multi-scale targets.

[0116] Relationship between FPN and PAN

[0117] In the YOLOv5s model, FPN and PAN together constitute the feature fusion and enhancement layer (Neck), and their workflow is as follows:

[0118] 1.FPN processing: After the image passes through the feature extraction layer (Backbone), feature maps of multiple scales are generated. FPN transfers high-level semantic information to low-level feature maps through a top-down path for feature fusion.

[0119] 2. PAN processing: After the top-down path of FPN is completed, PAN introduces a bottom-up path to transfer the low-level feature maps to the high-level feature maps, further enhancing the expressiveness of the feature maps and the efficiency of information transfer.

[0120] 4. Object detection and classification layer: Detect and classify objects on the fused feature map, and output the bounding box, confidence, and category probability of the defect. The object detection and classification layer (Head) is the core part of the entire defect detection model, responsible for the final output of the detection results, that is, identifying and classifying defects in the image. The main functions of this layer include bounding box regression, confidence prediction, and category probability prediction. In addition, in order to optimize the model training process, the Head layer also designs a multi-task loss function for comprehensively evaluating the performance of the model on various tasks. The following is a detailed analysis of the Head layer:

[0121] 1. Detection Head

[0122] The detection head is responsible for extracting and outputting the final detection results from the feature map. Specifically, it contains three main tasks:

[0123] ① Bounding Box Regression:

[0124] Function: Predict the bounding box position of each defect, that is, the specific location of the defect in the image.

[0125] Output: The position parameters of the bounding box, including the center coordinates (x, y) and the width (w) and height (h).

[0126] Working process:

[0127] Feature extraction: Extract features related to target detection from the feature maps output by the feature fusion and enhancement layers (FPN and PAN).

[0128] Regression calculation: Through the convolution layer and the fully connected layer, the position parameters (x, y, w, h) of each bounding box are calculated.

[0129] Output: Generate bounding box coordinates of each defect for subsequent localization and visualization.

[0130] ②Confidence Prediction:

[0131] Role: Predict whether there is a defect in each bounding box and the category probability of the defect.

[0132] Output: A confidence score for each bounding box, indicating the probability of a defect existing within the box, and the specific category of the defect.

[0133] Working process:

[0134] Feature Map: Extract category-related features from the feature map.

[0135] Confidence calculation: Through the convolutional layer and the fully connected layer, the confidence score of each bounding box is calculated.

[0136] Category probability calculation: For each bounding box, calculate the probability that it belongs to each defect category (such as blackening, solder joint bulging, etc.).

[0137] Output: Generates confidence scores and class probabilities for each bounding box.

[0138] ③Class Probability:

[0139] Function: Predict the specific type of defects (such as blackening, solder joint bulging, etc.).

[0140] Output: The defect category corresponding to each bounding box.

[0141] Working process:

[0142] Category mapping: Map the feature map to the category space.

[0143] Probability calculation: Calculate the probability corresponding to each category through the softmax function.

[0144] Output: Generates the final class label for each bounding box.

[0145] 2. Multi-task Loss Function

[0146] In order to optimize the performance of the model in the three tasks of bounding box regression, confidence prediction, and category classification, the Head layer uses a multi-task loss function, that is, calculating the losses of multiple tasks at the same time and combining them for model optimization. Specifically, the multi-task loss function consists of the following three parts:

[0147] ① Bounding Box Loss:

[0148] Loss function: Use CIoU (Complete IoU) loss function.

[0149] Function: measure the difference between the predicted bounding box and the true bounding box to improve the accuracy of bounding box positioning.

[0150] CIoU advantage: CIoU not only considers the overlapping area of ​​the bounding boxes, but also the center point distance and aspect ratio of the bounding boxes, which can more accurately reflect the similarity of the bounding boxes.

[0151] ②Confidence Loss:

[0152] Loss function: Use Binary Cross Entropy Loss.

[0153] Function: Measures the model's accuracy in predicting the presence or absence of defects.

[0154] Working process: Calculate the cross entropy loss between the predicted confidence and the true label.

[0155] ③Classification Loss:

[0156] Loss function: Use the cross entropy loss function.

[0157] Function: Measures the model's prediction accuracy for defect categories.

[0158] Working process: Calculate the cross entropy loss between the predicted category probability and the true category label.

[0159] Combination of multi-task loss functions:

[0160] The bounding box loss, confidence loss and category loss are combined by weighted summation to form the final total loss function. Total loss function = α*bounding box loss + β*confidence loss + γ*category loss, where α, β, γ are weight coefficients used to balance the loss contributions of different tasks.

[0161] 5. Defect classification layer: classify and classify the detected defects according to the bounding box, confidence and category probability, and output the detection results. The defect classification layer is the final processing stage of the defect detection model, responsible for classifying and classifying the detected defects. The main functions of this layer include post-processing steps and classification strategies. The post-processing steps are used to filter and optimize the detection results, while the classification strategy further classifies and classifies the same type of defects according to the characteristics of the defects (such as confidence, size, shape, etc.). The following is a detailed analysis of this layer:

[0162] Post-processing steps:

[0163] The purpose of the post-processing step is to optimize the detection results and improve the accuracy and robustness of the model. It mainly includes the following steps:

[0164] 1. Confidence Thresholding:

[0165] Function: Filter out the detection results with lower confidence and only keep those defect detections with higher confidence.

[0166] Working process:

[0167] Set a threshold: Based on experience or experimental results, set a confidence threshold (for example, 0.5).

[0168] Filtering operation: Compare the confidence score of each detected defect with the threshold. If the confidence score is higher than the threshold, the detection result is retained. If the confidence score is lower than the threshold, the detection result is discarded. By setting the confidence threshold, false detections and missed detections can be effectively reduced, and the detection accuracy of the model can be improved.

[0169] 2. Non-Maximum Suppression (NMS):

[0170] Function: Eliminate overlapping bounding boxes, retain the most likely detection results, and avoid duplicate detection.

[0171] Working process:

[0172] Sorting: Sort all detected defects according to their confidence scores.

[0173] Select Highest Confidence: Select the defect with the highest confidence as the candidate result.

[0174] Suppress overlap: Calculate the overlap between other detection results and candidate results (usually using IoU, Intersection over Union). If the overlap is higher than the set threshold (for example, 0.5), suppress those overlapping detection results.

[0175] Repeat: Repeat the above steps for the remaining test results until all test results have been processed.

[0176] NMS can effectively reduce redundant detection results, avoid multiple detections of the same defect, and improve the detection efficiency of the model.

[0177] 3. Grading strategy:

[0178] ①Confidence-based Grading:

[0179] Purpose: Classify defects of the same type into different levels (e.g., high, medium, low) based on the confidence scores of the detection results.

[0180] Working process:

[0181] Set classification thresholds: Based on experience or experimental results, set multiple confidence thresholds (e.g., high level: >0.8, medium level: 0.5-0.8, low level: <0.5).

[0182] Classification operation: Compare the confidence score of each detected defect with the classification threshold and classify it into the corresponding level.

[0183] Through confidence-based grading, the severity of defects can be assessed more intuitively, providing a basis for subsequent processing.

[0184] ②Feature-based Grading based on size or shape:

[0185] Function: If more detailed classification is required, the size, shape and other features of the defects can be extracted and classified using a classifier.

[0186] Working process:

[0187] Feature extraction: Extract features such as size and shape from the bounding box of the detected defect. For example, calculate the area, perimeter, aspect ratio, etc. of the defect.

[0188] Feature Normalization: The extracted features are normalized to have the same scale.

[0189] Classifier training: Train the classifier using supervised learning algorithms (such as support vector machines, random forests, neural networks, etc.) to classify defects into different levels.

[0190] Classification operation: Input the extracted features into the trained classifier and output the level of the defect.

[0191] Feature-based classification can provide more refined grading results and is suitable for application scenarios that require accurate assessment of defect severity.

[0192] 4. Output of classification results:

[0193] Grading label: Each defect is assigned a grading label indicating its level (e.g., high, medium, low).

[0194] Visualization: The grading results can be combined with the original images for visual display, which is convenient for users to view and analyze.

[0195] The defect type images include one or more of a burn-through image, a solder joint bulge image, a solder joint diameter range that is too small image, a solder joint diameter range that is too large image, a solder joint burr image, and an irregular solder pool shape image.

[0196] Although the above detection method can realize the defect detection of steel scrapers, realize the classification of qualified and defective products and further classification of defective products, in actual production, the number of qualified steel scrapers is far greater than the number of defective steel scrapers. Therefore, if all steel scrapers are tested according to the above detection method, a large number of qualified products need to be tested for defects in detail, which takes a lot of time and affects the overall production efficiency. In order to improve the overall production efficiency, the following steps are added before step S1, and the preliminary classification of qualified and defective products is realized through the following steps before detailed defect detection, thereby improving the overall production efficiency.

[0197] S01: Acquire images of region A and region B to obtain image A and image B, where region A and region B are two non-overlapping regions on the welding surface of the steel sheet;

[0198] Specifically, if there are no defects, the difference between any two different areas on the welding surface is only the difference caused by the welding spot, that is, the difference between the images of two areas of the same size is caused by the difference in the number of welding spots. For example, if there are 2 welding spots in the image of one area and 3 welding spots in the image of the other area, the difference between the images of the two areas is the image difference caused by 1 welding spot. In this step, two high-resolution cameras or other image acquisition devices are used to respectively shoot non-overlapping areas A and B on the welding surface of the steel sheet to obtain image A corresponding to area A and image B corresponding to area B. By acquiring images of the two areas, basic data is provided for subsequent comparative analysis. It should be noted that in order to ensure the effectiveness and efficiency of the comparison, it is necessary to ensure that there is at least one welding spot in both area A and area B; the size and shape of image A and image B are the same. It should be understood that area A and area B can be selected arbitrarily, such as selecting two areas close to the width axis, or selecting two areas far away from the width axis. In addition, by using an image acquisition device to capture images of area A and area B, the resulting images A and B will contain background images. In order to avoid interference from the background image, existing image segmentation technology can be used to pre-process the initial capture through coordinate information or pixel information to remove the images of area A and area B. The non-welding surface area of ​​the steel scraper can also be masked by designing corresponding workstations to make the image of the background part the same everywhere, thereby eliminating background interference.

[0199] More preferably, the width direction of region A is set to be the same as the width direction of the welding surface, and the width of region A is equal to the width of the welding surface, and when shooting, shooting is performed perpendicular to the welding surface of the steel sheet. For example, the welding surface is divided into N regions along the length direction, N is greater than 2 and is an integer multiple of 2, and each shooting uses two image acquisition devices to shoot two regions vertically respectively.

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

[0201] Specifically, in this step, in order to determine how much difference there is between image A and image B, image A and image B are compared and analyzed using an existing image comparison and analysis method to obtain the degree of difference between image A and image B. Because different image comparison and analysis methods have different comparison indicators, the degree of difference K is specifically determined by the image comparison and analysis method used.

[0202] S03: Determine whether K meets a preset standard, where the preset standard is determined based on the difference in the number of solder joints between area A and area B;

[0203] Specifically, by setting a preset standard and comparing the difference obtained in S2 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 is expressed as a dynamic preset value. More specifically, the value corresponding to a normal solder joint is used as a standard, and the preset standard = the difference in the number of solder joints between image A and image B * the standard.

[0204] S04: If not, it is determined that there is a defect.

[0205] Specifically, non-compliance means that the difference between image A and image B exceeds the difference caused by the difference in the number of welds, so it is determined that the steel scraper has defects, and then step S1 is continued to perform detailed defect type detection and defect classification.

[0206] S05: If it meets the requirements, then loop S01 to S03. The area A corresponding to each loop does not overlap with the union of the previous area A, and the area B corresponding to each loop does not overlap with the union of the previous area B, until the union of all areas A and B coincides with the welding surface. It is then determined to be qualified and the steel sheet scraper is sent to the processing station to execute the next production process.

[0207] Specifically, if it meets the requirements, it means that there are no defects in the current area A and area B, but the welding quality of the steel scraper is qualified only if there are no defects on the entire welding surface, so the remaining undetected areas of the welding surface should continue to be detected. Each detection of a new area is to repeat steps S01 to S03. If the difference of the newly detected area also meets the preset standard, the next new area will continue to be detected until the union of all the detection areas coincides with the welding surface, that is, the entire welding surface has been detected, and the product is determined to be qualified. The qualified steel scraper is sent to the next processing station through a manipulator or other automated equipment to ensure the continuity of the production line and product quality. If the difference between two areas does not meet the preset standard, step S1 is entered. In each cycle, it is necessary to ensure that the current detection area has a part of the undetected area to be detected compared with the previous detection area, that is, the current detection area and the previously detected area may have an intersection, but the area of ​​the intersection must be smaller than the area of ​​the current detection area. It should be noted that when the same defects appear in the same position in area A and area B, and there are only these two defects on the welding surface, there may be a possibility of missed detection, but the probability of this is extremely low and within the acceptable error range.

[0208] More preferably, because there are high-defect areas, the welding surface can be divided into high-defect areas and non-defect high-incidence areas. The high-defect areas can be used as the first few areas A and B, and the non-defect high-incidence areas can be used as the subsequent areas A and B. In this way, the detection efficiency of determining whether there are defects can be improved. In addition, the areas of areas A and B in the high-defect areas can be set smaller, and the areas of areas A and B in the non-defect high-incidence areas can be set larger, so that the detection efficiency can be further improved.

[0209] Add steps S01 to S05, compare the images of the two areas, and use the difference K to determine whether there are defects. When the difference K of two symmetrical areas does not meet the preset standard, further inspection can be stopped immediately without continuing to scan the entire welding surface. This "early stop" mechanism significantly reduces unnecessary inspection time, thereby greatly improving the efficiency of defect detection, quickly classifying qualified products and defective products, and improving overall production efficiency.

[0210] Through preliminary defect detection, products can be quickly classified into qualified products and defective products. The qualified products are then sent to the next production process for processing, and the defective products are sent to the defect detection station for specific defect analysis to obtain specific defect types and defect grades. Compared with the traditional method of performing a complete defect analysis at one station and then classifying, qualified products can be selected in a shorter time and sent to the next process for processing. By separating the specific analysis of defects from the main processing flow, the impact of defect analysis on processing speed is avoided, thereby improving the overall processing efficiency.

[0211] In order to improve the accuracy and robustness of the difference calculation, step S02 is optimized as follows: using a pixel-level comparison method or a frequency-domain-based image comparison method to analyze image A and image B, and obtaining a difference K between image A and image B, where K is expressed as different indicators depending on the specific method used.

[0212] Pixel-level comparison can be done by using the absolute difference method or the mean square error (MSE). The specific process of the absolute difference method is: calculate the difference between the RGB values ​​(or grayscale values) of the corresponding pixels of image A and image B, and then calculate the average or sum of all the differences as the difference K. The specific process of the mean square error (MSE) can also be used: calculate the average of the sum of the squares of the differences between the RGB values ​​(or grayscale values) of the corresponding pixels of image A and image B as the difference K.

[0213] Exemplarily: when pixel-level comparison is adopted, S02 includes:

[0214] S021: Preprocessing image A and image B, including denoising and alignment;

[0215] Specifically, the noise of image A and image B is first removed by using a termination filter or a Gaussian filter. The median filter is a nonlinear filtering technique that can effectively remove salt and pepper noise while retaining edge information. The operation steps are as follows: for each pixel point of the image, take the median value of the pixel value in its neighborhood (e.g., 3x3 or 5x5) and replace the value of the pixel point. For example, for a 3x3 neighborhood, take the middle value as the new pixel value; Gaussian filtering is a linear filtering technique that is suitable for removing Gaussian noise. The operation steps are as follows: convolve the image with a Gaussian kernel (e.g., 3x3 or 5x5). The weight of the Gaussian kernel is calculated according to the Gaussian function. The weight of the center pixel is the largest and the weight of the edge pixel is smaller. Then, an image matching technique, such as feature point matching, is used to align the two images to ensure the accuracy of the comparison. More specifically, a feature point detection algorithm (e.g., SIFT, SURF, ORB) is used to extract the key feature points in the two images. Matching is performed through feature descriptors to find the corresponding feature points in the two images. The RANSAC algorithm is used to estimate the transformation matrix (e.g., affine transformation or perspective transformation) between the images and perform image alignment. Example: Assuming that image A and image B are translated and rotated, use the ORB algorithm to extract feature points. After matching the feature points, use the RANSAC algorithm to estimate the rotation and translation matrices. Apply the transformation matrix to align image B to image A.

[0216] S022: Calculate the pixel-level difference between image A and image B to generate a difference image;

[0217] Specifically, the pixel-level difference between image A and image B is calculated to generate a difference image, in which each pixel value of the difference image is equal to the absolute value of the difference between the corresponding pixel values ​​of image A and image B: Di = |PAi-PBi|, where Di is the grayscale value of the i-th pixel in the difference image, and PAi and PBi are the grayscale values ​​of the i-th pixel in image A and image B, respectively.

[0218] S023: Calculate the total difference degree K of the difference image.

[0219] Specifically, the total difference K of the difference image is calculated: Where N is the total number of pixels in the image.

[0220] Accordingly, S03 is optimized as follows:

[0221] S031: Calculation of the difference in the number of solder joints

[0222] Specifically, the Canny edge detection algorithm is first used to detect the edges in the image, and morphological operations (such as dilation and corrosion) are performed on the edge image to connect the broken edges. Then, the connected region marking algorithm is used to identify the solder joint area, and the area and shape characteristics of each solder joint area are calculated. The solder joints that meet the conditions are screened out, and then the number of solder joints in image A and image B is counted, recorded as NA and NB respectively, and finally the difference in the number of solder joints is calculated: ΔN=|NA-NB|.

[0223] S032: Obtain the difference between standard solder joint images

[0224] Specifically, a standard solder joint image is predefined to represent a qualified solder joint, and the standard solder joint image is preprocessed and feature extracted to obtain a difference b of the standard solder joint image.

[0225] S033: Calculate preset standard B

[0226] Specifically, the preset standard is equal to the difference in the number of solder joints multiplied by the difference in the standard solder joint image: B=ΔN*b. This preset standard represents the image difference caused by the difference in the number of solder joints.

[0227] S034: Compare differences and determine defects

[0228] Specifically, the total difference K is compared with the preset standard B. If K≤B, it is determined that the welding surface corresponding to image A and image B has no defects. The corresponding S04 is optimized as follows: if K>B, it is determined that the welding surface corresponding to image A and image B has defects. More specifically, if the difference is mainly distributed in the solder joint area, and the difference exceeds the difference of the standard solder joint image, it is determined to be a solder joint defect. If the difference is distributed in the non-solder joint area, and the difference exceeds the preset non-solder joint defect standard, it is determined to be a non-solder joint defect (such as scratches, cracks, etc.)

[0229] Embodiment 2

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

[0231] The positioning component is used to fix the steel scraper at the image acquisition station, and the steel scraper is fixed by the precise positioning component; the image acquisition component is used to acquire the image on the welding surface of the steel sheet; the image analysis component is used to analyze and process the image, more specifically, to compare and analyze the image A and the image B and to run the defect detection model.

[0232] Specifically, the positioning assembly is usually composed of high-precision mechanical fixtures or positioning tables, which can accurately fix the steel scraper to ensure that its position is stable and repeatable. Before installation and use, the positioning assembly needs to be calibrated to ensure that it can accurately fix the steel scraper in the predetermined position. The calibration process may include the use of laser alignment, mechanical adjustment and other methods. Sensors (such as photoelectric sensors, position sensors) can be used to assist in positioning to ensure that the position of the steel scraper is accurate. Exemplary: The positioning assembly is a precision mechanical fixture that fixes the steel scraper with two adjustable clamping arms. During installation, the position of the clamping arm is adjusted by the laser alignment system to ensure that the welding surface of the steel scraper is perpendicular to the optical axis of the image acquisition device.

[0233] The image acquisition component uses a high-resolution industrial camera or other image acquisition device to ensure that the image quality is high enough to capture subtle defects. In order to obtain a clear image, a suitable light source is required. LED lights or other high-brightness light sources can be used, and diffuse reflectors or ring light sources can be used to evenly illuminate the welding surface. In order to avoid background interference, image segmentation technology or methods of masking non-welding surface areas can be used during image acquisition. For example, a light shield can be designed to expose only part of the welding surface. Exemplary: Use two high-resolution industrial cameras, symmetrically placed on both sides of the steel scraper. Each camera is equipped with a ring LED light source to ensure uniform illumination of the welding surface. When acquiring images, the image segmentation algorithm is used to remove background interference and only the image of the welding surface is retained.

[0234] The image analysis component performs steps S2, S02 to S05 in any of the steel scraper defect detection methods in the first embodiment, that is, compares and analyzes image A and image B to obtain the difference K, and runs the defect detection model to perform defect type and defect classification. This realizes the detection of whether there are defects, and realizes the classification and classification of qualified products and defective products.

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

[0236] Embodiment 3

[0237] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steel scraper defect detection method of embodiment one is implemented. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a high-density digital video disc (DVD)), or a semiconductor medium (for example, a solid-state hard disk), etc. The computer-readable storage medium includes instructions that instruct the computing device to execute any one of the steel scraper defect detection methods provided in embodiment one or embodiment two.

[0238] Embodiment 4

[0239] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, that is, a computer program stored in the memory;

[0240] The processor executes the computer program to implement the steel scraper defect detection method in the first embodiment.

[0241] Those skilled in the art can clearly understand that, for the convenience and brevity of description, other working processes of the method described above can refer to the corresponding processes in the aforementioned embodiments and will not be described in detail here.

[0242] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the method of each embodiment of the present application.

[0243] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0244] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk (SSD)), etc.

[0245] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting defects in a steel scraper, characterized in that: include: S1: Acquire an image of the steel sheet welding surface of the steel sheet scraper to be inspected to obtain an image to be inspected; S2: Input the image to be inspected into a defect detection model to identify the defect type and obtain the corresponding defect type. The training samples of the defect detection model include one or more labeled images of the following defect types: burn-through, weld bulging, weld diameter not meeting the standard, weld burrs and irregular weld pool shape.

2. A steel scraper defect detection method according to claim 1, characterized in that: The defect detection model includes: Input layer: receiving the image to be inspected, and preprocessing the image to be inspected to obtain a preprocessed image, wherein the preprocessing includes resizing, normalization and data enhancement; Feature extraction layer: extracting multi-scale features from the preprocessed image to generate feature maps of different scales; Feature fusion and enhancement layer: Feature pyramid network (FPN) and path aggregation network (PAN) are used to fuse feature maps of different scales to obtain a fused feature map; Target detection and classification layer: performs target detection and classification on the fused feature map, and outputs the bounding box, confidence level, and category probability of the defect; Defect grading layer: classifies and grades the detected defects according to the bounding box, the confidence level and the category probability, and outputs the detection results.

3. A steel scraper defect detection method according to claim 1 or 2, characterized in that: Before S1, it also included: S01: Acquire images of region A and region B to obtain image A and image B, where region A and region B are two non-overlapping regions on the welding surface 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 a preset standard, where the preset standard is determined based on the difference in the number of solder joints between area A and area B; S04: If not, it is determined that there is a defect.

4. A method for detecting defects in a steel scraper according to claim 3, characterized in that: S04 and later also include: S05: If it meets the requirements, then loop S01 to S03. The area A corresponding to each loop does not overlap with the union of the previous area A, and the area B corresponding to each loop does not overlap with the union of the previous area B. Until the union of all areas A and B coincides with the welding surface, it is judged to be qualified, and the steel scraper is sent to the processing station to execute the next production process.

5. A steel scraper defect detection method according to claim 3, characterized in that: The width direction of the region A is the same as the width direction of the welding surface, and the width of the region A is equal to the width of the welding surface; The acquisition direction of image A and image B is perpendicular to the welding surface of the steel sheet.

6. A steel scraper defect detection method according to claim 3, characterized in that: S02 includes: The image A and the image B are analyzed by using a pixel-level comparison method or a frequency-domain-based image comparison method to obtain a difference K between the image A and the image B.

7. A steel scraper defect detection method according to claim 6, characterized in that: When the pixel level comparison method is adopted, S02 includes: S021: Preprocessing image A and image B, including denoising and alignment; S022: Calculate the pixel-level difference between image A and image B to generate a difference image; S023: Calculate the total difference degree K of the difference image.

8. 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 blade scraper defect detection method according to any one of claims 1 to 7.

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

10. A steel scraper defect detection device, used to perform the steel scraper defect detection method according to any one of claims 1 to 7, characterized in that: include: A positioning component, used to fix the steel scraper at the image acquisition station; An image acquisition component, used for acquiring images of the welding surface of the steel sheet; Image analysis component, used to analyze and process images.

Citation Information

Patent Citations

  • Two-dimensional PCB defect real-time automatic detection and classification device based on deep learning

    CN112053318A

  • Chip defect detection method and device, equipment and storage medium

    CN117746077A

  • Weld joint surface defect detection method and device, electronic equipment and storage medium

    CN117830286A

  • Automated defect classification and detection

    EP4266246A1

  • Method and apparatus for training a convolutional neural network to detect defects

    US20210334587A1

Cited By

  • Medicinal glass tube appearance defect detection method and device

    CN120594545A

  • Method and device for detecting cosmetic defects of pharmaceutical glass tubes

    CN120594545B