Lithium battery current collector disc welding wire segmentation model generation method, system, device and medium
By analyzing and optimizing the convolutional module of the UNet-VGG model, and combining L1 pruning and nearest neighbor upsampling, a high-efficiency lithium battery current collector bonding wire segmentation model was generated, which solved the problem of insufficient computing resources in the existing technology and improved the segmentation efficiency.
Patent Information
- Application Number
- CN202511726916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-24
AI Technical Summary
Existing neural network models struggle to meet computational and storage requirements when used for current collector bonding wire segmentation on lithium battery production lines, resulting in low segmentation efficiency.
By analyzing the feature contribution and feature fusion efficiency of the convolutional modules in the UNet-VGG model, redundant modules were removed, and L1 pruning and nearest neighbor upsampling were used to generate the target model to reduce computational complexity.
It improves the segmentation efficiency of lithium battery current collector bonding wires, meeting the real-time requirements of the production line.
Smart Images

Figure CN121190480B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to, but is not limited to, the field of battery testing technology, and particularly to a method, system, device, and medium for generating a segmentation model of a lithium battery current collector bonding wire. Background Technology
[0002] In the lithium battery production process, the inspection and separation of current collector solder marks are key steps to ensure battery quality and safety.
[0003] Existing technologies use neural network models such as UNet-VGG for image recognition and segmentation. However, the neural network models used in existing technologies are complex and require a large amount of processor resources and storage space. On lithium battery production lines, processors are unable to meet the computational resource and storage space requirements of complex neural network models, which can easily lead to low segmentation efficiency of current collector bonding wires. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0005] The main objective of this invention is to provide a method, system, device, and medium for generating a segmentation model of lithium battery current collector bonding wires, which can generate a segmentation model that meets the requirements and improve the segmentation efficiency of lithium battery current collector bonding wires.
[0006] In a first aspect, embodiments of the present invention provide a method for generating a segmentation model of a lithium battery current collector bonding wire, comprising:
[0007] Acquire a target image, wherein the target image represents an image of the lithium battery current collector bonding wire;
[0008] The target image is input into a first model, which represents the original model used for image segmentation;
[0009] The feature contribution of each first convolutional module of the original VGG encoder in the first model is analyzed sequentially.
[0010] The first VGG encoder is obtained by performing convolution module deletion processing on the original VGG encoder based on the feature contribution degree. The convolution module deletion processing represents the deletion of one or more of the first convolution modules.
[0011] The feature map processed by the first VGG encoder is input into the original UNet decoder of the first model;
[0012] After replacing the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, the feature fusion efficiency of each second convolutional module is analyzed in turn.
[0013] The first UNet decoder is obtained by removing convolutional modules from the original UNet decoder based on the feature fusion efficiency.
[0014] The target model is obtained by performing L1 pruning on the first VGG encoder and the first UNet decoder. The target model is used to detect and segment the lithium battery current collector bonding wires. The L1 pruning is a structured pruning based on the L1 norm.
[0015] In some optional embodiments, the step of sequentially analyzing the feature contribution of each first convolutional module of the original VGG encoder in the first model includes:
[0016] Calculate the corresponding activation value and information entropy based on the input map and output feature map of each of the first convolutional modules;
[0017] The first contribution of each of the first convolutional modules is determined based on the activation value and the information entropy.
[0018] After freezing each of the first convolutional modules in sequence, the performance change of the first model is analyzed.
[0019] The second contribution of each of the first convolutional modules is determined based on the magnitude of the performance change.
[0020] The feature contribution is determined based on the first contribution and the second contribution.
[0021] In some optional embodiments, the step of sequentially freezing each of the first convolutional modules and then analyzing the performance change of the first model includes:
[0022] Perform the following steps sequentially on each of the first convolutional modules:
[0023] After freezing the module parameters, the first segmentation performance and the second segmentation performance of the first model are obtained. The first segmentation performance represents the segmentation accuracy and segmentation time of the first model before the module parameters are frozen, and the second segmentation performance represents the segmentation accuracy and segmentation time of the first model after the module parameters are frozen.
[0024] The magnitude of the performance change is determined based on the first segmentation performance and the second segmentation performance.
[0025] In some optional embodiments, obtaining the first VGG encoder by performing convolution module deletion processing on the original VGG encoder based on the feature contribution includes:
[0026] After arranging the contributions of each first convolutional module according to the feature contribution, a contribution table is obtained. The contribution table includes the feature contribution of each first convolutional module and the segmentation accuracy and segmentation time of the first model with different first convolutional modules.
[0027] The module to be deleted is determined in the contribution table according to the preset segmentation performance. The module to be deleted represents the first convolutional module to be deleted. The preset segmentation performance represents the preset segmentation accuracy and segmentation time.
[0028] The first VGG encoder is obtained by deleting the module to be deleted from the original VGG encoder.
[0029] In some optional embodiments, the step of sequentially analyzing the feature fusion efficiency of each of the second convolutional modules includes:
[0030] Different spatial information is determined based on the skip connection features obtained by each of the second convolutional modules from the first VGG encoder, wherein the skip connection features represent the features obtained from the first VGG encoder through skip connections.
[0031] The feature fusion efficiency of each of the second convolutional modules is determined based on the spatial information.
[0032] In some optional embodiments, obtaining the target model after performing L1 pruning on the first VGG encoder and the first UNet decoder includes:
[0033] Calculate the L1 norm of each first channel in the first VGG encoder;
[0034] The first channel with the smallest L1 norm is filtered and removed according to the preset pruning rate, and the weights and biases of the first convolution module on the first channel are set to zero.
[0035] Calculate the L1 norm of each second channel in the first UNet decoder;
[0036] Configure the second channel, which is used for wire bonding region activation and wire bonding edge gradient enhancement, as a non-deletable channel;
[0037] The second channel with the smallest L1 norm will be filtered and removed according to the preset pruning rate, and the weights and biases of the second convolution module on the second channel will be set to zero.
[0038] In some optional embodiments, after L1 pruning of the first VGG encoder and the first UNet decoder, the method further includes:
[0039] Obtain the performance parameters of the first VGG encoder and the first UNet decoder after L1 pruning;
[0040] The target model is obtained by adjusting the weights of the first VGG encoder and the first UNet decoder after L1 pruning based on the performance parameters.
[0041] Secondly, embodiments of the present invention provide a lithium battery current collector bonding wire segmentation model generation system, comprising:
[0042] The first module is used to acquire a target image, which represents an image of the lithium battery current collector bonding wire;
[0043] The second module is used to input the target image into the first model, whereby the first model represents the original model used for image segmentation.
[0044] The third module is used to sequentially analyze the feature contribution of each first convolutional module of the original VGG encoder in the first model; and to obtain the first VGG encoder by performing convolutional module deletion processing on the original VGG encoder based on the feature contribution. The convolutional module deletion processing represents the deletion of one or more first convolutional modules.
[0045] The fourth module is used to input the feature map processed by the first VGG encoder into the original UNet decoder of the first model.
[0046] The fifth module is used to replace the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, and then analyze the feature fusion efficiency of each second convolutional module in turn; and to obtain the first UNet decoder by deleting convolutional modules based on the feature fusion efficiency.
[0047] The sixth module is used to obtain a target model by performing L1 pruning on the first VGG encoder and the first UNet decoder. The target model is used to detect and segment lithium battery current collector bonding wires. The L1 pruning is a structured pruning based on the L1 norm.
[0048] Thirdly, embodiments of the present invention provide a lithium battery current collector bonding wire segmentation model generation device, comprising:
[0049] At least one processor;
[0050] At least one memory for storing at least one program;
[0051] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.
[0052] Fourthly, a computer storage medium stores computer-executable instructions for executing the lithium battery current collector bonding wire segmentation model generation method described in the first aspect.
[0053] The beneficial effects of this invention include: acquiring a target image, the target image representing an image of a lithium battery current collector bonding wire; inputting the target image into a first model, the first model representing an original model for image segmentation; sequentially analyzing the feature contribution of each first convolutional module of the original VGG encoder in the first model; obtaining a first VGG encoder by performing convolutional module deletion processing on the original VGG encoder based on the feature contribution, the convolutional module deletion processing representing the deletion of one or more first convolutional modules; inputting the feature map processed by the first VGG encoder into the original UNet decoder of the first model; replacing the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, and sequentially analyzing the feature fusion efficiency of each second convolutional module; obtaining a first UNet decoder by performing convolutional module deletion processing on the original UNet decoder based on the feature fusion efficiency; obtaining a target model by performing L1 pruning on the first VGG encoder and the first UNet decoder, the target model being used to detect and segment lithium battery current collector bonding wires, the L1 pruning representing structured pruning based on the L1 norm. Complex and redundant convolutional modules in the network are removed based on feature contribution and feature fusion efficiency. Nearest neighbor upsampling is used in the UNet decoder network to reduce computational complexity. L1 norm pruning of the convolutional modules further reduces complexity and computational cost, thereby effectively improving segmentation speed while maintaining model segmentation performance. Therefore, this application can generate a segmentation model that meets requirements and improves the segmentation efficiency of lithium battery current collector bonding wires.
[0054] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating the steps of a method for generating a lithium battery current collector bonding wire segmentation model according to an embodiment of the present invention.
[0056] Figure 2 This is a schematic diagram of a controller provided in one embodiment of the present invention.
[0057] Reference numerals: Controller 1000, Processor 1100, Memory 1200. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0059] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0060] This application provides a method, system, and storage medium for generating a lithium battery current collector bonding wire segmentation model, which will be described in detail in the following embodiments.
[0061] like Figure 1 As shown, this embodiment of the invention provides a method for generating a segmentation model of a lithium battery current collector bonding wire, including steps S100, S200, S300, S400, S500, S600, S700, and S800:
[0062] Step S100: Obtain the target image, which represents the image of the lithium battery current collector bonding wire.
[0063] Specifically, during model training and generation, target images are acquired through industrial cameras on the lithium battery production line to match the actual production scenario.
[0064] Step S200: Input the target image into the first model, whereby the first model represents the original model used for image segmentation.
[0065] Specifically, the target image representing the bonding wires of the lithium battery current collector is input into the first model (i.e., the original model used for image segmentation). The first model is built based on the UNet-VGG architecture. The VGG encoder on the left extracts features from the input image layer by layer through 13 convolutional modules: the shallow module captures low-level visual features such as the edges and textures of the bonding wires, while the deep module abstracts high-level semantic features such as the overall shape of the bonding wires and their distinguishability from the background. At the same time, the feature map size is gradually reduced through downsampling.
[0066] The multi-scale features extracted by the encoder are passed to the right-side UNet decoder via skip connections. The decoder contains eight convolutional modules. It first performs bilinear upsampling on the high-level low-resolution feature maps to restore their size, and then fuses them with the high-resolution feature maps of the corresponding layers of the encoder. After optimization by the convolutional modules, the spatial details of the feature maps are gradually improved. Finally, the model outputs two parts: one is the location marker of the weld wire (such as bounding boxes or key point coordinates) to realize the weld wire localization; the other is a segmentation mask of the same size as the input image (the area with a pixel value of 1 in the mask corresponds to the weld wire, and 0 is the background), which completes pixel-level segmentation, thereby achieving complete recognition and segmentation of the lithium battery current collector weld wires.
[0067] Step S300: Analyze the feature contribution of each first convolutional module of the original VGG encoder in the first model in sequence.
[0068] Specifically, the feature contribution of each first convolutional module was obtained by verifying and analyzing the impact of each convolutional module on the final segmentation. Among the 13 convolutional modules of the original VGG encoder, the shallow (convolutional modules 1-3) and middle (convolutional modules 4-6) modules have the highest contribution because they directly provide key details such as the edge and shape of the bonding wires; the medium-deep (convolutional modules 7-9) modules have a moderate contribution, and some modules can be optimized as appropriate; the deep (convolutional modules 10-13) modules have a low contribution and are significantly redundant. While controlling the loss of semantic abstraction ability, model compression is achieved by deleting deep modules with low contribution.
[0069] In some optional embodiments, the feature contribution of each first convolutional module of the original VGG encoder in the first model is analyzed sequentially, including:
[0070] S310. Calculate the corresponding activation value and information entropy based on the input map and output feature map of each of the first convolutional modules;
[0071] Specifically, the target image (including samples covering different solder line shapes and background interference) is input into the model, and the pixel activation values of the input feature map (output of the preceding module) and output feature map of each module are recorded. For all channels of the output feature map, the average activation value (the mean of all pixel activation values) and the effective activation ratio are calculated. If the average activation value and the effective activation ratio of the output feature map of a certain module are high (e.g., >60%), it indicates that it has a strong response to the solder line region and high feature utilization; if the activation value is close to 0 and the effective activation ratio is low, the feature redundancy is high.
[0072] For the output feature map of each module, the information entropy of the pixel values is calculated per channel (the higher the entropy value, the richer the information contained in the feature). Wire bonding segmentation depends on detailed information. If the average information entropy of the module's output feature map is high, it indicates that it retains more key features such as edges and textures; if the entropy value is low, the feature distribution is uniform and the information content is low.
[0073] S320. Determine the first contribution of each of the first convolutional modules based on the activation value and the information entropy;
[0074] Specifically, the activation value and information entropy are weighted according to the preset weight allocation value to obtain the corresponding first contribution, and then sorted according to the first contribution. The higher the first contribution, the higher the ranking.
[0075] S330. After freezing each of the first convolutional modules in sequence, analyze the performance change of the first model.
[0076] Specifically, the first convolutional module is frozen sequentially (the frozen first convolutional module does not participate in image recognition and segmentation processing), and the segmentation accuracy and segmentation time of the first model after freezing the first convolutional module are calculated to obtain the corresponding performance value after freezing. By comparing the performance value after freezing with the performance value before freezing, the corresponding performance change can be obtained, that is, the impact of freezing a certain first convolutional module on the overall performance of the first model can be analyzed.
[0077] S340. Determine the second contribution of each of the first convolutional modules based on the performance change magnitude.
[0078] Specifically, the greater the performance drop of the first model after the first convolutional module is frozen, the higher the second contribution of the first convolutional module. Therefore, the second contribution of each first convolutional module can be determined by comparing and analyzing the corresponding performance changes.
[0079] S350. Determine the feature contribution based on the first contribution and the second contribution.
[0080] Specifically, the final feature contribution of each first convolutional module is determined by weighted fusion using two dimensions: the first contribution (the information content of the feature itself) and the second contribution (the impact on model performance).
[0081] In some optional embodiments, the step of sequentially freezing each of the first convolutional modules and then analyzing the performance change of the first model includes:
[0082] Perform the following steps sequentially on each of the first convolutional modules:
[0083] S341. After freezing the module parameters, obtain the first segmentation performance and the second segmentation performance of the first model. The first segmentation performance represents the segmentation accuracy and segmentation time of the first model before the module parameters are frozen, and the second segmentation performance represents the segmentation accuracy and segmentation time of the first model after the module parameters are frozen.
[0084] S342. Determine the performance change range based on the first segmentation performance and the second segmentation performance.
[0085] Specifically, each first convolutional module is frozen, and the segmentation accuracy and segmentation time of the first model after freezing are analyzed to determine the performance change of the first model after freezing each first convolutional module.
[0086] Step S400: After performing convolution module deletion processing on the original VGG encoder according to the feature contribution, a first VGG encoder is obtained. The convolution module deletion processing represents the deletion of one or more of the first convolution modules.
[0087] Specifically, the first convolutional modules are sorted according to their feature contribution, resulting in a sorting table based on feature contribution. Considering the actual production situation and the specific equipment processing capacity, the first convolutional modules at the end of the sorting table are appropriately deleted, thereby removing the first convolutional modules with lower feature contribution, reducing the complexity of the model, reducing the processing time of the production equipment, and improving the segmentation efficiency.
[0088] In some optional embodiments, obtaining the first VGG encoder by performing convolution module deletion processing on the original VGG encoder based on the feature contribution includes:
[0089] S410. After sorting the contribution of each first convolutional module according to the feature contribution, a contribution table is obtained. The contribution table includes the feature contribution of each first convolutional module and the segmentation accuracy and segmentation time of the first model under different first convolutional modules.
[0090] Specifically, a contribution table is constructed based on the feature contribution of each first convolutional module. The contribution table records the sequence number of each first convolutional module (e.g., modules 1-13); it also labels the feature contribution and quantization score of each first convolutional module; and it labels the segmentation accuracy and segmentation time of the first model after each first convolutional module. For example, if the segmentation accuracy of the first convolutional module numbered 8 is labeled as 91% and the segmentation time as 100 milliseconds, it means that when the VGG encoder of the first model includes only the 8 first convolutional modules numbered 1-8 in the contribution table, the segmentation accuracy of the first model for the lithium battery current collector bonding wire is 91%, and the segmentation time is 100 milliseconds.
[0091] S420. Determine the module to be deleted in the contribution table according to the preset segmentation performance. The module to be deleted represents the first convolutional module to be deleted. The preset segmentation performance represents the preset segmentation accuracy and segmentation time.
[0092] Specifically, based on the required preset segmentation performance, the first convolutional module in the contribution table is located according to its corresponding order, and the first convolutional module following the located first convolutional module is determined as the module to be deleted. For example, based on the preset segmentation performance, the first convolutional module ranked 10 in the contribution table is located, and thus the first convolutional modules ranked 11 to 13 are determined as the modules to be deleted.
[0093] S430. The first VGG encoder is obtained by deleting the module to be deleted from the original VGG encoder.
[0094] Specifically, removing the modules to be deleted from the original VGG encoder will yield a first VGG encoder that meets the requirements. As in the example above, the first convolutional modules ranked 11 to 13 in the contribution table will be deleted.
[0095] In some optional embodiments, the generation of the first model includes: inputting the image to be processed, and obtaining a preprocessed image at the model input scale after preprocessing; inputting the entire preprocessed image into the feature extraction module of VGG16, which passes through 13 convolutional modules to obtain feature maps B1, B2, B3, B4, and B5 respectively; inputting B5 into the UNet decoder, restoring the scale through bilinear upsampling, making a skip connection with B4, and further restoring image features through two convolutional modules to obtain feature map C1; continuing to perform upsampling, skip connections, and convolution operations on C1 to obtain feature map D; inputting feature map D into a 1*1 two-dimensional convolutional layer to restore the segmentation result to the original image size for output; using CE_loss to obtain the loss function, and performing backpropagation based on gradient descent; training is completed, and the model is saved as the first model.
[0096] Step S500: Input the feature map processed by the first VGG encoder into the original UNet decoder of the first model.
[0097] Specifically, the first convolutional module of the first VGG encoder outputs a feature map of the corresponding scale to the original UNet decoder through layer-by-layer convolution and downsampling. The original UNet decoder contains 8 convolutional modules (i.e., the second convolutional module). After receiving the multi-scale features output by the first VGG encoder, it processes them in a progressive manner of upsampling, feature fusion, and convolution optimization. The feature map is restored to the same resolution as the input image through the final upsampling, and the segmentation mask for the bonding wires is generated by the output layer convolution.
[0098] Step S600: After replacing the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, analyze the feature fusion efficiency of each second convolutional module in turn.
[0099] Specifically, the original bilinear upsampling is replaced with nearest-neighbor upsampling. The bilinear upsampling method requires calculating the weighted average of the four neighboring pixels of the target pixel, a complex calculation involving multiple linear interpolation steps, resulting in high computational cost and slow inference speed. In contrast, the nearest-neighbor upsampling method only needs to find the nearest known pixel to the target pixel and directly copy its value, making the calculation simple and fast. The coordinate transformation calculation formula for nearest-neighbor upsampling is:
[0100]
[0101] in, , These are the pixel coordinates of the original image. , Let the coordinates be a pixel coordinate on the target image. , These are the target width and height, set according to the network's output requirements. , This represents the width and height of the original feature map.
[0102] Each second convolutional module performs feature fusion through nearest neighbor upsampling. Based on the feature comparison before and after feature fusion, the feature fusion efficiency of each second convolutional module is determined.
[0103] In some optional embodiments, the step of sequentially analyzing the feature fusion efficiency of each of the second convolutional modules includes:
[0104] S610. Different spatial information is determined based on the skip connection features obtained by each of the second convolutional modules from the first VGG encoder, wherein the skip connection features represent the features obtained from the first VGG encoder through skip connections.
[0105] S620. Determine the feature fusion efficiency of each of the second convolutional modules based on the spatial information.
[0106] Specifically, each second convolutional module fuses skip connection features (including spatial information) with upsampled high-level features, and optimizes the effectiveness of spatial information through convolution, thereby analyzing the feature fusion efficiency of each second convolutional module. The feature fusion efficiency of each second convolutional module is directly related to its ability to preserve and enhance spatial information in skip connection features. The first four modules (second convolutional modules 1-4) can effectively optimize the spatial information of global layout and local structure, resulting in high fusion efficiency; the latter four modules (second convolutional modules 5-8) have limited gain on fine spatial information, resulting in low fusion efficiency. Therefore, by eliminating the four redundant convolutional modules in the latter half, the structure of the first model is further simplified while maintaining the effective transmission of detailed features by skip connections.
[0107] Step S700: After performing convolution module deletion processing on the original UNet decoder according to the feature fusion efficiency, a first UNet decoder is obtained.
[0108] Specifically, based on the performance requirements of production, the second convolutional modules with low feature fusion efficiency are selected and deleted; as mentioned above, the first UNet decoder is obtained by removing the four second convolutional modules located in the latter half of the original UNet decoder, thereby further simplifying the structure of the first model while maintaining the effective transmission of detailed features by skip connections.
[0109] Step S800: After performing L1 pruning on the first VGG encoder and the first UNet decoder, a target model is obtained. The target model is used to detect and segment lithium battery current collector bonding wires. The L1 pruning characterizes structured pruning based on the L1 norm.
[0110] Specifically, L1 pruning is a model pruning method based on L1 regularization. It evaluates the importance of weights by calculating their L1 norm (the sum of their absolute values) and sets weights with smaller absolute values to zero, thus achieving model sparsity. L1 structured pruning uses channels of convolutional modules as the pruning unit. It measures the importance of each channel's weight by calculating its L1 norm (the sum of the absolute values of the weights): the smaller the L1 norm, the weaker the channel's contribution to feature extraction (higher redundancy). Channels with the smallest L1 norm are filtered and removed according to a preset global pruning rate (e.g., 0.1). Simultaneously, the weights, biases, and parameters associated with that channel in subsequent layers of the corresponding convolutional layer are deleted to ensure network structure coherence, ultimately resulting in a target model with fewer parameters and faster inference. A comparison of the segmentation results of the first model and the target model is shown in Table 1.
[0111] Table 1 Comparison of results before and after model improvement
[0112]
[0113] In some optional embodiments, obtaining the target model after performing L1 pruning on the first VGG encoder and the first UNet decoder includes:
[0114] S810. Calculate the L1 norm of each first channel in the first VGG encoder;
[0115] Specifically, iterate through all channels (i.e., the first channels) of all convolutional layers (i.e., the first convolutional module) in the first VGG encoder, and calculate the L1 norm (the sum of the absolute values of the weights) for the weight parameters of each channel. The L1 norm reflects the strength of the channel's contribution to feature extraction; the smaller the norm, the higher the channel redundancy.
[0116] S820: Filter and remove the first channel with the smallest L1 norm according to the preset pruning rate, and at the same time set the weights and biases of the first convolution module on the first channel to zero.
[0117] Specifically, based on a preset pruning rate (e.g., a global pruning rate of 0.1), all first channels are sorted in ascending order of their L1 norm, and the channels with the highest L1 norm are selected as redundant channels. The removal process includes: directly removing these redundant first channels; and setting all weight and bias parameters associated with these channels in the corresponding first convolutional modules to zero (to ensure network structure consistency and avoid subsequent calculation errors).
[0118] S830. Calculate the L1 norm of each second channel in the first UNet decoder;
[0119] Specifically, iterate through all channels (i.e., the second channels) of all convolutional layers (second convolutional modules) in the first UNet decoder, and calculate the L1 norm of the weights of each channel.
[0120] S840. Configure the second channel in the second channel used for wire bonding region activation and wire bonding edge gradient enhancement as a non-deletable channel;
[0121] Specifically, based on feature map analysis and task requirements, two types of second channels are configured as non-deletable channels:
[0122] Activation channels in the wire bonding region: Channels in the feature map where the activation value is concentrated in the wire bonding region (e.g., through threshold analysis, the activation rate of the wire bonding region is >60%) are crucial for the localization of the wire bonding region.
[0123] Bond wire edge gradient enhancement channel: The channel in which the edge gradient value (e.g., calculated by the Sobel operator) in the feature map is significantly higher than that of the background, which directly affects the segmentation accuracy of the bond wire edge.
[0124] S850: According to the preset pruning rate, the second channel with the smallest L1 norm is filtered and removed, and the weights and biases of the second convolution module on the second channel are set to zero.
[0125] Specifically, after excluding channels that cannot be deleted, the remaining second channels are sorted in ascending order of their L1 norm, and the channel with the smallest norm is selected as the redundant channel according to the preset pruning rate. The removal operation includes:
[0126] Remove these redundant second channels; set all weights and bias parameters associated with these channels in the corresponding second convolutional modules to zero to ensure that the decoder feature fusion process is not affected by structural breaks.
[0127] After the above steps, the redundant first and second channels in the first VGG encoder and the first UNet decoder are removed, and the remaining channels retain the key feature extraction and fusion capabilities required for wire bonding segmentation. Combining the pruned encoder and decoder yields a target model with fewer parameters and higher inference efficiency. This model can effectively detect and segment lithium battery current collector wires while meeting the real-time requirements of industrial scenarios.
[0128] In some optional embodiments, after L1 pruning of the first VGG encoder and the first UNet decoder, the method further includes:
[0129] S860: Obtain the performance parameters of the first VGG encoder and the first UNet decoder after L1 pruning;
[0130] S870. The target model is obtained by adjusting the weights of the first VGG encoder and the first UNet decoder after L1 pruning according to the performance parameters.
[0131] Specifically, the pruned first model is fine-tuned and retrained. By adjusting the remaining weights, the first model can regain its optimal performance in the new parameter space, thereby obtaining the desired target model.
[0132] The weights are adjusted based on the performance parameters of the first model after pruning. After adjustment, the model performance parameters are evaluated again. If the preset indicators are met, the adjusted model is determined as the target model. This target model retains the efficiency improvement brought by L1 pruning and compensates for the accuracy loss through weight optimization, enabling it to efficiently and accurately complete the detection and segmentation of lithium battery current collector bonding wires.
[0133] The beneficial effects of this invention include: acquiring a target image, the target image representing an image of a lithium battery current collector bonding wire; inputting the target image into a first model, the first model representing an original model for image segmentation; sequentially analyzing the feature contribution of each first convolutional module of the original VGG encoder in the first model; obtaining a first VGG encoder by performing convolutional module deletion processing on the original VGG encoder based on the feature contribution, the convolutional module deletion processing representing the deletion of one or more first convolutional modules; inputting the feature map processed by the first VGG encoder into the original UNet decoder of the first model; replacing the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, and sequentially analyzing the feature fusion efficiency of each second convolutional module; obtaining a first UNet decoder by performing convolutional module deletion processing on the original UNet decoder based on the feature fusion efficiency; obtaining a target model by performing L1 pruning on the first VGG encoder and the first UNet decoder, the target model being used to detect and segment lithium battery current collector bonding wires, the L1 pruning representing structured pruning based on the L1 norm. Complex and redundant convolutional modules in the network are removed based on feature contribution and feature fusion efficiency. Nearest neighbor upsampling is used in the UNet decoder network to reduce computational complexity. L1 norm pruning of the convolutional modules further reduces complexity and computational cost, thereby effectively improving segmentation speed while maintaining model segmentation performance. Therefore, this application can generate a segmentation model that meets requirements and improves the segmentation efficiency of lithium battery current collector bonding wires.
[0134] Secondly, embodiments of the present invention provide a lithium battery current collector bonding wire segmentation model generation system, comprising:
[0135] The first module is used to acquire a target image, which represents an image of the lithium battery current collector bonding wire;
[0136] The second module is used to input the target image into the first model, whereby the first model represents the original model used for image segmentation.
[0137] The third module is used to sequentially analyze the feature contribution of each first convolutional module of the original VGG encoder in the first model; and to obtain the first VGG encoder by performing convolutional module deletion processing on the original VGG encoder based on the feature contribution. The convolutional module deletion processing represents the deletion of one or more first convolutional modules.
[0138] The fourth module is used to input the feature map processed by the first VGG encoder into the original UNet decoder of the first model.
[0139] The fifth module is used to replace the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, and then analyze the feature fusion efficiency of each second convolutional module in turn; and to obtain the first UNet decoder by deleting convolutional modules based on the feature fusion efficiency.
[0140] The sixth module is used to obtain a target model by performing L1 pruning on the first VGG encoder and the first UNet decoder. The target model is used to detect and segment lithium battery current collector bonding wires. The L1 pruning is a structured pruning based on the L1 norm.
[0141] The above is a schematic scheme of a lithium battery current collector wire bonding segmentation model generation system according to this embodiment. It should be noted that the technical solution of this system and the technical solution of the lithium battery current collector wire bonding segmentation model generation method described above belong to the same concept. For details not described in detail in the technical solution of the system, please refer to the description of the technical solution of the lithium battery current collector wire bonding segmentation model generation method described above.
[0142] like Figure 2 As shown, Figure 2 A structural block diagram of a controller 1000 in a lithium battery current collector bonding wire splitting model generation apparatus according to an embodiment of this application is shown. The controller 1000 includes, but is not limited to, a memory 1200 and a processor 1100. The processor 1100 is connected to the memory 1200 via a bus, and the memory 1200 is used to store data.
[0143] The controller 1000 also includes an access device that enables the controller 1000 to communicate via one or more networks. Examples of such networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Global System for Microwave Access (GSM) interface, or a Wi-Fi interface. MAX interface, Ethernet interface, Universal Serial Bus (USB) interface, Cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
[0144] The controller 1000 can be any type of stationary or mobile electronic device, including mobile computers or mobile electronic devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable electronic devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary electronic devices such as desktop computers or PCs. The controller 1000 can also be a mobile or stationary server.
[0145] The processor 1100 is used to execute computer-executable instructions for generating a lithium battery current collector bonding wire segmentation model.
[0146] The above is an illustrative scheme of a controller according to this embodiment. It should be noted that the technical solution of this controller belongs to the same concept as the technical solution of the lithium battery current collector bonding wire segmentation model generation method described above. For details not described in detail in the technical solution of the controller, please refer to the description of the technical solution of the lithium battery current collector bonding wire segmentation model generation method described above.
[0147] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described method for generating a lithium battery current collector bonding wire segmentation model.
[0148] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as processors, such as central processing units, digital signal processors, or microprocessors executing software, or as hardware, or as integrated circuits, such as application-specific integrated circuits. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0150] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A method for generating a segmentation model of a lithium battery current collector bonding wire, characterized in that, include: Acquire a target image, wherein the target image represents an image of the lithium battery current collector bonding wire; The target image is input into a first model, which represents the original model used for image segmentation; The feature contribution of each first convolutional module of the original VGG encoder in the first model is analyzed sequentially. The first VGG encoder is obtained by performing convolution module deletion processing on the original VGG encoder based on the feature contribution degree. The convolution module deletion processing represents the deletion of one or more of the first convolution modules. The feature map processed by the first VGG encoder is input into the original UNet decoder of the first model; After replacing the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, the feature fusion efficiency of each second convolutional module is analyzed in turn. The first UNet decoder is obtained by removing convolutional modules from the original UNet decoder based on the feature fusion efficiency. The target model is obtained by performing L1 pruning on the first VGG encoder and the first UNet decoder. The target model is used to detect and segment the lithium battery current collector bonding wires. The L1 pruning is a structured pruning based on the L1 norm.
2. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 1, characterized in that, The sequential analysis of the feature contribution of each first convolutional module of the original VGG encoder in the first model includes: Calculate the corresponding activation value and information entropy based on the input map and output feature map of each of the first convolutional modules; The first contribution of each of the first convolutional modules is determined based on the activation value and the information entropy. After freezing each of the first convolutional modules in sequence, the performance change of the first model is analyzed. The second contribution of each of the first convolutional modules is determined based on the magnitude of the performance change. The feature contribution is determined based on the first contribution and the second contribution.
3. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 2, characterized in that, The step of freezing each of the first convolutional modules sequentially and then analyzing the performance change of the first model includes: Perform the following steps sequentially on each of the first convolutional modules: After freezing the module parameters, the first segmentation performance and the second segmentation performance of the first model are obtained. The first segmentation performance represents the segmentation accuracy and segmentation time of the first model before the module parameters are frozen, and the second segmentation performance represents the segmentation accuracy and segmentation time of the first model after the module parameters are frozen. The magnitude of the performance change is determined based on the first segmentation performance and the second segmentation performance.
4. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 1, characterized in that, The process of obtaining the first VGG encoder by performing convolution module deletion processing on the original VGG encoder based on the feature contribution includes: After arranging the contributions of each first convolutional module according to the feature contribution, a contribution table is obtained. The contribution table includes the feature contribution of each first convolutional module and the segmentation accuracy and segmentation time of the first model with different first convolutional modules. The module to be deleted is determined in the contribution table according to the preset segmentation performance. The module to be deleted represents the first convolutional module to be deleted. The preset segmentation performance represents the preset segmentation accuracy and segmentation time. The first VGG encoder is obtained by deleting the module to be deleted from the original VGG encoder.
5. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 1, characterized in that, The sequential analysis of the feature fusion efficiency of each of the second convolutional modules includes: Different spatial information is determined based on the skip connection features obtained by each of the second convolutional modules from the first VGG encoder, wherein the skip connection features represent the features obtained from the first VGG encoder through skip connections. The feature fusion efficiency of each of the second convolutional modules is determined based on the spatial information.
6. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 1, characterized in that, The process of obtaining the target model by performing L1 pruning on the first VGG encoder and the first UNet decoder includes: Calculate the L1 norm of each first channel in the first VGG encoder; The first channel with the smallest L1 norm is filtered and removed according to the preset pruning rate, and the weights and biases of the first convolution module on the first channel are set to zero. Calculate the L1 norm of each second channel in the first UNet decoder; Configure the second channel, which is used for wire bonding region activation and wire bonding edge gradient enhancement, as a non-deletable channel; The second channel with the smallest L1 norm will be filtered and removed according to the preset pruning rate, and the weights and biases of the second convolution module on the second channel will be set to zero.
7. The method for generating a lithium battery current collector bonding wire segmentation model according to claim 1, characterized in that, After performing L1 pruning on the first VGG encoder and the first UNet decoder, the process further includes: Obtain the performance parameters of the first VGG encoder and the first UNet decoder after L1 pruning; The target model is obtained by adjusting the weights of the first VGG encoder and the first UNet decoder after L1 pruning based on the performance parameters.
8. A lithium battery current collector bonding wire segmentation model generation system, characterized in that, include: The first module is used to acquire a target image, which represents an image of the lithium battery current collector bonding wire; The second module is used to input the target image into the first model, whereby the first model represents the original model used for image segmentation. The third module is used to sequentially analyze the feature contribution of each first convolutional module of the original VGG encoder in the first model; and to obtain the first VGG encoder by performing convolutional module deletion processing on the original VGG encoder based on the feature contribution. The convolutional module deletion processing represents the deletion of one or more first convolutional modules. The fourth module is used to input the feature map processed by the first VGG encoder into the original UNet decoder of the first model. The fifth module is used to replace the bilinear upsampling of each second convolutional module in the original UNet decoder with nearest neighbor upsampling, and then analyze the feature fusion efficiency of each second convolutional module in turn; and to obtain the first UNet decoder by deleting convolutional modules based on the feature fusion efficiency. The sixth module is used to obtain a target model by performing L1 pruning on the first VGG encoder and the first UNet decoder. The target model is used to detect and segment lithium battery current collector bonding wires. The L1 pruning is a structured pruning based on the L1 norm.
9. A device for generating a segmentation model of a lithium battery current collector bonding wire, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which are used to execute the lithium battery current collector bonding wire segmentation model generation method according to any one of claims 1-7.
Citation Information
Patent Citations
U-Net model optimization method based on dynamic interpretable pruning
CN120163189A
Predictive coding of point clouds using multiple frames of references
US20240221234A1