Battery detection method, training method, production method, device, equipment and medium
By identifying the end points of the pole sheet in the battery detection image, directly determining the excess amount of the pole sheet is solved, and the problem of low detection efficiency in the prior art is achieved, and more efficient battery detection is achieved.
Patent Information
- Application Number
- CN202310971825.7
- 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
In the prior art, the detection efficiency of the battery pole sheet exceeding the amount is low, and the outline of the pole sheet needs to be extracted, which has a large workload and low efficiency.
By acquiring the detection image of the battery to be tested, a first end point of the first pole sheet in the second direction and a second end point of the second pole sheet in the second direction are identified, based on the adjacent first end point and The second endpoint determines that the pole sheet exceeds the amount, reducing the workload of identifying the pole sheet profile.
The speed and efficiency of battery detection are improved, the workload is reduced, and the detection process is more efficient.
Smart Images

Figure CN119437047A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a battery detection method, training method, production method, device, equipment and medium. 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] The battery includes a stacked cathode electrode sheet and an anode electrode sheet, which are separated by a diaphragm to insulate the anode electrode sheet from the cathode electrode sheet. The anode electrode sheet exceeds the cathode electrode sheet in both width and length. The length or width of the anode electrode sheet exceeding the cathode electrode sheet (electrode sheet excess) will affect the performance of the battery. The electrode sheet excess needs to be detected so that the electrode sheet excess of the qualified battery is within an appropriate range.
[0004] In the related art, during the detection of the excess amount of the battery pole piece, it is necessary to extract the outline of the pole piece, which is labor-intensive and inefficient. Summary of the invention
[0005] The present application aims to solve at least one of the technical problems in the background technology. To this end, one object of the present application is to provide a battery detection method, training method, production method, device, equipment and medium to improve detection efficiency.
[0006] An embodiment of the first aspect of the present application provides a battery detection method, the method comprising: obtaining a detection image of 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; determining a first endpoint of the first pole piece along a second direction and a second endpoint of the second pole piece along the second direction based on the detection image, wherein the first endpoint is a point at which the first pole piece is closest to a first boundary of the detection image, and the second endpoint is a point at which the second pole piece is closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; determining an excess amount of the pole piece of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction.
[0007] In the technical solution of the embodiment of the present application, since the pole piece excess is the length of the portion of the first pole piece that exceeds the second pole piece, in the detection image, it is also the distance along the second direction between the first endpoint and the second endpoint. Therefore, after identifying the first endpoint of the first pole piece along the second direction and the second endpoint of the second pole piece along the second direction in the detection image, the pole piece excess of the battery to be tested can be directly determined based on the distance along the second direction between the adjacent first endpoint and the second endpoint. In the detection image, only the first endpoint of the first pole piece and the second endpoint of the second pole piece need to be determined. Compared with the need to identify the outline of the first pole piece and the outline of the second pole piece in the related art, the workload is reduced, the detection speed can be increased, and thus the detection efficiency is improved.
[0008] In some embodiments, determining the first endpoint of the first pole piece and the second endpoint of the second pole piece based on the detection image includes: inputting the detection image into a segmentation model, obtaining a pole piece mask diagram output by the segmentation model, the pole piece mask diagram including a background area and a plurality of end mask areas, each end mask area corresponding to an area where the end of the first pole piece is located or an area where the end of the second pole piece is located, the end of the first pole piece is an end of the first pole piece close to the first boundary, and the end of the second pole piece is an end of the second pole piece close to the first boundary; determining the first endpoint of the first pole piece and the second endpoint of the second pole piece based on the pole piece mask diagram. The pole piece mask diagram output by the trained segmentation model only needs to mark the head of the pole piece, which reduces the workload and improves efficiency.
[0009] In some embodiments, the plurality of end mask regions include a plurality of first end mask regions and a plurality of second end mask regions, the first end mask region corresponds to the region where the end of the first pole piece is located, and the second end mask region corresponds to the region where the end of the second pole piece is located; the first endpoint is located at the center of the first end mask region; and the second endpoint is located at the center of the second end mask region. By finding the center in the independent end mask region on the pole piece mask diagram, the endpoint of the pole piece in the detection image can be better located.
[0010] In some embodiments, based on the first endpoint and the second endpoint adjacent to each other along the first direction, determining the excess amount of the pole piece of the battery to be tested includes: based on the first endpoint and the second endpoint adjacent to each other along the first direction, determining a first distance between the adjacent first endpoint and the second endpoint along the second direction, the second direction being perpendicular to the first direction; and determining the excess amount of the pole piece of the battery to be tested based on the first distance. Characterizing the excess amount of the pole piece of the battery to be tested based on the distance between the first endpoint and the second endpoint only requires determining the first endpoint of the first pole piece and the second endpoint of the second pole piece, which reduces the workload and can increase the detection speed, thereby improving the detection efficiency.
[0011] In some embodiments, obtaining a test image of a battery to be tested includes: obtaining an initial image of the battery to be tested; performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested; performing image reconstruction based on the compressed gradient image to obtain a reconstructed image of the battery to be tested; performing image enhancement processing on the reconstructed image to obtain a test image of the battery to be tested. By processing the initial image in the above manner to obtain a test image, the pole piece features in the test image can be made clearer, which is more conducive to subsequent detection.
[0012] In some embodiments, image enhancement processing is performed on the reconstructed image to obtain a detection image of the battery to be tested, including: contrast enhancement processing is performed on the reconstructed image to obtain a first preprocessed image of the battery to be tested; histogram equalization processing is performed on the reconstructed image to obtain a second preprocessed image of the battery to be tested; and the detection image of the battery to be tested is obtained based on the first preprocessed image and the second preprocessed image. The different features of the electrode piece can be distinguished by two different image enhancement processings, so the detection image of the battery to be tested obtained based on the first preprocessed image and the second preprocessed image can highlight the different features of the electrode piece.
[0013] In some embodiments, obtaining a detection image of the battery to be tested based on the first preprocessed image and the second preprocessed image includes: performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain the detection image of the battery to be tested. Through image fusion processing, the information in the first preprocessed image and the second preprocessed image can be input into the detection image, increasing the data dimension, so that the detection image can include more information, and improving the subsequent detection accuracy.
[0014] In some embodiments, obtaining a detection image of the battery to be tested based on the first preprocessed image and the second preprocessed image includes: performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain a third preprocessed image of the battery to be tested, the third preprocessed 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 polarities of the first pole piece and the second pole piece are different; determining a first pole piece fitting line and a second pole piece fitting line based on the third preprocessed image to obtain an auxiliary detection image of the battery to be tested, the first pole piece fitting line is a fitting center line of the first pole piece, and the second pole piece fitting line is a fitting center line of the second pole piece; performing image fusion processing on the first preprocessed image, the second preprocessed image and the auxiliary detection image to obtain a detection image of the battery to be tested. Compared with the detection image obtained by fusing two images, the detection image obtained by fusing the three images has more information, further improving the subsequent detection accuracy.
[0015] In some embodiments, the method further includes: determining the pole piece gap of the battery to be tested based on the distance along the first direction between the adjacent first pole piece fitting line and the second pole piece fitting line in the auxiliary detection image. In the related art, the pole piece excess and the pole piece gap are detected separately through two images, and the two images need to be processed separately, and the detection efficiency is low. The method provided in the embodiment of the present application can be used to detect both the pole piece excess and the pole piece gap, that is, two feature detections of the battery to be tested can be realized through one image, thereby improving information utilization.
[0016] In some embodiments, before performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested, the method further includes: performing noise reduction processing on the initial image. By performing noise reduction processing on the initial image, random noise such as quantum noise, aliasing noise, and electronic noise in the initial image can be removed, thereby greatly improving the signal-to-noise ratio of the initial image.
[0017] In some embodiments, the initial image is subjected to gradient compression processing to obtain a compressed gradient image of the battery to be tested, including: extracting the gradient image of the initial image; performing gradient compression processing on the gradient image to obtain a compressed gradient image of the battery to be tested. The compressed gradient image of the battery to be tested is obtained by performing gradient compression processing on the gradient image, so that the gradient value in the compressed gradient image is less than the gradient value in the gradient image, and the change in the grayscale value in the reconstructed image obtained by compressing the gradient image is 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.
[0018] An embodiment of the second aspect of the present application provides a battery detection device, the device comprising: an acquisition module, configured to acquire a detection image of 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 pieces and the second pole pieces are different; a first determination module, configured to determine a first endpoint of the first pole piece along a second direction, and a second endpoint of the second pole piece along the second direction based on the detection image, wherein the first endpoint is a point at which the first pole piece is closest to a first boundary of the detection image, and the second endpoint is a point at which the second pole piece is closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; a second determination module, configured to determine an excess amount of the pole piece of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction.
[0019] The embodiment of the third aspect of the present application provides a segmentation model training method for battery detection, the training method comprising: obtaining a sample image containing a sample battery, the sample image comprising 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 comprising a real background area and a plurality of real end mask areas, the plurality of real end mask areas comprising a first real end mask area corresponding to the area where the end of the first sample pole piece is located and / or a second real end mask area corresponding to the area where the end of the second sample pole piece is located; inputting the sample image into the segmentation model to be trained, 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; adjusting the parameters of the segmentation model based on the loss value. Through the pole piece mask image output by the trained segmentation model, only the head of the pole piece in the detection image can be marked, and a complete pole piece mask area can be output. 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 characteristics of the pole piece to a certain extent, and facilitate subsequent measurement.
[0020] In some embodiments, obtaining a sample image containing a sample battery includes: obtaining a sample initial image of the sample battery; performing gradient compression processing on the sample initial image to obtain a sample compressed gradient image of the sample battery; performing image reconstruction based on the sample compressed gradient image to obtain a sample reconstructed image of the sample battery; performing image enhancement processing on the sample reconstructed image to obtain a sample image of the sample battery. The method of obtaining a sample image of a sample battery is the same as that of obtaining a test image of a battery to be tested, so that the subsequent trained model can process the test image more accurately.
[0021] In some embodiments, the sample reconstructed image is subjected to image enhancement processing to obtain a sample image of the sample battery, including: contrast enhancement processing is performed on the sample reconstructed image to obtain a first sample preprocessed image of the sample battery; histogram equalization is performed on the sample reconstructed image to obtain a second sample preprocessed image of the sample battery; image fusion processing is performed on the first sample preprocessed image and the second sample preprocessed image to obtain a sample image of the sample battery. The two preprocessed images are fused into a sample image and then annotated to produce a training data set, so that the sample detection image used for training and the detection image used for detection are obtained by the same type of side processing method, so that the trained segmentation model can process the detection image more accurately.
[0022] In some embodiments, obtaining a real pole piece mask image corresponding to a sample image includes: marking a first annotation point corresponding to the end of a first sample pole piece based on the sample image, and marking a second annotation point corresponding to the end of a second sample pole piece; obtaining a first real end mask area corresponding to the end of the first sample pole piece based on the marked first annotation point and a preset first expansion value; obtaining a second real end mask area corresponding to the end of the second sample pole piece based on the marked second annotation point and a preset second expansion value. Marking only two annotation points for a sample pole piece can reduce the difficulty of annotation, reduce the workload of annotation, and improve the efficiency of annotation.
[0023] An embodiment of the fourth aspect of the present application provides a segmentation model training device for battery detection, the training device comprising: a sample acquisition module, configured to acquire a sample image containing a sample battery, the sample image comprising 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 comprising a real background area and a plurality of real end mask areas, the plurality of real end mask areas comprising a first real end mask area corresponding to an area where an end of the first sample pole piece is located and / or a second real end mask area corresponding to an area where an end of the 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.
[0024] The fifth aspect of the present application provides a battery production method, the method comprising: using any of the battery detection methods in the above embodiments to detect the excess amount of the pole piece of the battery to be tested, so as to determine the quality test result of the battery to be tested. By testing the battery using the above battery detection method, it is possible to determine whether the battery is qualified according to the excess amount of the pole piece, thereby determining the quality test result of the battery to be tested.
[0025] In some embodiments, the method further includes: in response to the quality inspection result of the battery to be tested being unqualified, rejecting the unqualified battery. Rejecting the unqualified battery can reduce the possibility of safety accidents caused by the unqualified battery.
[0026] An embodiment of the sixth 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 of any one of the above embodiments or the training method of any one of the above embodiments or the battery production method of the above embodiments.
[0027] An embodiment of the seventh aspect of the present application provides a battery production device, including the electronic device in the above embodiment.
[0028] An embodiment of the eighth aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the battery detection method of any one of the above embodiments, the training method of any one of the above embodiments, or the battery production method of any one of the above embodiments.
[0029] An embodiment of the ninth 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 of any one of the above embodiments or the training method of any one of the above embodiments or the battery production method of the above embodiments.
[0030] 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
[0031] 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.
[0032] Figure 1 A flowchart of a battery detection method provided in an embodiment of the present application;
[0033] Figure 2 A detection image of a battery to be tested provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of a wound battery provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the structure of a laminated battery provided in an embodiment of the present application;
[0036] Figure 5 A block diagram of a battery detection device provided in an embodiment of the present application;
[0037] Figure 6 A flowchart of a segmentation model training method for battery detection provided in an embodiment of the present application;
[0038] Figure 7 A block diagram of a segmentation model training device for battery detection provided in an embodiment of the present application.
[0039] Description of reference numerals:
[0040] 100, first pole piece; 200, second pole piece; 300, wound battery; 301, first surface; 302, second surface; 303, first side; 304, second side; 400, laminated battery; 401, third surface; 402, fourth surface; 403, third side; 500, background area; 101, first end mask area; 201, second end mask area; 501, acquisition module; 502, first determination module; 503, second determination module; 701, sample acquisition module; 702, truth module; 703, sample prediction module; 704, loss module; 705, parameter adjustment module. DETAILED DESCRIPTION
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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).
[0047] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the 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.
[0048] 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.
[0049] 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.
[0050] The battery includes a stacked cathode electrode sheet and an anode electrode sheet, and the cathode electrode sheet and the anode electrode sheet are separated by a diaphragm, so that the anode electrode sheet and the cathode electrode sheet are insulated. The anode electrode sheet exceeds the cathode electrode sheet in both its width and length directions, and the electrode sheet overhang (Overhang, OH) will affect the performance of the battery. Taking lithium batteries as an example, during the charging and discharging process of the battery, lithium ions will repeatedly deintercalate between the cathode and cathode electrodes, but when lithium ions are removed from the cathode but there are not enough anode channels to embed, 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 electrode sheet is within the coating range of the anode as a whole, that is, to ensure that the anode exceeds the cathode, that is, the electrode sheet overhang is greater than 0. However, the larger the electrode sheet overhang, the lower the battery energy density. Therefore, it is necessary to detect the electrode sheet overhang so that the battery electrode sheet overhang is within an appropriate range.
[0051] In the related art, a ray collection device is used to irradiate the battery to obtain a detection image of the battery, and then the outline of the pole piece is identified in the detection image. The pole piece excess is determined based on the outline of the pole piece. However, identifying the outline of the pole piece requires a lot of work and has low efficiency.
[0052] The embodiment of the present application provides a battery detection method, which includes: obtaining a detection image of a battery to be tested, 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 polarities of the first pole piece and the second pole piece are different; determining a first endpoint of the first pole piece and a second endpoint of the second pole piece based on the detection image, wherein the first endpoint is the point where the first pole piece is closest to the first boundary of the detection image, and the second endpoint is the point where the second pole piece is closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; determining the pole piece excess of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction. The pole piece excess of the battery to be tested can be determined by only identifying the pole piece endpoints in the detection image, and there is no need to identify the outline of the entire pole piece, which reduces the recognition workload, speeds up the detection speed, and improves the detection efficiency.
[0053] The battery detection method disclosed in the embodiment of the present application can be used to detect batteries leaving the factory, and can also be used to detect batteries in service.
[0054] The present application embodiment provides a battery detection method. Figure 1 A flowchart of a battery detection method provided in an embodiment of the present application. Figure 1 , the method comprising:
[0055] Step S10: Acquire a detection image of the battery to be tested.
[0056] The detection image includes 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 pieces and the second pole pieces are different.
[0057] In an embodiment of the present application, the battery to be tested may be a wound battery, or may be a laminated battery.
[0058] In the embodiment of the present application, the detection image is an image obtained by capturing the battery to be tested through an image capture device. Exemplarily, the detection image may be a processed image.
[0059] 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.
[0060] In an embodiment of the present application, the first pole piece is an anode pole piece, and the second pole piece is a cathode pole piece; or, the first pole piece is a cathode pole piece, and the second pole piece is an anode pole piece.
[0061] In an embodiment of the present application, the cathode electrode and the anode electrode of the battery are made of different materials, and different materials absorb radiation to different degrees, which will form a light and dark contrast pattern on the detection image, thereby identifying the first electrode and the second electrode in the detection image.
[0062] Step S20: determining a first endpoint of the first pole piece and a second endpoint of the second pole piece based on the detection image.
[0063] Among them, the first endpoint is the point where the first pole piece is closest to the first boundary of the detection image, and the second endpoint is the point where the second pole piece is closest to the first boundary of the detection image. In the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece.
[0064] Exemplarily, the first endpoint and the second endpoint can be obtained by algorithm prediction or by manual annotation. When the first endpoint and the second endpoint are obtained by algorithm prediction, the first endpoint corresponding to the first pole piece or the second endpoint corresponding to the second pole piece can be obtained by the pole piece prediction result of the trained model. When the first endpoint and the second endpoint are obtained by manual annotation, the annotator can obtain the first endpoint corresponding to the first pole piece or the second endpoint corresponding to the second pole piece by punctuation on the detection image.
[0065] In an embodiment of the present application, the first endpoint corresponding to each first pole piece in the detection image and the second endpoint corresponding to each second pole piece can be determined. It is also possible to determine only the first endpoint corresponding to some of the first pole pieces in the detection image and the second endpoint 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 endpoint and the second endpoint can be determined by selecting the first pole piece and the second pole piece in the partial area (non-distorted area).
[0066] Step S30: determining the excess amount of the electrode of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction.
[0067] The pole piece overhang is the length of the portion of the first pole piece that overhangs the second pole piece, or the length of the portion of the second pole piece that overhangs the first pole piece.
[0068] Figure 2 This is a test image of a battery to be tested provided in an embodiment of the present application. Figure 2 , the first pole piece 100 and the second pole piece 200 in the detection image are brighter than the background, so that the first pole piece 100 and the second pole piece 200 can be observed from the detection image. Figure 2 The first pole piece 100 is an anode pole piece, and the second pole piece 200 is a cathode pole piece. In other embodiments, the first pole piece 100 may be a cathode pole piece, and the second pole piece 200 may be an anode pole piece.
[0069] In some embodiments of the present application, the first end point of the first electrode piece along the second direction Y can be understood as the point in the battery to be tested where the first electrode piece is closest to the housing along the second direction Y, that is, Figure 2 The second end point of the second electrode piece along the second direction Y can be understood as the point of the second electrode piece in the battery to be tested that is closest to the housing along the second direction Y, and the first end point and the second end point are located on the same side of the battery to be tested, that is, Figure 2 That is to say, the first end point of the first pole piece is the boundary point of the first pole piece, and the second end point of the second pole piece is the boundary point of the second pole piece.
[0070] In the embodiment of the present application, a plurality of first pole pieces and a plurality of second pole pieces are alternately arranged along the first direction X. Taking any first pole piece except the end as an example, the first pole piece is adjacent to two second pole pieces, and the positions of the second end points of the two second pole pieces may deviate in the second direction. Therefore, for the first pole piece, the excess amount of the two pole pieces can be determined, and the battery to be tested is subsequently tested according to the excess amounts of all pole pieces. Exemplarily, the first direction X is perpendicular to the second direction Y.
[0071] Acquiring the first endpoint of the first pole piece based on the detection image can be understood as acquiring the feature point corresponding to the first pole piece on the detection image. This feature point can be a feature point characterizing the end of the first pole piece. It can be understood that these feature points do not actually represent the actual starting point 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).
[0072] Obtaining the second endpoint of the second pole piece based on the detection image can be understood as obtaining the feature point corresponding to the second pole piece on the detection image. This feature point can be a feature point characterizing the end of the second pole piece. It can be understood that these feature points do not actually represent the actual starting point 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).
[0073] The first endpoint and the second endpoint may be obtained by manual punctuation or by machine punctuation. For example, the Point type in labelme is used for annotation.
[0074] In an embodiment of the present application, the first endpoint and the second endpoint should be selected based on the same marked reference so that the distance along the second direction between the first endpoint and the second endpoint adjacent to each other along the first direction is equal to the excess amount of the pole piece of the battery to be tested in the detection image.
[0075] See also Figure 2 , for the three first pole pieces 100 and the three second pole pieces 200 in the dotted frame, the first endpoints of the three first pole pieces 100 are A1, A2 and A3 respectively, and the second endpoints of the three second pole pieces 200 are B1, B2 and B3 respectively. In the dotted frame, the pole piece excess includes: the distance between A1 and B1 along the second direction, the distance between B1 and A2 along the second direction, the distance between A2 and B2 along the second direction, the distance between B3 and A3 along the second direction, and the distance between A3 and B3 along the second direction.
[0076] In the embodiment of the present application, since the pole piece excess is the length of the portion of the first pole piece that exceeds the second pole piece, in the detection image, it is the distance between the first endpoint and the second endpoint along the second direction. Therefore, after identifying the first endpoint of the first pole piece along the second direction and the second endpoint of the second pole piece along the second direction in the detection image, the pole piece excess of the battery to be tested can be directly determined based on the distance along the second direction between the adjacent first endpoint and the second endpoint. In the detection image, only the first endpoint of the first pole piece and the second endpoint of the second pole piece need to be determined. Compared with the need to identify the outline of the first pole piece and the outline of the second pole piece in the related art, the workload is reduced, the detection speed can be increased, and thus the detection efficiency is improved.
[0077] See also Figure 2, the detection image only includes a part of the battery to be tested, and the other boundary point between the first electrode and the second electrode is not shown. Figure 2 In the figure, the first boundary is the upper boundary of the detection image. If the detection image includes all the batteries to be tested, and another boundary point of the first electrode piece and the second electrode piece is also displayed in the detection image, then the first boundary can be the upper boundary of the detection image or the lower boundary of the detection image, but it is necessary to ensure that the first endpoint and the second endpoint are located on the same side of the detection image.
[0078] 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 ends of the pole piece, the missing parts of the pole piece features in the detection image can be ignored, which is convenient for subsequent measurement.
[0079] In the embodiment of the present application, in the detection image, the first boundary is well identified, and it is more convenient to determine the first endpoint and the second endpoint according to the first boundary.
[0080] According to some embodiments of the present application, the battery to be tested includes a wound battery, the detection image is obtained by projecting rays onto the surface of the wound battery for shooting, and the detection image includes any one of the four corners of the surface of the wound battery, and the surface of the wound battery is perpendicular to the thickness direction of the wound battery.
[0081] According to other embodiments of the present application, the battery to be tested includes a laminated battery, the detection image is obtained by projecting rays onto the side of the laminated battery, and the detection image includes any one of the four corners of the side of the laminated battery, and the side of the laminated battery is parallel to the thickness direction of the laminated battery.
[0082] A battery composed of cells assembled in a winding manner is called a wound battery. Figure 3 This is a schematic diagram of the structure of a wound battery provided in an embodiment of the present application. Figure 3 The wound battery 300 includes a first surface 301, a second surface 302, and two first side surfaces 303 and two second side surfaces 304 connecting the first surface 301 and the second surface 302. Figure 3 The back side of the wound battery 300 is shown, wherein a first side 303 is Figure 3 The bottom surface of the wound battery 300 shown cannot be seen from Figure 3It can be seen directly that only its side edges can be shown. The two first side faces 303 are both planes, and the two second side faces 304 are both curved surfaces. The thickness direction Z1 of the wound battery 300 is perpendicular to both the first surface 301 and the second surface 302. The pole piece in the wound battery 300 is bent at the two second side faces 304. When the ray is projected onto the first surface 301 or the second surface 302 of the wound battery 300 for shooting, and includes any of the four corner positions of the first surface 301 or the second surface 302 of the wound battery 300, the bent portion of the pole piece can be displayed in the detection image, and since there is also a boundary of the pole piece at the corner position, the detection image can be presented. Figure 2 The situation shown can be used for detection.
[0083] A laminated battery refers to a battery produced using a lamination process, in which the electrodes are arranged in layers. Figure 4 This is a schematic diagram of the structure of a laminated battery provided in an embodiment of the present application. Figure 4 The laminated battery 400 includes a third surface 401, a fourth surface 402, and four third side surfaces 403 connecting the third surface 401 and the fourth surface 402. The thickness direction Z2 of the laminated battery 400 is parallel to the third side surface 403. Figure 3 The back side of the wound battery 300 is not visible from the Figure 3 It can be seen directly from the figure that only the side edges can be shown, and the two third side faces 403 cannot be seen from the figure. Figure 3 Since the electrodes in the laminated battery 400 are stacked, when the ray is projected to the side of the laminated battery 400 for shooting, and includes any of the four corners of the side of the laminated battery 400, the bent portion of the stacked electrodes can be displayed in the detection image, and since there are also boundaries of the electrodes at the corners, the detection image can also be presented. Figure 2 The situation shown can be used for detection.
[0084] In the embodiments of the present application, different methods are used to acquire the detection images of different battery types, so that the method provided in the embodiments of the present application can be used for detecting different types of batteries.
[0085] According to some embodiments of the present application, step S20 includes:
[0086] Step S21: input the detection image into the segmentation model to obtain the pole piece mask image output by the segmentation model.
[0087] In an embodiment of the present application, the pole piece mask diagram includes a background area and multiple end mask areas, each end mask area corresponds to the area where the end of the first pole piece is located or the area where the end of the second pole piece is located, the end of the first pole piece is the end of the first pole piece close to the first boundary, and the end of the second pole piece is the end of the second pole piece close to the first boundary.
[0088] Step S22: Determine the first endpoint of the first pole piece and the second endpoint of the second pole piece based on the pole piece mask image.
[0089] The segmentation model can be trained using the gradient descent method until it can stably identify the positive and negative poles. Based on the grayscale features of adjacent pixels, the grayscale value of each pixel in the detection image is compared with the grayscale value of the adjacent pixel, and the pixels are classified into appropriate categories according to the comparison results to achieve the segmentation of each target on the image. In an embodiment of the present application, the segmentation model is a trained model that can directly output a pole piece mask image based on the input detection image.
[0090] In an embodiment of the present application, for the detection of excess pole piece of the battery to be tested, it is necessary to distinguish the areas where the first pole piece, the second pole piece and the background area are located. 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 end film areas to characterize the area where the end of the first pole piece or the end of the second pole piece is located.
[0091] The pole piece mask image output by the trained segmentation model only needs to mark the head of the pole piece, reducing the workload and improving efficiency.
[0092] According to some embodiments of the present application, the multiple end mask areas include multiple first end mask areas and multiple second end mask areas, the first end mask area corresponds to the area where the end of the first pole piece is located, and the second end mask area corresponds to the area where the end of the second pole piece is located; the first endpoint is located at the center of the first end mask area; the second endpoint is located at the center of the second end mask area.
[0093] In an embodiment of the present application, since it is necessary to measure the pole piece excess between the first pole piece and the second pole piece, it is necessary to further distinguish the first pole piece and the second pole piece, and divide the multiple end mask areas into multiple independent pole piece end masks, wherein each independent pole piece end mask may include a first end mask area representing the end of the first pole piece, and also include a second end mask area representing the end of the second pole piece.
[0094] Each independent end mask region includes a center that characterizes the end of the pole piece.
[0095] refer to Figure 2The first pole piece 100, the second pole piece 200 and the background area 500 are included. The area where the end of the first pole piece 100 is located is the first end mask area 101, and the center of the first end mask area 101 is the first end point A. The area where the end of the second pole piece 200 is located is the second end mask area 201, and the center of the second end mask area 201 is the second end point B. By measuring the distance between the first end point A and the second end point B along the second direction Y, the pole piece excess of the battery to be tested can be obtained.
[0096] By finding the center in the independent end mask area on the pole piece mask image, the end point of the pole piece in the detection image can be better located.
[0097] According to some embodiments of the present application, step S30 includes:
[0098] Step S31: Based on the first endpoint and the second endpoint that are adjacent to each other along the first direction, determine a first distance between the adjacent first endpoint and the second endpoint along the second direction.
[0099] The second direction is perpendicular to the first direction, and in the detection image, both the first pole piece and the second pole piece extend along the second direction.
[0100] Step S32: determining the excess amount of the electrode of the battery to be tested based on the first distance.
[0101] In the embodiment of the present application, the boundary point of the first pole piece in the detection image can be characterized by the first endpoint, and the boundary point of the second pole piece in the detection image can be characterized by the second endpoint. Since the first pole piece and the second pole piece are arranged alternately along the first direction and have high consistency, the first endpoint and the second endpoint should also be fitted based on the same standard, so that the obtained first endpoint and the second endpoint 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 pole piece excess of the battery to be tested can be characterized by the first distance by measuring the first distance between the adjacent first endpoint and the second endpoint. Wherein the adjacent first endpoint and the second endpoint means that there is no other endpoint between the two endpoints.
[0102] The excess amount of the electrode piece of the battery to be tested is characterized based on the distance between the first endpoint and the second endpoint. It is only necessary to determine the first endpoint of the first electrode piece and the second endpoint of the second electrode piece, which reduces the workload and can increase the detection speed, thereby improving the detection efficiency.
[0103] According to some embodiments of the present application, step S10 includes:
[0104] Step S11: Acquire an initial image of the battery to be tested.
[0105] Step S12: performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested.
[0106] Step S13: performing image reconstruction based on the compressed gradient image to obtain a reconstructed image of the battery to be tested.
[0107] Step S14: Perform image enhancement processing on the reconstructed image to obtain a detection image of the battery to be tested.
[0108] In an embodiment of the present application, the initial image is an image acquired by a radiographic image acquisition device, and the original image may be subjected to a simple noise reduction process to remove noise in the original image.
[0109] In an embodiment of the present application, the initial image is a grayscale image, the first compressed gradient image and the second compressed gradient image are both gradient images and cannot be used for detection, and image reconstruction is performed on the first compressed gradient image and the second compressed gradient image, that is, the first compressed gradient image and the second compressed gradient image are restored to the original grayscale images to obtain a reconstructed image.
[0110] In the embodiment of the present application, the initial image is processed in the above manner to obtain a detection image, which can make the pole piece features in the detection image clearer and more conducive to subsequent detection.
[0111] According to some embodiments of the present application, step S14 includes:
[0112] Step S141: performing contrast enhancement processing on the reconstructed image to obtain a first pre-processed image of the battery to be tested.
[0113] Step S142: performing histogram equalization processing on the reconstructed image to obtain a second pre-processed image of the battery to be tested.
[0114] Step S143: obtaining a detection image of the battery to be tested based on the first preprocessed image and the second preprocessed image.
[0115] Exemplarily, contrast enhancement processing can be unidirectional contrast enhancement, which can enhance the contrast in the image while avoiding amplifying noise that may exist in the image, making the object to be detected in the image more obvious and easier to identify than other areas, and highlighting the outline of the pole piece.
[0116] Exemplarily, histogram equalization processing can be local histogram processing, which is also a contrast enhancement method. It can also enhance the contrast in the image and avoid amplifying the noise that may exist in the image, so that the object to be detected in the image is more obvious and easier to identify than other areas, and the details of the pole piece can be highlighted.
[0117] In an embodiment of the present application, the above-mentioned step S141 and step S142 may be performed simultaneously or in a distributed manner, and step S141 may be performed before step S142 or after step S142.
[0118] Different features of the pole piece can be distinguished by two different image enhancement processes, and the detection image of the battery to be tested obtained based on the first preprocessed image and the second preprocessed image can highlight the different features of the pole piece.
[0119] According to some embodiments of the present application, step S143 includes:
[0120] Step S1431: performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain a detection image of the battery to be tested.
[0121] The purpose of image fusion is not only to reduce the amount of data, but also to construct images that are more suitable and easier to understand for human and machine perception. Image fusion is the process of combining relevant information from two or more images into one image, so that the resulting image will have more information than any of the input images.
[0122] Through image fusion processing, the information in the first preprocessed image and the second preprocessed image can be input into the detection image, increasing the data dimension so that the detection image can include more information and improving the subsequent detection accuracy.
[0123] According to some embodiments of the present application, step S143 includes:
[0124] Step S1431: performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain a third preprocessed image of the battery to be tested.
[0125] The third pre-processed image includes 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 pieces and the second pole pieces are different.
[0126] Step S1432: Determine the first pole piece fitting line and the second pole piece fitting line based on the third preprocessed image to obtain an auxiliary detection image of the battery to be tested, the first pole piece fitting line is the fitting center line of the first pole piece, and the second pole piece fitting line is the fitting center line of the second pole piece.
[0127] Step S1433: performing image fusion processing on the first preprocessed image, the second preprocessed image and the auxiliary detection image to obtain a detection image of the battery to be tested.
[0128] 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 can better fit the corresponding pole piece characteristics on the basis of conforming to the arrangement rules of the first pole piece and the second pole piece.
[0129] In the auxiliary detection image of the battery to be tested, the first pole piece in the detection image is characterized by the first pole piece fitting line, and the second pole piece in the detection image is characterized by the continuous second pole piece fitting line. When the contour or pole piece feature of the auxiliary detection image is discontinuous, a relatively accurate pole piece feature can be obtained through the continuous pole piece fitting line. This makes the pole piece feature more obvious in the auxiliary detection image compared with the first pre-processed image and the second pre-processed image.
[0130] In the embodiments of the present application, the detection image obtained by fusing three images has more information than the detection image obtained by fusing two images, thereby further improving the subsequent detection accuracy.
[0131] The detection image obtained by fusing the two images has fewer processing steps and higher detection efficiency.
[0132] According to some embodiments of the present application, the method further includes:
[0133] Step S40: determining the electrode sheet gap of the battery to be tested based on the distance along the first direction between the adjacent first electrode sheet fitting line and the second electrode sheet fitting line in the auxiliary detection image.
[0134] 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.
[0135] In the related art, the pole piece excess and the pole piece gap are detected by two images respectively, and the two images need to be processed separately, resulting in low detection efficiency. The method provided in the embodiment of the present application can be used to detect both the pole piece excess and the pole piece gap, that is, two feature detections of the battery to be tested can be realized through one image, thereby improving information utilization.
[0136] According to some embodiments of the present application, before step S12, the method further includes:
[0137] Step S15: performing noise reduction processing on the initial image.
[0138] Exemplarily, the noise reduction process includes at least one of mean filter noise reduction, Gaussian filter noise reduction, and three-dimensional block matching noise reduction.
[0139] Exemplarily, step S15 includes: firstly performing mean filter denoising processing on the initial image, then performing Gaussian filter denoising processing on the initial image, then performing three-dimensional block matching denoising processing on the initial image, and finally extracting the reflected image from the denoised image. Then, according to the above step S12, the initial image is subjected to gradient compression processing to obtain a compressed gradient image of the battery to be tested.
[0140] In the embodiment of the present application, by performing noise reduction processing on the initial image, random noise such as quantum noise, aliasing noise, electronic noise, etc. in the initial image can be removed, thereby greatly improving the signal-to-noise ratio of the initial image.
[0141] According to some embodiments of the present application, step S12 includes:
[0142] Step S121: extracting a gradient image of the initial image.
[0143] Step S122: performing gradient compression processing on the gradient image to obtain a compressed gradient image of the battery to be tested.
[0144] In an embodiment of the present application, the above step S121 may include:
[0145] Step S1211: extracting a first gradient image and a second gradient image of the initial image along a first direction and a second direction respectively.
[0146] In an embodiment of the present application, the first direction may be a pixel row direction in the initial image, and the second direction may be a pixel column direction in the initial image.
[0147] In an embodiment of the present application, the above step S122 may include:
[0148] Step S1221: using a feature pyramid algorithm to process the first gradient image and the second gradient image to obtain a contour image, wherein each pixel point in the contour image includes a gradient amplitude.
[0149] Step S1222: using a gradient domain dynamic range compression algorithm to process the gradient amplitude of each pixel in the contour image to obtain a compressed value of each pixel.
[0150] In an embodiment of the present application, the compression value of each pixel includes a first compression component along a first direction and a second compression component along a second direction.
[0151] Step S1223: extracting the gradient value of each pixel in the first gradient image.
[0152] Step S1224: obtaining a compressed gradient value of each pixel based on the gradient value of each pixel in the first gradient image and the first component of the compressed value of each pixel.
[0153] Step S1225: Obtain a first compressed gradient image based on the compressed gradient value of each pixel.
[0154] Step S1226: extracting the gradient value of each pixel in the second gradient image.
[0155] Step S1227: obtaining a compressed gradient value for each pixel based on the gradient value of each pixel in the second gradient image and the second component of the compressed value of each pixel.
[0156] Step S1228: Obtain a second compressed gradient image based on the compressed gradient value of each pixel.
[0157] The compressed gradient image of the battery to be tested includes a first compressed gradient image and a second compressed gradient image.
[0158] 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 initial image and the grayscale value of the previous pixel point on the initial image, the corresponding pixel point on the initial image and the previous pixel point on the initial image are arranged adjacent to each other along the first direction, and the previous pixel point on the initial image is located in front of the corresponding pixel point on the initial image along the first direction. The magnitude of the gradient value indicates the magnitude of the grayscale value change of the detection image between the pixel point and the adjacent pixel point. The larger the gradient value, the greater the grayscale value change of the detection image between the pixel point and the adjacent pixel point.
[0159] 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.
[0160] In an embodiment of the present application, a gradient image is subjected to gradient compression processing to obtain a compressed gradient image of the battery to be tested, so that the gradient value in the compressed gradient image is less than the gradient value in the gradient image, and the change in the grayscale value in the reconstructed image obtained by compressing the gradient image is 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.
[0161] The embodiment of the present application provides a battery detection device, Figure 5 A block diagram of a battery detection device provided in an embodiment of the present application is shown in FIG. Figure 5 The device includes: an acquisition module 501, which is configured to acquire a detection image of 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 polarities of the first pole piece and the second pole piece are different; a first determination module 502, which is configured to determine a first endpoint of the first pole piece and a second endpoint of the second pole piece based on the detection image, wherein the first endpoint is a point of the first pole piece that is closest to a first boundary of the detection image, and the second endpoint is a point of the second pole piece that is closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; a second determination module 503, which is configured to determine the pole piece excess amount of the battery to be tested based on the first endpoint and the second endpoint that are adjacent along the first direction.
[0162] For the specific definition of the battery detection device, please refer to the definition of the battery detection method above, which will not be repeated here. Each module in the above-mentioned battery detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0163] The embodiment of the present application provides a segmentation model training method for battery detection. Figure 6 A flow chart of a battery detection segmentation model training method provided in an embodiment of the present application. Figure 6 , training methods include:
[0164] Step S61: Acquire a sample image including a sample battery.
[0165] The sample image includes a plurality of first sample pole pieces and a plurality of second sample pole pieces of the sample battery that are alternately arranged along a first direction.
[0166] Step S62: Obtain the real pole piece mask image corresponding to the sample image.
[0167] The real pole piece mask image includes a real background area and multiple real end mask areas, and the multiple real end mask areas include a first real end mask area corresponding to the end area of the first sample pole piece and / or a second real end mask area corresponding to the end area of the second sample pole piece.
[0168] Step S63: input the sample image into the segmentation model to be trained, and obtain the predicted polar mask image output by the segmentation model.
[0169] Step S64: Calculate the loss value based on the actual pole piece mask diagram and the predicted pole piece mask diagram.
[0170] Step S65: Adjust the parameters of the segmentation model based on the loss value.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] The pole piece mask image output by the trained segmentation model can only mark the head of the pole piece in the detection image and output the complete pole piece mask area. Using the real mask area as the true value of the training segmentation model can improve the accuracy of the segmentation model prediction and restore the characteristics of the pole piece to a certain extent, which is convenient for subsequent measurement.
[0175] According to some embodiments of the present application, step S61 includes:
[0176] Step S611: Acquire a sample initial image of a sample battery.
[0177] Step S612: performing gradient compression processing on the sample initial image to obtain a sample compressed gradient image of the sample battery.
[0178] Step S613: performing image reconstruction based on the sample compressed gradient image to obtain a sample reconstructed image of the sample battery.
[0179] Step S614: Perform image enhancement processing on the sample reconstructed image to obtain a sample image of the sample battery.
[0180] In an embodiment of the present application, the method of obtaining a sample image of a sample battery is the same as the method of obtaining a detection image of a battery to be tested, so that the subsequent trained model processes the detection image more accurately.
[0181] According to some embodiments of the present application, step S614 includes:
[0182] Step S6141: performing contrast enhancement processing on the sample reconstructed image to obtain a first sample preprocessed image of the sample battery.
[0183] Step S6142: Perform histogram equalization processing on the sample reconstructed image to obtain a second sample preprocessed image of the sample battery.
[0184] Step S6143: performing image fusion processing on the first sample preprocessed image and the second sample preprocessed image to obtain a sample image of the sample battery.
[0185] The two pre-processed images are fused into sample images and then annotated to create a training data set, so that the sample detection images used for training and the detection images used for detection are obtained through the same type of side processing method, which can make the trained segmentation model process the detection images more accurately.
[0186] According to some embodiments of the present application, step S62 includes:
[0187] Step S621: marking a first marking point corresponding to the end of the first sample pole piece based on the sample image, and marking a second marking point corresponding to the end of the second sample pole piece.
[0188] Step S622: Based on the marked first annotation point and the preset first expansion value, obtain the first real end mask area corresponding to the end of the first sample pole piece; based on the marked second annotation point and the preset second expansion value, obtain the second real end mask area corresponding to the end of the second sample pole piece.
[0189] In an embodiment of the present application, based on the sample image, the steps of marking a first marking point corresponding to the first sample pole piece and marking a second marking point corresponding to the second sample pole piece can be completed by manual marking.
[0190] The preset first extension value can be obtained through the empirical value of the first sample pole piece. As an optional implementation, the first marked area can be a rectangle. After the first marked point is obtained, the first marked point is expanded along the first direction and the second direction respectively. Based on the preset first extension value, the first marked point is the first marked area (that is, the real mask area corresponding to the end of the first pole piece). At this time, the first marked area can be a parallelogram, and the long side and the short side of the parallelogram are both twice the first extension value. As another optional implementation, the first marked area can be a circle. After the first marked point is obtained, the circle is formed after the first marked point, and the first extension value is used as the radius for expansion. The first marked point is the first marked area (that is, the real mask area corresponding to the end of the first pole piece). At this time, the first marked area is a circle.
[0191] The preset second extension value can be obtained through the empirical value of the second sample pole piece. As an optional implementation, the second annotation area can be a rectangle. After the second annotation point is obtained, the second annotation point is expanded along the first direction and the second direction respectively. Based on the preset second extension value, the second annotation point is the second annotation area (that is, the real mask area corresponding to the end of the second pole piece). At this time, the second annotation area can be a parallelogram, and the long side and the short side of the parallelogram are both twice the second extension value. As another optional implementation, the second annotation area can be a circle. After the second annotation point is obtained, the circle is formed after the second annotation point, and the second extension value is used as the radius for expansion. The second annotation point is the second annotation area (that is, the real mask area corresponding to the end of the second pole piece). At this time, the second annotation area is a circle.
[0192] Marking only two points on a sample pole piece can reduce the difficulty of marking, reduce the workload of marking, and improve the efficiency of marking.
[0193] The embodiment of the present application provides a segmentation model training device for battery detection. Figure 7 A block diagram of a battery detection segmentation model training device provided in an embodiment of the present application. Figure 7The training device includes: a sample acquisition module 701, which 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 module 702, which is configured to 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 end mask areas, wherein the plurality of real end mask areas include a first real end mask area corresponding to an area where an end of the first sample pole piece is located and / or a second real end mask area corresponding to an area where an end of the second sample pole piece is located; a sample prediction module 703, which is 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 704, which is 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 705, which is configured to adjust the parameters of the segmentation model based on the loss value.
[0194] For the specific limitations of the segmentation model training device for battery detection, please refer to the limitations of the segmentation model training method for battery detection above, which will not be repeated here. Each module in the above-mentioned segmentation model training device for battery detection can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0195] An embodiment of the present application provides a battery production method, the method comprising: step S801: detecting the excess amount of the electrode of the battery to be tested to determine the quality test result of the battery to be tested.
[0196] In step S801, any battery detection method in the above embodiments may be used to detect the excess amount of the electrode of the battery to be tested.
[0197] By testing the battery using the above battery testing method, it is possible to determine whether the battery is qualified based on the excess amount of the electrode piece, thereby determining the quality test result of the battery to be tested.
[0198] Exemplarily, when all the electrode excess amounts are within a preset range, the battery to be tested can be determined to be qualified, and when the excess amount of any battery among all the electrode excess amounts is not within the preset range, the battery to be tested can be determined to be unqualified.
[0199] According to some embodiments of the present application, the method further includes:
[0200] Step S802: In response to the quality inspection result of the battery to be tested being unqualified, the unqualified battery is discarded.
[0201] Eliminating unqualified batteries can reduce the possibility of safety accidents caused by unqualified batteries.
[0202] An embodiment of the present application provides an electronic device, which includes: 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 of any one of the above embodiments, the training method of any one of the above embodiments, or the battery production method of any one of the above embodiments.
[0203] An embodiment of the present application provides a battery production device, including the electronic device in the above embodiment.
[0204] An embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the battery detection method of any one of the above embodiments, the training method of any one of the above embodiments, or the battery production method of any one of the above embodiments.
[0205] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the battery detection method of any one of the above embodiments, the training method of any one of the above embodiments, or the battery production method of any one of the above embodiments.
[0206] An embodiment of the present application provides a battery detection method, the method comprising:
[0207] Step S901: acquiring an initial image of the battery to be tested, and performing noise reduction processing on the initial image.
[0208] Step S902: performing gradient compression processing on the initial image after the noise reduction processing to obtain a compressed gradient image of the battery to be tested.
[0209] Step S903: performing image reconstruction based on the compressed gradient image to obtain a reconstructed image of the battery to be tested.
[0210] Step S904: performing contrast enhancement processing on the reconstructed image to obtain a first pre-processed image of the battery to be tested.
[0211] Step S905: performing histogram equalization processing on the reconstructed image to obtain a second pre-processed image of the battery to be tested.
[0212] Step S906: performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain a detection image of the battery to be tested.
[0213] The detection image includes 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 pieces and the second pole pieces are different. The first pole pieces and the second pole pieces in the detection image both extend along a second direction, and the first direction is perpendicular to the second direction.
[0214] Step S907: input the detection image into the segmentation model to obtain the pole piece mask image output by the segmentation model.
[0215] The pole piece mask diagram includes a background area and multiple end mask areas, each end mask area corresponds to the area where the end of the first pole piece is located or the area where the end of the second pole piece is located, the end of the first pole piece is the end of the first pole piece close to the first boundary, and the end of the second pole piece is the end of the second pole piece close to the first boundary.
[0216] Step S908: Determine the first endpoint of the first pole piece and the second endpoint of the second pole piece based on the pole piece mask image.
[0217] Step S909: determining the excess amount of the electrode of the battery to be tested based on the distance along the second direction between the first endpoint and the second endpoint adjacent to each other along the first direction.
[0218] 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 of the 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 a first endpoint of the first pole piece and a second endpoint of the second pole piece based on the detection image, wherein the first endpoint is a point of the first pole piece closest to a first boundary of the detection image, and the second endpoint is a point of the second pole piece closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; The pole piece excess amount of the battery to be tested is determined based on the first endpoint and the second endpoint adjacent to each other along the first direction.
2. The method according to claim 1, characterized in that The determining, based on the detection image, a first endpoint of the first pole piece and a second endpoint of the second pole piece comprises: 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 end mask areas, each of the end mask areas corresponds to an area where an end of the first pole piece is located or an area where an end of the second pole piece is located, the end of the first pole piece is an end of the first pole piece close to the first boundary, and the end of the second pole piece is an end of the second pole piece close to the first boundary; A first endpoint of the first pole piece and a second endpoint of the second pole piece are determined based on the pole piece mask image.
3. The method according to claim 2, characterized in that The plurality of end mask regions include a plurality of first end mask regions and a plurality of second end mask regions, wherein the first end mask regions correspond to regions where the ends of the first pole piece are located, and the second end mask regions correspond to regions where the ends of the second pole piece are located; The first endpoint is located at the center of the first end mask area; The second end point is located at the center of the second end mask area.
4. The method according to any one of claims 1 to 3, characterized in that The determining of the electrode sheet excess amount of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction includes: Based on the first endpoint and the second endpoint that are adjacent to each other along the first direction, determining a first distance between the first endpoint and the second endpoint that are adjacent to each other along the second direction, wherein the second direction is perpendicular to the first direction; The pole piece excess amount of the battery to be tested is determined based on the first distance.
5. The method according to any one of claims 1 to 4, characterized in that Obtain the test image of the battery to be tested, including: Acquiring an initial image of the battery to be tested; Performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested; Performing image reconstruction based on the compressed gradient image to obtain a reconstructed image of the battery to be tested; Perform image enhancement processing on the reconstructed image to obtain a detection image of the battery to be tested.
6. The method according to claim 5, characterized in that Performing image enhancement processing on the reconstructed image to obtain a detection image of the battery to be tested, including: Performing contrast enhancement processing on the reconstructed image to obtain a first preprocessed image of the battery to be tested; Performing histogram equalization processing on the reconstructed image to obtain a second preprocessed image of the battery to be tested; A detection image of the battery to be tested is obtained based on the first preprocessed image and the second preprocessed image.
7. The method according to claim 6, characterized in that Obtaining a detection image of the battery to be tested based on the first preprocessed image and the second preprocessed image, comprising: The first preprocessed image and the second preprocessed image are subjected to image fusion processing to obtain a detection image of the battery to be tested.
8. The method according to claim 6, characterized in that Obtaining a detection image of the battery to be tested based on the first preprocessed image and the second preprocessed image, comprising: Performing image fusion processing on the first preprocessed image and the second preprocessed image to obtain a third preprocessed image of the battery to be tested, wherein the third preprocessed 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 the first direction, wherein the first pole pieces and the second pole pieces have different polarities; Determine a first pole piece fitting line and a second pole piece fitting line based on the third preprocessed image to obtain an auxiliary detection image of the battery to be tested, wherein the first pole piece fitting line is a fitting center line of the first pole piece, and the second pole piece fitting line is a fitting center line of the second pole piece; Perform image fusion processing on the first preprocessed image, the second preprocessed image and the auxiliary detection image to obtain a detection image of the battery to be tested.
9. The method according to claim 8, characterized in that The method further comprises: Based on the distance along the first direction between the first pole piece fitting line and the second pole piece fitting line adjacent to each other in the auxiliary detection image, the pole piece gap of the battery to be tested is determined.
10. The method according to any one of claims 5 to 9, characterized in that Before performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested, the method further includes: The initial image is subjected to noise reduction processing.
11. The method according to any one of claims 5 to 10, characterized in that Performing gradient compression processing on the initial image to obtain a compressed gradient image of the battery to be tested includes: Extracting a gradient image of the initial image; Performing gradient compression processing on the gradient image to obtain a compressed gradient image of the battery to be tested.
12. A battery detection device, characterized in that: The device comprises: An acquisition module is configured to acquire a detection image of the 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 first determination module is configured to determine a first endpoint of the first pole piece and a second endpoint of the second pole piece based on the detection image, wherein the first endpoint is a point of the first pole piece closest to a first boundary of the detection image, and the second endpoint is a point of the second pole piece closest to the first boundary of the detection image, and in the detection image, the first boundary extends along the first direction, and the first boundary does not intersect with the first pole piece and the second pole piece; The second determination module is configured to determine the pole piece excess amount of the battery to be tested based on the first endpoint and the second endpoint adjacent to each other along the first direction.
13. 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 multiple real end mask areas, wherein the multiple real end mask areas include a first real end mask area corresponding to an area where an end of the first sample pole piece is located and / or a second real end mask area corresponding to an area where an end of 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.
14. The training method according to claim 13, characterized in that: Get a sample image containing a sample battery, including: Acquiring a sample initial image of the sample battery; Performing gradient compression processing on the sample initial image to obtain a sample compressed gradient image of the sample battery; Performing image reconstruction based on the sample compressed gradient image to obtain a sample reconstructed image of the sample battery; Perform image enhancement processing on the sample reconstructed image to obtain a sample image of the sample battery.
15. The training method according to claim 14, characterized in that: Performing image enhancement processing on the sample reconstructed image to obtain a sample image of the sample battery includes: Performing contrast enhancement processing on the sample reconstructed image to obtain a first sample preprocessed image of the sample battery; Performing histogram equalization processing on the sample reconstructed image to obtain a second sample preprocessed image of the sample battery; The first sample preprocessed image and the second sample preprocessed image are subjected to image fusion processing to obtain a sample image of the sample battery.
16. The training method according to any one of claims 13 to 15, characterized in that: Obtaining a real pole piece mask image corresponding to the sample image, including: Marking a first marking point corresponding to an end of the first sample pole piece based on the sample image, and marking a second marking point corresponding to an end of the second sample pole piece; Based on the marked first annotation point and the preset first expansion value, a first real end mask area corresponding to the end of the first sample pole piece is obtained; based on the marked second annotation point and the preset second expansion value, a second real end mask area corresponding to the end of the second sample pole piece is obtained.
17. 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, configured to obtain a real pole piece mask image corresponding to the sample image, the real pole piece mask image comprising a real background area and a plurality of real end mask areas, the plurality of real end mask areas comprising a first real end mask area corresponding to an area where an end of the first sample pole piece is located and / or a second real end mask area corresponding to an area where an end of 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 polar 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.
18. A battery production method, characterized in that: The method comprises: The battery detection method according to any one of claims 1 to 11 is used to detect the excess amount of the electrode of the battery to be tested, so as to determine the quality detection result of the battery to be tested.
19. The method according to claim 18, characterized in that The method further comprises: In response to the quality inspection result of the battery to be tested being unqualified, the unqualified battery is discarded.
20. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; 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 11 or the training method described in any one of claims 13 to 16 or the battery production method described in claim 18 or 19.
21. A battery production device, characterized in that: Comprising the electronic device as claimed in claim 20.
22. 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 11 or the training method according to any one of claims 13 to 16 or the battery production method according to claim 18 or 19 is implemented.
Citation Information
Patent Citations
Cell alignment degree detection method, system, device and apparatus
CN112053326A
Battery detection method and system
CN113030136A
Sky segmentation method, image defogging method, electronic equipment and storage medium
CN114004850A
Size detection device and detection method, and lamination equipment
CN115824062A
Battery cell alignment degree detection method, controller, detection device and storage medium
CN115841469A