Welding defect detection method, detection system, electronic equipment and storage medium
By automatically detecting the explosive points and weld information in the welding image of the battery cell, the problems of high cost, low efficiency and prone to missed inspection in the prior art are solved, and efficient and accurate welding defect detection is achieved.
Patent Information
- Application Number
- CN202411489667.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In the prior art, there are problems such as high manual inspection cost, low efficiency and easy to miss inspection during battery welding.
By acquiring the welding image of the battery cell, based on the image indicating the explosion point information and weld information, an automated detection method is adopted, including obtaining object segmentation images, segmenting with the Unet network, detecting the outline information of the explosion point and weld, and combining a variety of information to make comprehensive judgments to achieve automated detection of welding defects.
It improves the efficiency and accuracy of welding defect detection, and reduces labor costs and missed detection rate.
Smart Images

Figure CN119125165B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a welding defect detection method, a detection system, an electronic device and a storage medium. Background Art
[0002] At present, in the production process of power batteries, the quality of the laser welding seams around the top cover is crucial. If there are protrusions, pits, and uneven weld heights in the welds, these defects will affect the installation of the battery module and may easily cause damage during use, resulting in safety accidents.
[0003] In the related art, after the battery core welding is completed, manual inspection and judgment of welding defects are usually required. This method has the problem of high manual inspection cost and easy to miss the inspection because it is difficult for the human eye to distinguish defects. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a welding defect detection method, a detection system, an electronic device and a storage medium to improve the problems of high cost, low efficiency and easy missed detection in existing manual detection methods.
[0005] In a first aspect, an embodiment of the present application provides a welding defect detection method, the method comprising:
[0006] Get the welding image of the battery cell:
[0007] Based on the burst point information and weld seam information indicated by the welding image, detect whether the battery cell has welding defects, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness.
[0008] In the above implementation process, by detecting whether the battery cell has welding defects based on the burst point information and weld information indicated by the welding image, automatic detection of welding defects can be achieved, with higher detection efficiency, which can effectively reduce labor costs, time costs and missed detection rates.
[0009] Optionally, when the burst point information includes the burst point width, the burst point length and the burst point number, and the weld seam information includes the weld seam width, detecting whether the battery cell has a welding defect based on the burst point information and the weld seam information indicated by the welding image includes:
[0010] If the number of burst points is less than or equal to a set number, the length of the burst point is less than or equal to a set length, and the difference between the burst point width and the weld width is within a set range, it is determined that the battery cell has no welding defects.
[0011] In the above implementation process, by combining the burst point information and the weld seam information to comprehensively detect welding defects, the accuracy of welding defect detection can be effectively improved, thereby effectively screening out abnormal battery cells.
[0012] Optionally, when the burst point information includes burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness, detecting whether the battery cell has a welding defect based on the burst point information and weld seam information indicated by the welding image includes:
[0013] If the length of the burst point is less than or equal to the set length, the number of burst points is less than or equal to the set number, the thickness of the burst point is less than or equal to the set thickness, the difference between the burst point width and the weld width is within a set range, the weld length is greater than or equal to the preset length, the weld is not offset, and the weld thickness is within a set thickness range, it is determined that the battery cell has no welding defects.
[0014] In the above implementation process, more burst point information and weld information are used to perform weld defect detection, which can achieve comprehensive detection of weld defects and improve detection accuracy.
[0015] Optionally, the detecting whether the battery cell has a welding defect based on the burst point information and the weld seam information indicated by the welding image includes:
[0016] Determining the judgment priority of each information in the burst point information and the weld seam information;
[0017] Based on the judgment priority, each information is selected and judged in turn to detect whether the battery cell has a welding defect. When judging, if it is detected based on information with a higher priority that the battery cell does not have a welding defect, detection continues based on information with a lower priority.
[0018] In the above implementation process, information is selected and judged in sequence according to the judgment priority of each information. For example, if a defect of a certain information occurs more times, then the judgment priority is higher, and it can be judged first. If the corresponding conditions are met, it is directly determined that the battery cell has defects, and there is no need to judge other information, which can improve the detection efficiency of welding defects.
[0019] Optionally, the burst point information and weld seam information indicated by the welding image are obtained in the following manner:
[0020] Acquire an object segmentation image of the welding image, wherein the object segmentation image includes a burst point segmentation image and a weld segmentation image;
[0021] The burst point information in the burst point segmentation image is detected to obtain the burst point information, and the weld seam information in the weld seam segmentation image is detected to obtain the weld seam information.
[0022] In the above implementation process, the burst point and the weld are first segmented from the welding image, so that when the burst point information and the weld information are subsequently processed, the interference of background information on the detection result can be reduced.
[0023] Optionally, acquiring the object segmentation image of the welding image includes:
[0024] Using a first Unet network to obtain a flash point segmentation image of the welding image, wherein the first Unet network is obtained by training using a welding image containing flash point information;
[0025] A weld segmentation image of the welding image is obtained by using a second Unet network, and the second Unet network is obtained by training using a welding image containing weld information.
[0026] In the above implementation process, two Unet networks are trained to segment different objects respectively, so that each Unet network can learn specifically the features of the burst point or weld, and can learn and extract relevant features more accurately, thereby improving the accuracy of segmentation. In addition, the two Unet networks can also be processed independently in parallel to improve the efficiency of segmentation.
[0027] Optionally, the burst point information includes at least one of the burst point quantity, burst point width and burst point length, and the detecting the burst point information in the burst point segmentation image to obtain the burst point information includes:
[0028] The contour of the burst point in the burst point segmentation image is detected by using a contour detection function, and at least one of the number, width and length of the corresponding contour is obtained, wherein the number of the contour is the number of burst points, the width of the contour is the burst point width, and the length of the contour is the burst point length.
[0029] In the above implementation process, the contour detection function is used to detect the contour of the burst point in the burst point segmentation image, and the relevant information of the contour is obtained to obtain the burst point information. Since the contour can accurately reflect the boundary of the burst point, the width and length of the burst point and other information can be accurately detected.
[0030] Optionally, the burst point information further includes burst point thickness, and the detecting the burst point information in the burst point segmentation image to obtain the burst point information further includes:
[0031] A neural network model is used to predict the thickness of the burst points in the burst point segmentation image.
[0032] In the above implementation process, welding defects are also judged by detecting the thickness of the burst point. In this way, more information can be combined to screen out battery cells that meet the welding quality requirements to reduce missed inspections.
[0033] Optionally, the weld information includes weld width, and detecting the weld information in the weld segmentation image to obtain the weld information includes:
[0034] The contour of the weld in the weld segmentation image is detected using a contour detection function, and the width of the contour is determined as the weld width.
[0035] In the above implementation process, since the contour can accurately reflect the boundary of the weld, the width of the weld can be accurately obtained by obtaining the width of the contour.
[0036] Optionally, the detecting the contour of the weld in the weld segmentation image by using a contour detection function and determining the width of the contour as the weld width comprises:
[0037] Detecting the contour of the weld in the weld segmentation image using a contour detection function;
[0038] Determine a plurality of bounding boxes corresponding to the contour using a bounding box detection function, and obtain a width of each bounding box;
[0039] The width of the outline is determined according to the width of each bounding box, and the width of the outline is determined as the weld width.
[0040] In the above implementation process, since the weld is long and the width is not completely uniform, the weld width can be accurately determined according to the widths of multiple bounding boxes of the weld contour by detecting the widths of the multiple bounding boxes.
[0041] Optionally, the determining a plurality of bounding boxes corresponding to the contour by using a bounding box detection function includes:
[0042] A bounding box detection function is used to determine a plurality of bounding boxes for the contour in a length direction at intervals of n pixels, wherein a height of each bounding box is n pixels, and n is an integer greater than or equal to 1.
[0043] In the above implementation process, the contour is evenly divided into bounding boxes in the length direction, so that the heights of multiple bounding boxes are the same, which can accurately reflect the width of the contour at different positions and further accurately determine the weld width.
[0044] Optionally, acquiring the welding image of the battery core includes:
[0045] Acquire a collected initial welding image, wherein the initial welding image includes a battery cell area and a background area;
[0046] A battery cell region in the initial welding image is extracted to obtain a welding image including the battery cell region.
[0047] In the above implementation process, by extracting the welding image containing the battery cell area for subsequent detection, the influence of the background area in the initial welding image on the subsequent detection can be reduced.
[0048] Optionally, extracting the battery cell region in the initial welding image to obtain a welding image containing the battery cell region includes:
[0049] Acquire a binary image corresponding to the initial welding image by maximizing the inter-class variance method;
[0050] The binary image is subjected to morphological corrosion and expansion operations to obtain a welding image containing a battery core region.
[0051] In the above implementation process, the method of maximizing inter-class variance can automatically determine the global threshold of the image, which is not affected by brightness and contrast, so as to accurately segment the image into foreground and background. The erosion and expansion operations can effectively remove small objects in the image, improve image quality and reduce noise.
[0052] In a second aspect, an embodiment of the present application provides a welding defect detection system, the system comprising:
[0053] The industrial computer is used to send an image acquisition signal to the image acquisition device at the inspection station when the battery cell arrives at the inspection station;
[0054] The image acquisition device is used to acquire an image of the welding area of the battery cell in response to the image acquisition signal to obtain a welding image, and send the welding image to the industrial computer;
[0055] The industrial computer is further used to detect whether the battery cell has welding defects based on the burst point information and weld seam information indicated by the welding image, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness.
[0056] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which, when read and executed by a processor, execute the steps in the method provided in the first aspect above.
[0059] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A flow chart of a welding defect detection method provided in an embodiment of the present application;
[0062] Figure 2 A detailed flow chart of a welding defect detection method provided in an embodiment of the present application;
[0063] Figure 3 A detailed flow chart of another welding defect detection method provided in an embodiment of the present application;
[0064] Figure 4 A schematic diagram of the structure of a Unet network provided in an embodiment of the present application;
[0065] Figure 5 A schematic diagram of a normal welding image provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of a welding image of welding abnormality provided in an embodiment of the present application;
[0067] Figure 7 A schematic diagram of a burst point segmentation image provided in an embodiment of the present application;
[0068] Figure 8 A schematic diagram of a weld segmentation image provided in an embodiment of the present application;
[0069] Fig. 9 A schematic diagram of a collected welding image provided in an embodiment of the present application;
[0070] Fig.10 A schematic diagram of burst point information provided in an embodiment of the present application;
[0071] Fig.11 A schematic diagram of weld information provided in an embodiment of the present application;
[0072] Fig.12 A schematic diagram of final detection information provided in an embodiment of the present application;
[0073] Fig.13 A schematic diagram of a welding image including a battery cell area provided in an embodiment of the present application;
[0074] Fig.14 A structural block diagram of a welding defect detection system provided in an embodiment of the present application;
[0075] Fig.15 A structural block diagram of a welding defect detection device provided in an embodiment of the present application;
[0076] Fig.16 A schematic diagram of the structure of an electronic device for executing a welding defect detection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.
[0078] It should be noted that the terms "system" and "network" in the embodiments of the present invention can be used interchangeably. "Multiple" means two or more. In view of this, in the embodiments of the present invention, "multiple" can also be understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. 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 " / ", unless otherwise specified, generally indicates that the previously associated objects are in an "or" relationship.
[0079] At present, new energy batteries are more and more widely used in life and industry. New energy 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 vehicles, and aerospace and other fields. With the continuous expansion of the application field of power batteries, the market demand is also constantly expanding. In the embodiment of the present application, the battery cell involved may refer to a battery cell, which refers to a basic unit that can realize the mutual conversion of chemical energy and electrical energy, and can be used to make a battery pack of a battery module, so as to supply power to an electrical device. The battery cell can be a secondary battery, which refers to a battery cell that can be used to activate the active material by charging after the battery cell is discharged. The battery cell can be a lithium ion battery, a sodium ion battery, a sodium lithium ion battery, a lithium metal battery, a sodium metal battery, a lithium sulfur battery, a magnesium ion battery, a nickel hydrogen battery, a nickel cadmium battery, a lead-acid battery, etc., and the embodiment of the present application is not limited to this.
[0080] In the embodiment of the present application, the battery may be a single physical module including one or more battery cells to provide higher voltage and capacity. When there are multiple battery cells, the multiple battery cells are connected in series, in parallel or in hybrid connection through a busbar.
[0081] The quality of the laser welding seam of the battery top cover determines the safety performance of the battery. During the battery welding process, a weld will be left on the battery cell shell. Due to the instability of the welding process, there may be various defects in the welding, such as weld defects and explosion point defects.
[0082] The weld refers to the fusion area formed at the joint between two or more welded parts due to the melting and penetration of the welding material during the welding process.
[0083] Explosion point is also called explosion point or spatter. It is caused by the sudden vaporization and overflow of gas or impurities inside the material during welding, resulting in uneven concave and convex spots on the weld. Explosion point not only affects the appearance quality of the battery, but also affects the air tightness and structural strength of the battery, thus affecting the performance and safety of the battery.
[0084] Therefore, it is necessary to detect the weld defects on the battery cell casing to ensure the performance and safety of the battery. Currently, this is usually done through manual visual inspection, which has high manual inspection costs and is prone to missed inspections due to visual fatigue.
[0085] In order to solve the above technical problems, an embodiment of the present application provides a welding defect detection method, which detects whether there are welding defects in the battery cell based on the burst point information and weld information indicated by the welding image. In this way, automatic detection of welding defects can be achieved, the detection efficiency is higher, and labor costs, time costs and missed detection rates can be effectively reduced.
[0086] The battery obtained after the welding defect detection method provided in the embodiment of the present application can be used in, but not limited to, electrical devices such as vehicles, ships or aircraft. The power supply system of the electrical device can be composed of the battery pack and battery disclosed in the present application, which is conducive to alleviating and automatically adjusting the deterioration of the expansion force of the battery cell, replenishing the consumption of the electrolyte, and improving the stability of the battery performance and the battery life.
[0087] The battery obtained after the welding defect detection method provided in the embodiment of the present application can be used as a power supply for an electrical device, and the electrical device can be, but is not limited to, a mobile phone, a tablet, a laptop, an electric toy, an electric tool, a battery car, an electric car, a ship, a spacecraft, etc. Among them, the electric toy can include a fixed or mobile electric toy, for example, a game console, an electric car toy, an electric ship toy, an electric airplane toy, etc., and the spacecraft can include an airplane, a rocket, a space shuttle, a spacecraft, etc.
[0088] Please refer to Figure 1 , Figure 1 A flow chart of a welding defect detection method provided in an embodiment of the present application, the method comprising the following steps:
[0089] Step S110: Acquire a welding image of the battery cell.
[0090] For example, in an actual production line, after the battery cell is welded at a welding station, the production line transports the welded battery cell to a detection station, which is used to capture images of the welded battery cell to obtain a welding image. Alternatively, the battery cell can be welded at a welding station, and images of the battery cell during the welding process can be captured in real time to obtain a welding image.
[0091] Exemplarily, the executor of the welding defect detection method of the embodiment of the present application may be an industrial computer, which may be connected to an image acquisition device provided at the detection station, and the industrial computer may be connected to various automation equipment on the production line to realize control of various automation equipment.
[0092] When the battery cell arrives at the inspection station, the industrial computer is used to send an image acquisition signal to the image acquisition device at the inspection station. The image acquisition device is used to respond to the image acquisition signal, acquire an image of the welding area of the battery cell, obtain a welding image, and send the welding image to the industrial computer. The industrial computer can be used to detect whether there are weld defects in the battery cell based on the burst point information and weld information indicated by the welding image.
[0093] Exemplarily, relevant sensors may be provided at the inspection station. After detecting that the battery cell is in place, the sensor may transmit an in-place signal to the industrial computer, which then sends an image acquisition signal to the image acquisition device to control the image acquisition device to acquire the welding image. The image acquisition device transmits the acquired welding image to the industrial computer, so that the industrial computer can obtain the welding image.
[0094] Alternatively, the execution subject of the welding defect detection method of the embodiment of the present application may be a host computer, and the sensor may be directly connected to the host computer. After detecting that the battery cell is in place, the sensor transmits the in-place signal to the host computer. At this time, the host computer may control the image acquisition device to acquire images, and the image acquisition device may send the acquired images to the host computer, so that the host computer may also obtain the welding image. Alternatively, the host computer may be connected to an industrial computer, and the industrial computer may be connected to the sensor, the image acquisition device and other devices. The host computer may obtain the welding image sent by the image acquisition device from the industrial computer, and the host computer may send an image acquisition signal to the industrial computer to control the image acquisition device to acquire images through the industrial computer.
[0095] In some embodiments, the sensor may detect whether the battery cell has reached the inspection station by detecting the position, signal or other specific characteristics of the battery cell.
[0096] For ease of description, the industrial computer is used as the execution entity in the following embodiments.
[0097] In some other implementations, the image acquisition device may acquire images of each battery cell after it arrives at the inspection station, and then send the acquired images to the industrial computer for storage, or to other storage devices for storage. When welding defect detection is required, the industrial computer may obtain the stored welding images from its own memory or other devices, and then perform welding defect detection on these welding images. In order to distinguish the battery cells corresponding to these welding images, after acquiring the welding image of a certain battery cell, the image acquisition device may synchronously mark the identification of the battery cell on the welding image. In this way, when the industrial computer outputs the welding defect information, it may also synchronously mark the identification of the corresponding battery cell to distinguish the welding defect information of different battery cells, so as to facilitate the subsequent corresponding processing of each battery cell.
[0098] It can be understood that the image acquisition device can refer to the camera system on the inspection station, which can include components such as a camera, a light source, and a display interface. The display interface can be used to display the acquired image taken by the camera. Of course, the display interface can be on an industrial computer or a host computer. The display interface can be a human-computer interaction interface for on-site staff to adjust the parameters of the image acquisition device to improve the quality of the acquired image. The camera here can be a charge coupled device (CCD) camera, or a two-dimensional camera or a three-dimensional camera that can perform image acquisition.
[0099] It should be noted that the welding image collected here may refer to an image collected for the welding area of the battery cell, that is, the welding area of the battery cell is included in the welding image, so as to facilitate the subsequent detection of welding defect information in the welding area. The welding area may refer to the area where the weld is located on the battery cell casing after the battery cell is welded. The welding area includes but is not limited to: the weld area on the battery cell, the area outside the weld adjacent to the weld area, etc. Here, the weld area of the battery cell can be located at any position of the battery cell, such as the top cover area of the battery cell, the measurement of the battery cell, the bottom cover of the battery cell, etc.
[0100] To facilitate the acquisition of images of the welding area of the battery cell, after the battery cell arrives at the inspection station, the relevant adjustment equipment on the inspection station can be controlled by the industrial computer to adjust the posture of the battery cell. For example, the welding area can be facing the camera through rotation, shifting and other operations, and the battery cell can be lifted to a set height, etc., so that the camera can easily acquire the welding image including the welding area.
[0101] The welding image may contain all the information about the surface features of the welding area of the battery cell, such as shape, size, color, etc., so that subsequent image processing and analysis can detect whether there are defects in the welding area. Exemplarily, the welding image may include the following: the shape and size of the weld in the welding area: the shape, diameter, length, width and other dimensional information of the weld; the quality of the weld surface, including flatness, uniformity and possible defects or damage, such as: burst points; welding slag information outside the weld in the welding area: information such as the shape, position and size of the welding slag; color information of the welding area, such as the color of the surface of the welding area. In actual application scenarios, the welding image may also include other display content, which is not limited in any way in the embodiments of the present application.
[0102] Step S120: Based on the burst point information and weld seam information indicated by the welding image, detect whether the battery cell has welding defects.
[0103] The welding defect information may include burst point information and weld information. For example, the burst point information may include burst point width, burst point length, burst point number, burst point thickness and other information, and the weld information may include weld width, weld length, whether the weld is offset, weld thickness and other information.
[0104] Considering that in actual situations, if only judging weld defects or burst point defects is used to detect whether there are welding defects in the battery cell, inaccurate detection will be caused. For example, if burst points are detected on the weld, if they do not exist, it is considered that the battery cell does not have welding defects and the welding quality is qualified. If they exist, it is considered that the battery cell has welding defects and the welding quality is unqualified. For unqualified battery cells, wire filling and repair welding may be performed again. However, in this case, even if there are burst points, the welding quality is qualified (for example, the burst points are tiny and have little effect on the welding quality). At this time, the battery cells that cannot be repaired may be repaired, resulting in the formation of tiny particles or impurities inside the battery cells, forming abnormal battery cells. Therefore, in the present application scheme, the two information of burst point information and weld seam information are combined to judge the welding quality of the battery cell. For example, if the difference between the burst point width and the weld seam width is within the set range, even if there are burst points, it can be considered that there are no welding defects and the welding quality is qualified, and no further repair welding operation is required, or both the weld seam information and the burst point information must meet the corresponding conditions to be considered that there are no welding defects and the welding quality is qualified.
[0105] In some embodiments, welding defect detection software may be deployed in the industrial computer, and the software is used to execute the welding defect detection method of the embodiment of the present application. After receiving the welding image, the industrial computer can detect the burst point information and weld seam information in the welding image through the welding defect detection software. Here, the welding defect detection software can be implemented based on a trained neural network model. The neural network model can be a convolutional neural network model (CNN), a generative adversarial network model (GAN), etc. These neural network models can be trained by labeled defect sample images and supervised learning, wherein the sample image is labeled with defect information such as burst point information and weld seam information, and the neural network model is trained using a large number of sample images. After the training is completed, the trained neural network model can be used to detect welding defect information on the newly collected welding image.
[0106] In some embodiments, the burst point information may include at least one of the burst point number, burst point width, burst point length, and burst point thickness, and the weld information may include at least one of the weld width, weld length, weld thickness, and whether the weld is offset.
[0107] The number of burst points refers to the number of burst points in the welding image. Too many burst points affect the welding quality. For example, if the number of burst points is greater than the set number, it is considered that the battery cell has welding defects.
[0108] The burst point width refers to the width of each burst point in the welding image. If the burst point width is too wide, the welding quality will be affected. For example, if the burst point width is greater than the set width, it is considered that there is a welding defect in the battery cell.
[0109] The burst point length refers to the length of each burst point in the welding image. If the burst point is too long, the welding quality will be affected. For example, if the burst point length is greater than the set length, it is considered that there is a welding defect in the battery cell.
[0110] The burst point thickness refers to the thickness of each burst point in the welding image. Too thick a burst point will affect the welding quality. For example, if the burst point thickness is greater than the set thickness, it is considered that the battery cell has a welding defect.
[0111] The weld width refers to the width of the weld in the welding image. A weld that is too wide affects the welding quality. For example, if the weld width is greater than the preset width, it is considered that there is a welding defect in the battery cell.
[0112] The weld length refers to the length of the weld in the welding image. The structure of the battery cell may determine the minimum length of the weld to ensure the electrical connection and structural stability of the battery, so a sufficiently long weld is required to ensure a good electrical connection. A weld that is too short will affect the welding quality, such as loose welding, so if the weld length is less than the preset length, it can be considered that the battery cell has a welding defect.
[0113] Whether the weld is offset refers to the degree of offset between the position of the weld in the welding image and the reference position. For example, the reference position can be automatically identified by the welding defect detection software and marked in the welding image. The reference position can be preset and refers to the position to be welded. For example, the reference position can be marked on the battery cell, so that the reference position can be identified based on the mark in the collected welding image. After the welding defect detection software identifies the position of the weld as shown below, it can be compared with the base station position. If the difference between the two is greater than the set distance, it can be considered that the weld is offset, and at this time it can be considered that the battery cell has a welding defect.
[0114] The weld thickness refers to the thickness of the weld in the welding image. If the weld thickness is too thick or too thin, it may affect the welding quality. Therefore, if the weld thickness is not within the set thickness range, it is considered that the battery cell has a welding defect.
[0115] Therefore, it is possible to determine whether the battery cell has welding defects by determining whether at least one of the above information meets the corresponding determination conditions. In this way, by detecting the above burst point information and weld seam information, welding defects can be detected from multiple dimensions to ensure the comprehensiveness of the detection.
[0116] In the above implementation process, by detecting whether the battery cell has welding defects based on the burst point information and weld information indicated by the welding image, automatic detection of welding defects can be achieved, with higher detection efficiency, which can effectively reduce labor costs, time costs and missed detection rates.
[0117] In some embodiments, in actual situations, the burst point width, burst point length, burst point number, and weld seam width may have a greater impact on welding quality, so welding defects can be judged based on this information. That is, when the burst point information includes the burst point width, burst point length, and burst point number, and the weld seam information includes the weld seam width, in the method of detecting whether the battery cell has welding defects, it can be judged based on this information.
[0118] Specifically, if the number of burst points is less than or equal to the set number, the burst point length is less than or equal to the set length, and the difference between the burst point width and the weld width is within the set range, it is determined that the battery cell has no welding defects; otherwise, if any of the foregoing conditions is not met, it is determined that the battery cell has welding defects.
[0119] like Figure 2 As shown, the defect detection software pre-stores judgment thresholds such as set quantity, set length, and set range. After the defect detection software detects the number of burst points, burst point length, burst point width, and weld width from the welding image, it can make a comprehensive judgment based on this information. When making a specific judgment, this information can be judged in parallel, and these multiple judgment results can be combined to determine whether the battery cell has a welding defect. For example, as long as one of the judgment results is no, it is considered that the battery cell has a welding defect, and if all the judgment results are yes, it is considered that the battery cell does not have a welding defect. In this way, strict inspection of the welding quality of the battery cell can be achieved.
[0120] Among them, the set quantity, set length, and set range can be flexibly set according to the requirements for welding quality in actual conditions, and are not specifically limited here.
[0121] In the above implementation process, by combining the burst point information and the weld seam information to comprehensively detect welding defects, the accuracy of welding defect detection can be effectively improved, thereby effectively screening out abnormal battery cells.
[0122] In some other embodiments, in order to more strictly detect the welding quality of the battery cell, the detection can also be performed based on all the burst point information and all the weld information listed above, that is, when the burst point information includes the burst point width, burst point length, burst point number and burst point thickness, and the weld information includes the weld width, weld length, whether the weld is offset and the weld thickness, the method of detecting whether the battery cell has welding defects can be judged based on this information.
[0123] Specifically, if the length of the burst point is less than or equal to the set length, the number of burst points is less than or equal to the set number, the thickness of the burst point is less than or equal to the set thickness, the difference between the burst point width and the weld width is within the set range, the weld length is greater than or equal to the preset length, the weld is not offset, and the thickness after the weld is within the set thickness range, then it is determined that the battery cell does not have a welding defect. Otherwise, if any of the foregoing conditions is not met, it is determined that the battery cell has a welding defect.
[0124] The defect detection software pre-stores judgment thresholds such as set quantity, set length, set thickness, set range, preset length, set thickness range, etc. After the defect detection software detects the number of burst points, burst point length, burst point width, burst point thickness and weld width, weld length, weld thickness, and whether the weld is offset from the welding image, it can make a comprehensive judgment based on this information. When making a specific judgment, this information can be judged in parallel, and these multiple judgment results can be combined to determine whether the battery cell has a welding defect. For example, as long as one of the judgment results is no, it is considered that the battery cell has a welding defect, and if all the judgment results are yes, it is considered that the battery cell does not have a welding defect, so that strict inspection of the welding quality of the battery cell can be achieved.
[0125] Among them, judgment thresholds such as set quantity, set length, set thickness, set range, preset length, set thickness range, etc. can be flexibly set according to the requirements for welding quality in actual conditions, and are not specifically limited here.
[0126] In the above implementation process, more burst point information and weld information are used to perform weld defect detection, which can achieve comprehensive detection of weld defects and improve detection accuracy.
[0127] It can be understood that the above-mentioned burst point information and weld information may contain a variety of information. In actual situations, the information can be flexibly selected to judge the welding defects. If the selected information meets the corresponding judgment conditions, it can be determined that there are no welding defects in the battery cell. If any of the selected information does not meet the corresponding judgment conditions, it can be determined that there are welding defects in the battery cell.
[0128] In some other embodiments, when the burst point width and the weld width are used for comprehensive judgment, it can also be judged whether the burst point width is smaller than the weld width. If so, continue to judge other information. If not, it is considered that there is a welding defect. Alternatively, if the burst point width is smaller than the weld width, and the difference between the burst point width and the weld width is within a set range, and other information also meets the corresponding judgment conditions, it is considered that there is no welding defect, otherwise there is a welding defect.
[0129] In some embodiments, in order to improve detection efficiency, the judgment priority of each information in the burst point information and the weld information can be determined first, and then each information is selected based on the judgment priority for judgment in turn to detect whether there is a welding defect in the battery cell. When judging, if it is detected that there is no welding defect in the battery cell based on information with a higher priority, detection will continue based on information with a lower priority.
[0130] Among them, the judgment priority of each information can be determined according to the degree of influence of this information on welding quality in actual conditions. For example, the greater the influence, the higher the judgment priority, and the smaller the influence, the lower the judgment priority.
[0131] In some implementations, the judgment priority of each information may be set manually based on experience.
[0132] Alternatively, it can also be determined by counting the corresponding information, for example, the number of times each information in the historical welding defect detection results meets the corresponding judgment conditions can be counted, such as the number of times the burst point length is less than or equal to the set length, the number of times the burst point number is less than or equal to the set number, the number of times the burst point thickness is less than or equal to the set thickness, the number of times the difference between the burst point width and the weld width is within the set range, the number of times the weld length is greater than or equal to the preset length, the number of times the weld is not offset, the number of times the weld thickness is within the set thickness range, etc. If a certain information corresponds to a greater number of times, it indicates that the information usually will not go wrong during the welding process, and the fewer times a certain information corresponds, it indicates that the information is usually prone to errors during the welding process, so the highest judgment priority can be set for the information with the least number of times.
[0133] On the contrary, it can be understood that the number of times the burst point length is greater than the set length, the number of burst points is greater than the set number, the number of times the burst point thickness is greater than the set thickness, the number of times the difference between the burst point width and the weld width is not within the set range, the number of times the weld length is less than the preset length, the number of times the weld is offset, the number of times the weld thickness is not within the set thickness range, etc. in the historical welding defect detection results can also be counted. In this case, the more times, the higher the judgment priority, and the lower the number, the lower the judgment priority.
[0134] For example, the number of times the burst point length is less than or equal to the set length is the least, indicating that the probability of the defect that the burst point length is greater than the set length is the highest. At this time, the burst point length can be set to the highest judgment priority, that is, when judging, the burst point length and the set length can be judged first. If the burst point length is less than or equal to the set length, it is determined that there is no welding defect in the battery cell, and the detection continues. If the burst point length is greater than the set length, it is considered that there is a welding defect in the battery cell, and the subsequent detection will not continue, and the detection result can be directly output.
[0135] Taking the number of burst points, burst point width, and burst point length as examples, if the burst point number is determined to have the highest priority, the burst point length is the second highest, and the burst point width is the lowest, then during detection, gradient judgment can be achieved according to the judgment priority. Figure 3As shown, it can be determined whether the number of burst points n is less than or equal to the set number N. If so, it is further determined whether the burst point length h is less than or equal to the set length H. If not, it is considered that the battery cell has a welding defect. If the burst point length h is less than or equal to the set length H, it is further determined whether the difference between the burst point width w and the weld width W is within the set range X. If so, it is considered that the battery cell does not have a welding defect. If not, it is considered that the battery cell has a welding defect.
[0136] In the above implementation process, information is selected and judged in sequence according to the judgment priority of each information. For example, if a defect of a certain information occurs more times, then the judgment priority is higher, and it can be judged first. If the corresponding conditions are met, it is directly determined that the battery cell has defects, and there is no need to judge other information, which can improve the detection efficiency of welding defects.
[0137] On the basis of the above-mentioned embodiment, in this scheme, if the burst point information is to be detected, the outline of the burst point can be detected first, and then its width and length can be calculated. Therefore, the burst point and the weld can be segmented from the welding image first. Therefore, in the above-mentioned method of detecting the burst point information and the weld information in the welding image, the object segmentation map of the welding image can be obtained first, and the object segmentation image includes the burst point segmentation image and the weld segmentation image. Then, the burst point information in the burst point segmentation image is detected to obtain the burst point information, and the weld information in the weld segmentation image is detected to obtain the weld information.
[0138] Among them, image segmentation methods may include threshold segmentation, edge detection, region growing, watershed algorithm, clustering method, model-based method, deep learning method, Unet network, semantic segmentation, instance segmentation, etc.
[0139] Taking into account factors such as the configuration of the industrial computer on the production line and the production rhythm, this solution chooses to use the Unet network for image segmentation, which can meet the requirements of detection accuracy and speed.
[0140] Among them, the structure of the Unet network can be as follows Figure 4 As shown in the figure, the Unet network can be divided into three parts. The first part is the backbone feature extraction network, which can be used to obtain multiple feature layers, which can capture context information by continuously reducing the resolution of the feature map. The backbone feature extraction network includes convolutional layers and pooling layers, which are formed by stacking multiple convolutional layers and multiple pooling layers.
[0141] The second part is the weighted feature extraction network, which mainly upsamples the feature layer obtained in the first part and performs feature fusion to obtain a final effective feature layer that integrates all features.
[0142] The third part is the prediction network, which uses the effective feature layer to classify each feature point, which is equivalent to classifying each pixel point, thereby achieving object segmentation.
[0143] The Unet network introduces a skip connection in the second part, that is, connecting the feature map of the second part with the corresponding feature map of the first part. This connection method helps to better utilize the feature information of different levels in the second part, thereby improving the accuracy of image segmentation and the ability to retain details.
[0144] If the battery core welding is normal, the collected welding image can be Figure 5 As shown in the figure, if the battery core welding is abnormal, the collected image can be Figure 6 As shown in the figure, it can be seen that there are burst points. When conducting detection, the collected Figure 5 or Figure 6 The welding image is input into the Unet network for image segmentation. If the welding image contains hotspots, the Unet network can be used to segment the hotspot segmentation image from the welding image (such as Figure 7 ) and weld segmentation images (as shown Figure 8 as shown).
[0145] After obtaining the burst point segmentation image and the weld segmentation image, the relevant image processing algorithm can be used to detect the burst point information in the burst point segmentation image, and the weld information in the weld segmentation image. It is convenient to detect the burst point width, burst point length, burst point number and other information in the burst point segmentation image, and to detect the weld length, weld width and other information in the weld segmentation image.
[0146] In the above implementation process, the burst point and the weld are first segmented from the welding image, so that when the burst point information and the weld information are subsequently processed, the interference of background information on the detection result can be reduced.
[0147] On the basis of the above embodiment, when obtaining the object segmentation image, the first Unet network can be used to obtain the hot spot segmentation image of the welding image, and the first Unet network is obtained by training with the welding image containing hot spot information. The second Unet network is used to obtain the weld segmentation image of the welding image, and the second Unet network is obtained by training with the welding image containing weld information.
[0148] When training the first Unet network and the second Unet network, a large number of welding images containing burst point information and weld seam information can be collected. The training sample images of the first Unet network and the second Unet network can be the same or different. If they are the same training sample images, then when annotating, the annotation data used for training can be different. For example, for a training sample image, the image can be annotated twice to generate two annotated images, one annotated with burst point information and the other annotated with weld seam information. When annotating, two json annotation files (burst point and weld seam) can be generated for a training sample image, and then the burst point information and weld seam information are converted into label formats respectively, that is, the category information in the json annotation file is mapped to the pixel points of the corresponding training sample image, so that the image annotation can be completed.
[0149] The labeled training sample images can be input into the first Unet network and the second Unet network for training respectively. The specific training process is not described in detail here. After the training is completed, the trained first Unet network and the second Unet network can be obtained. When performing image segmentation, the obtained welding image can be input into the first Unet network and the second Unet network respectively, and the burst point segmentation image and the weld segmentation image can be obtained.
[0150] In the above implementation process, two Unet networks are trained to segment different objects respectively, so that each Unet network can learn specifically the features of the burst point or weld, and can learn and extract relevant features more accurately, thereby improving the accuracy of segmentation. In addition, the two Unet networks can also be processed independently in parallel to improve the efficiency of segmentation.
[0151] On the basis of the above embodiment, if the burst point information includes at least one of the burst point quantity, burst point width and burst point length, then in the method of detecting the burst point information in the burst point segmentation image, the contour detection function can be used to first detect the contour of the burst point in the burst point segmentation image, and obtain at least one of the quantity, width and length of the corresponding contour, the quantity of the contour is the quantity of the burst points, the width of the contour is the burst point width, and the length of the contour is the burst point length.
[0152] Among them, after obtaining the burst point segmentation image, the single-channel image can be thresholded, and the processing formula is as follows:
[0153] .
[0154] This formula can be used to realize binarization processing, obtain the binary image of the burst point, and then detect the contour in the binary image. represents the gray value of pixel (i, j), and T represents the threshold.
[0155] The contour detection function may be a function such as cv2.findContours() in an image processing library (such as OpenCV), or a function such as cv2.RETR_EXTERNAL. Of course, different image processing libraries may provide different contour detection functions. The contour detection function may be used to obtain the contours of the burst points in the burst point segmentation image. These contours are actually the boundaries of the burst points.
[0156] After detecting the outline of the burst point, the relevant functions in the image processing library can be used to calculate its bounding box. The bounding box is a rectangle that contains all the pixels within the outline, and its boundary touches the outermost pixels of the outline. In the image processing library OpenCV, the cv2.boundingRect() function can be used (the bounding box detection functions provided by different image processing libraries may be different) to calculate the bounding box of the outline, and a message containing the coordinates of the bounding box and the width and length of the bounding box can be obtained. The width of the bounding box can be used as the width of the outline, and the length of the bounding box can be used as the length of the outline. The number of outlines can be determined by the number of bounding box coordinates obtained. For example, if there are n bounding box coordinates, the number of outlines is n.
[0157] When the industrial computer outputs the burst point information, in order to facilitate the staff to directly view the burst point information, the cv2.rectangle function can be used on the welding image (welding image such as Fig. 9 Draw a bounding box in Fig.10 As shown, the cv2.putText function is used to add text annotations to the width and height information of the bounding box in the welding image, so that the staff can directly view the burst point information in the original welding image.
[0158] In the above implementation process, the contour detection function is used to detect the contour of the burst point in the burst point segmentation image, and the relevant information of the contour is obtained to obtain the burst point information. Since the contour can accurately reflect the boundary of the burst point, the width and length of the burst point and other information can be accurately detected.
[0159] On the basis of the above embodiments, in some cases, the welding defects can also be judged in combination with the burst point thickness, so the burst point information can also include the burst point thickness. In the method of detecting the burst point information in the burst point segmentation image, the neural network model can be used to predict the burst point thickness in the burst point segmentation image.
[0160] In order to facilitate accurate detection, the burst point segmentation image can contain burst point depth information, that is, the burst point segmentation image can be a depth image, so that the burst point thickness in the burst point segmentation image can be accurately detected by the neural network model, and the burst point thickness is the burst point depth. The neural network model here can be a convolutional neural network model, a fast convolutional neural network model, etc.
[0161] In some embodiments, in order to facilitate the acquisition of the burst point thickness, the collected welding image can also be a three-dimensional image, that is, a laser point cloud image. The burst point segmentation image obtained after segmentation is also a laser point cloud image. Since the laser point cloud image is a three-dimensional image and contains depth information, it is easy to detect the burst point thickness.
[0162] In some embodiments, two or more cameras may be used to capture welding images of the battery cells from different angles, so that image depth information can be calculated by capturing image differences, and the thickness of the burst point can be detected using a neural network model.
[0163] In some embodiments, the collected welding images may also include images collected from the front and images collected from the side. The images collected from the front can be used to identify the other flash point information and weld information mentioned above, and the images collected from the side can be used to identify the flash point thickness because they can collect the flash point thickness information.
[0164] It is understandable that the detection of weld thickness can also be achieved through a detection method similar to the detection of burst point thickness. For the sake of brevity of description, no further details will be given here.
[0165] In the above implementation process, welding defects are also judged by detecting the thickness of the burst point. In this way, more information can be combined to screen out battery cells that meet the welding quality requirements to reduce missed inspections.
[0166] Based on the above embodiment, if the weld information includes the weld width, in the method of detecting the weld information in the weld segmentation image, a contour detection function can be used to detect the contour of the weld in the weld segmentation image, and the width of the contour can be determined as the weld width.
[0167] It can be understood that after obtaining the weld segmentation image, the single-channel image can be thresholded, and the processing formula is as follows:
[0168] .
[0169] This formula can be used to realize binarization processing, obtain the binary image of the weld, and then detect the contour in the binary image. represents the gray value of pixel (i, j), and T represents the threshold.
[0170] The contour detection function may be a function such as cv2.findContours() in an image processing library (such as OpenCV), or a function such as cv2.RETR_EXTERNAL. Of course, different image processing libraries may provide different contour detection functions. The contour detection function can be used to obtain the contours of the weld in the weld segmentation image, and these contours are actually the boundaries of the weld.
[0171] After detecting the contour of the weld, you can use the relevant functions in the image processing library to calculate its bounding box. The bounding box is a rectangle that contains all the pixels within the contour, and its boundary touches the outermost pixels of the contour. In the image processing library OpenCV, you can use the cv2.boundingRect() function (different image processing libraries may provide different bounding box detection functions) to calculate the bounding box of the contour, and obtain a bounding box containing the coordinates and the width and length of the bounding box. The width of the bounding box can be used as the width of the contour, and the length of the bounding box can be used as the length of the contour, so that you can obtain information such as the width and length of the weld.
[0172] It can be understood that if the weld information also includes the weld length, the detection method of the weld length is similar to the detection method of the weld width, that is, the length of the above-mentioned boundary box can be used as the length of the contour, and the length of the contour is the weld length.
[0173] In the above implementation process, since the contour can accurately reflect the boundary of the weld, the width of the weld can be accurately obtained by obtaining the width of the contour.
[0174] Based on the above embodiment, since the weld is long and has different widths, it may not be very accurate to detect the width of the weld directly based on a bounding box. Therefore, a contour detection function may be used to detect the contour of the weld in the weld segmentation image, and then a bounding box detection function may be used to determine multiple bounding boxes corresponding to the contour, and the width of each bounding box may be obtained. Then, the width of the contour may be determined according to the width of each bounding box, and the width of the contour may be determined as the width of the weld.
[0175] Among them, multiple bounding boxes can be drawn in the weld segmentation image through a bounding box detection function (such as cv2.rectangle function). For example, multiple bounding boxes are drawn in sequence in the length direction of the contour. The multiple bounding boxes divide the contour into multiple parts. When drawing multiple bounding boxes, the height of each bounding box can be different. For example, the first bounding box contains 5 pixels in the length direction of the contour, and the second bounding box contains 6 pixels in the length direction of the contour, etc., so that multiple bounding boxes can be obtained.
[0176] Then, the width, height, coordinates and other information of each bounding box can be calculated using the cv2.boundingRect function. When determining the width of the contour, the maximum, minimum, average or median of the widths of multiple bounding boxes can be taken to determine the width of the final contour, thereby obtaining the width of the weld.
[0177] In the above implementation process, since the weld is long and the width is not completely uniform, the weld width can be accurately determined according to the widths of multiple bounding boxes of the weld contour by detecting the widths of the multiple bounding boxes.
[0178] In the above implementation process, in order to obtain a more accurate weld width, a bounding box detection function can also be used to determine multiple bounding boxes for the contour every n pixels in the length direction, where the height of each bounding box is n pixels, and n is an integer greater than or equal to 1.
[0179] Among them, a bounding box detection function (such as cv2.rectangle function) can be used to draw multiple bounding boxes every n pixels in the length direction of the contour in the weld segmentation image, such as Fig.11 As shown, the height of each bounding box in the vertical direction is n pixels, that is, the width of the rectangle is the same, but the length is different. In this way, the contour can be evenly divided into multiple bounding boxes to obtain a more accurate weld width.
[0180] In the above implementation process, the contour is evenly divided into bounding boxes in the length direction, so that the heights of multiple bounding boxes are the same, which can accurately reflect the width of the contour at different positions and further accurately determine the weld width.
[0181] On the basis of the above embodiment, when the industrial computer outputs the test results, in order to facilitate the staff to directly view the burst point information and weld information, Fig.10 and Fig.11 Specifically, the bounding box of the burst point outline and the bounding box of the weld outline can be drawn in the welding image through the cv2.rectangle function, as shown in Fig.12 As shown, the cv2.putText function is used to add text to the welding image to mark the width and height information of these bounding boxes, so that the staff can directly view the burst point information and weld information in the original welding image.
[0182] Based on the above embodiments, the embodiments of the present application can collect a large number of welding images. In order to perform accurate detection later, these welding images can also be preliminarily cleaned to select welding images for subsequent detection. The cleaning includes removing duplicate, damaged and irrelevant images.
[0183] Here, the removal of duplicate and irrelevant images can be achieved by comparing image similarity. For example, an image can be manually selected from multiple welding images as a standard image. The standard image can be a collected standard image containing burst points and welds. Then, each collected welding image is compared with the standard image for similarity (for example, the similarity can be calculated by feature matching, histogram comparison, image hashing, cosine similarity, etc.). If the similarity is greater than a first set threshold (for example, 90%), it is considered to be a duplicate image and can be deleted. If the similarity is less than a second set threshold (for example, 20%), it is considered to be an irrelevant image and can also be deleted. Otherwise, the remaining images can be retained for subsequent detection.
[0184] Damaged images can be judged by image format and image content recognition.
[0185] On the basis of the above embodiment, since the captured image may contain more background areas, in order to reduce the impact of the background on subsequent detection, the present solution may also first obtain the captured initial welding image, which includes the battery cell area and the background area, and then extract the battery cell area in the initial welding image to obtain a welding image including the battery cell area. The welding image including the battery cell area is used as the image for subsequent detection.
[0186] If the camera used to collect the initial welding image is a CCD device, the image it obtains is in bmp format. In the 8-bit bmp format initial welding image, there is an obvious difference in the grayscale value between the cell area and the background area. Therefore, the image can be segmented by setting an appropriate threshold to locate the area where the cell in the initial welding image is located, that is, the cell area, also called the region of interest, which is also called ROI (Region of Interest). Fig.13 shown.
[0187] In some embodiments, a machine learning method may be used to identify and locate the area where the battery cells are located in the initial welding image, so as to extract the battery cell area in the initial welding image.
[0188] In some implementations, the cell area may also be extracted using a related function in an image processing library.
[0189] In the above implementation process, by extracting the welding image containing the battery cell area for subsequent detection, the influence of the background area in the initial welding image on the subsequent detection can be reduced.
[0190] On the basis of the above embodiment, in the method of extracting the battery cell area, the maximization between-class variance method can also be used to obtain a binary image corresponding to the initial welding image, and then the binary image is subjected to morphological corrosion and expansion operations to obtain a welding image containing the battery cell area.
[0191] First, the 8-bit bmp color image can be converted into a grayscale image. The specific conversion formula is as follows:
[0192] ;
[0193] Among them, Red represents the value of the red component in the color image, Green represents the value of the green component in the color image, and Blue represents the value of the blue component in the color image. The weight value corresponding to each component can be set according to requirements, and Gray represents the pixel value of the output grayscale image.
[0194] After conversion to grayscale image, the initial welding image can be binarized by maximizing inter-class variance method. The maximizing inter-class variance method can automatically determine the global threshold of the image, which is not affected by brightness and contrast, thereby segmenting the image into foreground and background. When the threshold is t, the calculation formula is as follows:
[0195] (1);
[0196] in, represents the probability of a pixel being classified as a foreground pixel, Represents the average grayscale of pixels assigned to the foreground, 1- represents the probability that a pixel is classified as background, Represents the average grayscale of the pixels assigned to the background, and the cumulative mean of the grayscale level t is , Represents the grayscale value of the entire image.
[0197] According to the concept of variance, the expression is written as:
[0198] (2);
[0199] Substituting the above formula (1) into formula (2), we get:
[0200] (3);
[0201] Finally, it can be written as the following formula:
[0202] (4);
[0203] in, , i represents the gray value, Indicates the proportion of pixels with gray value i in the image.
[0204] Then, by using the method of maximizing the inter-class variance to solve the optimal threshold, we can find The t value that is maximized is used to binarize the initial welding image according to the optimal threshold. The processing formula can be expressed as follows:
[0205] (5);
[0206] Among them, img(i,j) represents the gray value of pixel (i,j) after binarization processing, threshold represents the optimal threshold obtained by the above-mentioned maximization of inter-class variance method, and val represents the maximum gray value in the image.
[0207] According to the above processing, the binary image corresponding to the initial welding image can be obtained, and then it can be combined with the connected region analysis through morphological opening operation. The former first corrodes and then expands the binary image, which can effectively remove small objects, isolated areas and fine edges while maintaining the shape of larger objects. The latter can mark and count these areas.
[0208] The erosion operation uses a small kernel called a structural element to slide on the image and perform convolution. For each pixel in the image, the pixels in the area covered by the structural element are updated according to certain rules, and the minimum pixel value is often taken as the new value of the center pixel. Suppose the input binary image is A, the structural element is B, and the erosion operation is The calculation formula is as follows:
[0209]
[0210] Where (i, j) represents the pixel coordinates in image A, (k, l) is the element coordinates in the structure element B, and the above formula (6) means that within the range of the structure element, the minimum value of all covered pixels is taken as the new pixel value.
[0211] The dilation operation enlarges or expands the objects in the image by sliding the structural element. The calculation formula is as follows:
[0212]
[0213] The calculation formula for opening operation is as follows:
[0214]
[0215] Connected region analysis first assigns a new label to each pixel based on the labels of its adjacent pixels. The calculation formula is as follows:
[0216]
[0217] in, It's pixels New tags, It's pixels The label set of the neighboring pixels.
[0218] Then, the area, bounding rectangle and other information of each region are counted, and the calculation formula is as follows:
[0219]
[0220] in, is the area of the region labeled label.
[0221] Finally, the label image and statistical information are output, and the area with the largest area is selected to obtain the extracted battery cell area.
[0222] In the above implementation process, the method of maximizing inter-class variance can automatically determine the global threshold of the image, which is not affected by brightness and contrast, so as to accurately segment the image into foreground and background. The erosion and expansion operations can effectively remove small objects in the image, improve image quality and reduce noise.
[0223] Please refer to Fig.14 , Fig.14 A structural schematic diagram of a welding defect detection system 200 provided in an embodiment of the present application, the system 200 includes an industrial computer 210 and an image acquisition device 220.
[0224] The industrial computer 210 is used to send an image acquisition signal to the image acquisition device 220 at the inspection station when the battery cell arrives at the inspection station.
[0225] The image acquisition device 220 is used to acquire an image of the welding area of the battery cell in response to the image acquisition signal, obtain a welding image, and send the welding image to the industrial computer 210 .
[0226] The industrial computer 210 is also used to detect whether the battery cell has welding defects based on the burst point information and weld seam information indicated by the welding image, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness.
[0227] Please refer to Fig.15 , Fig.15 This is a structural block diagram of a welding defect detection device 300 provided in an embodiment of the present application. The device 300 may be a module, program segment or code on an electronic device. It should be understood that the device 300 is similar to the above-mentioned Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device 300 can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0228] Optionally, the device 300 includes:
[0229] An image acquisition module 310 is used to acquire a welding image of a battery cell;
[0230] The defect detection module 320 is used to detect whether the battery cell has welding defects based on the burst point information and weld information indicated by the welding image, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld information includes at least one of weld width, weld length, whether the weld is offset and weld thickness.
[0231] Optionally, when the burst point information includes the burst point width, the burst point length and the number of burst points, and the weld information includes the weld width, the defect detection module 320 is used to determine that there is no welding defect in the battery cell if the number of burst points is less than or equal to a set number, the burst point length is less than or equal to a set length, and the difference between the burst point width and the weld width is within a set range.
[0232] Optionally, when the burst point information includes burst point width, burst point length, number of burst points and burst point thickness, and the weld information includes weld width, weld length, whether the weld is offset and weld thickness, the defect detection module 320 is used to determine that the battery cell does not have a welding defect if the burst point length is less than or equal to a set length, the number of burst points is less than or equal to a set number, the burst point thickness is less than or equal to a set thickness, the difference between the burst point width and the weld width is within a set range, the weld length is greater than or equal to a preset length, the weld is not offset and the weld thickness is within a set thickness range.
[0233] Optionally, the defect detection module 320 is used to determine the judgment priority of each information in the burst point information and the weld information; based on the judgment priority, each information is selected for judgment in turn to detect whether the battery cell has a welding defect, wherein, when judging, if it is detected that the battery cell does not have a welding defect based on information with a higher priority, then continue to detect based on information with a lower priority.
[0234] Optionally, the defect detection module 320 is also used to obtain an object segmentation image of the welding image, wherein the object segmentation image includes a hot spot segmentation image and a weld segmentation image; detect the hot spot information in the hot spot segmentation image to obtain the hot spot information, and detect the weld information in the weld segmentation image to obtain the weld information.
[0235] Optionally, the defect detection module 320 is used to obtain a hotspot segmentation image of the welding image using a first Unet network, wherein the first Unet network is obtained by training with a welding image containing hotspot information; and to obtain a weld segmentation image of the welding image using a second Unet network, wherein the second Unet network is obtained by training with a welding image containing weld information.
[0236] Optionally, the burst point information includes at least one of the number of burst points, the width of burst points and the length of burst points. The defect detection module 320 is used to detect the contours of the burst points in the burst point segmentation image using a contour detection function, and obtain at least one of the number, width and length of the corresponding contours, the number of the contours being the number of burst points, the width of the contours being the width of the burst points, and the length of the contours being the length of the burst points.
[0237] Optionally, the burst point information further includes burst point thickness, and the defect detection module 320 is used to predict the burst point thickness in the burst point segmentation image by using a neural network model.
[0238] Optionally, the weld information includes weld width, and the defect detection module 320 is used to detect the contour of the weld in the weld segmentation image using a contour detection function, and determine the width of the contour as the weld width.
[0239] Optionally, the defect detection module 320 is used to detect the contour of the weld in the weld segmentation image using a contour detection function; determine multiple bounding boxes corresponding to the contour using a bounding box detection function, and obtain the width of each bounding box; determine the width of the contour according to the width of each bounding box, and determine that the width of the contour is the weld width.
[0240] Optionally, the defect detection module 320 is used to determine a plurality of bounding boxes for the contour every n pixels in the length direction using a bounding box detection function, wherein the height of each bounding box is n pixels, and n is an integer greater than or equal to 1.
[0241] Optionally, the image acquisition module 310 is used to acquire a collected initial welding image, where the initial welding image includes a battery cell area and a background area; extract the battery cell area in the initial welding image to obtain a welding image including the battery cell area.
[0242] Optionally, the image acquisition module 310 is used to acquire a binary image corresponding to the initial welding image by maximizing the inter-class variance method; and perform morphological corrosion and expansion operations on the binary image to obtain a welding image containing a battery cell area.
[0243] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0244] Please refer to Fig.16 , Fig.16 A schematic diagram of the structure of an electronic device for executing a welding defect detection method provided in an embodiment of the present application, wherein the electronic device, such as an industrial computer, may include: at least one processor 410, such as a CPU, at least one communication interface 420, at least one memory 430 and at least one communication bus 440. Among them, the communication bus 440 is used to realize the connection and communication between these components. Among them, the communication interface 420 of the device in the embodiment of the present application is used to communicate signals or data with other node devices. The memory 430 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 430 can optionally also be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 430. When the computer-readable instructions are executed by the processor 410, the electronic device executes the above-mentioned Figure 1 The method process is shown.
[0245] Understandably, Fig.16 The structure shown is for illustration only, and the electronic device may also include Fig.16 More or fewer components as shown, or with Fig.16 Different configurations shown. Fig.16 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0246] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following is performed: Figure 1 The method process in the method embodiment shown is executed by the electronic device.
[0247] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above method embodiments, for example, including:
[0248] Get the welding image of the battery cell:
[0249] Based on the burst point information and weld seam information indicated by the welding image, detect whether the battery cell has welding defects, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness.
[0250] In summary, the embodiments of the present application provide a welding defect detection method, a detection system, an electronic device and a storage medium, which detect whether there are welding defects in the battery cell based on the burst point information and weld information indicated by the welding image. In this way, automatic detection of welding defects can be achieved, the detection efficiency is higher, and the labor cost, time cost and missed detection rate can be effectively reduced.
[0251] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0252] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0253] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0254] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0255] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A welding defect detection method, characterized in that: The method comprises: Get the welding image of the battery cell: Based on the burst point information and weld seam information indicated by the welding image, detecting whether the battery cell has a welding defect, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness; The burst point information and weld seam information indicated by the welding image are obtained in the following manner: Acquire an object segmentation image of the welding image, wherein the object segmentation image includes a burst point segmentation image and a weld segmentation image; Detecting the burst point information in the burst point segmentation image to obtain burst point information, and detecting the weld information in the weld segmentation image to obtain weld information; Wherein, in the case where the weld information includes weld width, detecting the weld information in the weld segmentation image to obtain the weld information includes: Detecting the contour of the weld in the weld segmentation image using a contour detection function; Determine a plurality of bounding boxes corresponding to the contour using a bounding box detection function, and obtain a width of each bounding box; The width of the outline is determined according to the width of each bounding box, and the width of the outline is determined as the weld width.
2. The method according to claim 1, characterized in that In a case where the burst point information includes the burst point width, the burst point length, and the burst point quantity, detecting whether the battery cell has a welding defect based on the burst point information and weld seam information indicated by the welding image includes: If the number of burst points is less than or equal to a set number, the length of the burst point is less than or equal to a set length, and the difference between the burst point width and the weld width is within a set range, it is determined that the battery cell has no welding defects.
3. The method according to claim 1, characterized in that In the case where the burst point information includes burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness, detecting whether the battery cell has a welding defect based on the burst point information and weld seam information indicated by the welding image includes: If the length of the burst point is less than or equal to the set length, the number of burst points is less than or equal to the set number, the thickness of the burst point is less than or equal to the set thickness, the difference between the burst point width and the weld width is within a set range, the weld length is greater than or equal to the preset length, the weld is not offset, and the weld thickness is within a set thickness range, it is determined that the battery cell has no welding defects.
4. The method according to claim 1, characterized in that: The detecting whether the battery cell has a welding defect based on the burst point information and the weld seam information indicated by the welding image includes: Determining the judgment priority of each information in the burst point information and the weld seam information; Based on the judgment priority, each information is selected and judged in turn to detect whether the battery cell has a welding defect. When judging, if it is detected based on information with a higher priority that the battery cell does not have a welding defect, detection continues based on information with a lower priority.
5. The method according to claim 1, characterized in that The step of acquiring an object segmentation image of the welding image comprises: Using a first Unet network to obtain a flash point segmentation image of the welding image, wherein the first Unet network is obtained by training using a welding image containing flash point information; A weld segmentation image of the welding image is obtained by using a second Unet network, and the second Unet network is obtained by training using a welding image containing weld information.
6. The method according to claim 1, characterized in that The burst point information includes at least one of the burst point quantity, burst point width and burst point length. The detecting the burst point information in the burst point segmentation image to obtain the burst point information includes: The contour of the burst point in the burst point segmentation image is detected by using a contour detection function, and at least one of the number, width and length of the corresponding contour is obtained, wherein the number of the contour is the number of burst points, the width of the contour is the burst point width, and the length of the contour is the burst point length.
7. The method according to claim 6, characterized in that The burst point information also includes burst point thickness, and the detecting the burst point information in the burst point segmentation image to obtain the burst point information further includes: A neural network model is used to predict the thickness of the burst points in the burst point segmentation image.
8. The method according to claim 1, characterized in that The determining a plurality of bounding boxes corresponding to the contour using a bounding box detection function comprises: A bounding box detection function is used to determine a plurality of bounding boxes for the contour in a length direction at intervals of n pixels, wherein a height of each bounding box is n pixels, and n is an integer greater than or equal to 1.
9. The method according to any one of claims 1 to 8, characterized in that: The step of obtaining the welding image of the battery core includes: Acquire a collected initial welding image, wherein the initial welding image includes a battery cell area and a background area; A battery cell region in the initial welding image is extracted to obtain a welding image including the battery cell region.
10. The method according to claim 9, characterized in that The extracting the battery cell area in the initial welding image to obtain a welding image containing the battery cell area includes: Acquire a binary image corresponding to the initial welding image by maximizing the inter-class variance method; The binary image is subjected to morphological corrosion and expansion operations to obtain a welding image containing a battery core region.
11. A welding defect detection system, characterized in that: The system comprises: The industrial computer is used to send an image acquisition signal to the image acquisition device at the inspection station when the battery cell arrives at the inspection station; The image acquisition device is used to acquire an image of the welding area of the battery cell in response to the image acquisition signal to obtain a welding image, and send the welding image to the industrial computer; The industrial computer is further used to detect whether the battery cell has welding defects based on the burst point information and weld seam information indicated by the welding image, wherein the burst point information includes at least one of burst point width, burst point length, burst point number and burst point thickness, and the weld seam information includes at least one of weld seam width, weld seam length, whether the weld seam is offset and weld seam thickness; The industrial computer is further used to obtain an object segmentation image of the welding image, wherein the object segmentation image includes a burst point segmentation image and a weld segmentation image; detect burst point information in the burst point segmentation image to obtain burst point information, and detect weld information in the weld segmentation image to obtain weld information; Among them, when the weld information includes the weld width, the industrial computer is specifically used to use a contour detection function to detect the contour of the weld in the weld segmentation image; use a bounding box detection function to determine multiple bounding boxes corresponding to the contour, and obtain the width of each bounding box; determine the width of the contour according to the width of each bounding box, and determine the width of the contour as the weld width.
12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 10 is executed.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is executed.
14. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 10 is executed.
Citation Information
Patent Citations
Power battery welding quality detection method
CN107093175A
Cylindrical cell seal welding quality detection method and device, electronic equipment and storage medium
CN114119497A
Method and device for detecting welding quality
CN114240877A
Welding detection method and system
CN117783147A
Cited By
Welding burst point detection and analysis method and system and storage medium
CN119952350A