A method for detecting edge defects of a rubber strip, an electronic device, a storage medium and an apparatus
By using automated image acquisition and processing technology, combined with a defect recognition model, the problem of low efficiency in detecting edge defects of rubber strips has been solved, achieving efficient and accurate detection of edge defects of rubber strips, and meeting the needs of modern production.
Patent Information
- Application Number
- CN202411928746.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In existing technologies, the detection of defects in the edges of rubber strips relies on manual visual inspection, which results in low detection efficiency, limited accuracy, poor consistency, and high cost, failing to meet the needs of modern production.
By employing automated image acquisition and processing technology, multiple images of the edge of the adhesive strip are compared and analyzed to initially screen out images that may have defects. Then, a defect recognition model is used for accurate identification, including models such as convolutional neural networks and support vector machines, to achieve efficient and accurate detection of defects on the edge of the adhesive strip.
It improves the efficiency and accuracy of detecting edge defects in rubber strips, reduces the amount of calculation and analysis time, adapts to the needs of high-speed production, ensures the efficient operation of the production line, and can accurately identify various types of defects.
Smart Images

Figure CN119850559B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of printers, and in particular to a method for detecting defects of edges of adhesive strips, an electronic device, a storage medium and an apparatus. BACKGROUND
[0002] In modern office automation equipment, the selenium drum cleaning system of printers and copiers plays a crucial role. The doctor blade adhesive strip in the selenium drum cleaning system is one of the key components, and its main function is to remove residual toner on the surface of the selenium drum through friction to ensure the printing or copying quality, so it is required to have high wear resistance (to ensure long-term stable friction with the surface of the selenium drum), good elasticity (to enable it to generate sufficient pressure when contacting the selenium drum, effectively clear the toner residue, and at the same time not damage the selenium drum), and precise size (to ensure perfect fit with the selenium drum and other components). However, the existing doctor blade adhesive strip is prone to defects such as knife marks, knife lines, corrugations, and notches on the edges during production due to the complexity and uncertainty of production, which directly affects the cleaning effect and service life of the doctor blade adhesive strip.
[0003] Currently, the commonly used method for detecting defects of edges of adhesive strips in the industry is manual visual inspection. This method relies on the experience and vision of the operator, and has low detection efficiency, and is prone to missed detection and false detection. In particular, in a mass production environment, manual visual inspection not only takes a long time, but also has high costs, and cannot meet the needs of modern production. In addition, manual visual inspection also has the following problems: 1. Limited detection accuracy: human vision is limited, and it is difficult to accurately identify small defects. 2. Poor consistency: the detection standards and experience of different operators vary greatly, resulting in inconsistent detection results. 3. High labor intensity: long-term visual inspection can easily cause the operator to become fatigued, further reducing detection efficiency and accuracy.
[0004] Therefore, how to improve the defect detection efficiency of the edges of the adhesive strip and realize automatic and high-precision detection is a technical problem that technicians need to solve at present. SUMMARY
[0005] The present application provides a method for detecting defects of edges of adhesive strips, an electronic device, a storage medium and an apparatus, which solves the technical problem of low detection efficiency caused by manual visual inspection of defects of edges of adhesive strips in the prior art.
[0006] The first aspect of the present application provides a method for detecting defects of edges of adhesive strips, comprising:
[0007] S1: Obtain local images of the edge surfaces of N adhesive strips to obtain image A, image A includes image B of the same region of the N adhesive strips, and N is an integer greater than or equal to 2;
[0008] S2: comparing and analyzing the N images B to determine whether there is a defective image B1;
[0009] S3: if there is, inputting the image B1 into a defect recognition model to recognize a defect type, the training sample of the defect recognition model including one or more of the following labeled images: knife mark, knife line, wave, and gap.
[0010] In the first possible implementation of the adhesive tape edge defect detection method of the first aspect, S2 comprises:
[0011] S21: segmenting the image A to obtain N images B;
[0012] S22: comparing and analyzing any two images B to obtain a difference degree K;
[0013] S23: comparing the difference degree K with a difference degree threshold K1;
[0014] S24: if K>K1, comparing and analyzing the corresponding image B with a standard image to obtain a difference degree K2;
[0015] S25: comparing the difference degree K2 with a difference degree threshold K3, K3
[0016] S26: if K2>K3, determining the corresponding image B as a defective image B1.
[0017] In combination with the first possible implementation of the adhesive tape edge defect detection method of the first aspect, in the second possible implementation of the adhesive tape edge defect detection method of the first aspect, S23 is followed by:
[0018] S231: if K≤K1, repeatedly performing steps S1 to S23 to detect the undetected area of the corresponding adhesive tape until the undetected area is cleared;
[0019] S25 is followed by:
[0020] S251: if K2≤K3, repeatedly performing steps S1 to S25 to detect the undetected area of the corresponding adhesive tape until the undetected area is cleared.
[0021] In combination with the first possible implementation of the adhesive tape edge defect detection method of the first aspect, in the third possible implementation of the adhesive tape edge defect detection method of the first aspect, S22 is replaced by:
[0022] comparing and analyzing any two images B taken from the same adhesive tape to obtain a difference degree K, the areas corresponding to the two images B being on two edge surfaces of the same adhesive tape.
[0023] The edge defect detection method of the adhesive strip according to the first aspect of the first possible implementation, in the edge defect detection method of the adhesive strip according to the fourth possible implementation of the first aspect, further comprising the following steps before S21 after S1:
[0024] S201: comparing and analyzing any two images A to obtain a difference degree k;
[0025] S202: comparing k with a difference degree threshold k1, and if k > k1, executing S21.
[0026] In the fifth possible implementation of the edge defect detection method of the adhesive strip according to the first aspect, the defect recognition model further has a defect grading function.
[0027] In the sixth possible implementation of the edge defect detection method of the adhesive strip according to the first aspect, further comprising the following steps before S1:
[0028] S0: arranging N adhesive strips in a manner that the edge surfaces are coplanar and the edges are flush.
[0029] The second aspect of the present application provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to realize the steps of any possible implementation of the edge defect detection method of the adhesive strip provided in the first aspect.
[0030] The third aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of any possible implementation of the edge defect detection method of the adhesive strip provided in the first aspect.
[0031] The fourth aspect of the present application provides an edge defect detection device of an adhesive strip, which comprises:
[0032] An image acquisition component is configured to acquire images of the edge surfaces of the adhesive strips;
[0033] An image analysis component is configured to analyze and process the images.
[0034] As can be seen from the above technical solutions, the present application has the following advantages:
[0035] ①The edge defect detection method of the adhesive strip provided by the present application acquires local images of the edge surfaces of N adhesive strips to obtain images A, the images A include images B of the same region of the N adhesive strips, and N is an integer greater than or equal to 2; N images B are compared and analyzed to determine whether there is a defective image B1; if there is, the image B1 is input into a defect recognition model for recognition to obtain a defect type. The use of automatic image acquisition and processing technology reduces the need for manual visual inspection, greatly shortens the detection time and improves the detection efficiency. Moreover, the use of the defect recognition model can more accurately identify various types of defects and improve the detection accuracy.
[0036] ②By comparing and analyzing multiple images first to determine whether there are defective images, only images with defects are input into the defect recognition model. This way avoids the traditional method of conducting comprehensive and in-depth analysis on each image, especially for a large number of non-defective images, without the need for complex defect recognition operations, greatly reducing the amount of calculation and analysis time, only processing the defective part, significantly improving the detection efficiency, and being able to adapt to the needs of high-speed production.
[0037] ③From obtaining multiple local images of the edge surface of the rubber strip to comparing and analyzing to determine whether there are defects, to recognizing images with defects, the entire process is more efficient and orderly. Compared with the traditional manual careful inspection method, this automated hierarchical detection process reduces redundant steps and improves the overall smoothness and speed of detection. In the automated production line, this efficient detection process can better match the production rhythm and will not affect the operating efficiency of the entire production line due to the lag of the detection link.
[0038] ④First, by comparing and analyzing to determine images that may have defects, the images input into the defect recognition model are all potentially problematic, which helps the defect recognition model focus more on features that may have defects, reduces interference factors, and improves the accuracy of defect recognition. Clearly distinguishing between defective and non-defective products, non-defective products can be directly sent to the next process, while defective products are accurately identified for defect types, facilitating the adoption of appropriate handling measures. This targeted handling method not only improves detection efficiency, but also more effectively addresses quality issues, improving the level of product quality control. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, a brief introduction of the drawings needed to be used in the embodiments or prior art description will be given below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0040] Figure 1 A flowchart of a rubber strip edge defect detection method provided by the embodiments of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application provide a rubber strip edge defect detection method, electronic equipment, storage medium and device, which are used to solve the technical problem that the detection efficiency is low in the prior art by manually inspecting the rubber strip edge defects.
[0042] 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 below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of the present application.
[0043] 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", etc. 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 referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on 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.
[0044] 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", "connection" should be understood in a broad sense, for example, it can be fixed connection, or replaceable connection, or integral connection, it can be mechanical connection, or electrical connection, it can be direct connection, or indirect connection through an intermediate medium, or internal communication of 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.
[0045] At present, the commonly used method for detecting the edge defects of the adhesive strip in the industry is manual visual inspection. This method relies on the experience and vision of the operator, and has low detection efficiency, and is prone to missed detection and false detection. Especially in a mass production environment, manual visual inspection not only takes a long time, but also has high cost, and cannot meet the needs of modern production. In addition, manual visual inspection also has the following problems: 1. Limited detection accuracy: human vision is limited, and it is difficult to accurately identify small defects. 2. Poor consistency: the detection standards and experience of different operators differ greatly, resulting in inconsistent detection results. 3. High labor intensity: long-time visual inspection can easily cause the operator to be tired, further reducing the detection efficiency and accuracy.
[0046] Embodiment one
[0047] Please refer to Figure 1 The adhesive strip edge defect detection method provided by the embodiments of the present application comprises:
[0048] S1: Obtain a local image of the edge surface of N strips of adhesive tape, to obtain image A, image A includes image B of the same region of N strips of adhesive tape, N is an integer greater than or equal to 2;
[0049] Specifically, the purpose of this step is to collect data. N strips of adhesive tape to be detected are arranged at fixed intervals and positions, ensuring that the same local region of each strip of adhesive tape can be photographed at the same time, and ensuring that the edge surface of each strip of adhesive tape is clean and free of foreign matter obstruction. An industrial camera or other high-resolution image acquisition device is used for image acquisition. The field of view of the camera should be large enough to cover the same local region of all strips of adhesive tape, and should have sufficient resolution to capture small defects such as knife marks, knife lines, ripples and notches, ensuring consistent angle and distance for shooting to ensure image consistency and comparability. A local region of the arranged N strips of adhesive tape is photographed once to obtain an image A containing the local region of all strips of adhesive tape. The edge surface refers to the surface of the rectangular parallelepiped-shaped adhesive tape on which the two edges are located, or the surface parallel to the length direction and the thickness direction.
[0050] Example: On a production line, the adhesive tape passes through the detection area at a speed of 100 strips per minute, and every 5 strips of adhesive tape is a group. The 5 strips of adhesive tape are fixed side by side on the detection platform, ensuring that the edge surface of each strip of adhesive tape is on the same horizontal line and the interval is uniform. The interval between each group of adhesive tape is 1 second of process, and the adhesive tape in each group passes through the detection area at the same posture at the same time. Set the camera to shoot the edge surface of each group of adhesive tape, and each time shoot an image containing the 1 / 4 (4 equal parts based on length) region of 5 strips of adhesive tape. In this way, we obtain 2 images A (each image contains the same region of 5 strips of adhesive tape) every second.
[0051] Optimization: N strips of adhesive tape are arranged with the edge surfaces coplanar and the edges flush, ensuring that the edge surface of each strip of adhesive tape is on the same horizontal line and arranged neatly, so that their edge surfaces are coplanar and flush, facilitating subsequent image acquisition.
[0052] Further optimization: N strips of adhesive tape are arranged in a staggered manner, i.e. there is a certain interval between each strip of adhesive tape, and they are placed in layers, so that they have a certain interval in the vertical direction. In this way, the edge surface of the adhesive tape appears as a vertical surface, and when the adhesive tape flows along its length direction (front and back direction) on the production line, the two edge surfaces of the adhesive tape appear as left and right surfaces respectively, so that image acquisition can be performed on both edge surfaces at the same time, thereby improving the efficiency of image acquisition and further improving the efficiency of defect detection. In addition, in order to avoid mutual influence of image acquisition on both sides, the image acquisition devices on both sides can be designed with a distance greater than or equal to an image acquisition interval in the front and back direction.
[0053] S2: comparing and analyzing N images B to determine whether there is a defective image B1;
[0054] Specifically, when the edge surface of the adhesive tape does not have defects, each image B corresponding to different adhesive tapes in image A is highly consistent, that is, the difference between each image B in image A is very small, or can be said to be basically the same. By comparing the local images corresponding to the local regions of the multiple representative adhesive tapes in image A with each other, a local image that may have defects, image B1, is found. Through comparative analysis, images that may have defects are preliminarily screened out, and images without defects are quickly excluded. If this step is not taken, all images will be input into the defect recognition model, increasing unnecessary computational load.
[0055] Illustratively, then, the five local images B in image A are compared with each other, and the image B that has a significant difference is defined as image B1.
[0056] S3: If there is, input image B1 into the defect recognition model for recognition to obtain the defect type, and the training samples of the defect recognition model include one or more of the following labeled images: knife marks, knife lines, corrugations, and notches.
[0057] Specifically, in the previous step S2, it has been determined through comparative analysis that there are images B1 with large difference. These images B1 are preliminarily determined as images that may have defects. In order to analyze the preliminarily screened images with defects in detail and determine the specific defect type, the selected image B1 is input into the pre-trained defect recognition model for defect type recognition. Commonly used models include convolutional neural network (CNN), support vector machine (SVM), etc. The training samples of the model should include various types of defect images, such as knife marks, knife lines, corrugations, and notches, etc. There should be a sufficient number of samples for each defect type to ensure the recognition accuracy of the model. The model will classify the input image B1 and output the defect type and its confidence. According to the output result and confidence of the model, the reliability of the recognition result is judged. Usually, a confidence threshold (such as 80%) is set, and only when the confidence exceeds the threshold, the recognition result is considered valid. If the confidence of the model is lower than the set threshold, manual review or further processing may be needed.
[0058] Illustratively, five images B1 with defects are input into the pre-trained CNN model.
[0059] Defect classification: the model output result is:
[0060] Image B1-1: knife marks, confidence 85%
[0061] Image B1-2: corrugations, confidence 90%
[0062] Image B1-3: Notch, confidence 80%
[0063] Image B1-4: Knife mark, confidence 95%
[0064] Image B1-5: Knife mark, confidence 75%
[0065] Result output: According to the output result of the model, it is identified that the five adhesive strips respectively have knife marks, corrugations, notches, knife marks and knife marks.
[0066] The beneficial effects of the embodiment include:
[0067] ① The use of automatic image acquisition and processing technology reduces the need for manual visual inspection, greatly shortens the detection time, and improves the detection efficiency. And using the defect recognition model, it can more accurately identify various types of defects, and improve the detection accuracy.
[0068] ② By comparing and analyzing multiple images to determine whether there are defect images, only images with defects will be input into the defect recognition model. This way avoids the traditional method of thoroughly analyzing each image, especially for a large number of defect-free images, there is no need for complex defect recognition operations, greatly reducing the amount of calculation and analysis time, only the defective part is processed, significantly improving the detection efficiency, which can meet the needs of high-speed production.
[0069] ③ From obtaining multiple local images of the edges of the adhesive strips to comparing and analyzing to determine whether there are defects, to identifying images with defects, the entire process is more efficient and orderly. Compared with the traditional manual careful inspection method, this automated hierarchical detection process reduces redundant steps and improves the overall smoothness and speed of detection. In the automated production line, this efficient detection process can better match the production rhythm and will not affect the operating efficiency of the entire production line due to the lag of the detection link.
[0070] ④ First, by comparing and analyzing to determine images that may have defects, the images input into the defect recognition model are all potentially problematic, which helps the defect recognition model focus more on features that may have defects, reduces interference factors, and improves the accuracy of defect recognition. Clearly distinguish between defective and non-defective products, non-defective products can be directly put into the next process, and for defective products, accurately identify the defect type, which facilitates the adoption of appropriate handling measures. This targeted approach not only improves detection efficiency, but also more effectively addresses quality issues, improving the level of product quality control.
[0071] ⑤Through the image acquisition of multiple adhesive strips at one time, the image acquisition efficiency is improved compared with independent acquisition of each adhesive strip, and the overall defect recognition efficiency is improved.
[0072] Specifically, step S2 includes the following steps:
[0073] S21: segmenting the image A to obtain N images B;
[0074] Specifically, the image B corresponding to each adhesive strip is segmented from the image A to obtain N images B. Each image B corresponds to a local area of one adhesive strip. The specific segmentation method can adopt the following ways: coordinate-based segmentation: according to the coordinate relationship between the arrangement position of the adhesive strip and the camera field of view, the position of each adhesive strip in the image A is determined and segmented. Image processing-based segmentation: using image processing techniques (such as edge detection, threshold segmentation) to automatically identify the boundary of each adhesive strip in the image A and perform segmentation. After segmentation, each image B is preprocessed, including denoising, grayscale and image standardization operations. The purpose of this step is to reduce the influence of image noise and illumination changes on the comparison results, and to ensure more accurate subsequent comparison and analysis. Illustratively, the image A is segmented into 5 images B through coordinate calculation or image processing techniques.
[0075] S22: comparing and analyzing any two images B to obtain a difference degree K;
[0076] Specifically, any two images B are selected to calculate their difference degree K. The difference degree K can be calculated by pixel-level difference (such as absolute difference, mean square error) or feature-level difference (such as Euclidean distance, cosine similarity) to obtain the difference degree K.
[0077] Further, step S22 can be optimized as: comparing and analyzing any two images B taken from the same adhesive strip to obtain a difference degree K, and the areas corresponding to the two images B are respectively located at two edge surfaces of the same adhesive strip.
[0078] Specifically, because the images of the two edge surfaces of the adhesive tape have high similarity as long as the edge surfaces of the adhesive tape have no defects, the local images of the two edge surfaces of the adhesive tape can be compared with each other, and the products that can have defects can be preliminarily screened out. In this step, the two images B are taken from two images A, and the two images A are obtained by photographing the edge surfaces on the two sides of the same group of adhesive tapes. The two images A can be taken from two corresponding regions on the two edge surfaces of the same group of adhesive tapes, or can be taken from two non-corresponding regions on the two edge surfaces of the same group of adhesive tapes, as long as the two images B are taken from the two edge surfaces of the same adhesive tape and have the same size and shape. After the two images B are obtained, the difference degree K is calculated. The difference degree K can be calculated by pixel-level difference (such as absolute difference, mean square error) or feature-level difference (such as Euclidean distance, cosine similarity), and the difference degree K is obtained.
[0079] S23: comparing the difference degree K with a difference degree threshold K1;
[0080] Specifically, a difference degree threshold K1 is set. If the difference degree of any two images B is greater than K1, it is represented that the region of the adhesive tape corresponding to one of the images or both of the images has defects. If the difference degree is equal to K1, it is represented that the regions of the adhesive tapes corresponding to the two images have no defects. K1 is set according to experience. If the difference degree K is greater than the threshold K1, the next step S24 is entered; otherwise, it is considered that there is no significant difference between the two images B. It is represented that both of the images have no defects.
[0081] Further optimization is to add the following steps after step S23:
[0082] S231: if K≤K1, the steps S1 to S23 are circularly executed to detect the undetected regions of the corresponding adhesive tape until the undetected regions are cleared.
[0083] Specifically, if the difference degree K is less than or equal to the threshold K1, it is considered that there is no significant difference between the two images B that are currently compared, and further detection needs to be performed on the undetected regions of the adhesive tape. The steps S1 to S23 are re-executed to perform image acquisition, segmentation and difference degree calculation on the undetected regions of the adhesive tape, until all regions are detected.
[0084] S24: if K>K1, the corresponding image B is compared with a standard image to obtain a difference degree K2;
[0085] Specifically, a standard image is used as a reference, and the standard image is an image of an adhesive tape that is known to have no defects. The two images B corresponding to K greater than K1 are compared with the standard image of the image B, respectively, and the difference degree K2 is calculated. The difference degree K2 can be calculated by pixel-level difference (such as absolute difference, mean square error) or feature-level difference (such as Euclidean distance, cosine similarity).
[0086] S25: compare the difference degree K2 with the difference degree threshold K3, K3 < K1;
[0087] Specifically, a difference degree threshold K3 is set, because K3 represents the maximum difference degree allowed between the standard image, and greater than K3 represents that there must be defects, and less than or equal to K3 represents that there is no defect, so K3 needs to be set more strictly than K1, so its value is smaller than K1. The two K2 obtained by step S24 are compared with K3 respectively. If the difference degree K2 is greater than the threshold K3, it is determined that the image B is a defective image B1.
[0088] By comparing the images B in the image A with each other, the images that may have defects are picked out according to the comparison result, and then the images that may have defects are compared with the standard image, so as to determine the images that have defects. Compared with comparing all images B with the standard image at the beginning, this way reduces the number of calculations, thereby reducing the amount of calculation, and further improving the detection efficiency.
[0089] Further optimization, the following steps are added after step S25:
[0090] S251: if K2 ≤ K3, then the steps S1 to S25 are executed in a loop to detect the undetected area of the corresponding adhesive tape until the undetected area is zero.
[0091] Specifically, if the difference degree K2 is less than or equal to the threshold K3, it is considered that there is no significant difference between the image B and the standard image, and further detection needs to be performed on the undetected area of the adhesive tape. Re-execute steps S1 to S25 to perform image acquisition, segmentation, difference degree calculation and standard image comparison on the undetected area of the adhesive tape until all areas are detected.
[0092] S26: if K2 > K3, then the corresponding image B is determined as a defective image B1.
[0093] Specifically, if the difference degree K2 exceeds the threshold K3, it is considered that the image B has defects, and it is determined as a defective image B1, that is, the edge surface of the adhesive tape corresponding to the image B1 has defects.
[0094] Further, based on the same principle as S22, before the mutual comparison of the images B, the following steps can also be added before step S21:
[0095] S201: compare and analyze any two images A to obtain a difference degree k;
[0096] S202: compare k with the difference degree threshold k1, if k > k1, then execute S21.
[0097] Specifically, any two images A taken from the same group of adhesive strips are highly similar in the absence of defects. By comparing any two images A taken from the same group of adhesive strips, the difference degree k is obtained, and k is compared with the difference degree k1. When k > k1, it represents that the similarity of the two images A is low, and there may be defects, then step S21 is executed for further defect analysis, or the image A that may have defects can be compared with the standard image of image A before (similar to step S24); when k ≤ k1, it represents that the similarity of the two images A is very high, and the area of the edge surface of the adhesive strip corresponding to the two images A does not have defects. The two images A can be two images taken from the same edge surface of the adhesive strip in sequence, or two images taken from two edge surfaces of the same group of adhesive strips respectively.
[0098] Specifically, in order to design a model capable of identifying defects of the edge of the adhesive strip and capable of classifying and grading according to the type and degree of defects, the following is a detailed model design scheme. The scheme combines the convolutional neural network (CNN) architecture in deep learning and the target detection algorithm.
[0099] I. Input layer: The input layer is used to receive the image to be detected and pre-process the image to be detected to obtain a pre-processed image. The pre-processing includes size adjustment, normalization and data enhancement. More specifically, the processing includes: performing size adjustment to adjust the image to be detected to a uniform size required by the model, then performing normalization to normalize the pixel values of the size-adjusted image to the range [0, 1] to speed up training and improve model stability, and then performing data enhancement to apply data enhancement techniques such as random flipping, rotation, scaling, etc. to improve the generalization ability of the model.
[0100] II. Feature extraction layer: multi-scale features are extracted from the pre-processed image to generate feature maps of different scales. Specifically, the YOLOv5s network architecture is adopted, including 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, adopts CSPDarknet53 architecture; Neck: feature fusion network, responsible for fusing feature maps of different scales, adopts FPN and PAN architecture; Head: target detection and classification network, responsible for outputting detection results, including bounding box, confidence and class probability. The present application adopts YOLOv5s as the defect detection model, and the feature extraction layer thereof corresponds to the Backbone part, which is specifically as follows:
[0101] Focus layer (Focus Layer)
[0102] 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 preserving spatial information. The core idea of Focus layer is to increase the number of channels of input image from 3 (RGB) to a higher dimension (e.g., 32) through slicing operation, so as to provide more feature information for subsequent convolution operations.
[0103] Workflow of Focus layer:
[0104] 1. Slicing operation: The input image is sliced into multiple small blocks, each containing multiple adjacent pixels.
[0105] 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.
[0106] 3. Convolution operation: The expanded feature map is processed through convolution layers to extract higher-level features.
[0107] Conv Block 1
[0108] Contains multiple convolution layers (Conv), batch normalization layers (Batch Normalization, BN) and activation functions (such as Leaky ReLU), which are used to extract preliminary features of the image.
[0109] CSPNet Block 1
[0110] Adopts CSPNet structure, divides the feature map into two parts, one part is processed through convolution operation, and the other part is directly spliced with the convolution feature map, enhances the feature representation ability and reduces the calculation amount.
[0111] Workflow of CSPNet:
[0112] 1. Feature map segmentation: The input feature map is divided into two parts.
[0113] 2. Convolution operation: One part of the feature map is processed through a series of convolution layers.
[0114] 3. Feature fusion: The processed feature map is spliced with the unprocessed feature map to form a new feature map.
[0115] 4. Repeat operation: The above steps are repeated in multiple stages to form the complete structure of CSPNet.
[0116] Conv Block 2 and CSPNet Block 2 repeat the process of Conv Block 1 and CSPNet Block 1 respectively, further extracting higher-level features.
[0117] Conv Block 3
[0118] 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:
[0119] -P3: The feature map size is 1 / 8 of the input image, with less semantic information but rich spatial information;
[0120] -P4: The feature map size is 1 / 16 of the input image, with relatively rich semantic information;
[0121] -P5: The feature map size is 1 / 32 of the input image, with rich semantic information;
[0122] -P6: The feature map size is 1 / 64 of the input image, with the most rich semantic information but less spatial information.
[0123] These multi-scale feature maps are used in subsequent feature fusion and enhancement layers. Under the action of FPN and PAN, different scale feature maps are fused to generate fusion feature maps for target detection and classification.
[0124] Three, feature fusion and enhancement layer: adopt feature pyramid network (FPN) and path aggregation network (PAN) to fuse different scale feature maps to get fusion feature maps, in which: FPN fuses high-level semantic information and low-level spatial information through top-down path; PAN introduces bottom-up path on the basis of FPN, forms a two-way connection with FPN, further enhances the expression ability of feature map and information transmission efficiency. Its main function is to enhance the expression ability of feature map and improve the detection ability of model to different size targets. The following is a detailed analysis of the specific role, workflow and relationship between FPN and PAN:
[0125] FPN (Feature Pyramid Network)
[0126] The main function of FPN is to establish horizontal connection between different scale feature maps, so as to fuse feature information of different levels. FPN combines high-level semantic information and low-level spatial information through top-down path, so that the model can use different scale features for target detection at the same time.
[0127] Workflow of FPN:
[0128] 1. Multi-scale feature extraction: In the feature extraction layer (Backbone), the image goes through multiple convolution layers and generates feature maps of different scales. For example, YOLOv5s generates P3, P4, P5, P6, and other multi-scale feature maps.
[0129] 2. Top-down path: Starting from the highest layer of feature maps, the size is enlarged to the same size as the next layer of feature maps through upsampling operations (such as bilinear interpolation).
[0130] 3. Lateral connection: The upsampling feature map is added element-wise to the next layer of feature maps, fusing different scale feature information.
[0131] 4. Repeat operation: The above steps are repeated at multiple levels to form a pyramid-shaped feature map structure.
[0132] Advantages of FPN:
[0133] Multi-scale feature fusion: By fusing feature maps of different scales, the model can better detect targets of different sizes. Enhance semantic information: High-level feature maps contain more rich semantic information, which is passed to low-level feature maps through the top-down path, enhancing the expression ability of feature maps. Improve detection accuracy: FPN can effectively improve the accuracy of target detection, especially when dealing with multi-scale targets.
[0134] PAN (Path Aggregation Network)
[0135] PAN is based on FPN and further enhances the transmission path of feature maps. PAN introduces a bottom-up path, forming a bidirectional connection with the top-down path of FPN, further enhancing the expression ability and information transmission efficiency of feature maps.
[0136] PAN workflow:
[0137] 1. Bottom-up path: After the completion of the top-down path of FPN, PAN introduces a bottom-up path to pass low-level feature maps to high-level feature maps through convolution and upsampling operations.
[0138] 2. Feature fusion: The bottom-up feature map is fused with the top-down feature map to form a more rich feature representation.
[0139] 3. Repeat operation: The above steps are repeated at multiple levels to form a bidirectional feature transmission path.
[0140] Advantages of PAN:
[0141] Bidirectional Feature Propagation: Through the bidirectional paths of top-down and bottom-up, PAN can more effectively propagate and fuse feature information. Enhanced Feature Representation: The bidirectional paths enable the feature maps to retain more detailed information and semantic information during propagation, improving the representation ability of feature maps. Improved Detection Performance: PAN can further improve the performance of target detection, especially in handling complex scenes and multi-scale targets.
[0142] Relationship between FPN and PAN
[0143] In the YOLOv5s model, FPN and PAN jointly constitute the feature fusion and enhancement layer (Neck), and their workflow is as follows:
[0144] 1. FPN Processing: After the image passes through the feature extraction layer (Backbone), multiple scale feature maps are generated. FPN transmits high-level semantic information to low-level feature maps through the top-down path for feature fusion.
[0145] 2. PAN Processing: After the top-down path of FPN is completed, PAN introduces the bottom-up path to transmit low-level feature maps to high-level feature maps, further enhancing the representation ability of feature maps and the efficiency of information transmission.
[0146] Four, Target Detection and Classification Layer: Perform target detection and classification on the fused feature maps, output the bounding box, confidence and class probability of defects. The target detection and classification layer (Head) is the core part of the entire defect detection model, responsible for the final output of the detection result, i.e. identifying and classifying defects in the image. The main functions of this layer include bounding box regression, confidence prediction and class probability prediction. In addition, in order to optimize the model training process, the Head layer also designs a multi-task loss function to comprehensively evaluate the performance of the model on various tasks. The following is a detailed analysis of the Head layer:
[0147] 1. Detection Head
[0148] The detection head is responsible for extracting and outputting the final detection results from the feature maps. Specifically, it includes three main tasks:
[0149] ① Bounding Box Regression:
[0150] Function: Predict the bounding box position of each defect, i.e. the specific position of the defect in the image.
[0151] Output: Position parameters of the bounding box, including center coordinates (x, y) and width (w) and height (h).
[0152] Working Process:
[0153] Feature Extraction: Extract features related to object detection from the feature maps output by the feature fusion and enhancement layers (FPN and PAN).
[0154] Regression Calculation: Calculate the position parameters (x, y, w, h) of each bounding box through convolutional and fully connected layers.
[0155] Output: Generate the bounding box coordinates for each defect for subsequent localization and visualization.
[0156] ② Confidence Prediction:
[0157] Function: Predict whether there is a defect in each bounding box and the probability of the defect's category.
[0158] Output: Confidence score for each bounding box, indicating the probability of a defect existing within the box and the specific category of the defect.
[0159] Working Process:
[0160] Feature Mapping: Extract features related to categories from the feature maps.
[0161] Confidence Calculation: Calculate the confidence score for each bounding box through convolutional and fully connected layers.
[0162] Category Probability Calculation: Calculate the probability of each bounding box belonging to various defect categories (such as knife marks, knife lines, ripples, and gaps, etc.).
[0163] Output: Generate the confidence score and category probability for each bounding box.
[0164] ③ Class Probability:
[0165] Function: Predict the specific type of defect (such as knife marks, knife lines, ripples, and gaps, etc.).
[0166] Output: The defect category corresponding to each bounding box.
[0167] Working Process:
[0168] Category Mapping: Map the feature maps to the category space.
[0169] Probability Calculation: Calculate the probability of each category through the softmax function.
[0170] Output: Generate the final category label for each bounding box.
[0171] 2、Multi-task Loss Function
[0172] To optimize the model's performance on the three tasks of 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:
[0173] ① Bounding Box Loss:
[0174] Loss Function: CIoU (Complete IoU) loss function is used.
[0175] Effect: Measures the difference between the predicted bounding box and the true bounding box, improving the accuracy of bounding box positioning.
[0176] 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.
[0177] ② Confidence Loss:
[0178] Loss Function: Binary Cross Entropy Loss is used.
[0179] Effect: Measures the prediction accuracy of the model on the existence of defects.
[0180] Working Process: Calculate the cross-entropy loss between the predicted confidence and the true label.
[0181] ③ Classification Loss:
[0182] Loss Function: Cross Entropy Loss is used.
[0183] Effect: Measures the prediction accuracy of the model on the defect class.
[0184] Working Process: Calculate the cross-entropy loss between the predicted class probability and the true class label.
[0185] Combination of Multi-task Loss Function:
[0186] By weighted summation, the bounding box loss, confidence loss, and classification loss are combined to form the final total loss function. Total Loss Function = α * Bounding Box Loss + β * Confidence Loss + γ * Classification Loss, where α, β, γ are weight coefficients, used to balance the loss contribution of different tasks.
[0187] V. Defect Classification Layer: Classify and rank the detected defects based on bounding boxes, confidence scores, and class probabilities, output the detection results. The defect classification layer is the final processing stage of the defect detection model, responsible for classifying and ranking the detected defects. The main functions of this layer include post-processing steps and ranking strategies. Post-processing steps are used to filter and optimize detection results, while ranking strategies further classify and rank defects of the same type based on their characteristics such as confidence scores, size, shape, etc. The following is a detailed analysis of this layer:
[0188] Post-processing steps:
[0189] The purpose of post-processing steps is to optimize detection results and improve the accuracy and robustness of the model. Mainly including the following steps:
[0190] 1. Confidence Thresholding:
[0191] Function: Filter out detection results with low confidence scores, and only keep those with high confidence scores.
[0192] Working process:
[0193] Set threshold: Set a confidence threshold (for example, 0.5) based on experience or experimental results.
[0194] Filtering operation: Compare the confidence score of each detected defect with the threshold. If the confidence score is higher than the threshold, keep the detection result. If the confidence score is lower than the threshold, discard the detection result. By setting a confidence threshold, false positives and false negatives can be effectively reduced, improving the detection accuracy of the model.
[0195] 2. Non-Maximum Suppression (NMS):
[0196] Function: Eliminate overlapping bounding boxes, keep the most likely detection results, and avoid repeated detection.
[0197] Working process:
[0198] Sort: Sort all detected defects according to confidence scores.
[0199] Select the highest confidence: Select the defect with the highest confidence as the candidate result.
[0200] Suppress overlap: Calculate the overlap (usually using IoU, Intersection over Union) between other detection results and the candidate result. If the overlap is higher than the set threshold (for example, 0.5), suppress those overlapping detection results.
[0201] Repeat the above steps for the remaining test results until all test results have been processed.
[0202] NMS can effectively reduce redundant detection results, avoid the same defect being detected multiple times, and improve the detection efficiency of the model.
[0203] 3. Tiered strategy:
[0204] ① Confidence-based grading:
[0205] Function: Based on the confidence score of the detection results, defects of the same type are classified into different levels (e.g., high, medium, low).
[0206] Work process:
[0207] Set grading 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).
[0208] Grading operation: The confidence score of each detected defect is compared with the grading threshold, and it is classified into the corresponding level.
[0209] By using confidence-based grading, the severity of defects can be assessed more intuitively, providing a basis for subsequent processing.
[0210] ② Feature-based grading based on size or shape:
[0211] Function: If more refined grading is required, features such as the size and shape of defects can be extracted and graded using a classifier.
[0212] Work process:
[0213] Feature extraction: Extracting features such as size and shape from the bounding boxes of detected defects. For example, calculating the area, perimeter, and aspect ratio of the defect.
[0214] Feature normalization: Normalize the extracted features to make them have the same scale.
[0215] Classifier training: Use supervised learning algorithms (such as support vector machines, random forests, neural networks, etc.) to train a classifier to classify defects into different levels.
[0216] Grading operation: Input the extracted features into the trained classifier and output the level of the defect.
[0217] Feature-based classification can provide more refined grading results, suitable for application scenarios that require accurate assessment of defect severity.
[0218] 4. Grading result output:
[0219] Grading label: Each defect is assigned a grading label indicating its level (e.g., high, medium, low).
[0220] Visualization: The grading results can be visualized in combination with the original image, making it easier for users to view and analyze.
[0221] Example Two
[0222] The adhesive tape edge defect detection device provided by the embodiment of the present application comprises:
[0223] The positioning assembly is used to fix the adhesive tape on the image acquisition station, and the adhesive tape is fixed by the precise positioning assembly; the image acquisition assembly is used to acquire images on the edge surface of the adhesive tape; and the image analysis assembly is used to analyze and process the images, and more specifically, is used to perform comparative analysis of images and operation of a defect detection model.
[0224] Specifically, the positioning assembly is usually composed of a positioning table, which can accurately fix the adhesive tape and ensure that the position is stable and highly repeatable. Before installation and use, the positioning assembly needs to be calibrated to ensure that it can accurately fix the adhesive tape at the predetermined position. The calibration process may include methods such as laser alignment and mechanical adjustment. Sensors such as photoelectric sensors and position sensors can be used to assist positioning to ensure the accuracy of the position of the adhesive tape. In this embodiment, the positioning assembly is composed of five support plates stacked in the vertical direction, and the support plates are movably connected to each other, so that when the adhesive tape is placed, the upper surfaces of the support plates are exposed to place the adhesive tape, and the positioning assembly flows back and forth on the production line to continuously transport the adhesive tape to be detected through the image acquisition assembly for detection.
[0225] The image acquisition assembly uses high-resolution industrial cameras or other image acquisition devices to ensure that the image quality is high enough to capture subtle defects. In order to obtain clear images, appropriate light sources are needed. LED lights or other high-brightness light sources can be used, and the edge surface is uniformly illuminated by a diffuse reflection plate or a ring-shaped light source.
[0226] The image analysis assembly performs the steps in any of the adhesive tape edge defect detection methods in Example One, i.e., comparative analysis of images B to obtain the difference degree K, and simultaneously running the defect detection model to perform defect classification of the defect type. Thus, the detection of whether there is a defect is realized, and the classification and grading of qualified products and defective products are realized.
[0227] The adhesive tape edge defect detection device provided by the embodiment can significantly improve the efficiency and accuracy of adhesive tape edge defect detection, and is suitable for automatic detection in an actual production environment.
[0228] Embodiment three
[0229] The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the adhesive tape edge defect detection method of the embodiment one is realized. 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 containing 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 digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state disk) and the like. The computer readable storage medium includes instructions, and the instructions instruct the computing device to execute any one of the adhesive tape edge defect detection methods provided in the embodiment one.
[0230] Embodiment four
[0231] The embodiment of the application also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory.
[0232] The processor executes the computer program to realize the adhesive tape edge defect detection method in the embodiment one.
[0233] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, other working processes of the above-described method can refer to the corresponding processes in the foregoing embodiments, and will not be described here.
[0234] Through the description of the above embodiments, those skilled in the art can clearly understand that the application can be realized by means of software and necessary general hardware, and of course, it can also be realized by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions completed by computer programs can be easily realized by corresponding hardware, and specific hardware structures for realizing the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the application, software program implementation is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a readable storage medium such as a computer floppy disk, U disk, mobile hard disk, ROM, RAM, magnetic disc or optical disc, and includes a plurality of instructions for making a computer device (which can be a personal computer, a training device or a network device) execute the method of each embodiment of the application.
[0235] In the above embodiments, the technical solutions can be implemented by software, hardware, firmware or any combination thereof, entirely or partially. When implemented by software, the technical solutions can be implemented in the form of a computer program product, entirely or partially.
[0236] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are entirely or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, 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 (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be stored by the computer or a data storage device such as a training device, a data center, etc. integrated with 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)) and the like.
[0237] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; 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 replacements; and these modifications or replacements do not make 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 of detecting a defect of a bead edge of a rubber strip, characterized by, Comprising: S1: obtaining local images of the edge surfaces of N strips of adhesive tape, obtaining image A, image A including N images B of the same region of the N strips of adhesive tape, N being an integer greater than or equal to 2; S2: comparing and analyzing the N images B to determine whether there is a defective image B1, comprising: S21: segmenting image A to obtain N images B; S22: comparing and analyzing any two images B to obtain a difference degree K; S23: comparing difference degree K with difference degree threshold K1; S24: if K > K1, comparing and analyzing the corresponding image B with a standard image to obtain a difference degree K2; S25: comparing difference degree K2 with difference degree threshold K3, K3 < K1; S26: if K2 > K3, determining the corresponding image B as a defective image B1; S3: if there is, inputting image B1 into a defect recognition model to obtain a defect type, the training samples of the defect recognition model including one or more of the following labeled images: knife marks, knife lines, corrugations, and notches.
2. The method of claim 1, wherein S23 further comprises: S231: if K ≤ K1, performing steps S1 to S23 in a loop to detect the undetected area of the corresponding adhesive tape until the undetected area is cleared; S25 further comprises: S251: if K2 ≤ K3, performing steps S1 to S25 in a loop to detect the undetected area of the corresponding adhesive tape until the undetected area is cleared.
3. The method of claim 1, wherein the step of detecting the edge defect of the adhesive strip is performed by using a camera. Replace S22 with: Comparing and analyzing any two images B taken from the same adhesive tape to obtain a difference degree K, the regions corresponding to the two images B being on two edge surfaces of the same adhesive tape.
4. The method of claim 1, wherein the step of detecting the edge defect of the adhesive strip is characterized by, S1 further comprises before S21: S201: comparing and analyzing any two images A to obtain a difference degree k; S202: comparing k with difference degree threshold k1, if k > k1, then performing S21.
5. The adhesive tape edge defect detection method according to claim 1, characterized in that: The defect recognition model further has a defect grading function.
6. The method of claim 1, wherein S1 further comprises before: S0: arranging the N strips of adhesive tape in a manner that the edge surfaces are coplanar and the edges are flush.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory, characterized in that: The processor executes the computer program to implement the steps of the adhesive tape edge defect detection method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the steps of the adhesive tape edge defect detection method according to any one of claims 1 to 6.
9. An apparatus for detecting a defect of a bead edge, for executing the method of detecting a defect of a bead edge according to any one of claims 1 to 6, characterized by, Comprising: An image acquisition component for acquiring images of the edge surfaces of the adhesive tape; An image analysis component for analyzing and processing the images.
Citation Information
Patent Citations
Complex workpiece defect detection method based on auto-encoder
CN114202544A
OLED display screen quality detection method based on artificial intelligence
CN117173168A