Lightweight detection method and system for appearance defects of lithium copper foil
Patent Information
- Application Number
- CN202611097863.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
然而,现有深度学习检测模型普遍存在参数量庞大、计算复杂度过高的问题
[0018]The present invention discloses a lightweight detection method and system for appearance defects in lithium-ion battery copper foil. By simultaneously acquiring tension fluctuation signals and linear velocity signals during winding and unwinding, the tension fluctuation signals are used to compensate for motion blur in the original image, thereby improving the motion blur compensation process and providing a high signal-to-noise ratio input image foundation for subsequent defect detection. Addressing the significant anisotropic rolling texture exhibited by lithium-ion battery copper foil after rolling and annealing processes, a local weighted directional gradient histogram is constructed to extract the main texture direction. Based on this, an anisotropic suppression mask is generated, which effectively suppresses normal background responses consistent with the main texture direction while enhancing potential defect areas that deviate from the main texture direction. Domain response makes minute defects such as penetrating pinholes and micro-scratches stand out significantly from the complex rolling texture background, greatly improving the signal-to-noise ratio of defects. An adaptive sampling bias field is constructed to deflect the convolution kernel along the extension direction of local texture or defects, accurately matching the geometric orientation of linear defects such as scratches and roll marks on the surface of lithium battery copper foil. A hybrid second-order gradient-curvature criterion is used to evaluate the importance score of key channels, avoiding the accidental deletion of channels corresponding to minute defects such as penetrating pinholes in lithium battery copper foil by traditional pruning methods that only rely on sorting. A soft pruning mask is introduced to replace hard threshold binarization pruning, making the pruning operation completely differentiable and leaving sufficient recovery elasticity for the fine-tuning stage.
Smart Images

Figure CN122928776A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a lightweight detection method and system for appearance defects in lithium battery copper foil. Background Technology
[0002] Lithium-ion batteries, as the core power source for new energy vehicles, energy storage systems, and mobile electronic devices, directly determine the quality of end products and user experience through their performance and safety. Meanwhile, lithium-ion battery copper foil, as a key material for the negative electrode current collector, has a decisive impact on the battery's charge-discharge efficiency, cycle life, and safety performance due to its surface quality. With the penetration rate of new energy vehicles exceeding 30%, lithium-ion battery copper foil is rapidly developing towards ultra-thinness (below 6μm) and high tensile strength. As the foil thickness approaches its limit, the difficulty of detecting surface defects such as penetrating pinholes, micro-scratches, oxidation discoloration spots, copper nodules, indentations, and wrinkles increases exponentially. Among these, penetrating pinholes and micro-scratches are fatal defects. Pinholes can puncture the battery separator, causing internal short circuits or even thermal runaway, while micro-scratches affect the conductivity uniformity and coating adhesion of the copper foil, posing a serious threat to battery safety.
[0003] Currently, the detection of appearance defects in lithium battery copper foil mainly relies on the following two methods: (I) Traditional Manual Visual Inspection and Machine Vision Methods. Early copper foil surface quality inspection relied primarily on manual visual sampling. However, manual inspection is inefficient, easily affected by subjective factors, and has a missed detection rate as high as 15%–30%. In recent years, machine vision-based inspection methods have gradually replaced manual inspection. These methods use high-speed CCD industrial cameras combined with customized optical systems to acquire images of the copper foil surface, and utilize traditional image processing algorithms (such as improved Canny edge detection and closing operations) for defect identification and classification. However, traditional machine vision methods rely on manually designed feature extraction algorithms. When faced with complex rolling textures, lighting variations, and diverse defect morphologies on the copper foil surface, they suffer from insufficient detection accuracy, limited robustness, and limited generalization ability.
[0004] (II) Deep Learning-Based Copper Foil Defect Detection Methods. With the development of deep learning technology, researchers have begun to introduce object detection algorithms such as Convolutional Neural Networks (CNNs) and the YOLO series into the field of copper foil surface defect detection. Deep learning models automatically extract deep semantic features of defects through multi-layer neural networks, effectively addressing complex backgrounds and varied defect morphologies that are difficult to handle with traditional methods. However, existing deep learning detection models generally suffer from a large number of parameters and excessive computational complexity. Taking mainstream models such as YOLOv7 as an example, the improved detection network can have up to 41.5M parameters. Although it runs normally on PCs or high-performance servers, it faces challenges such as excessive memory consumption and a surge in inference latency when deployed in resource-constrained scenarios such as embedded vision processors (e.g., Jetson Nano), production line edge computing devices, and handheld inspection terminals. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide a lightweight detection method and system for appearance defects of lithium battery copper foil, so as to at least solve the shortcomings of the above-mentioned technology.
[0006] This invention proposes a lightweight detection method for appearance defects in lithium battery copper foil, comprising: Simultaneously acquire the original image of the lithium battery copper foil surface, and simultaneously acquire the tension fluctuation signal of winding and unwinding to perform motion blur compensation on the original image. Then, extract features from the compensated original image to obtain a standardized enhanced input tensor. A backbone network is constructed, and the enhanced input tensor is input into the backbone network to calculate the principal response direction angle at the local spatial location. An adaptive sampling bias field is constructed based on the principal response direction angle to adjust the sampling position of the convolution kernel. The spatial mean and spatial variance of each channel are calculated based on the adaptive sampling bias field. The number of key channels participating in the convolution operation is determined based on the spatial mean and the spatial variance. Depth-separable convolution operation is performed on the key channels to obtain a lightweight enhanced feature map. A converged sparse model is constructed, and the scaling factor and first-order partial derivative of all prunable channels are extracted from the sparse model. The importance score of the key channel is evaluated using a hybrid second-order gradient-curvature criterion. Based on the importance score, a soft-pruning mask is introduced to construct the corresponding lightweight detection model. The lightweight enhanced feature map is input into the lightweight detection model. The confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil are output through decoupling branches. After non-maximum suppression, the appearance defect detection result of the lithium battery copper foil is output.
[0007] Furthermore, the steps of simultaneously acquiring the original image of the lithium battery copper foil surface and simultaneously acquiring the tension fluctuation signal during winding and unwinding to perform motion blur compensation on the original image, and extracting features from the compensated original image to obtain a standardized enhanced input tensor include: Simultaneously acquired bright-field reflection and dark-field scattering images of the lithium-ion battery copper foil surface, and simultaneously acquired tension fluctuation signals and linear velocity signals during winding and unwinding; Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring. The spatial gradient is calculated pixel by pixel for the deblurred clear dark field image. The deblurred clear dark field image is divided into several local windows, and a weighted directional gradient histogram is constructed in each local window. The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. An anisotropic suppression mask is constructed based on the main texture direction. The deblurred clear dark field image is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map. The defect saliency map is then subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. The normalized enhancement graph is extended along the channel dimension to generate a standardized enhancement input tensor.
[0008] Furthermore, the steps of constructing a backbone network and inputting the enhanced input tensor into the backbone network to calculate the principal response direction angle at a local spatial location, and constructing an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel include: A backbone network is constructed, and the enhanced input tensor is upsampled and downsampled using the backbone network to obtain a texture feature map. ; For the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; An adaptive sampling bias field is dynamically constructed based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
[0009] Further, the steps of calculating the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determining the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and performing depthwise separable convolution operations on the key channels to obtain a lightweight enhanced feature map include: Calculate each channel based on the adaptive sampling bias field. Spatial mean Spatial variance Define anisotropic feature scores and dynamically adjust the number of key channels for parameter convolution operations based on the anisotropic feature scores of all channels. Depth-separable convolution operations are performed on the key channels to obtain convolution output feature maps. The convolution output feature maps are then concatenated in the original channel order, and the concatenated results are post-processed by linear projection and normalization using pointwise convolution to obtain lightweight enhanced feature maps.
[0010] Furthermore, based on the importance score, the steps of introducing a soft-pruning mask to construct the corresponding lightweight detection model include: All channels are sorted based on the importance score to obtain an ordered sequence, and the number of channels to be retained in the ordered sequence is determined according to the target compression ratio to calculate the global hard pruning threshold. A continuous soft-pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft-pruning mask is then introduced into the sparse model to construct the corresponding lightweight detection model.
[0011] This invention also proposes a lightweight inspection system for appearance defects in lithium-ion battery copper foil, comprising: The image acquisition module is used to simultaneously acquire the original image of the lithium battery copper foil surface and simultaneously acquire the tension fluctuation signal of the winding and unwinding to perform motion blur compensation on the original image, and extract features from the compensated original image to obtain a standardized enhanced input tensor. The network construction module is used to construct the backbone network and input the enhanced input tensor into the backbone network to calculate the principal response direction angle at the local spatial location, and construct an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel; The convolution processing module is used to calculate the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determine the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and perform depthwise separable convolution operation on the key channels to obtain a lightweight enhanced feature map. The model building module is used to build a converged sparse model, extract the scaling factor and first-order partial derivative of all prunable channels from the sparse model, evaluate the importance score of the key channels using a hybrid second-order gradient-curvature criterion, and introduce a soft-pruning mask based on the importance score to build the corresponding lightweight detection model. The defect detection module is used to input the lightweight enhanced feature map into the lightweight detection model, and output the confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil through decoupling branches. After non-maximum suppression, the module outputs the appearance defect detection result of the lithium battery copper foil.
[0012] Furthermore, the image acquisition module is specifically used for: Simultaneously acquired bright-field reflection and dark-field scattering images of the lithium-ion battery copper foil surface, and simultaneously acquired tension fluctuation signals and linear velocity signals during winding and unwinding; Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring. The spatial gradient is calculated pixel by pixel for the deblurred clear dark field image. The deblurred clear dark field image is divided into several local windows, and a weighted directional gradient histogram is constructed in each local window. The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. An anisotropic suppression mask is constructed based on the main texture direction. The deblurred clear dark field image is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map. The defect saliency map is then subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. The normalized enhancement graph is extended along the channel dimension to generate a standardized enhancement input tensor.
[0013] Furthermore, the network construction module is specifically used for: A backbone network is constructed, and the enhanced input tensor is upsampled and downsampled using the backbone network to obtain a texture feature map. ; For the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; An adaptive sampling bias field is dynamically constructed based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
[0014] Furthermore, the convolution processing module is specifically used for: Calculate each channel based on the adaptive sampling bias field. Spatial mean Spatial variance Define anisotropic feature scores and dynamically adjust the number of key channels for parameter convolution operations based on the anisotropic feature scores of all channels. Depth-separable convolution operations are performed on the key channels to obtain convolution output feature maps. The convolution output feature maps are then concatenated in the original channel order, and the concatenated results are post-processed by linear projection and normalization using pointwise convolution to obtain lightweight enhanced feature maps.
[0015] Furthermore, the model building module is specifically used for: All channels are sorted based on the importance score to obtain an ordered sequence, and the number of channels to be retained in the ordered sequence is determined according to the target compression ratio to calculate the global hard pruning threshold. A continuous soft-pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft-pruning mask is then introduced into the sparse model to construct the corresponding lightweight detection model.
[0016] The present invention also proposes a storage medium storing a computer program, which, when executed by a processor, implements the above-described method for lightweight detection of appearance defects in lithium-ion battery copper foil.
[0017] The present invention also proposes a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for lightweight detection of appearance defects in lithium battery copper foil.
[0018] The present invention discloses a lightweight detection method and system for appearance defects in lithium-ion battery copper foil. By simultaneously acquiring tension fluctuation signals and linear velocity signals during winding and unwinding, the tension fluctuation signals are used to compensate for motion blur in the original image, thereby improving the motion blur compensation process and providing a high signal-to-noise ratio input image foundation for subsequent defect detection. Addressing the significant anisotropic rolling texture exhibited by lithium-ion battery copper foil after rolling and annealing processes, a local weighted directional gradient histogram is constructed to extract the main texture direction. Based on this, an anisotropic suppression mask is generated, which effectively suppresses normal background responses consistent with the main texture direction while enhancing potential defect areas that deviate from the main texture direction. Domain response makes minute defects such as penetrating pinholes and micro-scratches stand out significantly from the complex rolling texture background, greatly improving the signal-to-noise ratio of defects. An adaptive sampling bias field is constructed to deflect the convolution kernel along the extension direction of local texture or defects, accurately matching the geometric orientation of linear defects such as scratches and roll marks on the surface of lithium battery copper foil. A hybrid second-order gradient-curvature criterion is used to evaluate the importance score of key channels, avoiding the accidental deletion of channels corresponding to minute defects such as penetrating pinholes in lithium battery copper foil by traditional pruning methods that only rely on sorting. A soft pruning mask is introduced to replace hard threshold binarization pruning, making the pruning operation completely differentiable and leaving sufficient recovery elasticity for the fine-tuning stage. Attached Figure Description
[0019] Figure 1 This is a flowchart of the lithium battery copper foil appearance defect lightweight detection method in the first embodiment of the present invention; Figure 2 This is a structural block diagram of the lightweight detection system for appearance defects of lithium battery copper foil according to the second embodiment of the present invention; Figure 3 This is a structural block diagram of the computer in the third embodiment of the present invention.
[0020] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0021] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0023] Example 1 Please see Figure 1 The figure shows a method for lightweight detection of appearance defects in lithium battery copper foil according to the first embodiment of the present invention, the method specifically including steps S101 to S105: S101, synchronously acquire the original image of the lithium battery copper foil surface, and synchronously acquire the tension fluctuation signal of winding and unwinding to perform motion blur compensation on the original image, and extract features from the compensated original image to obtain a standardized enhanced input tensor. Furthermore, step S101 specifically includes steps S1011 to S1015: S1011, synchronously acquires bright field reflection and dark field scattering images of the lithium battery copper foil surface, and synchronously acquires tension fluctuation signals and linear velocity signals during winding and unwinding. S1012, Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring; S1013, calculate the spatial gradient pixel by pixel for the deblurred clear dark field image, divide the deblurred clear dark field image into several local windows, construct a weighted directional gradient histogram in each local window, take the direction corresponding to the peak of the histogram as the main texture direction of the window, and construct an anisotropic suppression mask based on the main texture direction. S1014, the clear dark field image after deblurring is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map, and the defect saliency map is subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. S1015, the normalized enhancement graph is extended along the channel dimension to generate a normalized enhancement input tensor.
[0024] In practice, a pre-set image acquisition system synchronously performs optical imaging on the surface of the copper foil of the lithium battery in operation, including bright-field and dark-field channels. The bright-field channel camera is positioned on the specular reflection light path to acquire bright-field reflection images. It is used to preserve the rolling texture and macroscopic morphology information of the copper foil substrate; the dark field channel camera is set on the diffuse reflection light path to acquire dark field scattering images. It is used to enhance the scattering signal caused by tiny defects such as penetrating pinholes, micro-scratches, and copper nodules. and These represent the height and width of the image (in pixels).
[0025] Furthermore, during the high-speed winding process of lithium battery copper foil (linear speed) ,unit: Simultaneously acquire real-time tension fluctuation signals between the take-up roll and the unwind roll. (unit: Because tension fluctuations can cause variations in foil surface temperature during exposure time... (unit: The micro-displacement generated along the direction of motion within the image causes motion blur in the dark field image, and the blur kernel (point spread function) is determined by the tension-velocity coupling model.
[0026] First, calculate the displacement of the foil surface along the direction of motion during the exposure time. :
[0027] In the formula, For the start time of exposure, for Instantaneous linear velocity at time t. This is the tension-strain coupling coefficient of the copper foil, in units of... The elastic modulus and thickness of the copper foil determine this. This is the reference tension setting value.
[0028] Based on displacement with the direction angle of motion Constructing a two-dimensional motion fuzzy kernel :
[0029] In the formula, and For pixel space coordinates, For pixel equivalent displacement, This refers to the camera's physical resolution. Frequency domain Wiener filtering for dark field images Perform deblurring to obtain a clear image. :
[0030] In the formula, For image spatial coordinate index, , Represents the two-dimensional discrete Fourier forward transform. This represents the two-dimensional discrete Fourier inverse transform. This represents the complex conjugate of the fuzzy Fourier transform. Represents the square of the modulus. This represents the Wiener filter regularization coefficient.
[0031] Furthermore, after the rolling and annealing processes, the surface of the lithium-ion battery copper foil exhibits obvious anisotropic rolling textures. The main texture direction is typically parallel to the rolling direction. To quantify these texture characteristics, the deblurred dark-field image... Calculate the spatial gradient pixel by pixel:
[0032]
[0033] in, and Representing pixels The gradient magnitude along the horizontal and vertical directions; Calculate the local gradient magnitude and gradient direction angle :
[0034]
[0035] In the formula, It is a very small positive number; Divide the image into several Local window of a pixel ,in, , Within each window, set the direction angle. The range of 0° to 180° is evenly divided into 9 intervals, and a weighted directional gradient histogram is constructed. , :
[0036] In the formula, This represents an indicator function, which takes the value 1 if the condition within the parentheses is true, and 0 otherwise. Indicates the first A range of angles in each direction.
[0037] The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. :
[0038] To suppress the interference of rolling texture background on defect detection, an anisotropic suppression mask is constructed. For each pixel Its suppression weight is determined by the deviation between the main texture direction of its window and the local actual direction:
[0039] In the formula, For pixels Index of the window to which it belongs. This is the directional bandwidth parameter, with a value ranging from 0.1 to 0.5, used to control the sensitivity of texture suppression. The closer to 1, the stronger the response. The closer it is to 0, the more suppressed the response becomes.
[0040] The deblurred dark-field image is multiplied element-wise with an anisotropic suppression mask to obtain a defect saliency map. Adaptive contrast stretching based on histogram quantiles is then applied to the defect saliency map to amplify the grayscale difference between minute defects (penetrating pinholes, microcracks, etc.) and the background. First, the cumulative histogram of the defect saliency map is calculated to obtain the low quantile (grayscale value corresponding to a cumulative probability of 1%) and the high quantile (grayscale value corresponding to a cumulative probability of 99%). Linear stretching and truncation are performed based on low and high quantiles to obtain a normalized augmented map. The normalized augmented map is then expanded along the channel dimension to generate a standardized augmented input tensor.
[0041] S102, construct a backbone network and input the enhanced input tensor into the backbone network to calculate the principal response direction angle at the local spatial location, and construct an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel; Furthermore, step S102 specifically includes steps S1021 to S1023: S1021, Construct a backbone network, and use the backbone network to perform upsampling and downsampling processing on the enhanced input tensor to obtain a texture feature map. ; S1022, for the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; S1023, Dynamically construct an adaptive sampling bias field based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
[0042] In specific implementation, a backbone network is constructed (in this embodiment, the backbone network can be any one of YOLOv7, YOLOv8, and YOLO11). This backbone network is used to perform dimensionality upsampling and downsampling processing on the aforementioned enhanced input tensor to obtain a texture feature map. ; Furthermore, pixel-by-pixel local geometric orientation analysis is performed on the texture feature map to capture the extension direction of anisotropic rolling textures and defects (scratches, roll marks) on the surface of lithium-ion battery copper foil. Regarding spatial location... (in, For height direction index, (indexed by width direction), calculate its horizontal direction ( Direction, corresponding width index ) and vertical direction ( Direction, corresponding height index The spatial partial derivatives of the gradient are obtained. To enhance robustness to noise, the Scharr operator is used instead of the basic Sobel operator for gradient calculation, thus obtaining the partial derivatives in two orthogonal directions. Specifically, the local gradient magnitude is calculated using partial derivatives in two orthogonal directions. With the main response direction angle :
[0043]
[0044] in, It is the arctangent function in the fourth quadrant. For position The rate of change of grayscale along the width direction. For position The rate of change of grayscale along the height direction.
[0045] Obtain the principal orientation angle for each spatial location Then, the backbone network dynamically adjusts the sampling grid of the standard convolution kernel (e.g., 3×3 size) according to this angle, so that the convolution kernel deflects along the extension direction of local texture or defects, thereby accurately matching the geometric direction of linear defects such as scratches and roller marks on the surface of lithium battery copper foil.
[0046] First, define the basic grid coordinate set of the standard convolution kernel. It is a collection A set of two-dimensional coordinate points (in this embodiment, the...) ):
[0047] in, , Relative center pixels The offset in the width direction and the offset in the height direction, This indicates the floor function; To introduce directional adaptive capability, the backbone network performs directional adaptation at each sampling point. A spatial bias vector driven by the principal orientation angle is applied to construct a dynamic bias field:
[0048] In the formula, This is a rotation matrix used to rotate the standard network coordinates counterclockwise around the origin by an angle. This aligns the main axis of the convolution kernel with the local texture direction.
[0049] S103, calculate the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determine the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and perform depthwise separable convolution operation on the key channels to obtain a lightweight enhanced feature map; Furthermore, step S103 specifically includes steps S1031 to S1032: S1031, calculate each channel based on the adaptive sampling bias field. Spatial mean Spatial variance Define anisotropic feature scores and dynamically adjust the number of key channels for parameter convolution operations based on the anisotropic feature scores of all channels. S1032, perform depthwise separable convolution operation on the key channels to obtain convolution output feature maps, concatenate the convolution output feature maps in the original channel order, and perform linear projection and normalization post-processing on the concatenation result using pointwise convolution to obtain lightweight enhanced feature maps.
[0050] In practical implementation, different feature channels of lithium-ion battery copper foil carry differentiated semantic information: some channels respond to the rolling texture background (globally uniform and isotropic), while others respond to minute defects (significant local abrupt changes and anisotropy). The backbone network adaptively determines the number of channels participating in expensive convolution operations based on the degree of spatial anisotropy of the channel features, minimizing computational redundancy. For texture feature maps... Calculate each channel along the spatial dimension ( mean Spatial variance :
[0051]
[0052] In the formula, Indicates the first The spatial location of each channel The eigenvalue at that location.
[0053] Define anisotropic characteristic scores:
[0054] In the formula, It is a very small positive number; in this embodiment, it is taken as 10. -8 ; The number of key channels in the parametric convolution operation is dynamically adjusted based on the anisotropic feature scores of all channels. :
[0055] In the formula, Texture feature map The global average of the anisotropy scores for all channels. As a dynamic adjustment factor, This means that the maximum number of active channels is capped at half the total number of channels. This means that the minimum number of active channels is set to one-eighth of the total number of channels. Based on the number of critical channels, the backbone network supports all... The channels are sorted from highest to lowest anisotropy score, and the channels with the highest scores are selected. Each channel constitutes a key channel index set.
[0056] Perform depthwise separable convolution operations on the key channels to obtain the first... Each channel is independently assigned a rotated convolutional kernel weight. The feature maps of each channel are subjected to depthwise convolution (i.e., the input channel and the output channel correspond one-to-one and there is no cross-channel fusion). The sampling position is modulated by the bias field to obtain the convolution output feature map. The convolution output feature maps are concatenated in the original channel order, and the concatenation result is linearly projected and normalized by pointwise convolution to obtain a lightweight enhanced feature map.
[0057] S104, Construct a converged sparse model, extract the scaling factor and first-order partial derivative of all prunable channels from the sparse model, evaluate the importance score of the key channel using the hybrid second-order gradient-curvature criterion, and introduce a soft-pruning mask based on the importance score to construct the corresponding lightweight detection model. Furthermore, step S104 specifically includes steps S1041 to S1042: S1041, Sort all channels based on the importance score to obtain an ordered sequence, and determine the number of channels to be retained in the ordered sequence according to the target compression ratio to calculate the global hard pruning threshold. S1042, a continuous soft pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft pruning mask is then introduced into the sparse model to construct the corresponding lightweight detection model.
[0058] In practical implementation, a converged sparsified model is constructed (in this embodiment, the model includes ProSparse series models, channel-sparse CNN models, or DST architecture models trained through dynamic sparsity, etc.). The scaling factors and first-order partial derivatives of all prunable channels are extracted from the constructed sparsified model. A hybrid second-order gradient-curvature criterion (in this embodiment, a first-order Taylor term and a second-order Fisher term) is used to evaluate the importance score of the key channels.
[0059] In the formula, For first-order Taylor terms, The normalized layer of the sparse model represents the first... Learnable scaling factor for each channel, The total loss function of the sparse model, For second-order Fisher terms, Represents the first Fisher information matrix One diagonal element.
[0060] Furthermore, all channels are sorted based on importance scores to obtain an ordered sequence, and then compressed according to a target compression ratio (in this embodiment, the target compression ratio is...). The number of channels to be retained in an ordered sequence is determined by rounding down, so as to calculate the global hard pruning threshold.
[0061] A continuous soft-pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft-pruning mask is then introduced into the sparsity model to construct the corresponding lightweight detection model.
[0062] S105, the lightweight enhanced feature map is input into the lightweight detection model, and the confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil are output through decoupling branches respectively. After non-maximum suppression, the appearance defect detection result of the lithium battery copper foil is output.
[0063] In practical implementation, due to the extreme differences in defect size on the surface of lithium-ion battery copper foil, penetrating pinholes may be only three to five pixels in size, while oxidation discoloration spots may reach hundreds of pixels. The lightweight enhanced feature map is input into the lightweight detection model, which outputs three feature maps at different scales, corresponding to large, medium, and small target sizes, respectively. Before entering the detection head, each feature map at each scale has several anchor frames with different aspect ratios pre-bound at each spatial location. These anchor frames are equivalent to pre-set "candidate windows." For example, micro-scratches correspond to slender anchor frames, copper nodules correspond to approximately circular anchor frames, and penetrating pinholes correspond to extremely small square anchor frames.
[0064] Furthermore, the feature maps are first fed into a shared 1×1 convolutional layer for channel compression to reduce the burden of subsequent computation. The compressed intermediate feature maps are then fed into two independent branches simultaneously: a classification branch and a regression branch.
[0065] Each branch employs depthwise separable convolutions instead of traditional standard convolutions to achieve a lightweight design. Depthwise separable convolutions decompose standard convolutions into two steps: first, spatial filtering is performed independently for each channel; second, 1×1 convolutions are used for cross-channel fusion. This design significantly reduces the number of parameters and computational cost.
[0066] The classification branch outputs a set of raw logical values, while the regression branch outputs a set of offsets relative to the prior dimensions of the anchor box, including the offsets of the center point's horizontal and vertical coordinates, as well as the logarithmic scaling of the width and height.
[0067] Specifically, the raw logical values output by the classification branch are first processed by the Softmax function and normalized along the category dimension, so that the sum of the probabilities of each anchor box across all defect categories is 1. A defect hazard perception reweighting is introduced. After Softmax normalization, the probability scores belonging to fatal defect categories such as penetrating pinholes and micro-scratches are multiplied by an enhancement factor greater than 1 (in this embodiment, the factor is 1.5), amplifying the response to that fatal defect. Simultaneously, a minimum value operation is used to truncate the probability to 1.0 to prevent numerical overflow.
[0068] The regression branch outputs the encoded offset relative to the anchor box. A sigmoid function is applied to this center offset, constraining it between 0 and 1, representing the relative position of the predicted box center with respect to the top-left corner of its corresponding grid cell. This offset is then multiplied by the downsampling stride of the feature map at that scale, mapping back to the original image size. Decoding the width and height involves multiplying the prior width and height of the anchor box by the natural exponent of the offset, ensuring that the predicted width and height are always positive real numbers. The final result is four real numbers: the center x-coordinate, center y-coordinate, width, and height of the predicted box, all in pixels, relative to the resolution of the original input image.
[0069] During training, the total loss of the detection head is composed of a weighted average of classification loss and regression loss. The classification loss uses binary cross-entropy loss or Focal Loss to handle the extreme imbalance between positive and negative anchor boxes. The regression loss uses Wise-IoU loss, dynamically modulated based on anchor box outlier. Specifically, this loss has three layers: the first layer is a smoothed intersection-union ratio (IoU) loss, which adds a quadratic smoothing term to the standard IoU loss, making the gradient smoother when the IoU approaches 0; the second layer is a normalized center point distance penalty term, which penalizes the distance between the predicted box center and the true box center using an exponential function; the third layer is a dynamic gradient gain factor, which is related to both the anchor box outlier and the training epoch. Outlier reflects the difference in quality between the current anchor box and the average level. Medium-quality anchor boxes with an outlier of approximately 1.5 receive the highest gradient gain, while the gain of anchor boxes with extremely high (very poor) or extremely low (very good) outliers is suppressed. Meanwhile, the gain factor undergoes nonlinear annealing with each training round. The gain is small in the early stages of training, suppressing harmful gradients caused by low-quality anchor boxes; in the later stages of training, the gain approaches the theoretical maximum value, focusing on fine regression of anchor boxes with minor defects.
[0070] After obtaining the confidence score and bounding box coordinate offset of the corresponding defect category, the non-maximum suppression algorithm is used to sort the boxes from high to low confidence, retain the highest-scoring boxes, and delete the neighboring boxes whose intersection-union ratio exceeds the threshold, and output the appearance defect detection results of lithium battery copper foil.
[0071] In summary, the lightweight detection method for appearance defects of lithium-ion battery copper foil in the above embodiments of the present invention simultaneously acquires tension fluctuation signals and linear velocity signals during winding and unwinding, and uses the tension fluctuation signals to perform motion blur compensation on the original image to improve the motion blur compensation progress, providing a high signal-to-noise ratio input image basis for subsequent defect detection. For the obvious anisotropic rolling texture exhibited by lithium-ion battery copper foil after rolling and annealing processes, the main texture direction is extracted by constructing a locally weighted directional gradient histogram, and an anisotropic suppression mask is generated accordingly. This effectively suppresses the normal background response consistent with the main texture direction, while enhancing the potential background response that deviates from the main texture direction. The defect region response makes minute defects such as penetrating pinholes and micro-scratches stand out significantly from the complex rolling texture background, greatly improving the signal-to-noise ratio of defects. An adaptive sampling bias field is constructed to deflect the convolution kernel along the local texture or defect extension direction, accurately matching the geometric orientation of linear defects such as scratches and roll marks on the surface of lithium battery copper foil. A hybrid second-order gradient-curvature criterion is used to evaluate the importance score of key channels, avoiding the accidental deletion of channels corresponding to minute defects such as penetrating pinholes in lithium battery copper foil by traditional pruning methods that only rely on sorting. A soft pruning mask is introduced to replace hard threshold binarization pruning, making the pruning operation completely differentiable and leaving sufficient recovery elasticity for the fine-tuning stage.
[0072] Example 2 Another aspect of this invention proposes a lightweight detection system for appearance defects in lithium-ion battery copper foil; please refer to [link / reference needed]. Figure 2 The figure shows a lightweight inspection system for appearance defects of lithium battery copper foil according to a second embodiment of the present invention. The system includes: Image acquisition module 11 is used to simultaneously acquire the original image of the surface of the lithium battery copper foil, and simultaneously acquire the tension fluctuation signal of the winding and unwinding to perform motion blur compensation on the original image, and extract features from the compensated original image to obtain a standardized enhanced input tensor. The network construction module 12 is used to construct a backbone network and input the enhanced input tensor into the backbone network to calculate the principal response direction angle at a local spatial location, and construct an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel; The convolution processing module 13 is used to calculate the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determine the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and perform depth-separable convolution operation on the key channels to obtain a lightweight enhanced feature map. The model building module 14 is used to build a converged sparse model, extract the scaling factor and first-order partial derivative of all prunable channels from the sparse model, evaluate the importance score of the key channel using a hybrid second-order gradient-curvature criterion, and introduce a soft-pruning mask based on the importance score to build the corresponding lightweight detection model. The defect detection module 15 is used to input the lightweight enhanced feature map into the lightweight detection model, output the confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil through decoupling branches, and output the appearance defect detection result of the lithium battery copper foil after non-maximum suppression.
[0073] Furthermore, the image acquisition module 11 is specifically used for: Simultaneously acquired bright-field reflection and dark-field scattering images of the lithium-ion battery copper foil surface, and simultaneously acquired tension fluctuation signals and linear velocity signals during winding and unwinding; Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring. The spatial gradient is calculated pixel by pixel for the deblurred clear dark field image. The deblurred clear dark field image is divided into several local windows, and a weighted directional gradient histogram is constructed in each local window. The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. An anisotropic suppression mask is constructed based on the main texture direction. The deblurred clear dark field image is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map. The defect saliency map is then subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. The normalized enhancement graph is extended along the channel dimension to generate a standardized enhancement input tensor.
[0074] Furthermore, the network construction module 12 is specifically used for: A backbone network is constructed, and the enhanced input tensor is upsampled and downsampled using the backbone network to obtain a texture feature map. ; For the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; An adaptive sampling bias field is dynamically constructed based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
[0075] Furthermore, the convolution processing module 13 is specifically used for: Calculate each channel based on the adaptive sampling bias field. Spatial mean Spatial variance Define anisotropic feature scores and dynamically adjust the number of key channels for parameter convolution operations based on the anisotropic feature scores of all channels. Depth-separable convolution operations are performed on the key channels to obtain convolution output feature maps. The convolution output feature maps are then concatenated in the original channel order, and the concatenated results are post-processed by linear projection and normalization using pointwise convolution to obtain lightweight enhanced feature maps.
[0076] Furthermore, the model building module 14 is specifically used for: All channels are sorted based on the importance score to obtain an ordered sequence, and the number of channels to be retained in the ordered sequence is determined according to the target compression ratio to calculate the global hard pruning threshold. A continuous soft-pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft-pruning mask is then introduced into the sparse model to construct the corresponding lightweight detection model.
[0077] The functions or operation steps implemented by the above modules and units are largely the same as those in the above method embodiments, and will not be repeated here.
[0078] The lightweight detection system for appearance defects of lithium-ion battery copper foil provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0079] Example 3 This invention also proposes a computer, please refer to [link / reference]. Figure 3 The computer shown in the third embodiment of the present invention includes a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, it implements the above-mentioned method for lightweight detection of appearance defects in lithium battery copper foil.
[0080] The memory 10 includes at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10 can be an internal storage unit of a computer, such as the computer's hard disk. In other embodiments, the memory 10 can be an external storage device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory 10 can include both internal and external storage units of the computer. The memory 10 can be used not only to store application software and various types of data installed on the computer, but also to temporarily store data that has been output or will be output.
[0081] In some embodiments, the processor 20 may be an electronic control unit (ECU), a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, used to run program code stored in the memory 10 or process data, such as executing access restriction programs.
[0082] It should be pointed out that, Figure 3 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0083] This invention also proposes a storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for lightweight detection of appearance defects in lithium-ion battery copper foil.
[0084] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0085] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0086] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0087] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0088] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A lightweight detection method for appearance defects in lithium battery copper foil, characterized in that, include: Simultaneously acquire the original image of the lithium battery copper foil surface, and simultaneously acquire the tension fluctuation signal of winding and unwinding to perform motion blur compensation on the original image. Then, extract features from the compensated original image to obtain a standardized enhanced input tensor. A backbone network is constructed, and the enhanced input tensor is input into the backbone network to calculate the principal response direction angle at the local spatial location. An adaptive sampling bias field is constructed based on the principal response direction angle to adjust the sampling position of the convolution kernel. The spatial mean and spatial variance of each channel are calculated based on the adaptive sampling bias field. The number of key channels participating in the convolution operation is determined based on the spatial mean and the spatial variance. Depth-separable convolution operation is performed on the key channels to obtain a lightweight enhanced feature map. A converged sparse model is constructed, and the scaling factor and first-order partial derivative of all prunable channels are extracted from the sparse model. The importance score of the key channel is evaluated using a hybrid second-order gradient-curvature criterion. Based on the importance score, a soft-pruning mask is introduced to construct the corresponding lightweight detection model. The lightweight enhanced feature map is input into the lightweight detection model. The confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil are output through decoupling branches. After non-maximum suppression, the appearance defect detection result of the lithium battery copper foil is output.
2. The method for lightweight detection of appearance defects in lithium battery copper foil according to claim 1, characterized in that, The steps of simultaneously acquiring the original image of the lithium battery copper foil surface and simultaneously acquiring the tension fluctuation signal during winding and unwinding to perform motion blur compensation on the original image, and extracting features from the compensated original image to obtain a standardized enhanced input tensor include: Simultaneously acquired bright-field reflection and dark-field scattering images of the lithium-ion battery copper foil surface, and simultaneously acquired tension fluctuation signals and linear velocity signals during winding and unwinding; Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring. The spatial gradient is calculated pixel by pixel for the deblurred clear dark field image. The deblurred clear dark field image is divided into several local windows, and a weighted directional gradient histogram is constructed in each local window. The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. An anisotropic suppression mask is constructed based on the main texture direction. The deblurred clear dark field image is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map. The defect saliency map is then subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. The normalized enhancement graph is extended along the channel dimension to generate a standardized enhancement input tensor.
3. The method for lightweight detection of appearance defects in lithium battery copper foil according to claim 1, characterized in that, The steps of constructing a backbone network and inputting the enhanced input tensor into the backbone network to calculate the principal response direction angle at a local spatial location, and constructing an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel include: A backbone network is constructed, and the enhanced input tensor is upsampled and downsampled using the backbone network to obtain a texture feature map. ; For the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; An adaptive sampling bias field is dynamically constructed based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
4. The method for lightweight detection of appearance defects in lithium battery copper foil according to claim 1, characterized in that, The steps of calculating the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determining the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and performing depthwise separable convolution operations on the key channels to obtain a lightweight enhanced feature map include: Calculate each channel based on the adaptive sampling bias field. Spatial mean Spatial variance Define anisotropic feature scores and dynamically adjust the number of key channels for parameter convolution operations based on the anisotropic feature scores of all channels. Depth-separable convolution operations are performed on the key channels to obtain convolution output feature maps. The convolution output feature maps are then concatenated in the original channel order, and the concatenated results are post-processed by linear projection and normalization using pointwise convolution to obtain lightweight enhanced feature maps.
5. The method for lightweight detection of appearance defects in lithium battery copper foil according to claim 1, characterized in that, Based on the importance score, the steps for constructing the corresponding lightweight detection model by introducing a soft-pruning mask include: All channels are sorted based on the importance score to obtain an ordered sequence, and the number of channels to be retained in the ordered sequence is determined according to the target compression ratio to calculate the global hard pruning threshold. A continuous soft-pruning mask is generated for each channel using the Sigmoid function and the global hard pruning threshold. The soft-pruning mask is then introduced into the sparse model to construct the corresponding lightweight detection model.
6. A lightweight inspection system for appearance defects in lithium-ion battery copper foil, characterized in that, include: The image acquisition module is used to simultaneously acquire the original image of the lithium battery copper foil surface and simultaneously acquire the tension fluctuation signal of the winding and unwinding to perform motion blur compensation on the original image, and extract features from the compensated original image to obtain a standardized enhanced input tensor. The network construction module is used to construct the backbone network and input the enhanced input tensor into the backbone network to calculate the principal response direction angle at the local spatial location, and construct an adaptive sampling bias field based on the principal response direction angle to adjust the sampling position of the convolution kernel; The convolution processing module is used to calculate the spatial mean and spatial variance of each channel based on the adaptive sampling bias field, determine the number of key channels participating in the convolution operation based on the spatial mean and the spatial variance, and perform depthwise separable convolution operation on the key channels to obtain a lightweight enhanced feature map. The model building module is used to build a converged sparse model, extract the scaling factor and first-order partial derivative of all prunable channels from the sparse model, evaluate the importance score of the key channels using a hybrid second-order gradient-curvature criterion, and introduce a soft-pruning mask based on the importance score to build the corresponding lightweight detection model. The defect detection module is used to input the lightweight enhanced feature map into the lightweight detection model, and output the confidence score of the defect category and the bounding box coordinate offset of the lithium battery copper foil through decoupling branches. After non-maximum suppression, the module outputs the appearance defect detection result of the lithium battery copper foil.
7. The lightweight inspection system for appearance defects of lithium-ion battery copper foil according to claim 6, characterized in that, The image acquisition module is specifically used for: Simultaneously acquired bright-field reflection and dark-field scattering images of the lithium-ion battery copper foil surface, and simultaneously acquired tension fluctuation signals and linear velocity signals during winding and unwinding; Based on the tension fluctuation signal and the linear velocity signal, a tension-velocity coupled motion blur kernel is constructed, and the dark field scattering image is deblurred using frequency domain Wiener filtering and the tension-velocity coupled motion blur kernel to obtain a clear dark field image after deblurring. The spatial gradient is calculated pixel by pixel for the deblurred clear dark field image. The deblurred clear dark field image is divided into several local windows, and a weighted directional gradient histogram is constructed in each local window. The direction corresponding to the peak value of the histogram is taken as the main texture direction of the window. An anisotropic suppression mask is constructed based on the main texture direction. The deblurred clear dark field image is multiplied element-wise with the anisotropic suppression mask to obtain a defect saliency map. The defect saliency map is then subjected to adaptive contrast stretching based on histogram quantiles to obtain a normalized enhancement map. The normalized enhancement graph is extended along the channel dimension to generate a standardized enhancement input tensor.
8. The lightweight inspection system for appearance defects of lithium battery copper foil according to claim 6, characterized in that, The network construction module is specifically used for: A backbone network is constructed, and the enhanced input tensor is upsampled and downsampled using the backbone network to obtain a texture feature map. ; For the texture feature map Perform pixel-by-pixel local geometric orientation analysis for spatial location The Schar operator is used to calculate the horizontal and vertical partial derivatives to obtain the local gradient magnitude. With the main response direction angle ; An adaptive sampling bias field is dynamically constructed based on the main response direction angle. This is to adjust the sampling position of the convolution kernel.
9. A readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the lightweight detection method for appearance defects of lithium battery copper foil as described in any one of claims 1 to 5.
10. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the lightweight detection method for appearance defects of lithium battery copper foil as described in any one of claims 1 to 5.