Battery coating defect detection method and device and computer readable storage medium
By segmenting battery coating images and designing exclusive attribution rules, the problems of low efficiency and insufficient accuracy in traditional detection methods are solved, achieving efficient and accurate defect detection and adapting to the production needs of battery coating of different specifications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI HIGRAND ELECTRONICS TECH
- Filing Date
- 2025-12-22
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional manual visual inspection and machine vision solutions are inefficient and lack accuracy in battery coating defect detection, making it difficult to meet the needs of modern large-scale production. Furthermore, existing algorithms are sensitive to lighting and materials, have poor generalization ability, and are unstable in defect detection.
The battery coating image is divided into multiple sub-images along the extension direction, and a preset overlapping area is set between adjacent sub-images. A target detection model is used to detect defects, and a unique attribution rule is designed to determine the defect attribution, generating the final detection result.
It improves the completeness and accuracy of detection, avoids missed detections due to defects being truncated during segmentation, ensures the uniqueness and adaptability of detection results, and is applicable to battery coating production scenarios of different specifications.
Smart Images

Figure CN121962013A_ABST
Abstract
Description
A method, apparatus, and computer-readable storage medium for detecting defects in battery coating. Technical Field
[0001] This application relates to the field of battery coating inspection technology, and in particular to a method, apparatus and computer-readable storage medium for detecting defects in battery coating. Background Technology
[0002] In battery manufacturing, the coating process is a crucial step that determines battery performance and safety. Defects such as foil leakage, edge breakage, and bubbles generated during coating can severely impact the battery's electrochemical performance and safety. Traditional manual visual inspection methods suffer from low efficiency, high subjectivity, and high false negative rates, making them unsuitable for the demands of modern large-scale production.
[0003] Traditional machine vision solutions for coating quality inspection have the following shortcomings: 1) Inadequate imaging schemes result in insufficient contrast between light and dark areas for foil defects, affecting detection accuracy; 2) Traditional defect detection algorithms rely on fixed thresholds, morphological or manual feature extraction, making them sensitive to changes in lighting, material reflectivity, and texture; large differences in appearance between different defects and diverse forms of similar defects lead to frequent parameter adjustments and poor generalization; 3) In engineering implementation, deep learning detectors typically require fixed input sizes. Scaling an ultra-long image to a fixed size results in significant compression, while scaling to a small size or low contrast can easily obscure defects and impair accuracy; to reduce the compression ratio, some solutions crop the image before feeding it into the network, causing cross-block defects to be truncated at block boundaries, resulting in missed detections or positioning errors; 4) Some solutions only output detection boxes and confidence scores, lacking engineering-based grading rules that incorporate defect geometry such as the area or length of the minimum bounding rectangle, resulting in an inability to stably map "detection" to "OK / NG". Summary of the Invention
[0004] To solve at least one of the above-mentioned technical problems, this application provides a method, apparatus and computer-readable storage medium for detecting battery coating defects, and the technical solution adopted is as follows.
[0005] This application provides a battery coating defect detection method, comprising: acquiring a battery coating image to be detected; dividing the image to be detected into multiple sub-images along the extension direction of the battery coating, wherein two adjacent sub-images have a preset overlapping region; performing defect detection on each sub-image using a target detection model to obtain a sub-image detection result corresponding to each sub-image, and determining whether a target defect exists based on the detection result; for defects detected in the preset overlapping region, determining the attribution of the defects in the preset overlapping region according to a preset attribution rule; and generating a final detection result for the image to be detected.
[0006] In some embodiments of this application, after acquiring the image to be inspected of the battery coating, a coarse inspection is performed on the entire image to be inspected to generate a coarse inspection result, wherein: based on the coarse inspection result, it is determined whether it is necessary to divide the image to be inspected into multiple sub-images along the extension direction of the battery coating for fine inspection; if so, fine inspection is performed; otherwise, the coarse inspection result is output and the process ends.
[0007] In some embodiments of this application, the image to be detected is divided into multiple sub-images along the extension direction of the battery coating, and two adjacent sub-images have a preset overlapping area, including: each preset overlapping area has an equal length along the extension direction.
[0008] In some embodiments of this application, the step of performing defect detection on each of the sub-images to obtain a sub-image detection result corresponding to each sub-image includes: the detection area for defect detection of any sub-image is the sub-image itself, wherein each of the sub-images located at both ends of the battery coating contains one of the preset overlapping areas, and each of the sub-images located in the middle of the battery coating contains two of the preset overlapping areas.
[0009] In some embodiments of this application, determining the attribution of a defect detected within a preset overlapping area according to a preset attribution rule includes: setting a center line perpendicular to the extension direction for the preset overlapping area; setting a center point for the detected defect; determining the attribution of the defect based on the position of the center point relative to the center line; and assigning the defect to one of two adjacent sub-images if the center point is located at the center line.
[0010] In some embodiments of this application, coordinate systems are established in each of the sub-images and the image to be detected; when a target defect is determined to exist based on the detection result, the center point coordinates of the defect are generated; and the center point coordinates are mapped back to the coordinate system of the image to be detected through the positional offset relationship between the sub-image and the image to be detected, so as to obtain the actual coordinates of the center point of the defect in the image to be detected.
[0011] In some embodiments of this application, an intersection-union ratio (IURR) threshold is set to compare the mapped defect information; if the IURR of any two defect detection boxes is greater than the IURR threshold, they are determined to be the same defect, the defect information with higher confidence is retained, and the defect information with lower confidence is deleted.
[0012] In some embodiments of this application, acquiring the image to be detected of the battery coating includes: the image to be detected is formed by stitching together continuously acquired image frames.
[0013] This application also discloses an apparatus including a processor and a memory, the memory storing a computer program, which, when executed by the processor, performs the battery coating defect detection method as described above. The apparatus includes: an image acquisition module for acquiring the image to be detected of the battery coating; an image segmentation module for segmenting the image to be detected into multiple sub-images; a detection module for performing defect detection on the sub-images; and an output module for generating the final detection result of the image to be detected.
[0014] This application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the battery coating defect detection method as described above.
[0015] This application has at least the following beneficial effects: It segments the battery coating image to be inspected and sets a preset overlapping area in adjacent sub-images to ensure that defects across sub-images can fall completely into the detection range of at least one sub-image. This fundamentally avoids missed detections caused by defects being truncated due to segmentation, improves detection completeness, designs exclusive attribution rules for defects in overlapping areas, clarifies the attribution of defects, eliminates the problem of repeated detection of defects in overlapping areas, and ensures the uniqueness and accuracy of detection results. The method is highly versatile, does not rely on specific imaging equipment or detection models, can be flexibly adapted to battery coating production scenarios of different specifications, and has a wide range of applications.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] The present application will be further illustrated below with reference to the accompanying drawings and embodiments. It should be noted that the embodiments illustrated in the following drawings are exemplary and are only used to explain the present application, and should not be construed as limiting the present application.
[0018] Figure 1 is a schematic diagram of the device in one embodiment of this application; Figure 2 is a diagram of the detection result output in one embodiment of this application.
[0019] Reference numerals: Battery coating 001; Camera 100; Light source 200; Conveyor belt 300. Detailed Implementation
[0020] The embodiments of this application are described in detail below with reference to FIG1, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] In the description of this application, it should be understood that the terms "center", "middle", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0022] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0023] In the description of this application, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0024] In the description of this application, the use of terms such as "one embodiment," "some embodiments," "an example," "some instances," "some embodiments," "illustrative embodiment," "example," "specific example," and "some examples" indicates that the specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0025] This application provides a battery coating defect detection method, comprising: acquiring a battery coating 001 image to be detected; dividing the image to be detected into multiple sub-images along the extension direction of the battery coating 001, wherein two adjacent sub-images have a preset overlapping region; performing defect detection on each sub-image using a target detection model to obtain a sub-image detection result corresponding to each sub-image, and determining whether a target defect exists based on the detection result; for defects detected within the preset overlapping region, determining the attribution of the defects within the preset overlapping region according to a preset attribution rule; and generating a final detection result for the image to be detected.
[0026] Defects are visually observable and identifiable abnormal areas of a certain physical area on the battery coating surface, including but not limited to foil leakage, bubbles, edge damage, and uneven coating. These defects all have quantifiable areas, and their shape and location can be captured by image acquisition equipment and presented in the image to be inspected, providing a basis for subsequent defect detection and attribution determination.
[0027] As shown in Figure 1, images of the coating surface during the battery coating 001 production process are collected to form images to be inspected. The type of acquisition device is not limited, only that the image can clearly show the state of the coating surface.
[0028] In Figure 1, the X direction represents the extension direction of the battery coating 001, i.e., the transmission direction of the production line. The image to be inspected is divided into multiple sub-images, and the number of sub-images can be set according to the length of the image to be inspected and the required inspection accuracy. A preset overlapping area is reserved between adjacent sub-images, and the preset size of the overlapping area can be adjusted according to the common defect sizes.
[0029] Select a target detection model suitable for battery coating defect detection, input each sub-image into the target detection model for defect detection, and determine whether a target defect exists based on the detection results. The target detection model outputs the sub-image detection result corresponding to each sub-image. When a target defect is detected, the detection result includes defect information within the sub-image detection range, including key parameters such as the defect's location, category, and confidence level. The defect can be placed within a detection bounding box for output.
[0030] For defects located within a preset overlapping area in the detection results, a sub-image for outputting the defect is determined from the corresponding adjacent sub-images according to a preset attribution rule, ensuring that the same defect is output by only one sub-image. The preset attribution rule is set based on the position of the defect in the sub-image, and a defect is output only from the detection results of one sub-image, avoiding duplicate output and reducing computational load.
[0031] All valid defect information from the sub-images is aggregated and integrated to form the final detection result corresponding to the image to be detected. This result can be directly used for production line quality judgment or defect tracing.
[0032] In this process, segmenting into multiple sub-images only divides the detection area on the image to be detected, rather than actually cutting it. The sub-image is just a divided detection box, and the defect information is output from the sub-image to which it belongs. The same defect is only output by one sub-image, and the sub-image adjacent to the same sub-image does not output the same defect. Even if the complete defect information is observed in an adjacent sub-image, it is not output from the sub-image to which it belongs, ensuring that the same defect is only output once.
[0033] This application segments the battery coating image to be inspected and sets a preset overlapping region in adjacent sub-images to ensure that defects spanning sub-images can be completely included in the detection range of at least one sub-image. This fundamentally avoids missed detections caused by defects being truncated due to segmentation, improving detection completeness. A dedicated attribution rule is designed for defects in the overlapping region to clarify defect attribution and eliminate the problem of repeated detection of defects in the overlapping region, ensuring the uniqueness and accuracy of the detection results. The method is highly versatile, does not rely on specific imaging equipment or detection models, and can be flexibly adapted to battery coating production scenarios of different specifications, with a wide range of applications.
[0034] Specifically, when acquiring the image to be tested for battery coating 001, the image to be tested is formed by stitching together continuously acquired image frames. When acquiring the image to be tested for battery coating, multiple frames of coating surface images are acquired continuously, with each frame covering a portion of the coating area. A preset overlap, such as 5%-10%, can be set between adjacent frames to ensure stitching continuity. Image stitching algorithms, such as feature point matching-based stitching algorithms or phase correlation-based stitching algorithms, are used to stitch together the continuously acquired multiple frames, eliminating inter-frame stitching gaps and forming a complete image to be tested for battery coating. During the stitching process, preprocessing can be performed on the image, such as brightness equalization and distortion correction, to ensure that the stitched image to be tested accurately reflects the coating surface condition.
[0035] During the transmission of battery coating 001, an encoder generates a uniform displacement trigger signal based on its movement. A line scan camera performs line-by-line exposure and acquisition at fixed intervals to obtain images with consistent aspect ratios. The resulting image to be inspected is denoted as [image name missing]. Based on prior knowledge, the coated area of the electrode is cut off and denoted as... The height is H ROI Width is W ROI .
[0036] Enhancement of the ROI region improves the characterization of defects; linear grayscale transformation is used here. .
[0037] If take =4, To improve contrast and brightness without altering the geometric relationships, among which... Determine the magnification factor. This determines the increase in brightness, enhancing the visibility of weak-contrast defects such as foil leakage and bubbles.
[0038] In some embodiments, after acquiring the image to be detected of the battery coating, a coarse inspection is performed on the entire image to be detected to generate a coarse inspection result, wherein: based on the coarse inspection result, it is determined whether it is necessary to divide the image to be detected into multiple sub-images along the extension direction of the battery coating for fine inspection; if so, fine inspection is performed; otherwise, the coarse inspection result is output and the process ends.
[0039] After acquiring the image to be inspected for battery coating 001, a preliminary screening is first performed on the entire image to be inspected, and then a decision is made on whether to segment it into sub-images based on the preliminary screening results.
[0040] Localized, small-sized defects, such as small bubbles and minor breaks, can exist on the battery coating 001. Macroscopic, systemic coating anomalies, such as large-area missed coating, electrode folding, and peeling, can also occur. These defects or anomalies are often large in size and easily identifiable, requiring only a preliminary rough inspection. If the rough inspection reveals a defect, the result is output, and the process ends, eliminating the need for a time-consuming fine inspection stage. This significantly saves subsequent calculations and reduces the risk of production line congestion. If the rough inspection finds no defects, the image to be inspected is segmented into multiple sub-images along the extension direction of the battery coating 001 for subsequent high-precision inspection.
[0041] Specifically, a lightweight binary classification model is used for... For diagnosis, the enhanced ROI region was first scaled proportionally and then adjusted to the MobileNetv3 model using letterboxing to generate a suitable input size. The scaled image is denoted as [image size not specified]. . As a discriminant function, the probability of coating anomalies is obtained: .
[0042] Where O is the original two-dimensional output of the classification network, P norm and P abn This represents the normalized probability of normal or abnormal coating. If P... abn If the value exceeds a preset threshold, it is judged as an abnormal coating, and the coating is directly removed as an anomaly. The preset threshold can be dynamically adjusted according to the actual situation. Otherwise, the image is segmented into sub-images and further refined.
[0043] Initial screening can quickly intercept large-area severe anomalies without requiring complex subsequent sub-image segmentation and detection processes, significantly saving detection computing power and time, and improving production line detection efficiency. The coarse inspection uses lightweight algorithms and networks to quickly identify obvious and serious defects while ensuring detection speed, preventing such defects from flowing into subsequent processes and improving the timeliness of production line quality control. First, MobileNetV3 performs binary classification (normal / abnormal) on the ROI thumbnail; large-area missing coatings, folds, etc., are directly judged as unqualified. Then, samples requiring fine inspection are sent to YOLOv11; this reduces heavy-load inference while ensuring accuracy, improving real-time performance.
[0044] In some embodiments, the image to be detected is divided into multiple sub-images along the extension direction of the battery coating, and two adjacent sub-images have a preset overlapping region, including: the preset overlapping regions have equal lengths along the extension direction.
[0045] A pre-defined overlapping region is set between two adjacent sub-images. This overlapping region is distributed along the extension direction to prevent defects that cross sub-images from being segmented and truncated, ensuring that the defect falls completely within the detection range of at least one sub-image. First, based on the maximum size of common battery coating defects and the recognition accuracy of the target detection model, the length of a single overlapping region along the extension direction is determined, such as a fixed value of 5-20 pixels, or a fixed value of 5%-10% of the sub-image's length along the extension direction. Then, overlapping regions are set at the junctions of adjacent sub-images according to this fixed length. Specifically, for sub-images located at both ends of the coating, an overlapping region of this fixed length is set only on the side connecting to the middle sub-image; for sub-images located in the middle of the coating, an overlapping region of this fixed length is set on each of the two sides connecting to adjacent sub-images, and the lengths of the overlapping regions on both sides are exactly the same. The standardized overlapping region length facilitates the unified configuration and batch adjustment of production line detection parameters. When adapting to battery coating production scenarios of different specifications, only the fixed length value of the overlapping region needs to be modified, without reconstructing the segmentation logic, thus improving the versatility and detection efficiency of the solution.
[0046] Furthermore, defect detection is performed on each sub-image to obtain the sub-image detection result corresponding to each sub-image, including: the detection area for defect detection of any sub-image is the sub-image itself, wherein the sub-images located at both ends of the battery coating each contain a preset overlapping area, and the sub-images located in the middle of the battery coating each contain two preset overlapping areas.
[0047] When performing defect detection on each sub-image, the detection area for each sub-image is its entire area. When performing defect detection on any sub-image, the detection area is the sub-image itself, including all its fixed-length overlapping regions. No additional expansion of the detection range is needed; complete coverage of defects across sub-images can be achieved through the overlapping regions it contains. That is, for any sub-image, its detection area includes the overlapping regions connecting to the left-adjacent sub-image and / or the overlapping regions connecting to the right-adjacent sub-image, ensuring that the detection area completely covers the surrounding overlapping regions. The preset overlapping regions are set to a fixed length along the extension direction. For example, if an image to be detected is equally divided into 4 parts, i.e., divided into 4 sub-images, let the length of the image to be detected along the extension direction be L. The preset overlapping region along the extension direction is set to a fixed length 2C. With a starting point of the image to be detected as the zero point, the detection regions of the four sub-images are [0, L / 4+C), (L / 4-C, L / 2+C), (L / 2-C, 3L / 4+C), and (3L / 4-C, L). The detection region covers the sub-image itself, including adjacent overlapping areas, ensuring that defects spanning multiple sub-images fall completely within the detection region of at least one sub-image. This ensures that defects are not truncated in the detection range, further reducing the risk of missed detections. It also provides a prerequisite for the subsequent attribution of defects in overlapping areas, ensuring that defects in overlapping areas can be accurately identified and assigned. This division avoids the inefficient method of traditional sliding windows requiring a large amount of overlap; only four sub-images are needed to completely cover the entire image to be detected, ensuring that even if a defect crosses the theoretical boundary, it will still be completely seen in one of the sub-images.
[0048] Furthermore, for defects detected within a preset overlapping area, the attribution of defects within the preset overlapping area is determined according to preset attribution rules, including: setting a center line perpendicular to the extension direction for the preset overlapping area; setting a center point for the detected defects; determining the attribution of defects based on the position of the center point relative to the center line; if the center point is at the position of the center line, the defect is assigned to one of the two adjacent sub-images.
[0049] A center line perpendicular to the battery coating extension direction is set for each preset overlapping area. This center line divides the overlapping area into two parts of equal area. The defect coordinate information output by the target detection model is used to determine the center point of each detected defect. The center point can be the geometric center point of the minimum bounding rectangle of the defect or the centroid of the defect contour.
[0050] The position of the defect center point relative to the center line is determined. If the center point is located on one side of the center line, the defect is assigned to the corresponding sub-image on that side, and its defect information is marked, uploaded, and reported by the assigned sub-image. If the center point happens to fall on the center line and coincides, it is assigned to the adjacent sub-image on one side. At the same time, all sub-images follow the preset assignment rules. For example, if the center point happens to fall on the center line and coincides, the defect is assigned to the sub-image on the left or upper side along the extension direction of battery coating 001, or the defect is assigned to the sub-image on the right or lower side along the extension direction of battery coating 001.
[0051] Specifically, taking two adjacent sub-images [0, L / 4+C) and (L / 4-C, L / 2+C) as examples, the sub-image with a detection range of [0, L / 4+C) is designated as the first sub-image, and the sub-image with a detection range of (L / 4-C, L / 2+C) is designated as the second sub-image. The center lines of the first and second sub-images are located at L / 4. When no defect is detected, there is no defect information, and no defect information is reported. When the defect center point is located in [0, L / 4], the defect belongs to the first sub-image and the defect information is output by the first sub-image; when the defect center point is located in (L / 4, L / 2), the defect belongs to the second sub-image and the defect information is output by the second sub-image. Alternatively, when the defect center point is located in [0, L / 4), the defect belongs to the first sub-image and the defect information is output by the first sub-image; when the defect center point is located in [L / 4, L / 2), the defect belongs to the second sub-image and the defect information is output by the second sub-image.
[0052] Clearly defining defect attribution resolves the issue of duplicate defect outputs in overlapping areas, ensuring the accuracy and uniqueness of test results and avoiding quality misjudgments due to duplicate counting. The center point attribution rules are adapted to the morphological characteristics of battery coating defects, such as irregular rectangles or clumps, with precise judgment logic that effectively avoids attribution bias. Rules for overlapping center points and center lines prevent attribution confusion caused by boundary conditions, ensuring the integrity and rigor of the process.
[0053] The sub-images obtained above are then input into YOLOv11 for defect detection. Each sub-image undergoes an independent forward inference on the GPU, and the model outputs all bounding boxes, their confidence scores, and categories for that sub-image, as shown below: .
[0054] Where Bi is the set of candidate boxes for the i-th subgraph, c is the category, and σ is the confidence level.
[0055] In some embodiments, coordinate systems are established in each sub-image and the image to be detected respectively; when a target defect is determined to exist based on the detection result, the coordinates of the center point of the defect are generated; the coordinates of the center point are mapped back to the coordinate system of the image to be detected through the positional offset relationship between the sub-image and the image to be detected, so as to obtain the actual coordinates of the center point of the defect in the image to be detected.
[0056] Establish independent coordinate systems for each sub-image and the image to be detected: the coordinate system of the sub-image has its upper left corner as the origin, the horizontal direction as the x-axis, and the vertical direction, i.e., along the coating extension direction, as the y-axis; the coordinate system of the image to be detected also has its upper left corner as the origin, and the x-axis and y-axis directions are consistent with the coordinate system of the sub-image.
[0057] The target coordinates detected in each sub-image are mapped back to the image to be detected using the following formula: .
[0058] .
[0059] Where x glob y glob Let x be the coordinates of the target detection center point on the x-axis and y-axis of the image to be detected; x sub y sub For the corresponding subgraph coordinates, r i It is the scaling factor. P x P y To pad the edges of letterboxes during image compression. Let be the ordinate of the i-th subgraph.
[0060] By establishing a coordinate system and mapping coordinates, the precise conversion from the sub-image defect coordinates to the image coordinates to be inspected is achieved. This allows the final inspection result to directly reflect the actual position of the defect in the complete coating image, facilitating production line staff to locate defects and trace production problems. It also ensures the accuracy of defect location information and provides reliable data support for subsequent defect handling and quality analysis.
[0061] In some embodiments, an intersection-union ratio (IURR) threshold is set to compare the mapped defect information; if the IURR of any two defect detection boxes is greater than the IURR threshold, they are determined to be the same defect, the defect information with higher confidence is retained, and the defect information with lower confidence is deleted.
[0062] For overlapping or adjacent detection boxes that may exist in different sub-images, the NMS algorithm is further used to remove duplicate or highly overlapping redundant boxes. Specifically, for any two detection boxes B i and B j Calculate its intersection-union ratio (ECU) (search for the concept of ECU for details): .
[0063] All defect information mapped to the coordinate system of the image to be detected is collected. All defect information is compared pairwise, and the Cross-Union Ratio (IoU) between any two defect information pairs is calculated. If the IoU is greater than a set threshold τ, it is considered that the same defect has been detected. In this case, only the bounding box with the higher confidence score is retained, and the bounding box with the lower confidence score is deleted. By reasonably setting the IoU threshold, duplicate detections can be eliminated without mistakenly deleting adjacent detection boxes belonging to different defects. The fused detection results include the category of each defect, its coordinates and bounding box size on the original electrode, confidence score, and other information. The IoU threshold further filters out potentially redundant defect information, improving the purity and accuracy of the final detection results. The IoU threshold can be flexibly adjusted to adapt to the detection needs of different types of battery coating defects, making it highly versatile.
[0064] Based on the detection results, the detected defects are judged and alarms are triggered. Since different manufacturers and products have different tolerances for coating defects, this invention performs a final evaluation of the product based on the type, quantity, and size of the detected defects, combined with a pre-set judgment threshold. This application adopts a graded judgment strategy, using camera calibration to obtain the single-pixel accuracy in the x and y directions, denoted as... , mm / px. At this point, the area A and length L of each defect can be approximately calculated: .
[0065] .
[0066] A defect classification strategy is used to screen defects. In this invention, clump-like defects such as foil leakage and bubbles are classified by usage area. .
[0067] Long and thin defects, such as those with shiny edges, are classified by length: .
[0068] If an L3 level defect occurs, the coating is immediately deemed unqualified. If there are no L3 level defects but more than 2 L2 level defects, the coating is deemed unqualified. If there are no L3 level defects and the number of L2 level defects is ≤2, the L1 level defect is assessed. If L1 defects are greater than 5, the coating is deemed unqualified; otherwise, it is deemed qualified. All of the above threshold parameters can be adjusted dynamically according to production conditions.
[0069] Results Recording and Display: The system will save the original stitched large image and the result image with defect locations marked for offline analysis. The detection results are displayed in real time through the HMI interface, including detailed information such as the type, location coordinates, and size of each defect, for easy viewing by operators.
[0070] Data Upload and Traceability. Inspection data is uploaded to the Manufacturing Execution System (MES). This includes the unique identifier for each electrode, inspection time, defect type, and distribution. This data can be used for subsequent quality traceability, statistical analysis, and process parameter optimization.
[0071] Through the above steps, this invention can efficiently and in real time detect and determine surface defects on each electrode sheet after the coating process, and use the detection results to provide timely feedback to the production process to prevent defective products from being exported. The detection frame is categorized by threshold based on its area or maximum length; for example, missing foil or bubbles are identified by area, while shiny edges are identified by length. This process improves robustness and ultimately determines the best outcome.
[0072] Referring to Figure 1, this application also discloses an apparatus, including a processor and a memory. The memory stores a computer program, which is executed by the processor to perform the battery coating defect detection method described above. The apparatus includes: an image acquisition module for acquiring an image of the battery coating 001 to be detected; an image segmentation module for segmenting the image to be detected into multiple sub-images; a detection module for performing defect detection on the sub-images; and an output module for generating the final detection result of the image to be detected.
[0073] Specifically, the image acquisition module is set as camera 100, which can be a high-resolution CCD line scan camera. First, the high-resolution CCD line scan camera is vertically mounted above the conveyor belt platform, paired with a suitable industrial lens to ensure coverage of the coating width and meet resolution requirements. The line scan camera captures only one line pixel at a time. During movement, an encoder controls pulse signals to trigger camera acquisition, allowing camera 100 to acquire line scan images at equal intervals, ensuring uniform longitudinal sampling and undistorted images. During acquisition, symmetrically mounted strip LED light sources 200 on both sides form a grazing-incidence illumination structure. The incident angle of the light sources 200 is preferably 5°-15°, with the lights from both sides illuminating the coating surface at an angle from opposite directions, creating a certain contrast between defective and normal areas. Using grazing-incidence illumination with opposing strip lights, combined with encoder-triggered line scan imaging at equal intervals, significantly enhances the contrast of reflective defects such as foil edge damage, solving the problem of "unclear visibility" in traditional imaging.
[0074] The device also includes a conveyor belt 300, which is used to transport the battery coating 001. The encoder generates a constant-distance displacement trigger signal based on the movement of the conveyor belt, driving the line scan camera to perform line-by-line exposure acquisition at fixed intervals to obtain images with consistent aspect ratios. The resulting image to be detected is denoted as... For example, the height H is 12500 and the width W is 2048.
[0075] The device also includes an image enhancement module to enhance the ROI region and improve the ability to characterize defects, using linear grayscale transformation: .
[0076] If take =4, This method improves contrast and brightness without altering the geometric relationships. Determine the magnification factor. This determines the increase in brightness, enhancing the visibility of weak-contrast defects such as foil leakage and bubbles.
[0077] The device in this application adopts a modular design, which corresponds each step of the detection method to an independent functional module. The structure is clear, the maintenance is convenient, and the parameters of each module can be flexibly adjusted according to actual needs.
[0078] As shown in Figure 2, which is a detection result diagram of the detected defects, the detected defects are foil leakage and its defect size, bubbles and their defect size, and edge brightening and its size. The text and annotations are the results directly output by the system rather than active annotations.
[0079] This application also discloses a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it executes the battery coating defect detection method described above. The computer-readable storage medium is a non-volatile storage medium that can be read by a computer, such as a hard disk, USB flash drive, optical disk, flash memory, or read-only memory (ROM). The computer program stored on the storage medium executes the battery coating defect detection method described above when run by a processor. The computer program stored on the computer-readable storage medium can be directly called and run by existing computer devices without the need for additional hardware development, thus reducing the implementation cost of the detection method.
[0080] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application. Furthermore, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
Claims
1. A method for detecting defects in battery coating, characterized in that, include: Obtain a test image of the battery coating; divide the test image into multiple sub-images along the extension direction of the battery coating, with adjacent sub-images having a preset overlapping area; Defect detection is performed on each of the sub-images using a target detection model to obtain the sub-image detection result corresponding to each sub-image. Based on the detection result, it is determined whether there is a target defect. For defects detected in the preset overlapping area, the attribution of the defects in the preset overlapping area is determined according to the preset attribution rule. The final detection result of the image to be detected is generated.
2. The battery coating defect detection method according to claim 1, characterized in that: After acquiring the image to be inspected of the battery coating, a coarse inspection is performed on the entire image to be inspected to generate a coarse inspection result. The process involves: determining whether it is necessary to divide the image to be inspected into multiple sub-images along the extension direction of the battery coating for fine inspection based on the coarse inspection result; if so, fine inspection is performed; otherwise, the coarse inspection result is output and the process ends.
3. The battery coating defect detection method according to claim 1, characterized in that, The step of dividing the image to be detected into multiple sub-images along the extension direction of the battery coating, wherein two adjacent sub-images have a preset overlapping region, including: each preset overlapping region has an equal length along the extension direction.
4. The battery coating defect detection method according to claim 3, characterized in that, The step of performing defect detection on each of the sub-images to obtain the sub-image detection result corresponding to each sub-image includes: the detection area for defect detection of any sub-image is the sub-image itself, wherein each of the sub-images located at both ends of the battery coating contains one of the preset overlapping areas, and each of the sub-images located in the middle of the battery coating contains two of the preset overlapping areas.
5. The battery coating defect detection method according to claim 4, characterized in that, The step of determining the attribution of a defect detected within the preset overlapping area according to a preset attribution rule includes: setting a center line perpendicular to the extension direction for the preset overlapping area; setting a center point for the detected defect; determining the attribution of the defect based on the position of the center point relative to the center line; and assigning the defect to one of the two adjacent sub-images if the center point is located at the center line.
6. A method for detecting defects in battery coating according to claim 1 or 5, characterized in that: Coordinate systems are established for each of the sub-images and the image to be detected. When a target defect is determined to exist based on the detection result, the coordinates of the center point of the defect are generated. The coordinates of the center point are mapped back to the coordinate system of the image to be detected through the positional offset relationship between the sub-image and the image to be detected, so as to obtain the actual coordinates of the center point of the defect in the image to be detected.
7. The battery coating defect detection method according to claim 6, characterized in that: Set an intersection-union ratio (IURR) threshold and compare the mapped defect information. If the IURR of any two defect detection boxes is greater than the IURR threshold, they are determined to be the same defect. The defect information with higher confidence is retained, and the defect information with lower confidence is deleted.
8. The battery coating defect detection method according to claim 1, characterized in that, The process of acquiring the image to be tested of the battery coating includes: the image to be tested is formed by stitching together continuously acquired image frames.
9. An apparatus, characterized in that, The apparatus includes a processor and a memory, the memory storing a computer program that, when executed by the processor, performs the battery coating defect detection method as described in any one of claims 1 to 8. The apparatus further includes: an image acquisition module for acquiring the image to be inspected of the battery coating; an image segmentation module for segmenting the image to be inspected into multiple sub-images; a detection module for performing defect detection on the sub-images; and an output module for generating a final detection result for the image to be inspected.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the battery coating defect detection method as described in any one of claims 1 to 8.