A steel sheet doctor blade defect detection method, storage medium, electronic device and apparatus
Through machine vision and deep learning technology, steel scraper welding defects are automatically detected, solving the problem of low efficiency of manual visual inspection, achieving efficient and accurate defect identification, and improving production efficiency and printer performance.
Patent Information
- Application Number
- CN202411803145.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In the existing technology, defect detection of steel scrapers relies on manual visual inspection, which leads to low efficiency and is easily affected by human factors. It is difficult to detect minor defects, which affects production efficiency and cost.
Using machine vision and deep learning technology, by acquiring images of the steel scraper welding surface, the defect detection model is used to identify the defect type, including preprocessing, feature extraction, feature fusion and enhancement, target detection and classification, to achieve automated detection.
It realizes the automated detection of the welding quality of steel scrapers, improves the detection efficiency and accuracy, reduces labor costs, can identify tiny defects, ensure the quality of steel scrapers, and thus improve the overall performance and service life of laser printers.
Smart Images

Figure CN119693339B_ABST
Abstract
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 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 to paper using toner. To ensure print quality and extend the life of the toner cartridge, excess toner and impurities on the drum surface must be regularly removed. This task is primarily performed by a toner scraper, particularly steel scrapers, which are widely used due to their excellent wear resistance and cleaning performance.
[0003] A steel scraper is typically installed in the toner cartridge assembly, with its working end in close contact with the photosensitive drum surface. As the drum rotates, the scraper effectively removes excess toner, ensuring a clean surface and crisp, flawless images every time you print. Furthermore, the scraper removes tiny particles and other contaminants from the drum surface, reducing wear on the photosensitive layer and extending the life of the toner cartridge. Therefore, the quality of the scraper directly impacts 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 design requirements; 3) Surface treatment: clean the steel sheet, remove impurities such as oil, oxides, etc., and make the steel sheet surface smooth and flat by grinding or polishing. If necessary, apply rust inhibitor or wear-resistant coating; 4) Laser welding 5) Connecting: Precisely position the steel blade on the bracket and secure it with a clamp. Laser welding technology is then used to securely weld the blade to the bracket, ensuring high precision and a small heat-affected zone. Parameters such as laser power and welding speed are adjusted to ensure weld quality. 5) Cleaning and Finishing: Remove weld slag and grind or polish the weld area to make it smooth and flat. 6) Quality Inspection: Because welding quality directly affects the performance and lifespan of the steel blade, welding defects can lead to blade loosening, premature failure, print quality issues, and even damage to the toner cartridge. Therefore, welding quality must be inspected to filter out defective products. Existing steel blade defect detection primarily relies on manual visual inspection. While accurate, this method is inefficient, time-consuming, and susceptible to human error. Manual visual inspection struggles to detect minor defects, such as tiny cracks or burrs in welds, which can lead to subsequent print quality issues. Furthermore, manual inspection is costly and unfavorable for 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 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, solder joint bulge, solder joint diameter not meeting the standard, solder joint burr, 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: receives the image to be inspected and preprocesses it to obtain a preprocessed image. The preprocessing includes size adjustment, normalization, and data enhancement.
[0012] Feature extraction layer: extracts multi-scale features from the preprocessed image and generates 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: performs object detection and classification on the fused feature map, and outputs 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 the steel scraper defect detection method of the first aspect or the first possible implementation of the steel scraper defect detection method of the first aspect, in the 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 weld points 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, S01 to S03 are executed in a loop. 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 sheet 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 weld surface, and the width of the region A is equal to the width of the weld surface;
[0024] The acquisition directions of images A and B are 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 images A and 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 acquires an image of the steel blade welding surface of the steel scraper to be inspected, thereby obtaining an image to be inspected. This image to be inspected is then input into a defect detection model trained using labeled defect type images as training samples to identify the defect type, thereby obtaining the corresponding defect type and implementing steel scraper defect detection. Through machine vision and deep learning technologies, automated inspection of steel scraper welding quality is achieved, avoiding the tedious process of manual visual inspection, reducing reliance on manual labor, and lowering labor costs. Furthermore, the method can process large amounts of image data in a short period of time, enabling real-time inspection and improving inspection efficiency.
[0039] ② The deep learning model can identify tiny defects that are difficult to detect with human eyes, 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 existing production lines to achieve seamless connection and improve overall production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0043] Figure 1 A flowchart of a steel sheet doctor blade defect detection method provided by the embodiments of the present application. DETAILED DESCRIPTION
[0044] The embodiments of the present application provide a steel sheet doctor blade defect detection method, a storage medium, an electronic device and an apparatus, and the technical problem to be solved is that the detection mode of the existing technology for detecting the welding defects of the steel sheet doctor blade by manual visual inspection leads to low production efficiency.
[0045] In order to make the objectives, characteristics and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the embodiments described below are only some of the embodiments of the present application, but not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0046] In the description of the embodiments of the present application, it should be noted that the orientations or positional relationships indicated by the terms “center”, “upper”, “lower”, “left”, “right”, “vertical”, “horizontal”, “inner”, “outer” and the like are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the embodiments of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the embodiments of the present application. In addition, the terms “first”, “second”, “third” are only for the purpose of description, 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 explicitly specified and limited, the terms “mounting”, “connecting”, “connecting” should be understood in a broad sense, for example, it can be fixedly connected, or it can be replaceably connected, or it can be integrally connected, it can be mechanically connected, or it can be electrically connected, it can be directly connected, or it can be indirectly connected through an intermediate medium, it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the 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 detection accuracy, it has low detection efficiency, which is not conducive to improving production efficiency and reducing production costs.
[0049] Example 1
[0050] See also Figure 1 The steel scraper defect detection method provided by the embodiment of the present invention includes:
[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 high-resolution camera is used to capture an image of the welded surface of a steel scraper under appropriate lighting conditions. The captured image is then transferred to an image processing system for necessary preprocessing, such as image cropping and noise removal, to obtain an image to be inspected. For example, assume that an industrial camera with a resolution of 1920x1080 is used to capture an image of the welded surface of a steel scraper under uniform white light to obtain a raw image. The raw image is then transferred to a computer and cropped using image processing software to remove 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 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, this step includes:
[0055] Collect and prepare training samples:
[0056] Collect a large number of images of steel scraper weld surfaces containing various defect types, such as burn-through, weld bulges, substandard weld diameters (undersized and oversized), burred welds, and irregular weld pool shapes. Label the collected images to clearly identify the location and type of defects in each image, generating labeled defect type images.
[0057] Build a neural network model: Choose an appropriate neural network architecture, such as a convolutional neural network (CNN), deep residual network (ResNet), or densely connected network (DenseNet). Adjust the network structure according to specific needs, such as increasing or decreasing the number of convolutional layers, adjusting the convolution kernel size, and introducing skip connections.
[0058] Data preprocessing:
[0059] Preprocessing operations are performed 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]), 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 fed into the neural network model and forward propagation is performed to obtain predictions. The loss between the predictions and the true labels (e.g., cross entropy loss, mean squared error loss, etc.) is calculated. The backpropagation algorithm calculates the gradient based on the loss and updates the network parameters (e.g., weights, biases, etc.) to minimize the loss. This process is repeated until the model achieves the desired performance on the validation set (e.g., an accuracy rate of 95% or higher).
[0062] Model evaluation and optimization:
[0063] Use an independent test set to evaluate the trained model and test performance metrics such as accuracy, precision, recall, and F1 score. Based on the evaluation results, optimize the model by adjusting hyperparameters (such as learning rate and batch size), 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 will output information such as defect type, location, and confidence level.
[0066] For example, a convolutional neural network (CNN) is used as a defect detection model. 10,000 images of steel scraper weld surfaces containing various defect types are collected and annotated to obtain labeled defect type images. The images are resized to 224x224 and normalized. Data augmentation techniques, such as random rotations of 0-360 degrees, random flipping, and random cropping, are used to increase the diversity of the training data. A CNN model is constructed with five convolutional layers and two fully connected layers, using the ReLU activation function and a softmax classifier. The preprocessed training samples are fed into the CNN model, and forward and backward propagation are performed to update the network parameters. After 50 epochs of training, the model achieves 96% accuracy on the validation set. The model is evaluated on the test set, achieving 95.5% accuracy, 94.8% precision, 96.2% recall, and 95.5% F1 score. The trained CNN model is saved and applied to the steel scraper weld surface defect detection task. The image to be inspected is input into the CNN model, and the model outputs the defect type as "burr on 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 quality of steel scraper welding can be automatically inspected, avoiding the tedious process of manual visual inspection, reducing dependence on manual labor, and reducing labor costs. It can also process large amounts of image data in a short time, realize real-time detection, and improve detection efficiency.
[0069] ② The deep learning model can identify tiny defects that are difficult to detect with human eyes, 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 existing production lines to achieve seamless connection and improve overall production efficiency.
[0072] Specifically, to design a model that can identify steel scraper defects and classify and grade them according to defect type and severity, the following is a detailed model design scheme that combines the convolutional neural network (CNN) architecture used in deep learning with an object detection algorithm.
[0073] 1. Input Layer: The input layer receives the image to be inspected and preprocesses it to produce a preprocessed image. Preprocessing includes resizing, normalization, and data augmentation. More specifically, this processing includes: resizing the image to the uniform size required by the model; normalization to normalize the pixel values of the resized image to the range [0, 1] to accelerate training and improve model stability; and data augmentation, which applies data augmentation techniques such as random flipping, rotation, and scaling to improve the model's generalization capabilities.
[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. 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. Its feature extraction layer corresponds to the Backbone part, as follows:
[0075] Focus Layer
[0076] The Focus layer is a unique layer in YOLOv5s that is used to increase the number of channels in the initial stage of the network while preserving 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 the convolution layer to extract higher-level features.
[0081] Convolution Block 1
[0082] The CSPNet structure is adopted to divide the feature map into two parts, one part is processed by convolution operation, and the other part is directly spliced with the convolution feature map, which enhances the feature representation ability and reduces the calculation amount.
[0083] CSPNet Block 1
[0084] The CSPNet structure is adopted to divide the feature map into two parts, one part is processed by convolution operation, and the other part is directly spliced with the convolution feature map, which enhances the feature representation ability and reduces the calculation amount.
[0085] Workflow of CSPNet:
[0086] 1. Feature map segmentation: The input feature map is divided into two parts.
[0087] 2. Convolution operation: One part of the feature map is processed by a series of convolution layers.
[0088] 3. Feature fusion: The processed feature map is spliced with the unprocessed feature map to form a new feature map.
[0089] 4. Repeat operation: The above steps are repeated in multiple stages to form the complete structure of CSPNet.
[0090] Conv Block 2 and CSPNet Block 2 respectively repeat the process of Conv Block 1 and CSPNet Block 1, further extracting higher-level features.
[0091] Conv Block 3
[0092] Through deeper convolution operation, 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, with relatively rich semantic information;
[0095] P5: The feature map size is 1 / 32 of the input image, with rich semantic information;
[0096] P6: The feature map size is 1 / 64 of the input image, with the most rich 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 a fused feature map. Among them: 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, forming a bidirectional connection with FPN to further enhance the expressiveness of the feature map and the efficiency of information transmission. Its main function is to enhance the expressiveness of the feature map and improve the model's ability to detect objects 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, enabling the model to simultaneously utilize features of different scales for object 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 are generated. For example, YOLOv5s generates 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 map 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. Enhanced 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 expressive power of the feature maps. Improved detection accuracy: FPN can effectively improve the accuracy of object detection, especially when dealing with multi-scale objects.
[0108] PAN (Path Aggregation Network)
[0109] PAN further enhances the feature map transmission path 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 expressive power 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 transfer 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 a bidirectional path from top to bottom and bottom to top, PAN can more effectively transfer and fuse feature information. 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 object detection, especially when dealing with complex scenes and multi-scale objects.
[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 at 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 map to the high-level feature map, further enhancing the expressiveness of the feature map and the efficiency of information transmission.
[0120] 4. Object Detection and Classification Layer: This layer performs object detection and classification on the fused feature map, outputting the defect's bounding box, confidence score, and class probability. The object detection and classification layer (Head) is the core of the entire defect detection model, responsible for ultimately outputting the detection results—that is, identifying and classifying defects in the image. The main functions of this layer include bounding box regression, confidence score prediction, and class probability prediction. Furthermore, to optimize the model training process, the Head layer also incorporates a multi-task loss function for comprehensively evaluating the model's performance across 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 includes 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 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 that a defect exists within the box, and the specific category of the defect.
[0133] Working Process:
[0134] Feature Mapping: Extract features related to classes from feature maps.
[0135] Confidence Calculation: Calculate the confidence score for each bounding box through convolutional layers and fully connected layers.
[0136] Class Probability Calculation: Calculate the probability of each bounding box belonging to each defect class (such as blackening, weld bulging, etc.).
[0137] Output: Generate the confidence score and class probability for each bounding box.
[0138] ③ Class Probability:
[0139] Role: Predict the specific type of defects (such as blackening, weld bulging, etc.).
[0140] Output: The corresponding defect class for each bounding box.
[0141] Working Process:
[0142] Class Mapping: Map feature maps to class space.
[0143] Probability Calculation: Calculate the probability of each class through the softmax function.
[0144] Output: Generate 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 bounding box regression, confidence prediction and class classification, the Head layer adopts a multi-task loss function, which calculates the loss of multiple tasks simultaneously and combines them for model optimization. Specifically, the multi-task loss function includes the following three parts:
[0147] ① Bounding Box Loss:
[0148] Loss Function: Use CIoU (Complete IoU) loss function.
[0149] Role: Measure the difference between the predicted bounding box and the true bounding box, and improve the accuracy of bounding box positioning.
[0150] CIoU Advantage: CIoU not only considers the overlapping area of the bounding box, but also considers the center point distance and aspect ratio of the bounding box, which can more accurately reflect the similarity of the bounding box.
[0151] ②Confidence Loss:
[0152] Loss function: Use Binary Cross Entropy Loss.
[0153] Function: Measures the accuracy of the model's prediction of 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 (Cross Entropy Loss).
[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 through weighted summation to form the final total loss function. The total loss function = α * bounding box loss + β * confidence loss + γ * category loss, where α, β, and γ are weight coefficients used to balance the loss contributions of different tasks.
[0161] 5. Defect Classification Layer: This layer classifies and grades detected defects based on bounding boxes, confidence levels, and class probabilities, and outputs the detection results. The defect classification layer is the final processing stage of the defect detection model and is responsible for classifying and grading detected defects. The main functions of this layer include post-processing steps and classification strategies. Post-processing steps are used to filter and optimize detection results, while classification strategies further classify and grade defects of the same type based on defect characteristics (such as confidence levels, 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 retain 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: Compare the confidence score of each detected defect to a 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 a confidence threshold, you can effectively reduce false detections and missed detections, and improve the detection accuracy of the model.
[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 a 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 (for example, 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: Normalize the extracted features to make them have the same scale.
[0189] Classifier training: Use supervised learning algorithms (such as support vector machines, random forests, neural networks, etc.) to train classifiers 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. Grading result output:
[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 image for visual display, making it easier for users to view and analyze.
[0195] The defect type images include one or more of burn-through images, weld bulging images, weld diameter range being too small images, weld diameter range being too large images, weld burr images, and weld pool irregular shape images.
[0196] Although the above-mentioned detection method can realize the defect detection of steel scraper, realize the classification of qualified and defective products and further classification of defective products, in actual production, the number of qualified steel scraper is far greater than the number of defective steel scraper. Therefore, if all steel scraper are tested according to the above-mentioned detection method, a large number of qualified products need to be tested for defects in detail, which takes a long time and affects the overall production efficiency. In order to improve the overall production efficiency, the following steps are added before step S1. Through the following steps, the preliminary classification of qualified and defective products is realized and then the detailed defect detection is carried out, 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 weld surface is only the difference caused by the weld spot, that is, the difference in the images of two areas of the same size is caused by the difference in the number of weld spots. For example, if there are 2 weld spots in the image of one area and 3 weld spots in the image of the other area, then the difference in the images of the two areas is the image difference caused by 1 weld 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 weld surface of the steel sheet to obtain image A corresponding to area A and image B corresponding to area B. By obtaining 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 weld 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, when images of area A and area B are captured by an image acquisition device, 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 of region A is set to be the same as the width of the weld surface, and the width of region A is equal to the width of the weld surface. When shooting, the shooting is performed perpendicular to the weld surface of the steel sheet. For example, the weld surface is divided into N equal regions along the length direction, where N is greater than 2 and an integer multiple of 2. Each shooting is performed using two image acquisition devices to shoot two regions perpendicularly.
[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 the difference 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 weld points between area A and area B;
[0203] Specifically, a preset standard is set and the difference obtained in S2 is compared with the preset standard to determine whether the difference K is within an acceptable range. The preset standard is the same indicator as the difference K, expressed as a dynamic preset value. More specifically, the value corresponding to a normal solder joint is used as a standard. The preset standard = the difference in the number of solder joints in image A and image B * the preset 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 weld points, so it is determined that the steel scraper has a defect, 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 determined to be qualified and the steel scraper is sent to the processing station to execute the next production process.
[0207] Specifically, if the difference degree meets the preset standard, it means that the current region A and region B do not have defects, but the requirement for the welding quality of the steel sheet scraper is that there is no defect on the entire welding surface, so the detection of the remaining undetected area of the welding surface needs to be continued, and each detection of a new region is repeated execution of steps S01 to S03. If the difference degree of the newly detected region also meets the preset standard, the detection of the next new region is continued, until the union of all detected regions coincides with the welding surface, that is, the entire welding surface has been detected, and then it is determined that the product is qualified. The qualified steel sheet scraper is sent to the next processing station by a mechanical hand or other automatic equipment, ensuring the continuity of the production line and the quality of the product. When the difference degree of two regions does not meet the preset standard during the process, step S1 is entered. In each cycle, it is necessary to ensure that the current detection region has a part of the undetected region compared with the previous detection region, that is, the current detection region and the previously detected region can have an intersection, but the area of the intersection is smaller than the area of the current detection region. It should be noted that when region A and region B appear the same defect at the same position, and there are only two defects on the welding surface, there may be a missed detection possibility, but the probability 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-high-defect areas. The high-defect areas can be used as region A and region B in the first few times, and the non-high-defect areas can be used as region A and region B in the later times. In this way, the detection efficiency of determining whether there is a defect can be improved. In addition, the area of region A and region B in the high-defect area can be set smaller, and the area of region A and region B in the non-high-defect area can be set larger. In this way, the detection efficiency can be further improved.
[0209] Steps S01 to S05 are added. By comparing the images of two regions, the difference degree K is used to determine whether there is a defect. When the difference degree K of two symmetrical regions does not meet the preset standard, further detection can be immediately stopped without the need to continue scanning the entire welding surface. This "early stopping" mechanism significantly reduces unnecessary detection time, thereby greatly improving the detection efficiency of whether there is a defect, quickly classifying qualified products and defective products, and improving the overall production efficiency.
[0210] The product is rapidly classified into qualified products and defective products through preliminary defect detection, and then the qualified products are sent to the next production process for processing, and the defective products are sent to the defect detection station for specific analysis of defects to obtain specific defect types and defect classification. Compared with the traditional classification after complete defect analysis at a station, the qualified products are selected and sent to the next process for processing in a shorter time. By separating the specific analysis of defects from the main processing flow, the influence 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 degree calculation, step S02 is optimized as follows: using a pixel-level comparison method or a frequency-domain-based image comparison method to analyze images A and B to obtain the difference degree K of images A and B. K represents different indicators according to the specific method used.
[0212] The pixel-level comparison can use an absolute difference method or a mean square error (MSE). The specific process of using the absolute difference method is as follows: calculate the difference between the RGB values (or the difference between the gray values) of the corresponding pixel points of images A and B, and then take the average value or the sum of all difference values as the difference degree K. The specific process of using the mean square error (MSE) is as follows: calculate the average value of the square sum of the difference between the RGB values (or the gray values) of the corresponding pixel points of images A and B as the difference degree K.
[0213] For example, when using pixel-level comparison, S02 includes:
[0214] S021: Preprocessing images A and B, which includes denoising and alignment;
[0215] Specifically, image A and image B are first de-noised using a stop filter or Gaussian filter. Median filtering is a nonlinear filtering technique that effectively removes salt-and-pepper noise while preserving edge information. For each pixel in the image, the median of the pixel values within its neighborhood (e.g., a 3x3 or 5x5 grid) is taken as the new pixel value. For example, for a 3x3 grid, the median value is used as the new pixel value. Gaussian filtering is a linear filtering technique suitable for removing Gaussian noise. It convolves the image with a Gaussian kernel (e.g., a 3x3 or 5x5 grid). The kernel's weights are calculated using a Gaussian function, with center pixels receiving the highest weight and edge pixels receiving the lowest weight. Then, image alignment techniques, such as feature point matching, are used to align the two images to ensure accurate comparison. Specifically, feature point detection algorithms (e.g., SIFT, SURF, or ORB) are used to extract key feature points from the two images. Feature descriptors are then matched to find corresponding feature points in the two images. The RANSAC algorithm is used to estimate the transformation matrix (e.g., affine or perspective transformation) between the images and perform image alignment. Example: Assume that images A and 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, 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, calculate the total difference K of the difference image: 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 erosion) are performed on the edge image to connect the broken edges. Then, the connected component labeling 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 are counted, denoted as NA and NB respectively. 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, the weld surface corresponding to image A and image B is determined to be free of defects. The corresponding S04 is optimized as follows: If K>B, the weld surface corresponding to image A and image B is determined to be defective. More specifically, if the difference is mainly distributed in the weld area and the difference exceeds the difference of the standard weld image, it is determined to be a weld defect. If the difference is distributed in the non-weld area and the difference exceeds the preset non-weld defect standard, it is determined to be a non-weld defect (such as scratches, cracks, etc.).
[0229] Example 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 collect images on the welding surface of the steel sheet; the image analysis component is used to analyze and process images, more specifically, to perform comparative analysis of image A and image B and 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 weld surface. In order to avoid background interference, image segmentation technology or methods of masking non-weld surface areas can be used during the image acquisition process. For example, a light shield can be designed to expose only part of the weld 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 weld surface. When acquiring images, background interference is removed through an image segmentation algorithm, and only the image of the weld surface is retained.
[0234] The image analysis component performs steps S2, S02, to S05 of any of the steel scraper defect detection methods in Example 1, comparing and analyzing image A and image B to obtain a difference K. Simultaneously, the defect detection model is run to determine the defect type and classify the defects. This allows for defect detection and classification of qualified 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] Example 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] Example 4
[0239] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and 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 repeated here.
[0242] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most 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's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods 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 a computer, the flow or function according to the embodiments 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 transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, training device or data center to another website, computer, training device or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that the computer can store or be integrated into a data storage device such as a training device, a data center, etc. containing one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0245] The above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent ones; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting defects in steel scrapers, characterized in that: The steel scraper is a scraper in which a steel sheet is welded to a bracket, comprising a steel sheet and a bracket. The defect detection method comprises: S01: Acquire images of region A and region B on the welding surface of the steel sheet and the bracket to obtain images A and B; wherein region A and region B are two non-overlapping regions on the welding surface of the steel sheet, region A and region B have the same area size, the welding surface is equally divided into N regions along the length direction, N is greater than 2 and is an integer multiple of 2, region A and region B are arbitrarily selected, and there is at least one welding point in region A and region B; in addition, image A and image B are the same in size and shape, the width direction of region A is 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; 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. The preset standard is determined based on the difference in the number of welds between region A and region B. The preset standard and the difference K are the same indicator. The preset standard = the difference in the number of welds between image A and image B * a standard, where the standard is the value corresponding to a normal weld. S04: If it does not meet the requirements, it means that the difference between image A and image B exceeds the difference caused by the difference in the number of weld points, and it is determined that the steel scraper has a defect, and step S1 is executed; S05: If the result is met, it means that there are no defects in the current area A and area B, and the remaining undetected areas of the weld surface are detected. S01 to S03 are executed in a loop. 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 weld surface, it is determined to be qualified, and the steel scraper is sent to the processing station to execute the next production process; 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 bulge, weld diameter not meeting the standard, weld burr, 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: receives the image to be inspected and preprocesses it to obtain a preprocessed image. The preprocessing includes size adjustment, normalization, and data enhancement. Feature extraction layer: extracts multi-scale features from the preprocessed image and generates 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; Object detection and classification layer: performs object 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. The method for detecting defects in a steel scraper according to claim 1, wherein: The acquisition directions of images A and B are perpendicular to the welding surface of the steel sheet.
4. A method for detecting defects in steel scrapers according to claim 1, characterized in that: S02 includes: Image A and image B are analyzed using a pixel-level comparison method or a frequency-domain-based image comparison method to obtain a difference K between image A and image B.
5. A method for detecting defects in steel scrapers according to claim 4, characterized in that: When the pixel-level comparison method is adopted, S02 includes: S021: Preprocessing images A and 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.
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 scraper 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 a processor, the steps of the steel scraper defect detection method according to any one of claims 1 to 5 are implemented.
8. A steel scraper defect detection device, used to perform the steel scraper defect detection method according to any one of claims 1 to 5, 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