Battery detection method, model training method and device, production system and equipment

By converting the pole sheets in the detection image into fitting lines and determining the endpoints using the mask diagram output from the segmentation model, the problem of poor detection image quality is solved, and accurate measurement of the pole sheet gap of the battery is achieved.

CN119444645APending Publication Date: 2025-02-14CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310973129.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, when acquiring poor detection images, it is difficult to accurately measure the pole plate parameters of the battery, resulting in discontinuity of the pole plate characteristics, affecting the accuracy of the measurement.

Method used

By converting the pole sheet in the detection image into a pole sheet fitting line, the pole sheet end point is determined using the pole sheet mask diagram output by the segmentation model, and the pole sheet fitting line is obtained through the connecting lines, and the pole sheet gap is then measured.

Benefits of technology

When the pole sheet profile or features are discontinuous in the image, more accurate pole sheet gap detection data is obtained through continuous pole sheet fitting lines, which improves the accuracy of pole sheet parameter measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444645A_ABST
    Figure CN119444645A_ABST
Patent Text Reader

Abstract

The invention provides a battery detection method, a model training method and device, a production system and equipment, and belongs to the field of battery detection. The battery detection method comprises the steps that a detection image containing a to-be-detected battery is acquired, the detection image comprises a plurality of first pole pieces and a plurality of second pole pieces which are alternately arranged in the first direction of the to-be-detected battery, and the polarities of the first pole pieces and the second pole pieces are different; and determining a first pole piece fitting line for representing the first pole piece and a second pole piece fitting line for representing the second pole piece based on the detection image, wherein the first pole piece fitting line and the second pole piece fitting line are spaced along the first direction. And determining the pole piece gap of the battery to be detected based on the adjacent first pole piece fitting line and second pole piece fitting line. When the contour of the pole piece or the characteristics of the pole piece in the detection image are discontinuous, accurate pole piece gap detection data can be obtained through the continuous pole piece fitting line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery detection, and in particular to a battery detection method, a battery detection device, a segmentation model training method for battery detection, a segmentation model training device for battery detection, a battery production system, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Energy conservation and emission reduction are the key to the sustainable development of the automobile industry. Electric vehicles have become an important part of the sustainable development of the automobile industry due to their advantages in energy conservation and environmental protection. For electric vehicles, battery technology is an important factor in their development.

[0003] In order to understand the internal conditions of the battery, the relevant technology uses a detection device to detect the inside of the battery. After scanning the battery, the detection device obtains a detection image of the battery, and the internal conditions of the battery are understood through the detection image. If the quality of the acquired detection image is poor, the electrode features will be discontinuous in the processed image, thereby affecting the accuracy of the electrode parameter measurement based on the image. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the background technology. To this end, one purpose of the present application is to provide a battery detection method, a battery detection device, a segmentation model training method for battery detection, a segmentation model training device for battery detection, a battery production system, an electronic device, a computer-readable storage medium and a computer program product, so as to improve the accuracy of pole piece parameter measurement when the quality of the acquired detection image is poor.

[0005] An embodiment of the first aspect of the present application provides a battery detection method, comprising: obtaining a detection image containing a battery to be tested, the detection image comprising a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested, which are alternately arranged along a first direction, wherein the polarities of the first pole piece and the second pole piece are different. Based on the detection image, a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece are determined, and the first pole piece fitting line and the second pole piece fitting line are spaced along the first direction. Based on adjacent first pole piece fitting lines and second pole piece fitting lines, a pole piece gap of the battery to be tested is determined.

[0006] In the technical solution of the embodiment of the present application, the pole piece in the detection image is converted into a pole piece fitting line. When the outline or pole piece feature of the pole piece in the detection image is discontinuous, more accurate pole piece gap detection data can be obtained through the continuous pole piece fitting line.

[0007] In some embodiments, the step of determining a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image includes: obtaining a first endpoint and a second endpoint of the first pole piece based on the detection image, and obtaining a third endpoint and a fourth endpoint of the second pole piece; obtaining a first pole piece fitting line corresponding to the first pole piece based on a line connecting the first endpoint and the second endpoint, and obtaining a second pole piece fitting line corresponding to the second pole piece based on a line connecting the third endpoint and the fourth endpoint. By marking the two endpoints of the pole piece and connecting the endpoints to obtain the pole piece fitting line corresponding to the pole piece, the pole piece fitting line can be obtained with fewer marking points, and since the consistency of the alternatingly arranged multiple first pole pieces and multiple second pole pieces is high, the pole piece fitting line obtained by connecting the lines can restore the characteristics of the pole piece to a certain extent, which is convenient for subsequent measurement.

[0008] In some embodiments, the battery to be tested includes a wound cell; the detection image is obtained by projecting rays onto the surface of the wound cell for shooting, and the detection image includes any one of the four corners of the surface of the wound cell. For the wound cell, the four corners of the surface of the wound cell are detected, and a detection image including a plurality of first pole pieces and a plurality of second pole pieces arranged alternately can be obtained, which facilitates the acquisition of the pole piece spacing of the wound cell.

[0009] In some embodiments, the steps of obtaining the first and second endpoints of the first pole piece based on the detection image, and obtaining the third and fourth endpoints of the second pole piece include: inputting the detection image into a segmentation model, obtaining a pole piece mask map output by the segmentation model, the pole piece mask map including a background area and multiple mask areas, each mask area corresponding to an area where the first pole piece or the second pole piece is located; determining the first and second endpoints of the first pole piece based on the pole piece mask map, and determining the third and fourth endpoints of the second pole piece. The pole piece mask map output by the trained segmentation model can output a complete pole piece mask when the pole piece contour or pole piece feature is discontinuous in the detection image, thereby restoring the features of the pole piece to a certain extent and facilitating subsequent measurement.

[0010] In some embodiments, the steps of determining the first endpoint and the second endpoint of the first pole piece based on the pole piece mask diagram, and determining the third endpoint and the fourth endpoint of the second pole piece include: the plurality of mask areas include a plurality of first mask areas and a plurality of second mask areas, the first mask area corresponds to the area where the first pole piece is located, and the second mask area corresponds to the area where the second pole piece is located; the first mask area includes a first top edge and a first bottom edge spaced from the first top edge along a second direction, the first endpoint is located at the first top edge, and the second endpoint is located at the first bottom edge, wherein the second direction is the extension direction of the first pole piece; the second mask area includes a second top edge and a second bottom edge spaced from the second top edge along a third direction, the third endpoint is located at the second top edge, and the fourth endpoint is located at the second bottom edge, wherein the third direction is the extension direction of the first pole piece. By searching for the top edge and the bottom edge in the independent mask area on the pole piece mask diagram, the starting point and the end point of the pole piece in the detection image can be better located, so that the obtained pole piece fitting line is closer to the original feature of the pole piece in the detection image.

[0011] In some embodiments, the first endpoint is the midpoint of the first top edge, the second endpoint is the midpoint of the first bottom edge; the third endpoint is the midpoint of the second top edge, and the fourth endpoint is the midpoint of the second bottom edge. The first pole piece fitting line is made to be the center line of the first mask area corresponding to the first pole piece, and the second pole piece fitting line is made to be the center line of the second mask area corresponding to the second pole piece. The pole piece fitting line is obtained based on the center line, so that the obtained pole piece fitting line is closer to the original features of the pole piece in the detection image, and at the same time, the adjacent pole piece fitting lines are selected based on the same standard, so as to further improve the accuracy of subsequent measurements.

[0012] In some embodiments, the first mask area includes a first side extending along a second direction, the first endpoint is the vertex of the first side, and the second endpoint is the end point of the first side; the second mask area includes a second side extending along a third direction, the third endpoint is the vertex of the second side, and the fourth endpoint is the end point of the second side. At this time, the first pole piece fitting line is a side edge line of the first pole piece, and the second pole piece fitting line is a side edge line of the second pole piece. The pole piece fitting line is obtained based on the side edge line, so that the obtained pole piece fitting line is closer to the original features of the pole piece in the detection image, and at the same time, the adjacent pole piece fitting lines are selected based on the same standard, further improving the accuracy of subsequent measurements.

[0013] In some embodiments, based on the adjacent first pole piece fitting line and the second pole piece fitting line, the step of determining the pole piece gap of the battery to be tested includes: along the first direction, based on the adjacent first pole piece fitting line and the second pole piece fitting line, obtaining a first distance between the adjacent first pole piece fitting line and the second pole piece fitting line, the first distance is used to characterize the pole piece gap of the battery to be tested; wherein the first distance is any one of the minimum distance, the maximum distance and the average distance between the adjacent first pole piece fitting line and the second pole piece fitting line. Characterizing the pole piece gap of the battery to be tested based on the distance between the first pole piece fitting line and the second pole piece fitting line can obtain relatively accurate pole piece gap detection data through continuous pole piece fitting lines.

[0014] In some embodiments, before determining the first pole piece fitting line for characterizing the first pole piece and the second pole piece fitting line for characterizing the second pole piece based on the detection image, the method further includes: performing image preprocessing on the detection image, and obtaining a plurality of first pole piece fitting lines and a plurality of second pole piece fitting lines based on the detection image after image preprocessing. By preprocessing the detection image, the interference of noise in the detection image can be reduced, so that the object to be detected in the image is more obvious than other areas, thereby making the pole piece features in the image easier to identify.

[0015] In some embodiments, the image preprocessing step includes: performing local enhancement processing on the detection image. Performing image enhancement processing on the detection image can further enhance the contrast of the image, thereby making the detailed features in the image easier to identify.

[0016] In some embodiments, the step of local enhancement processing includes: extracting a gradient image of the detection image; performing gradient compression on the gradient image to obtain a corresponding compressed gradient image; performing image reconstruction based on the compressed gradient image to obtain a detection image after image reconstruction. By extracting the gradient image and compressing the gradient image, the gradient value in the obtained compressed gradient image is reduced, and the change in the grayscale value in the reconstructed image obtained by reconstructing the compressed gradient image will also be reduced. For the reconstructed image, even if the grayscale values ​​between adjacent pixels are not much different, they can be more easily identified from the reconstructed image, making the detailed features in the reconstructed image clearer and improving the accuracy of the image recognition results. This method can be used in the processing of battery detection images to improve the accuracy of battery detection results.

[0017] In some embodiments, the step of gradient compression includes: determining the contour image of the object to be detected based on the gradient image; determining the compression value of the corresponding pixel based on the gradient amplitude of each pixel in the contour image; extracting the gradient value of each pixel in the gradient image; obtaining the compressed gradient value of the corresponding pixel based on the gradient value of each pixel and the compression value of the corresponding pixel; and obtaining the corresponding compressed gradient image based on the compressed gradient value of each pixel. The contour image of the object to be detected is first determined by the gradient image, and each pixel in the contour image includes a gradient amplitude. Then, the compression value of each pixel is determined according to the gradient amplitude of each pixel. In this way, when the compression process is performed subsequently, each pixel can be compressed. Since the compression value of each pixel is not exactly the same, different compressions can be achieved for different pixels. For pixels with larger gradient values, larger compression is achieved, and for pixels with smaller gradient values, smaller compression is achieved. Since the gradient values ​​in the first compressed gradient image and the second compressed gradient image are reduced, the difference in grayscale values ​​between pixels in the subsequent reconstructed image can be reduced, and the detail features in the reconstructed image can be more easily identified.

[0018] The second aspect of the present application provides a battery detection device, including: an acquisition module, configured to acquire a detection image containing a battery to be tested, the detection image including a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested, which are alternately arranged along a first direction, wherein the polarities of the first pole piece and the second pole piece are different; a fitting module, configured to determine a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image, wherein the first pole piece fitting line and the second pole piece fitting line are spaced along the first direction; a processing module, configured to determine the pole piece gap of the battery to be tested based on adjacent first pole piece fitting lines and second pole piece fitting lines. The pole pieces in the detection image are converted into pole piece fitting lines, and when the outline or pole piece features of the pole pieces in the detection image are discontinuous, more accurate pole piece gap detection data can be obtained through continuous pole piece fitting lines.

[0019] The embodiment of the third aspect of the present application provides a segmentation model training method for battery detection, including: obtaining a sample image containing a sample battery, the sample image including a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery arranged alternately along a first direction; obtaining a real pole piece mask image corresponding to the sample image, the real pole piece mask image including a real background area and a plurality of real mask areas, each real mask area corresponding to the area where the first sample pole piece or the second sample pole piece is located; inputting the sample image into the segmentation model to be trained, and obtaining a predicted pole piece mask image output by the segmentation model; calculating a loss value based on the real pole piece mask image and the predicted pole piece mask image; and adjusting the parameters of the segmentation model based on the loss value. The pole piece mask image output by the trained segmentation model can output a complete pole piece mask area when the pole piece contour or pole piece feature is discontinuous in the detection image. Using the real mask area as the true value of the training segmentation model can improve the accuracy of the segmentation model prediction, restore the pole piece features to a certain extent, and facilitate subsequent measurements.

[0020] In some embodiments, the step of obtaining a real pole piece mask image corresponding to a sample image includes: based on the sample image, marking a first annotation point and a second annotation point corresponding to a first sample pole piece, and marking a third annotation point and a fourth annotation point corresponding to a second sample pole piece; based on the marked first annotation point and the second annotation point of the first sample pole piece, and a preset first expansion value, obtaining a real mask area corresponding to the first pole piece; based on the marked third annotation point and the third annotation point of the second sample pole piece, and a preset second expansion value, obtaining a real mask area corresponding to the second pole piece. Marking only two annotation points for a sample pole piece can reduce the difficulty of annotation, reduce the annotation workload, and improve the annotation efficiency. At the same time, when the pole piece contour or pole piece feature is discontinuous in the sample image, the complete real mask area can be output as the true value of the model training, so that the trained segmentation model can predict the complete mask area based on the discontinuous pole piece contour.

[0021] An embodiment of the fourth aspect of the present application provides a segmentation model training device for battery detection, including: a sample acquisition module, configured to acquire a sample image containing a sample battery, the sample image including a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery alternately arranged along a first direction; a truth module, configured to acquire a real pole piece mask image corresponding to the sample image, the real pole piece mask image including a real background area and a plurality of real mask areas, each real mask area corresponding to an area where a first sample pole piece or a second sample pole piece is located; a sample prediction module, configured to input the sample image into a segmentation model to be trained, and acquire a predicted pole piece mask image output by the segmentation model; a loss module, configured to calculate a loss value based on the real pole piece mask image and the predicted pole piece mask image; and a parameter adjustment module, configured to adjust the parameters of the segmentation model based on the loss value.

[0022] The pole mask image output by the trained segmentation model can output the complete pole mask area when the pole contour or pole feature in the detection image is discontinuous. Using the real mask area as the true value of the training segmentation model can improve the accuracy of the segmentation model prediction, restore the pole features to a certain extent, and facilitate subsequent measurement.

[0023] An embodiment of the fifth aspect of the present application provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery detection method in the above embodiment or the segmentation model training method in the above embodiment.

[0024] An embodiment of the sixth aspect of the present application provides a battery production system, including the electronic device in the above embodiment.

[0025] An embodiment of the seventh aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the battery detection method in the above embodiment or the segmentation model training method in the above embodiment is implemented.

[0026] An embodiment of the eighth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the battery detection method in the above embodiment or the segmentation model training method in the above embodiment.

[0027] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0029] Figure 1 A flowchart of a battery detection method provided for some embodiments of the present application;

[0030] Figure 2 A sub-flow chart of step S120 in the battery detection method provided in some embodiments of the present application;

[0031] Figure 3A schematic diagram of a pole piece mask diagram output by a segmentation model in a battery detection method provided in some embodiments of the present application;

[0032] Figure 4 A structural block diagram of a battery detection device provided in some embodiments of the present application;

[0033] Figure 5 A flowchart of a segmentation model training method for battery detection provided in some embodiments of the present application;

[0034] Figure 6 A structural block diagram of a segmentation model training device for battery detection provided in some embodiments of the present application;

[0035] Figure 7 An example configuration of a computer device that may be used to implement the methods described herein is shown. DETAILED DESCRIPTION

[0036] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0038] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0039] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0040] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0041] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0042] In the description of the embodiments of the present application, the orientations or positional relationships indicated by technical terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", and "circumferential" are based on the orientations or positional relationships shown in the accompanying drawings and are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.

[0043] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0044] At present, from the perspective of market development, the application of power batteries is becoming more and more extensive. Power batteries are not only used in energy storage power systems such as hydropower, thermal power, wind power and solar power stations, but also widely used in electric vehicles such as electric bicycles, electric motorcycles, electric cars, as well as military equipment and aerospace and other fields. With the continuous expansion of the application field of power batteries, the market demand is also constantly expanding.

[0045] A battery generally includes an electrode assembly and a casing that wraps the electrode assembly. The interior of the battery is wrapped in the casing. If changes occur inside the battery, it cannot be seen from the outside. The battery needs to be scanned and inspected using a radiographic image acquisition device to obtain a test image of the battery. The test image can be analyzed to determine the internal situation of the battery and achieve battery detection.

[0046] Taking lithium-ion batteries as an example, the gap between the cathode and cathode plates and the overhang (OH) between the cathode and cathode plates are important factors affecting the safety performance of wound batteries. For the gap between the cathode and cathode plates: During the charge and discharge process of the battery, when the gap between the cathode and cathode plates is large, the lithium ions cannot be fully embedded in the anode channel, resulting in the accumulation of some lithium ions and the problem of lithium precipitation, which poses a greater safety risk. Therefore, it is required that the gap between the cathode and cathode plates in the battery should not be too large. For the overhang of the cathode and cathode plates: During the charge and discharge process of the lithium battery, lithium ions will repeatedly deintercalate between the cathode and cathode plates, but when lithium ions are not embedded in enough anode channels after being released from the cathode, it is easy to cause lithium ion accumulation and lithium precipitation, causing certain product safety risks. Therefore, it is necessary to ensure that the cathode plate is within the coating range of the anode as a whole, that is, to ensure that the anode exceeds the cathode, that is, the overhang of the cathode and cathode is greater than 0. Therefore, it is necessary to detect the internal spacing of the battery and the overhang of the cathode and cathode plates to promptly detect internal defects of the battery and reduce the outflow of defective batteries. For wound batteries, the thickness of the inner circle is much greater than that of the outer circle. The thickness of the inner and outer circles of the wound battery passed through by the detection rays of the ray image acquisition device is different, which makes the grayscale values ​​of the parts corresponding to the inner and outer circles of the detection image differ greatly. However, the thickness difference between the two adjacent circles of the wound battery is small, the grayscale value change on the detection image is small, and the grayscale difference between the two adjacent circles is very small compared to the maximum grayscale difference. Therefore, it is difficult to distinguish the two adjacent circles of the wound battery on the detection image. This will cause the required features in the detection image to be not clear enough, affecting the results of battery detection. At the same time, if the grayscale values ​​of the pixels in the detection image are not much different, then the changes between the pixels with similar grayscale values ​​are relatively small, so these pixels with similar grayscale values ​​are difficult to distinguish, which is manifested as discontinuous features of the pole pieces on the image in the detection image, which will affect the accuracy of the detection of the internal spacing of the battery and the misalignment of the positive and negative pole pieces.

[0047] An embodiment of the present application provides a battery detection method, the method comprising: obtaining a detection image containing a battery to be tested, the detection image comprising a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested that are alternately arranged along a first direction, wherein the polarities of the first pole piece and the second pole piece are different. Based on the detection image, a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece are determined, and the first pole piece fitting line and the second pole piece fitting line are spaced along the first direction. Based on the adjacent first pole piece fitting lines and the second pole piece fitting lines, the pole piece gap of the battery to be tested is determined. The plurality of first pole pieces and the plurality of second pole pieces that are alternately arranged along the first direction are characterized by the first pole piece fitting line and the second pole piece fitting line. When the contours or pole piece features of the pole pieces in the detection image are discontinuous, more accurate pole piece gap detection data can also be obtained through continuous pole piece fitting lines.

[0048] The battery detection method disclosed in the embodiment of the present application can be used to detect the gap between pole pieces. For detection images of different qualities, it can provide relatively accurate pole piece gap detection data, thereby improving the accuracy of pole piece gap detection to a certain extent.

[0049] refer to Figure 1 , Figure 1 A flowchart of a battery detection method provided in some embodiments of the present application. The battery detection method 100 includes:

[0050] S110, acquiring a detection image including a battery to be tested, wherein the detection image includes a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested that are alternately arranged along a first direction, wherein the first pole pieces and the second pole pieces have different polarities.

[0051] S120, determining a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image, the first pole piece fitting line and the second pole piece fitting line being spaced apart along a first direction.

[0052] S130, determining a pole piece gap of the battery to be tested based on the adjacent first pole piece fitting line and the second pole piece fitting line.

[0053] In the embodiments of the present application, the object to be detected may be a battery or a battery cell or any other object that can be detected by a radiographic image acquisition device.

[0054] In an embodiment of the present application, the detection image is an image acquired by an image acquisition device. Exemplarily, the detection image may be a processed image.

[0055] Exemplarily, the image acquisition device may be a radiation image acquisition device, a CT scanning device or a PET scanning device, and the detection image may be a detection image acquired by the radiation image acquisition device. Exemplarily, the radiation image acquisition device may include a radiation source and a flat panel detector, wherein the detection image may be acquired by the radiation source and the flat panel detector, the radiation emitted by the radiation source is projected to the flat panel detector through the battery to be tested, and the flat panel detector acquires the detection image based on the received radiation. The radiation emitted by the radiation source may be X-Ray, γ-ray or β-ray, etc.

[0056] In the embodiment of the present application, the first pole piece may be a cathode pole piece, and the second pole piece may be an anode pole piece. Of course, it is understandable that in some cases, the first pole piece may also be an anode pole piece, and the second pole piece may be a cathode pole piece.

[0057] Exemplarily, the first pole piece fitting line and the second pole piece fitting line can be obtained by algorithm prediction, or by manual annotation. When the first pole piece fitting line and the second pole piece fitting line are obtained by algorithm prediction, multiple annotation points representing a single pole piece can be obtained by the pole piece prediction result of the trained model, and multiple annotation points in a single pole piece are connected to form a first pole piece fitting line corresponding to the first pole piece or a second pole piece fitting line corresponding to the second pole piece. When manual annotation is used to obtain the first pole piece fitting line and the second pole piece fitting line, the annotator can obtain multiple annotation points representing a single pole piece by punctuation on the detection image, and connect multiple annotation points in a single pole piece to form a first pole piece fitting line corresponding to the first pole piece or a second pole piece fitting line corresponding to the second pole piece.

[0058] When the number of marked points on a single pole piece is greater than two, the first pole piece fitting line and the second pole piece fitting line can be a broken line connecting multiple marked points in sequence, or a fitting straight line of multiple marked points obtained by linear regression. When the number of marked points on a single pole piece is equal to two, the first pole piece fitting line or the second pole piece fitting line is obtained based on the line connecting the two marked points on the single pole piece.

[0059] In an embodiment of the present application, a first pole piece fitting line corresponding to each first pole piece in the detection image and a second pole piece fitting line corresponding to each second pole piece can be determined. It is also possible to determine only the first pole piece fitting lines corresponding to some of the first pole pieces in the detection image and the second pole piece fitting lines corresponding to some of the second pole pieces. Exemplarily, the edge area of ​​the detection image may be distorted due to shooting limitations, so the first pole piece fitting line and the second pole piece fitting line can be determined by selecting the first pole piece and the second pole piece in the partial area (non-distorted area).

[0060] In an embodiment of the present application, the first pole piece in the detection image can be characterized by a continuous first pole piece fitting line, and the second pole piece in the detection image can be characterized by a continuous second pole piece fitting line. Since the first pole piece and the second pole piece are arranged alternately along the first direction, they have high consistency. Therefore, the first pole piece fitting line and the second pole piece fitting line should also be fitted based on the same standard, so that the obtained first pole piece fitting line and the second pole piece fitting line are more in line with the corresponding pole piece characteristics on the basis of conforming to the arrangement law of the first pole piece and the second pole piece, so as to facilitate obtaining the pole piece gap of the battery to be tested by measuring the relevant detection data of the adjacent first pole piece fitting line and the second pole piece fitting line. Wherein the adjacent first pole piece fitting line and the second pole piece fitting line mean that there are no other pole piece fitting lines between the two pole piece fitting lines. Since the first pole piece and the second pole piece are arranged alternately along the first direction, the pole piece gap of the battery to be tested is the amount of misalignment of the positive and negative pole pieces in the first direction. The first pole piece fitting line can extend along the second direction, wherein the second direction intersects with the first direction, and the second pole piece fitting line can extend along the third direction, wherein the first direction intersects with the third direction. Exemplarily, the second direction may be parallel to the third direction. Exemplarily, the first direction may be perpendicular to the second direction or the first direction may be perpendicular to the third direction.

[0061] The first pole piece fitting line and the second pole piece fitting line are used to characterize the plurality of first pole pieces and the plurality of second pole pieces alternately arranged along the first direction. When the outline or pole piece features of the pole piece in the detection image are discontinuous, more accurate pole piece gap detection data can also be obtained through the continuous pole piece fitting line.

[0062] refer to Figure 2 , Figure 2 A sub-flow chart of step S120 in a battery detection method provided in some embodiments of the present application. According to some embodiments of the present application, step S120 of determining a first pole piece fitting line for characterizing a first pole piece and a second pole piece fitting line for characterizing a second pole piece based on a detection image includes:

[0063] S121, obtaining a first endpoint and a second endpoint of the first pole piece based on the detection image, and obtaining a third endpoint and a fourth endpoint of the second pole piece;

[0064] S122, obtaining a first pole piece fitting line corresponding to the first pole piece based on a line connecting the first endpoint and the second endpoint, and obtaining a second pole piece fitting line corresponding to the second pole piece based on a line connecting the third endpoint and the fourth endpoint.

[0065] Obtaining the first endpoint and the second endpoint of the first pole piece based on the detection image can be understood as obtaining two feature points corresponding to the first pole piece on the detection image. These two feature points can be feature points characterizing the head of the first pole piece, and feature points characterizing the tail of the first pole piece. It can be understood that these feature points do not actually represent the actual starting point and the actual tail of the first pole piece, but are used to characterize the starting point of the first pole piece that can be observed on the detection image (that is, the head feature point) and the end point of the first pole piece that can be observed on the detection image (that is, the tail feature point).

[0066] Obtaining the third endpoint and the fourth endpoint of the second pole piece based on the detection image can be understood as obtaining two feature points corresponding to the second pole piece on the detection image. These two feature points can be feature points characterizing the head of the second pole piece, and feature points characterizing the tail of the second pole piece. It can be understood that these feature points do not actually represent the actual starting point and the actual tail of the second pole piece, but are used to characterize the starting point of the second pole piece that can be observed on the detection image (that is, the head feature point) and the end point of the second pole piece that can be observed on the detection image (that is, the tail feature point).

[0067] The first endpoint, the second endpoint, the third endpoint and the fourth endpoint may be obtained by manual punctuation or by machine punctuation.

[0068] In the embodiment of the present application, the first endpoint and the third endpoint should be selected based on the same marked reference, and the second endpoint and the fourth endpoint should be selected based on the same marked reference, so that the interval between the adjacent first pole piece fitting line and the second pole piece fitting line is equal to the interval between the adjacent first pole piece and the second pole piece in the detection image.

[0069] For the detection image, the pole piece detail features are represented by pixels of different grayscale values. Since the quality of the detection image may be good or bad, the corresponding pole piece detail features may be complete or missing. By marking the head and tail of the pole piece and connecting them, the missing part of the pole piece features in the detection image can be ignored. The pole piece fitting line obtained by connecting the lines can restore the pole piece features to a certain extent, which is convenient for subsequent measurements.

[0070] According to some embodiments of the present application, the battery to be tested includes a wound battery cell; the detection image is obtained by projecting rays onto the surface of the wound battery cell for shooting, and the detection image includes any one of the four corners of the surface of the wound battery cell.

[0071] For a wound battery, in order to obtain a plurality of first pole pieces and a plurality of second pole pieces arranged alternately along a first direction, it is necessary to project rays onto the surface of the wound battery cell for shooting. The surface of the wound battery cell may be the large surface direction of the wound battery cell. For a plurality of first pole pieces and a plurality of second pole pieces arranged alternately along a first direction, it is necessary to shoot the four corners of the surface of the wound battery cell. When shooting other areas of the surface of the wound battery cell (except the four corners), due to the characteristics of the winding, it is impossible to obtain the detection image of the plurality of first pole pieces and the plurality of second pole pieces arranged alternately along the first direction.

[0072] For a wound battery cell, the four corners of the surface of the wound battery cell are detected, and a detection image including a plurality of first pole pieces and a plurality of second pole pieces arranged alternately can be obtained, which facilitates obtaining the pole piece interval of the wound battery cell.

[0073] According to some embodiments of the present application, the steps of obtaining the first endpoint and the second endpoint of the first pole piece based on the detection image, and obtaining the third endpoint and the fourth endpoint of the second pole piece include: inputting the detection image into a segmentation model, obtaining a pole piece mask map output by the segmentation model, the pole piece mask map including a background area and multiple mask areas, each mask area corresponding to the area where the first pole piece or the second pole piece is located; determining the first endpoint and the second endpoint of the first pole piece based on the pole piece mask map, and determining the third endpoint and the fourth endpoint of the second pole piece.

[0074] The segmentation model can compare the grayscale value of each pixel in the detection image with the grayscale value of adjacent pixels based on the grayscale features of adjacent pixels, and classify the pixels into appropriate categories according to the comparison results to achieve the segmentation of each target on the image.

[0075] In an embodiment of the present application, for the pole piece gap detection of the battery to be tested, it is necessary to distinguish the areas where the first pole piece, the second pole piece are located and the background area. Therefore, the segmentation model can better classify each pixel based on different grayscale ranges, output a pole piece mask image, separate the pole piece from the background, and use multiple mask areas to characterize the area where the first pole piece or the second pole piece is located.

[0076] The pole mask image output by the trained segmentation model can output a complete pole mask when the pole contour or pole feature in the detection image is discontinuous, thereby restoring the pole features to a certain extent and facilitating subsequent measurements.

[0077] According to some embodiments of the present application, the steps of determining the first endpoint and the second endpoint of the first pole piece based on the pole piece mask diagram, and determining the third endpoint and the fourth endpoint of the second pole piece include: multiple mask areas include multiple first mask areas and multiple second mask areas, the first mask area corresponds to the area where the first pole piece is located, and the second mask area corresponds to the area where the second pole piece is located; the first mask area includes a first top edge and a first bottom edge spaced from the first top edge along a second direction, the first endpoint is located at the first top edge, and the second endpoint is located at the first bottom edge, wherein the second direction is an extension direction of the first pole piece; the second mask area includes a second top edge and a second bottom edge spaced from the second top edge along a third direction, the third endpoint is located at the second top edge, and the fourth endpoint is located at the second bottom edge, wherein the third direction is an extension direction of the second pole piece.

[0078] In an embodiment of the present application, since it is necessary to measure the spacing between the first pole piece and the second pole piece in the first direction, it is necessary to further distinguish the first pole piece and the second pole piece, and divide the multiple mask areas into multiple independent pole piece masks, wherein each independent pole piece mask may include a first mask area representing the first pole piece, and also include a second mask area representing the second pole piece.

[0079] For each independent mask area, it includes a top edge and a bottom edge spaced from the top edge in the second direction or the third direction, wherein the top edge can be used as a set of starting points of the corresponding pole piece (specifically, the first endpoint or the third endpoint), and the bottom edge can be used as a set of cutoff points of the corresponding pole piece (specifically, the second endpoint or the fourth endpoint). It can be understood that, on the output mask image, along the second direction, there is no pixel point representing the first pole piece above the first top edge, and there is no pixel point representing the first pole piece below the first bottom edge. Or along the third direction, there is no pixel point representing the second pole piece above the second top edge, and there is no pixel point representing the second pole piece below the second bottom edge. Exemplarily, the second direction can be parallel to the third direction.

[0080] refer to Figure 3 , Figure 3A schematic diagram of a pole piece mask diagram 300 output by a segmentation model in a battery detection method provided in some embodiments of the present application. The diagram includes a background area 303, a first mask area 301, and a second mask area 302, wherein the first mask area 301 and the second mask area 302 are alternately arranged along a first direction X, and are used to characterize a plurality of first pole pieces and a plurality of second pole pieces alternately arranged along the first direction, the first mask area 301 includes a first top edge 3011 and a first bottom edge 3012 spaced from the first top edge 3011 along a second direction Y, wherein a first endpoint 3013 is located on the first top edge 3011, a second endpoint 3014 is located on the first bottom edge 3012, and a line connecting the first endpoint 3013 and the second endpoint 3014 is a first pole piece fitting line 3015. The second mask area 302 includes a second top edge 3021 and a second bottom edge 3022 spaced from the second top edge 3021 along a third direction (when the second direction is parallel to the third direction, the third direction and the second direction are both in the Y direction), wherein the third endpoint 3023 is located on the second top edge 3021, the fourth endpoint 3024 is located on the second bottom edge 3022, and the line connecting the third endpoint 3023 and the fourth endpoint 3024 is the second pole piece fitting line 3025. By measuring the spacing d between the first pole piece fitting line 3015 and the second pole piece fitting line 3025, the pole piece gap of the battery to be tested can be obtained.

[0081] By searching for the top and bottom edges in the independent mask area on the pole piece mask image, the starting point and the end point of the pole piece in the detection image can be better located, so that the obtained pole piece fitting line is closer to the original features of the pole piece in the detection image.

[0082] According to some embodiments of the present application, the first endpoint is the midpoint of the first top side, the second endpoint is the midpoint of the first bottom side; the third endpoint is the midpoint of the second top side, and the fourth endpoint is the midpoint of the second bottom side.

[0083] The first pole piece fitting line 3015 is the center line of the first mask area 301 corresponding to the first pole piece, and the second pole piece fitting line 3025 is the center line of the second mask area 302 corresponding to the second pole piece.

[0084] The pole piece fitting line is obtained based on the center line, so that the obtained pole piece fitting line is closer to the original features of the pole piece in the detection image. At the same time, adjacent pole piece fitting lines are selected based on the same standard, further improving the accuracy of subsequent measurements.

[0085] According to some embodiments of the present application, the first mask area includes a first side extending along a second direction, the first endpoint is the vertex of the first side, and the second endpoint is the end point of the first side; the second mask area includes a second side extending along a third direction, the third endpoint is the vertex of the second side, and the fourth endpoint is the end point of the second side.

[0086] At this time, the first pole piece fitting line is a side edge line of the first pole piece, and the second pole piece fitting line is a side edge line of the second pole piece. It can be understood that in order to obtain accurate pole piece gap measurement values, when the first pole piece fitting line is the left edge line of the first pole piece, the second pole piece fitting line should also be the left edge line of the second pole piece, and when the first pole piece fitting line is the right edge line of the first pole piece, the second pole piece fitting line should also be the right edge line of the second pole piece.

[0087] The pole piece fitting line is obtained based on the edge line on one side, so that the obtained pole piece fitting line is closer to the original features of the pole piece in the detection image. At the same time, adjacent pole piece fitting lines are selected based on the same standard, further improving the accuracy of subsequent measurements.

[0088] The step of determining the electrode gap of the battery to be tested based on the adjacent first electrode piece fitting line and the second electrode piece fitting line includes: along a first direction, based on the adjacent first electrode piece fitting line and the second electrode piece fitting line, obtaining a first distance between the adjacent first electrode piece fitting line and the second electrode piece fitting line, the first distance being used to characterize the electrode gap of the battery to be tested; wherein the first distance is any one of the minimum distance, maximum distance and average distance between the adjacent first electrode piece fitting line and the second electrode piece fitting line.

[0089] In an embodiment of the present application, the first pole piece in the detection image can be characterized by a continuous first pole piece fitting line, and the second pole piece in the detection image can be characterized by a continuous second pole piece fitting line. Since the first pole piece and the second pole piece are arranged alternately along the first direction and have high consistency, the first pole piece fitting line and the second pole piece fitting line should also be fitted based on the same standard, so that the obtained first pole piece fitting line and the second pole piece fitting line are more in line with the corresponding pole piece characteristics on the basis of conforming to the arrangement rule of the first pole piece and the second pole piece, so that the first distance between the adjacent first pole piece fitting line and the second pole piece fitting line can be measured, and the pole piece gap of the battery to be tested can be characterized by the first distance. Wherein the adjacent first pole piece fitting line and the second pole piece fitting line mean that there is no other pole piece fitting line between the two pole piece fitting lines.

[0090] Since the first pole piece and the second pole piece are arranged alternately along the first direction, the pole piece gap of the battery to be tested is the misalignment of the positive and negative pole pieces in the first direction, that is, the misalignment (first distance) of the first pole piece fitting line and the second pole piece fitting line in the first direction.

[0091] The first pole piece fitting line may extend along the second direction, wherein the second direction intersects with the first direction, and the second pole piece fitting line may extend along the third direction, wherein the first direction intersects with the third direction. Therefore, along the first direction, the first pole piece fitting line and the second pole piece fitting line include the minimum spacing, the maximum spacing, and the average spacing obtained by measuring the spacing multiple times, wherein the first distance may be any one of the minimum spacing, the maximum spacing, and the average spacing obtained by measuring the spacing multiple times. It can be understood that, along the first direction, the detection image may include multiple first distances, and the multiple first distances are used to characterize the spacing between different first pole piece fitting lines and second pole piece fitting lines, and the multiple first distances should be calculated based on a unified standard. That is, when the minimum spacing is used as the first spacing to characterize the pole piece gap of the battery to be tested, each first distance in the detection image is the minimum distance between the adjacent first pole piece fitting line and the second pole piece fitting line; when the average spacing is used as the first spacing to characterize the pole piece gap of the battery to be tested, each first distance in the detection image is the average distance between the adjacent first pole piece fitting line and the second pole piece fitting line.

[0092] The pole piece gap of the battery to be tested is characterized based on the distance between the first pole piece fitting line and the second pole piece fitting line. When the outline or pole piece feature of the pole piece in the detection image is discontinuous, more accurate pole piece gap detection data can also be obtained through the continuous pole piece fitting line.

[0093] According to some embodiments of the present application, before determining a first pole piece fitting line for characterizing a first pole piece and a second pole piece fitting line for characterizing a second pole piece based on a detection image, the method further includes: performing image preprocessing on the detection image, and obtaining a plurality of first pole piece fitting lines and a plurality of second pole piece fitting lines based on the detection image after image preprocessing.

[0094] In an embodiment of the present application, image preprocessing may include an image enhancement step and an image denoising step, wherein the image enhancement step may include increasing the contrast of the image so that details in the image are more easily identified. As a feasible implementation, local histogram processing may be performed on the detection image to enhance the contrast in the image.

[0095] The image denoising step may include at least one of mean filtering denoising, Gaussian filtering denoising, and three-dimensional block matching denoising.

[0096] Denoising multiple initial images can remove random noises such as quantum noise, aliasing noise, and electronic noise in the initial images, greatly improving the signal-to-noise ratio of the initial images. Enhancing the contrast in the image can avoid amplifying the noise that may exist in the image, making the object to be detected in the image more obvious than other areas.

[0097] Therefore, by preprocessing the detection image, the interference of noise in the detection image can be reduced, making the object to be detected in the image more obvious than other areas, so that the pole piece features in the image can be more easily identified.

[0098] According to some embodiments of the present application, the image preprocessing step includes: performing local enhancement processing on the detection image.

[0099] The image enhancement step may include increasing the contrast of the image so that details in the image are more easily recognized. As a feasible implementation, local histogram processing may be performed on the detection image to enhance the contrast in the image.

[0100] Through local histogram processing, the contrast in the image can be enhanced, while the noise that may exist in the image can be avoided from being amplified, making the object to be detected in the image more obvious and easier to identify than other areas.

[0101] According to some embodiments of the present application, the step of local enhancement processing includes: extracting a gradient image of the detection image; performing gradient compression on the gradient image to obtain a corresponding compressed gradient image; and performing image reconstruction based on the compressed gradient image to obtain a detection image after image reconstruction.

[0102] The pixels in the detection image are arranged in an array. For a pixel point in the detection image, there are at least two adjacent pixels in two directions. Therefore, when extracting the gradient image, it is necessary to extract the first gradient image of the detection image along the first direction and the second gradient image of the detection image along the second direction.

[0103] For the first gradient image, the gradient value of a certain pixel point therein can be understood as the difference between the grayscale value of the corresponding pixel point on the detection image and the grayscale value of the previous pixel point on the detection image, the corresponding pixel point on the detection image and the previous pixel point on the detection image are arranged adjacent to each other along the first direction, and the previous pixel point on the detection image is located in front of the corresponding pixel point on the detection image along the first direction. The magnitude of the gradient value indicates the magnitude of the grayscale value change between the detection image at the pixel point and the adjacent pixel point. The larger the gradient value, the greater the grayscale value change between the detection image at the pixel point and the adjacent pixel point.

[0104] The compression process compresses the gradient value so that the gradient value in the first compressed gradient image is smaller than the gradient value in the first gradient image, and the gradient value in the second compressed gradient image is smaller than the gradient value in the second gradient image. Then, an image reconstruction is performed based on the first compressed gradient image and the second compressed gradient image to obtain a reconstructed image of the object to be detected, and the change of the gray value in the reconstructed image is reduced compared with the detection image.

[0105] By extracting a gradient image (specifically, the gradient image may include a first gradient image and a second gradient image) and compressing the gradient image, the gradient value in the obtained compressed gradient image is reduced, and the change in the grayscale value in the reconstructed image obtained by compressing the gradient image is also reduced. For the reconstructed image, even if the grayscale values ​​between adjacent pixels are not much different, they can be more easily identified from the reconstructed image, making the detailed features in the reconstructed image clearer and improving the accuracy of the image recognition results. This method is used in the processing of battery detection images to improve the accuracy of battery detection results.

[0106] According to some embodiments of the present application, the step of gradient compression includes: determining a contour image of an object to be detected based on a gradient image; determining a compression value of a corresponding pixel based on the gradient amplitude of each pixel in the contour image; extracting the gradient value of each pixel in the gradient image; obtaining a compressed gradient value of the corresponding pixel based on the gradient value of each pixel and the compression value of the corresponding pixel; and obtaining a corresponding compressed gradient image based on the compressed gradient value of each pixel point.

[0107] The contour image of the object to be detected is determined based on the gradient image. The gradient amplitude of each pixel in the contour image includes both the information in the first gradient image and the information in the second gradient image. Therefore, the compression value of each pixel is determined based on the gradient amplitude of each pixel in the contour image, which can be used to compress the first gradient image or the second gradient image. The compression value is used to indicate the degree of compression of the gradient value.

[0108] The magnitude of the gradient amplitude indicates the direction and rate of change of the gradient value of the contour image at that pixel point. The larger the gradient amplitude, the more drastic the change of the contour at that pixel point, that is, the steeper the gradient of the contour image at that point, and the faster the change.

[0109] Each pixel in the contour image includes a gradient amplitude, and then the compression value of each pixel is determined according to the gradient amplitude of each pixel, so that each pixel can be compressed in the subsequent compression process, and because the compression value of each pixel is not exactly the same, different compressions can be achieved for different pixels. Then, a larger compression is achieved for the pixel with a larger gradient value, and a smaller compression is achieved for the pixel with a smaller gradient value.

[0110] Since the gradient value in the compressed gradient image is reduced, the difference in grayscale values ​​between pixels in the subsequent reconstructed image can be reduced, making it easier to identify detail features in the reconstructed image.

[0111] refer to Figure 4 , Figure 4A structural block diagram of a battery detection device provided for some embodiments of the present application. The battery detection device 400 includes: an acquisition module 401, configured to acquire a detection image containing a battery to be tested, the detection image including a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested that are alternately arranged along a first direction, wherein the polarities of the first pole piece and the second pole piece are different. A fitting module 402, configured to determine a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image, the first pole piece fitting line and the second pole piece fitting line being spaced apart along the first direction. A processing module 403, configured to determine the pole piece gap of the battery to be tested based on adjacent first pole piece fitting lines and second pole piece fitting lines.

[0112] In the embodiments of the present application, the object to be detected may be a battery or a battery cell or any other object that can be detected by a radiographic image acquisition device.

[0113] In an embodiment of the present application, the detection image is an image acquired by an image acquisition device. Exemplarily, the detection image may be a processed image.

[0114] Exemplarily, the image acquisition device may be a radiation image acquisition device, a CT scanning device or a PET scanning device, and the detection image may be a detection image acquired by the radiation image acquisition device. Exemplarily, the radiation image acquisition device may include a radiation source and a flat-panel detector, wherein the detection image may be acquired by the radiation source and the flat-panel detector, the radiation emitted by the radiation source is projected to the flat-panel detector through the battery to be tested, and the flat-panel detector acquires the detection image based on the received radiation. The radiation emitted by the radiation source may be X-Ray rays, gamma rays or beta rays, etc. In an embodiment of the present application, the first pole piece may be a cathode pole piece, and the second pole piece may be an anode pole piece. Of course, it can be understood that in some cases, the first pole piece may also be an anode pole piece, and the second pole piece may be a cathode pole piece.

[0115] In an embodiment of the present application, the first pole piece in the detection image can be characterized by a continuous first pole piece fitting line, and the second pole piece in the detection image can be characterized by a continuous second pole piece fitting line. Since the first pole piece and the second pole piece are alternately arranged along the first direction and have high consistency, the first pole piece fitting line and the second pole piece fitting line should also be fitted based on the same standard, so that the obtained first pole piece fitting line and the second pole piece fitting line are more in line with the corresponding pole piece features on the basis of conforming to the arrangement rules of the first pole piece and the second pole piece, so as to obtain the pole piece gap of the battery to be tested by measuring the relevant detection data of the adjacent first pole piece fitting lines and the second pole piece fitting lines.

[0116] Since the first pole piece and the second pole piece are arranged alternately along the first direction, the pole piece gap of the battery to be tested is the misalignment of the positive and negative pole pieces in the first direction. The first pole piece fitting line can extend along the second direction, wherein the second direction intersects the first direction, and the second pole piece fitting line can extend along the third direction, wherein the first direction intersects the third direction. Exemplarily, the second direction can be parallel to the third direction, and exemplary, the first direction can be perpendicular to the second direction or the first direction can be perpendicular to the third direction.

[0117] The pole pieces in the detection image are converted into pole piece fitting lines. When the outline or pole piece features in the detection image are discontinuous, more accurate pole piece gap detection data can be obtained through the continuous pole piece fitting lines.

[0118] refer to Figure 5 , Figure 5 A flow chart of a segmentation model training method for battery detection provided in some embodiments of the present application. The segmentation model training method 500 for battery detection includes:

[0119] S501, acquiring a sample image containing a sample battery, wherein the sample image includes a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery alternately arranged along a first direction.

[0120] S502, obtaining a real pole piece mask image corresponding to the sample image, wherein the real pole piece mask image includes a real background area and multiple real mask areas, each real mask area corresponding to an area where the first sample pole piece or the second sample pole piece is located.

[0121] S503, inputting the sample image into the segmentation model to be trained, and obtaining the predicted polar mask image output by the segmentation model.

[0122] S504, calculating the loss value based on the actual pole piece mask diagram and the predicted pole piece mask diagram.

[0123] S505, adjusting the parameters of the segmentation model based on the loss value.

[0124] In an embodiment of the present application, a plurality of sample images containing sample batteries may be obtained as a data set for training a segmentation model. The sample images are images acquired by a radiographic image acquisition device. For example, the plurality of sample images may be images that have been simply processed.

[0125] The pole piece area in the sample image is labeled to obtain the real pole piece mask image corresponding to the sample image. The real pole piece mask image is used as the ground truth of the segmentation model for supervised learning.

[0126] After the segmentation model outputs the predicted pole mask map, the actual pole mask map is compared with the predicted pole mask map, and the loss value is calculated using the cross entropy loss function. If the difference between the predicted pole mask map and the actual pole mask map is large, the loss value will also be relatively large, and the model parameters need to be adjusted and iterated. If the predicted pole mask map and the actual pole mask map are highly consistent, the loss value converges, and the iteration is completed when it approaches the optimal value or finds a local optimal value. At this time, the internal parameters of the segmentation model can be updated through back propagation to complete the training.

[0127] The pole mask image output by the trained segmentation model can output the complete pole mask area when the pole contour or pole feature in the detection image is discontinuous. Using the real mask area as the true value of the training segmentation model can improve the accuracy of the segmentation model prediction, restore the pole features to a certain extent, and facilitate subsequent measurement.

[0128] According to some embodiments of the present application, the step of obtaining a real pole piece mask image corresponding to a sample image includes:

[0129] Based on the sample image, mark the first annotation point and the second annotation point corresponding to the first sample pole piece, and mark the third annotation point and the fourth annotation point corresponding to the second sample pole piece; based on the marked first annotation point and the second annotation point of the first sample pole piece, and the preset first expansion value, obtain the real mask area corresponding to the first pole piece; based on the marked third annotation point and the third annotation point of the second sample pole piece, and the preset second expansion value, obtain the real mask area corresponding to the second pole piece.

[0130] In an embodiment of the present application, based on the sample image, the steps of marking the first and second marking points corresponding to the first sample pole piece, and marking the third and fourth marking points corresponding to the second sample pole piece can be completed by manual marking.

[0131] The preset first extension value can be obtained through the experience value of the first sample pole piece. After the first annotation point and the second annotation point are obtained, the first annotation point and the second annotation point are connected to form a first annotation line corresponding to the first sample pole piece. The first annotation line is extended along the first direction. Based on the preset first extension value, the first annotation line is extended to the first annotation area (that is, the real mask area corresponding to the first pole piece). At this time, the first annotation area can be a parallelogram, the long side of the parallelogram is equal to the length of the first annotation line, and the short side of the parallelogram is equal to the width of the first extension value. As an optional embodiment, the first annotation area can be a rectangle.

[0132] The preset second extension value can be obtained through the experience value of the second sample pole piece. After the third annotation point and the fourth annotation point are obtained, the third annotation point and the fourth annotation point are connected to form a second annotation line corresponding to the second sample pole piece. The second annotation line is extended along the first direction. Based on the preset second extension value, the second annotation line is extended to the second annotation area (that is, the real mask area corresponding to the second pole piece). At this time, the second annotation area can be a parallelogram, the long side of the parallelogram is equal to the length of the second annotation line, and the short side of the parallelogram is equal to the width of the second extension value. As an optional embodiment, the second annotation area can be a rectangle.

[0133] Only two annotation points are marked for a sample pole piece, which can reduce the difficulty of annotation, reduce the annotation workload, and improve the annotation efficiency. At the same time, when the pole piece contour or pole piece feature is discontinuous in the sample image, the complete real mask area can be output as the true value of model training, so that the trained segmentation model can predict the complete mask area based on the discontinuous pole piece contour.

[0134] refer to Figure 6 , Figure 6 A structural block diagram of a segmentation model training device for battery detection provided in some embodiments of the present application. The segmentation model training device 600 for battery detection includes: a sample acquisition module 601, configured to acquire a sample image containing a sample battery, the sample image including a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery arranged alternately along a first direction. A truth module 602, configured to acquire a real pole piece mask image corresponding to the sample image, the real pole piece mask image including a real background area and a plurality of real mask areas, each real mask area corresponding to an area where a first sample pole piece or a second sample pole piece is located; a sample prediction module 603, configured to input the sample image into the segmentation model to be trained, and acquire a predicted pole piece mask image output by the segmentation model; a loss module 604, configured to calculate a loss value based on the real pole piece mask image and the predicted pole piece mask image; a parameter adjustment module 605, configured to adjust the parameters of the segmentation model based on the loss value.

[0135] In an embodiment of the present application, a plurality of sample images containing sample batteries may be obtained as a data set for training a segmentation model. The sample images are images acquired by a radiographic image acquisition device. For example, the plurality of sample images may be images that have been simply processed.

[0136] The pole piece area in the sample image is labeled to obtain the real pole piece mask image corresponding to the sample image. The real pole piece mask image is used as the ground truth of the segmentation model for supervised learning.

[0137] After the segmentation model outputs the predicted pole mask map, the actual pole mask map is compared with the predicted pole mask map, and the loss value is calculated using the cross entropy loss function. If the difference between the predicted pole mask map and the actual pole mask map is large, the loss value will also be relatively large, and the model parameters need to be adjusted and iterated. If the predicted pole mask map and the actual pole mask map are highly consistent, the loss value converges, and the iteration is completed when it approaches the optimal value or finds a local optimal value. At this time, the internal parameters of the segmentation model can be updated through back propagation to complete the training.

[0138] The pole mask image output by the trained segmentation model can output the complete pole mask area when the pole contour or pole feature in the detection image is discontinuous. Using the real mask area as the true value of the training segmentation model can improve the accuracy of the segmentation model prediction, restore the pole features to a certain extent, and facilitate subsequent measurement.

[0139] According to some embodiments of the present application, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery detection method in the above-mentioned embodiment or the segmentation model training method in the above-mentioned embodiment.

[0140] According to some embodiments of the present application, a battery production system is provided, comprising the electronic device in the above embodiments.

[0141] According to some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the battery detection method in the above embodiment or the segmentation model training method in the above embodiment is implemented.

[0142] According to some embodiments of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the battery detection method in the above embodiment or the segmentation model training method in the above embodiment.

[0143] In the following, combined Figure 7 Illustrative examples of such a computer device, non-transitory computer-readable storage medium, and computer program product are described.

[0144] Computer device 700 can be a variety of different types of devices. Examples of computer device 700 include, but are not limited to, desktop computers, server computers, laptop or netbook computers, mobile devices (e.g., tablet computers, cellular or other wireless phones (e.g., smart phones), notepad computers, mobile stations), wearable devices (e.g., glasses, watches), entertainment devices (e.g., entertainment appliances, set-top boxes communicatively coupled to display devices, game consoles), televisions or other display devices, automotive computers, and the like.

[0145] The computer device 700 may include at least one processor 702, memory 704, communication interface(s) 706, a display device 708, other input / output (I / O) devices 710, and one or more mass storage devices 712 that can communicate with each other, such as via a system bus 714 or other appropriate connection.

[0146] The processor 702 may be a single processing unit or multiple processing units, all of which may include a single or multiple computing units or multiple cores. The processor 702 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operating instructions. Among other capabilities, the processor 702 may be configured to obtain and execute computer-readable instructions stored in the memory 704, mass storage device 712, or other computer-readable media, such as program codes of an operating system 716, program codes of an application program 718, program codes of other programs 720, and the like.

[0147] The memory 704 and the mass storage device 712 are examples of computer-readable storage media for storing instructions that are executed by the processor 702 to implement the various functions described above. For example, the memory 704 may generally include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.). In addition, the mass storage device 712 may generally include a hard drive, a solid-state drive, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CDs, DVDs), storage arrays, network attached storage, storage area networks, etc. The memory 704 and the mass storage device 712 may all be collectively referred to herein as memory or computer-readable storage media, and may be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code, which may be executed by the processor 702 as a specific machine configured to implement the operations and functions described in the examples herein.

[0148] A number of programs may be stored on the mass storage device 712. These programs include an operating system 716, one or more application programs 718, other programs 720, and program data 722, and they may be loaded into the memory 704 for execution. Examples of such applications or program modules may include, for example, computer program logic (e.g., computer program code or instructions) for implementing the client application, method 200, method 400, and / or other embodiments described herein.

[0149] Although in Figure 7 700, but modules 716, 718, 720, and 722, or portions thereof, may be implemented using any form of computer-readable media accessible by computer device 700. As used herein, "computer-readable media" includes at least two types of computer-readable media, namely, computer-readable storage media and communication media.

[0150] Computer-readable storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data. Computer-readable storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD), or other optical storage device, magnetic cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, or any other non-transmission medium that can be used to store information for access by a computer device. In contrast, communication media can embody computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism. Computer-readable storage media as defined herein do not include communication media.

[0151] One or more communication interfaces 706 are used to exchange data with other devices, such as through a network, a direct connection, etc. Such communication interfaces can be one or more of the following: any type of network interface (e.g., a network interface card (NIC)), a wired or wireless (such as IEEE 802.11 wireless LAN (WLAN)) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a cellular network ... TMThe communication interface 706 may facilitate communication within a variety of network and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet, etc. The communication interface 706 may also provide for communication with external storage devices (not shown) such as in a storage array, network attached storage, storage area network, etc.

[0152] In some examples, a display device 708 such as a monitor may be included for displaying information and images to the user. Other I / O devices 710 may be devices that receive various inputs from the user and provide various outputs to the user, and may include a touch input device, a gesture input device, a camera, a keyboard, a remote control, a mouse, a printer, an audio input / output device, and the like.

[0153] The technology described herein can be supported by these various configurations of the computer device 700, and is not limited to the specific examples of the technology described herein. For example, the function can also be implemented in whole or in part on the "cloud" by using a distributed system. The cloud includes and / or represents a platform for resources. The platform abstracts the underlying functions of the hardware (e.g., server) and software resources of the cloud. Resources can include applications and / or data that can be used when performing computing processing on a server away from the computer device 700. Resources can also include services provided through the Internet and / or through a subscriber network such as a cellular or Wi-Fi network. The platform can abstract resources and functions to connect the computer device 700 to other computer devices. Therefore, the implementation of the functions described herein can be distributed throughout the cloud. For example, the functions can be implemented partially on the computer device 700 and partially through a platform that abstracts the functions of the cloud.

[0154] An embodiment of the present application provides a battery detection method, which inputs a detection image into a segmentation model to obtain a pole piece mask image output by the segmentation model, wherein the pole piece mask image includes a background area and multiple mask areas, each mask area corresponding to an area where a first pole piece or a second pole piece is located; based on the pole piece mask image, a first endpoint and a second endpoint of the first pole piece are determined, and a third endpoint and a fourth endpoint of the second pole piece are determined.

[0155] The plurality of mask regions include a plurality of first mask regions and a plurality of second mask regions, the first mask region corresponds to the region where the first pole piece is located, and the second mask region corresponds to the region where the second pole piece is located; the first mask region includes a first top edge and a first bottom edge spaced from the first top edge along a second direction, the first endpoint is located at the first top edge, and the second endpoint is located at the first bottom edge; the second mask region includes a second top edge and a second bottom edge spaced from the second top edge along a second direction, the third endpoint is located at the second top edge, and the fourth endpoint is located at the second bottom edge. The first endpoint is the midpoint of the first top edge, the second endpoint is the midpoint of the first bottom edge; the third endpoint is the midpoint of the second top edge, and the fourth endpoint is the midpoint of the second bottom edge.

[0156] refer to Figure 3 The pole piece mask diagram 300 output by the segmentation model includes a background area 303, a first mask area 301 and a second mask area 302, wherein the first mask area 301 and the second mask area 302 are alternately arranged along a first direction X, and are used to characterize a plurality of first pole pieces and a plurality of second pole pieces alternately arranged along the first direction, the first mask area 301 includes a first top edge 3011 and a first bottom edge 3012 spaced from the first top edge 3011 along a second direction Y, wherein a first endpoint 3013 is located on the first top edge 3011, and a second endpoint 3014 is located on the first bottom edge 3012, and a line connecting the first endpoint 3013 and the second endpoint 3014 is a first pole piece fitting line 3015. The second mask area 302 includes a second top edge 3021 and a second bottom edge 3022 spaced from the second top edge 3021 along the second direction Y, wherein the third endpoint 3023 is located on the second top edge 3021, the fourth endpoint 3024 is located on the second bottom edge 3022, and the line connecting the third endpoint 3023 and the fourth endpoint 3024 is the second pole piece fitting line 3025. By measuring the spacing d between the first pole piece fitting line 3015 and the second pole piece fitting line 3025, the pole piece gap of the battery to be tested can be obtained.

[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.

Claims

1. A battery detection method, characterized in that: The method comprises: Acquire a detection image including a battery to be tested, wherein the detection image includes a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested that are alternately arranged along a first direction, wherein the first pole pieces and the second pole pieces have different polarities; Determine, based on the detection image, a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece, wherein the first pole piece fitting line and the second pole piece fitting line are spaced apart along a first direction; Based on the adjacent first pole piece fitting line and the second pole piece fitting line, the pole piece gap of the battery to be tested is determined.

2. The method according to claim 1, characterized in that The step of determining a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image comprises: Obtaining a first endpoint and a second endpoint of the first pole piece based on the detection image, and obtaining a third endpoint and a fourth endpoint of the second pole piece; A first pole piece fitting line corresponding to the first pole piece is obtained based on a line connecting the first endpoint and the second endpoint, and a second pole piece fitting line corresponding to the second pole piece is obtained based on a line connecting the third endpoint and the fourth endpoint.

3. The method according to claim 1 or 2, characterized in that: The battery to be tested includes a wound battery cell; The detection image is obtained by projecting rays onto the surface of the wound battery cell for shooting, and the detection image includes any one of the four corners of the surface of the wound battery cell.

4. The method according to claim 2, characterized in that: The steps of obtaining the first endpoint and the second endpoint of the first pole piece based on the detection image, and obtaining the third endpoint and the fourth endpoint of the second pole piece include: Input the detection image into a segmentation model to obtain a pole piece mask image output by the segmentation model, wherein the pole piece mask image includes a background area and a plurality of mask areas, each of the mask areas corresponding to an area where the first pole piece or the second pole piece is located; A first endpoint and a second endpoint of the first pole piece are determined based on the pole piece mask image, and a third endpoint and a fourth endpoint of the second pole piece are determined.

5. The method according to claim 4, characterized in that The steps of determining the first endpoint and the second endpoint of the first pole piece based on the pole piece mask image, and determining the third endpoint and the fourth endpoint of the second pole piece include: The plurality of mask regions include a plurality of first mask regions and a plurality of second mask regions, the first mask regions correspond to the regions where the first pole piece is located, and the second mask regions correspond to the regions where the second pole piece is located; The first mask region includes a first top edge and a first bottom edge spaced from the first top edge along a second direction, the first endpoint is located at the first top edge, and the second endpoint is located at the first bottom edge, wherein the second direction is an extension direction of the first pole piece; The second mask area includes a second top edge and a second bottom edge spaced apart from the second top edge along the third direction, the third endpoint is located at the second top edge, and the fourth endpoint is located at the second bottom edge, wherein the third direction is the extension direction of the second pole piece.

6. The method according to claim 5, characterized in that The first endpoint is the midpoint of the first top side, and the second endpoint is the midpoint of the first bottom side; The third endpoint is the midpoint of the second top side, and the fourth endpoint is the midpoint of the second bottom side.

7. The method according to claim 5, characterized in that The first mask region includes a first side extending along the second direction, the first endpoint is a vertex of the first side, and the second endpoint is an end point of the first side; The second mask region includes a second side extending along the third direction, the third endpoint is a vertex of the second side, and the fourth endpoint is an end point of the second side.

8. The method according to claim 1, characterized in that The step of determining the electrode sheet gap of the battery to be tested based on the adjacent first electrode sheet fitting line and the second electrode sheet fitting line includes: Along the first direction, based on the adjacent first pole piece fitting line and the second pole piece fitting line, a first distance between the adjacent first pole piece fitting line and the second pole piece fitting line is obtained, and the first distance is used to characterize the pole piece gap of the battery to be tested; wherein, The first distance is any one of a minimum distance, a maximum distance and an average distance between the adjacent first pole piece fitting lines and the second pole piece fitting lines.

9. The method according to any one of claims 1 to 8, characterized in that Before determining a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece based on the detection image, the method further includes: The detection image is subjected to image preprocessing, and a plurality of first pole piece fitting lines and a plurality of second pole piece fitting lines are obtained based on the detection image after image preprocessing.

10. The method according to claim 9, characterized in that The image preprocessing step comprises: Performing local enhancement processing on the detection image.

11. The method according to claim 10, characterized in that The local enhancement processing step comprises: Extracting a gradient image of the detection image; Performing gradient compression on the gradient image to obtain a corresponding compressed gradient image; Image reconstruction is performed based on the compressed gradient image to obtain a reconstructed detection image.

12. The method according to claim 11, characterized in that The step of gradient compression comprises: Determine a contour image of the object to be detected based on the gradient image; Determining a compression value of a corresponding pixel based on a gradient magnitude of each pixel in the contour image; Extracting the gradient value of each pixel in the gradient image; Obtaining a compressed gradient value of the corresponding pixel based on the gradient value of each pixel and the compression value of the corresponding pixel; A corresponding compressed gradient image is obtained based on the compressed gradient value of each pixel.

13. A battery detection device, characterized in that: The device comprises: an acquisition module configured to acquire a detection image containing a battery to be tested, wherein the detection image includes a plurality of first pole pieces and a plurality of second pole pieces of the battery to be tested that are alternately arranged along a first direction, wherein the first pole pieces and the second pole pieces have different polarities; a fitting module configured to determine, based on the detection image, a first pole piece fitting line for characterizing the first pole piece and a second pole piece fitting line for characterizing the second pole piece, wherein the first pole piece fitting line and the second pole piece fitting line are spaced apart along a first direction; The processing module is configured to determine the pole piece gap of the battery to be tested based on the adjacent first pole piece fitting line and the second pole piece fitting line.

14. A segmentation model training method for battery detection, characterized in that: The training method comprises: Acquire a sample image containing a sample battery, wherein the sample image includes a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery alternately arranged along a first direction; Acquire a real pole piece mask image corresponding to the sample image, wherein the real pole piece mask image includes a real background area and a plurality of real mask areas, each of the real mask areas corresponds to an area where the first sample pole piece or the second sample pole piece is located; Inputting the sample image into the segmentation model to be trained, and obtaining a predicted pole piece mask image output by the segmentation model; Calculating a loss value based on the actual pole piece mask diagram and the predicted pole piece mask diagram; Parameters of the segmentation model are adjusted based on the loss value.

15. The training method according to claim 14, characterized in that: The step of obtaining a real pole piece mask image corresponding to the sample image comprises: Based on the sample image, mark a first marking point and a second marking point corresponding to the first sample pole piece, and mark a third marking point and a fourth marking point corresponding to the second sample pole piece; Based on the marked first and second marked points of the first sample pole piece, and the preset first expansion value, the real mask area corresponding to the first pole piece is obtained; based on the marked third and third marked points of the second sample pole piece, and the preset second expansion value, the real mask area corresponding to the second pole piece is obtained.

16. A segmentation model training device for battery detection, characterized in that: The training device comprises: A sample acquisition module is configured to acquire a sample image containing a sample battery, wherein the sample image includes a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery alternately arranged along a first direction; A truth value module is configured to obtain a real pole piece mask image corresponding to the sample image, wherein the real pole piece mask image includes a real background area and multiple real mask areas, each of which corresponds to an area where the first sample pole piece or the second sample pole piece is located; a sample prediction module is configured to input the sample image into a segmentation model to be trained, and obtain a predicted pole piece mask image output by the segmentation model; A loss module, configured to calculate a loss value based on the actual pole piece mask diagram and the predicted pole piece mask diagram; A parameter adjustment module is configured to adjust the parameters of the segmentation model based on the loss value.

17. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery detection method described in any one of claims 1 to 12 or the segmentation model training method described in claim 14 or 15.

18. A battery production system comprising the electronic device according to claim 17.

19. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the battery detection method according to any one of claims 1 to 12 or the segmentation model training method according to claim 14 or 15 is implemented.

20. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the battery detection method described in any one of claims 1 to 12 or the segmentation model training method described in claim 14 or 15.