Next Article in Journal
Progress in the Energy Transition Process in EU Countries—A Sustainable Multi-Criteria Assessment
Previous Article in Journal
Influence of Skin Factor on Oil Recovery and Economic Performance in Synthetic Layered Carbonate Models Based on Pre-Salt Well Profiles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lightweight Cooperative Attention for Empowering YOLOv7-Tiny in Lithium Battery Surface Defect Recognition

1
School of Electronic, Electrical Engineering and Physics, Fujian University of Technology, Fuzhou 350118, China
2
Institute for Digital Intelligence Systems and Devices, Fujian University of Technology, Fuzhou 350118, China
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Energies 2026, 19(4), 1044; https://doi.org/10.3390/en19041044
Submission received: 3 January 2026 / Revised: 3 February 2026 / Accepted: 12 February 2026 / Published: 16 February 2026

Abstract

In response to the challenges of complex lithium battery surface defect morphology, difficulties in detecting small targets, and the trade-off between accuracy and speed in existing detection methods, this paper proposes an improved object detection network based on YOLOv7-tiny. The method focuses on enhancing the model’s adaptability to complex defects at the feature extraction level, primarily achieved through two key designs: First, we introduce a simple parameter-free attention module (SimAM) to enhance the network’s ability to characterize small-scale defect features with minimal computational overhead. Second, a lightweight large-kernel attention module is incorporated into the neck network, which builds long-range spatial dependencies to improve the model’s generalization and understanding of irregularly shaped defects. To validate the effectiveness of the model, comprehensive experiments were conducted on a self-built lithium battery surface defect dataset. The results show that the proposed method achieves an mAP@0.5 of 93.14%, representing an improvement of 3.08 percentage points over the baseline YOLOv7-tiny (You Only Look Once v7, lightweight variant) model. At the same time, the detection speed reaches 94 Frames Per Second (FPS), which is 17 FPS faster than the original YOLOv7. The experiments demonstrate that the network outperforms existing comparative methods in both detection accuracy and inference speed, providing an effective technical solution for high-precision, real-time online defect detection in lithium battery production processes.

1. Introduction

With the development of the domestic economy, new energy vehicles and various digital products continue to enrich people’s daily lives. These new types of products, which rely on electricity as their core energy source, have made life more convenient and efficient. As the key energy component of these products, lithium batteries—thanks to their lightweight nature, high energy density, and long lifespan—are increasingly favored by the market and widely used in products such as mobile phones, computers, smart home devices, and more. According to statistics released by the Ministry of Industry and Information Technology, from January to April 2025, China’s lithium-ion battery industry maintained its growth trend. Based on information from companies listed in the lithium battery industry specification announcement and estimates from industry associations, the total national lithium battery output from January to April exceeded 473 GWh, representing a year-on-year increase of 68% [1]. Production is expected to continue growing in the future, indicating broad market potential.
Based on different detection methods, current quality inspection approaches in lithium battery enterprises are primarily categorized into two types: manual visual inspection and machine vision detection [2]. Due to its low efficiency, high cost, and poor stability, manual visual inspection fails to meet the demands of modern automated production. This has compelled both researchers and enterprises to explore defect detection technologies based on machine vision.
Machine vision detection systems typically consist of three main modules: image acquisition, computer processing, and motion control [3]. Compared to manual visual inspection, machine vision detection offers higher precision and better stability, making it an effective means of achieving automation, intelligence, and precise control in equipment [3]. However, practical applications of machine vision detection also face several challenges, including: 1. In automated production lines, factors such as dynamic imaging on moving conveyor belts can easily generate motion blur and defocus blur, especially at higher line speeds [2]. 2. Blurred images often lead to missed detections and false detections during defect inspection, resulting in unreliable detection outcomes and significantly limiting the accuracy of machine vision detection methods [4].
As mentioned above, image blur in machine vision detection affects inspection accuracy. For already acquired clear lithium battery images, the key to efficiently and accurately detecting surface defects lies in developing a robust object detection algorithm. In recent years, breakthroughs in deep learning methods for industrial quality inspection [5,6,7] have provided a clear technical pathway for this purpose. Current common lithium battery detection methods are primarily improved based on the YOLO model. However, these detection methods still face three key challenges that need to be addressed:
  • Due to different formation mechanisms, lithium battery surface defects often exhibit diverse shapes, such as linear scratches and point-like pinholes. To adapt to varied defect morphologies, detection methods need to develop attention capabilities for different defect types, thereby improving detection accuracy.
  • The scale of these defects also varies, such as pinhole defects spanning only a few pixels. Detection methods must effectively perceive small-scale information to enhance the detection capability for small targets.
  • To improve detection speed, it is necessary to reduce the computational burden of the model.
To address the aforementioned challenges, we propose a target detection network based on YOLOv7-tiny. First, the method incorporates a low-computational-cost, parameter-free attention module to enhance the perception of small target features. Subsequently, a lightweight large kernel attention module is employed to understand morphological variations across different defects, thereby improving the network’s defect detection accuracy. The main contributions of this paper are as follows:
  • We propose an improved YOLOv7-tiny target detection network, aiming to achieve high-precision and high-efficiency automated detection of lithium battery surface defects.
  • We introduce the LKA module into the neck network. Through decoupled large-kernel depthwise convolution and spatial convolution, this module constructs a multi-scale receptive field with long-range dependencies. It efficiently models the spatial contextual information of irregular and polymorphic lithium battery surface defects with a lower parameter count, thereby enhancing the network’s feature understanding and geometric adaptability to complex defects.
  • We integrate the SimAM into the backbone network. With minimal computational overhead, this module adaptively enhances the feature response in small target regions while suppressing redundant background information. Consequently, it more completely preserves the semantic information of tiny defects during forward feature propagation, effectively mitigating the feature dilution problem in deep networks and improving the model’s sensitivity and detection robustness to small, low-contrast defects.
It should be emphasized that this study does not propose a new attention paradigm, but instead introduces, for the first time, the collaborative integration of existing SimAM and the Large Kernel Attention (LKA) modules into the backbone and neck of the YOLOv7-tiny network in a lightweight manner. This design achieves a significant and practical synergistic improvement in both accuracy and speed for industrial inspection scenarios. The code can be found in https://github.com/pilibal/-Lithium-Battery-Surface-Defect-Recognition (accessed on 3 January 2026).
The remainder of this paper is organized as follows. Section 2 reviews related work in the field of surface defect detection. Section 3 outlines the data used in this study and the overall framework of the proposed method, providing detailed descriptions of the individual modules introduced. Experimental results are discussed in Section 4, while Section 5 contains the discussion and conclusions.

2. Related Works

In recent years, machine vision-based surface defect detection technology has advanced significantly and has become an effective solution for industrial product quality inspection. Based on the type of defect information obtained, traditional defect detection techniques can be categorized into three main approaches: class labels, bounding boxes, and pixel masks. These correspond to learning-based methods, namely image classification, object detection, and image segmentation [5]. Image classification is used to determine whether an image contains defects and to identify the defect category; it is often employed in industrial scenarios where defects are relatively uniform. Image segmentation involves making pixel-level judgments about defect morphology, size, and location. However, it requires pixel-level annotated images for training, which incurs high labeling costs and is less suitable for industrial systems where economic considerations are critical. Object detection not only identifies the presence and category of defects in an image but also determines their location and size. It requires lower labeling costs and applies to defect detection in most industrial products [8].

2.1. Traditional Detection Methods

Traditional methods typically rely on the Support Vector Machine (SVM) algorithm, combined with features such as defect color and shape. In 2019, Xiao et al. [9] achieved defect detection on the surface of lithium battery rolling mills through processes including category classification, image processing, and feature extraction. By testing 40 sets of rolling mill defect samples, the model achieved an accuracy of 90%, confirming the precision and effectiveness of the method. In 2021, Xu et al. [10] proposed a surface defect detection method for lithium battery electrodes combining Particle Swarm Optimization-SVM (PSO-SVM), using the Canny operator and logical operations to extract defect regions, then integrating texture and edge features to characterize the defect areas, and finally employing SVM for defect image classification and recognition. In 2023, Wang et al. [11] introduced a battery surface defect detection method based on photometric stereo and frequency-domain Gabor filtering. Through steps such as Fast Fourier Transform, Gabor filtering, noise reduction, and morphological operations, accurate detection of block-like defects was achieved. Although the aforementioned methods have yielded promising results, their limitations have become more pronounced as industrial scenarios grow increasingly complex and defects become harder to detect. In response, researchers have begun adapting general-purpose object detection network frameworks to better suit industrial data detection needs.

2.2. Object Detection Methods Based on Deep Learning

Surface defect detection typically requires accurate identification of defects on product surfaces, thus imposing high-performance demands on detection methods. Based on differences in detection principles, object detection methods can be categorized into two-stage and single-stage approaches, with typical representatives including Faster Region-based Convolutional Network (Faster R-CNN [12]) and the YOLO series [13,14,15,16,17,18,19], among others.

2.2.1. Two-Stage Detection Network

Two-stage detection networks typically begin by scanning the entire image using a set of predefined sliding windows to generate a series of candidate bounding boxes, followed by filtering out negative samples. The remaining candidate regions then undergo a secondary refinement regression to produce the final detection results. In 2014, Girshick et al. [20] first proposed the two-stage object detection model R-CNN, which transforms the detection task into separate classification and localization problems, employing a region proposal module and a CNN for implementation. However, R-CNN suffers from low computational efficiency, limiting its practical utility. In 2015, Ren et al. [12] improved upon R-CNN and introduced Faster R-CNN, achieving significant enhancements in both real-time performance and accuracy. Consequently, Faster R-CNN has been widely adopted in industrial quality inspection. For example, in 2020, Hu et al. [21] utilized ResNet50 as the feature extraction backbone for Faster R-CNN and integrated residual units from ShuffleNetV2 to accelerate network inference, achieving satisfactory accuracy in detecting surface defects on printed circuit board products.
Although two-stage detection networks achieve high detection accuracy in object detection tasks, this often comes at the cost of high computational complexity. This high computational burden limits the real-time efficiency of two-stage networks, constraining their practical application in certain scenarios, particularly in the field of lithium battery defect detection.

2.2.2. Single-Stage Detection Network

Compared to two-stage networks, single-stage detection networks eliminate the region proposal step, enabling the network to directly output defect locations and classifications, thereby improving real-time performance. In 2021, Lang et al. [22] applied image preprocessing to a lithium battery dataset, used the K-means algorithm to generate anchor boxes, and subsequently trained a YOLOv3 detection network. Experimental results showed that this algorithm achieved a detection speed of 25 frames per second on the lithium battery dataset while effectively locating and classifying lithium battery defects. To address the issues of low accuracy and slow speed in traditional methods for detecting lithium battery surface defects, in 2022, Gui et al. [23] built upon YOLOv4 by incorporating techniques such as dilated convolutions and conditional convolutions in the feature extraction network, enhancing the detection capability for defects of various scales while reducing model complexity and computational load. In 2023, Hu et al. [24] proposed a lithium battery defect detection model named Sim-YOLOv5s. This model optimized the network architecture by introducing a SimSPPF rapid spatial pyramid pooling structure, an attention-based convolutional block, a novel upsampling operator, and cross-layer connections. Experimental results demonstrated that the Sim-YOLOv5s model achieved an average precision of 88.3%, representing a 6.9% improvement over YOLOv5s, significantly enhancing the detection performance for lithium battery defects. Also in 2023, Zhang et al. [25] integrated a convolutional block attention module into YOLOv5s and designed a positional loss function to improve the model’s localization prediction accuracy.
Single-stage networks offer high real-time performance, yet their detection accuracy remains constrained by the feature extraction capability of the network, leaving room for further improvement. In contrast, two-stage object detection algorithms generate region proposals first and then perform predictions separately, resulting in relatively slower detection speeds. By comparison, YOLO adopts an end-to-end approach, performing both object localization and classification within a single network, achieving a better balance between speed and accuracy. Among the YOLO series, YOLOv7 delivers high detection performance, and its lightweight variant, YOLOv7-tiny, is particularly known for its extremely fast inference speed. However, its recognition accuracy in complex defect detection scenarios still has certain room for enhancement. Therefore, to meet the dual requirements of real-time performance and accuracy in lithium battery defect detection tasks, this paper selects YOLOv7-tiny as the baseline for research on lithium battery defect detection and enhances it according to the specific application requirements.

3. Materials and Methods

3.1. Lithium Battery Data

In this study, we employ a custom-built dataset. By applying quality screening and restoration to the collected images, clear lithium battery images were obtained. To construct a dataset for training surface defect detection models, we used the LabelImg (version 1.8.6) to perform detailed annotation on the collected lithium battery images. The annotation process focused on the bounding box locations and category information of various defects, such as scratches, dents, and stains, thereby generating high-quality supervised learning labels. After annotation, a total of 313 labeled images of size 128 × 128 pixels were obtained.

3.1.1. Dataset Composition and Defect Categories

The dataset we constructed encompasses multiple types of lithium-ion batteries, ensuring diversity in data sources. The collected defect images include both naturally occurring real defects from the battery production process and artificially generated simulated defects under controlled conditions, thereby enhancing the comprehensiveness and controllability of the dataset. The defect categories primarily cover the following four typical surface anomalies: bulges, pinholes, scratches, and dents (as shown in Figure 1). Each defect category includes samples of varying sizes, morphologies, and occurrence locations, simulating various scenarios that may be encountered in actual industrial inspections.

3.1.2. Image Acquisition and Preprocessing

(1)
Lighting setup for acquisition
During image acquisition, the illumination source is a critical component of the hardware platform. The aluminum-laminated film packaging of pouch lithium batteries exhibits metallic reflective properties similar to metal materials. Inappropriate lighting can cause direct specular reflections into the lens, resulting in local overexposure and obscuring defect features in captured images, thereby compromising subsequent image processing. Therefore, an appropriate illumination configuration is essential to enhance product brightness, increase defect contrast, suppress background noise and other interfering factors, consequently reducing the complexity of downstream detection algorithms and improving overall detection performance. In this study, a bar-type LED light source was selected as the illumination source (as shown in Figure 2a). The tilt angle of the bar light was adjusted according to the dimensions of the pouch lithium battery to maximize feature contrast in defect regions.
(2)
Pouch Lithium Battery Surface Image Preprocessing
After completing the calibration of the industrial camera and illumination source, image acquisition was performed using the platform shown in Figure 2b. Since the pouch lithium battery tabs fall outside the scope of this study and the captured images contain substantial irrelevant background pixels, preprocessing was conducted to extract the Region of Interest (ROI) of the pouch lithium battery surface, thereby eliminating interference from unrelated factors in subsequent defect detection. The entire preprocessing pipeline comprises three steps: image segmentation, morphological opening, and image cropping. Figure 3 illustrates the ROI extraction workflow.
(3)
Data Augmentation
Compared to non-learning methods, deep learning-based object detection algorithms typically require a large number of defect image samples. Therefore, based on the annotated images, data augmentation methods were applied, including horizontal flipping, vertical flipping, HSV adjustments, brightness variations, and random rotation, as illustrated in Figure 4. After data augmentation, 2191 images were obtained to construct the Surface Defect Detection of Lithium Batteries (SDDLB) dataset. The dataset was then randomly split into training, validation, and test sets in an 8:1:1 ratio.
To verify the feasibility of the SDDLB dataset, we evaluated three mainstream object detectors: YOLOv3, YOLOv5, and our proposed method. The results are reported in Table 1, where the top two metrics are bolded. YOLOv5 and our approach rank first and second in Precision and F1-Score, while our method achieves the highest mAP@0.5. Consequently, SDDLB can serve as a reliable image benchmark for surface-defect detection algorithms.

3.2. Network Architecture for Surface Defect Detection of Lithium Batteries

To address the challenges of complex defect morphology and limited detection capability for small-scale defects, we propose a Surface Defect Detection Network of Lithium Battery Based on YOLOv7-tiny (SLT-YOLOv7). As illustrated in Figure 5, the overall architecture of SLT-YOLOv7 consists of three components: a feature extraction backbone, a feature fusion neck, and a detection head. The input lithium battery surface image is first processed by the backbone network. In this stage, the image undergoes convolutional operations, normalization, and activation functions to extract multi-scale spatial features across three scales (P1, P2, and P3). Additionally, the SimAM [26] is incorporated to enhance the extraction of small-target features. Subsequently, the features from the three scales (P1, P2, and P3) are fused within the neck network. To improve the model’s adaptability to diverse defect morphologies, the LKA module is integrated into the first and second scales (P1 and P2). The fused features are then forwarded to the detection head to perform the final surface defect detection. Thus, the workflow of SLT-YOLOv7 can be summarized into three stages: feature extraction, feature fusion, and defect detection. Defect detection itself can be further divided into defect classification and defect localization, with outputs including visualized defect positions, defect categories, and confidence scores within the input image.

3.3. A Simple Parameter-Free Attention Module

During the feature extraction process in the backbone network, as the number of convolutional layers increases and downsampling operations are performed, the resolution of feature maps is progressively compressed. This leads to the loss of small-scale target information, which contains fewer pixels, thereby significantly compromising the accuracy and effectiveness of detecting small defect targets. To address this, the SimAM is introduced into the P3 layer of the backbone network to enhance the representation capability for small targets (as shown in Figure 5). Incorporating SimAM makes the model more sensitive to small-target information, allowing such features to be better preserved during network propagation and ultimately improving the detection of small-target defects.
As shown in Figure 6, unlike existing spatial and channel attention modules, the SimAM is a parameter-free module that infers 3D attention weights. Its working principle is based on neuroscience theory. In the field of neuroscience, informative neurons typically exhibit firing patterns that are distinctly different from those of surrounding neurons [27]. This characteristic can be captured by measuring the linear separability between a target neuron and other neurons. In the SimAM, each neuron is quantified by an energy function, where the minimum energy corresponds to finding the linear separability between the target neuron and others. Specifically, the energy function for each neuron is expressed as:
t l = w t t + b t ,
x l i = w t x i + b t ,
e t w t , b t , y , x i = y t t l 2 + 1 H × W 1 i = 1 H × W 1 y 0 x l i 2 ,
where t and xi represent the target neuron and other neurons in the input feature X ∈ ℝC×H×W, respectively. i is the index of the neuron. tl and xli denote the linear transformations of t and xi. wt and bt represent the weight and bias transformations, respectively. yt denotes the target neuron, while y0 represents the other neurons. Minimizing the energy function yields:
μ = 1 H × W i = 1 H × W x i ,
δ 2 = 1 H × W i = 1 H × W ( x i μ ) 2 ,
e m i n = 4 ( μ + δ 2 ) ( t μ ) 2 + 2 δ 2 + 2 × 10 4 ,
where emin is the minimum energy function, μ and δ represent the mean and variance of all neurons, respectively. The importance of each neuron is expressed as 1/emin. It can be observed that the lower the energy function emin, the greater the distinction between the target neuron t and other neurons, and the higher its importance. In attention mechanisms, it is necessary to model the attention feature map for the input feature X. Therefore, the working process of SimAM can be expressed as:
X a t t e n = σ 1 E X ,
where E denotes the sum of all emin values across spatial and channel dimensions. σ represents the Sigmoid function, which constrains the value of E within a certain range. As shown in Equation (7), the SimAM does not require any convolutional operations throughout its workflow, thereby introducing no parameter cost to the network and earning its designation as a parameter-free attention module. This module can significantly reduce model parameter counts and computational costs. In the backbone network, as convolutional layers deepen, the resolution of feature maps continually shrinks, causing small-target features to disperse or even lose information. Therefore, the SimAM is embedded into the P3 layer of the backbone network (as illustrated in Figure 5). In deep networks, the SimAM can enhance the weight of small-target features, prevent information loss, and help improve the model’s ability to detect small targets, thereby reducing the rate of missed detections.

3.4. Large Kernel Attention Module

Due to the diverse formation mechanisms of lithium battery surface defects, they exhibit various morphologies, including linear scratches and punctate pinholes. To address this variability, it is essential to ensure that the model can accurately identify and distinguish surface defects of different shapes. After multi-scale information is extracted by the backbone network, the deepening of network layers leads to an increase in fine-grained features, making it difficult for the network to correctly discern the distinct differences between defects. This is particularly detrimental to the extraction and fusion of multi-scale information in the neck network. In deep learning, attention mechanisms have been widely applied to various computer vision tasks—such as image super-resolution [28] and image segmentation [29]—with significant impact. Attention mechanisms can redistribute network resources to focus more on the features of target objects, thereby improving detection capability. Among attention mechanisms, the LKA module [30] is a lightweight module with receptive fields of different scales, capable of efficiently capturing the features of lithium battery defects across varying morphologies. Therefore, the LKA module is integrated into the P1 and P2 layers of the neck network (as shown in Figure 5) to enhance the network’s ability to distinguish between different defect morphologies.
As shown in Figure 7, the LKA module first applies batch normalization (BN) to the input feature Fin to accelerate network convergence. After normalization, a 1 × 1 convolutional layer and a GELU activation function are applied to preprocess the feature, yielding feature Fx. This can be mathematically expressed as:
F x = GELU ( C 1 ( BN ( F i n ) ) )
After preprocessing, the spatial attention unit (SAU) achieves differentiated focus on multi-scale information. To capture larger-scale information, previous approaches often employ solutions such as self-attention mechanisms with quadratic complexity or convolutional layers with large kernels. Although these methods can yield performance gains, they come with substantial computational costs and high parameter counts. In recent years, approaches based on the principle of equivalent decomposition [30] have been proposed, effectively addressing this issue. This principle equivalently decomposes a large convolutional kernel into three smaller kernels, significantly reducing computational costs while maintaining the same receptive field. Let the input and output feature map dimensions be H × W × C, the kernel size and dilation rate of the large-kernel convolution be K and d, respectively, and ignore the bias term. The parameter count P(K, d) and floating-point operations F(K, d) of the network are expressed as:
P K , d = C × C × K × K ,
F K , d = 2 × K × K × C × C C × H × W .
After equivalent decomposition, the parameter count and floating-point operations become, respectively:
P K , d = K d × K d × C + 2 d 1 × 2 d 1 × C + C × C ,
F K , d = K d × K d × C + 2 d 1 × 2 d 1 × C + C × C × H × W .
From the equations, it can be observed that by decomposing a large convolutional kernel, both the network’s parameter counts and floating-point operations are reduced. This indicates that the decomposed network achieves significant improvements in computational efficiency while also lowering model complexity. In the SAU, a large convolutional layer is decomposed into three smaller layers: a depth-wise convolution (DW-Conv), a depth-wise dilation convolution (DW-D-Conv), and a pointwise convolution (Point-Conv). Among these, DW-Conv uses a small kernel to capture fine-scale information. DW-D-Conv builds upon DW-Conv by increasing the dilation rate, granting it a larger receptive field for capturing coarse-scale information. Point-Conv is a 1 × 1 convolutional layer that focuses on the channel dimension, compensating for the lack of channel modeling capability in the network. After processing through these three convolutional layers, an attention map Fatten is generated. Then, Fatten is mapped onto feature Fx via element-wise multiplication to achieve differentiation and attention toward defect information of various morphologies. The mathematical expression for SAU is:
F a t t e n   =   Point-Conv ( DW-D-Conv ( DW-Conv ( F x ) ) ) ,
F y = F a t t e n F x .
Following the SAU, a 1 × 1 convolutional layer is used to fine-tune the features, and a residual structure is incorporated to prevent the network from encountering gradient vanishing issues. The final output feature Fout is obtained, with the specific mathematical expression given as:
F o u t = C 1 ( SAU ( F x ) ) + F i n .
where SAU denotes the Spatial Attention Unit, and C1 represents the 1 × 1 convolutional layer.

4. Results and Discussion

4.1. Experiment Setup and Interpretation

After constructing the SLT-YOLOv7 network, we performed model training. The training data was sourced from the SDDLB dataset, which was randomly split into training, validation, and test sets in an 8:1:1 ratio. Although the original image size is 128 × 128, to enhance feature extraction capability, all images were uniformly upsampled to 640 × 640 during training. A phased optimization strategy was adopted: the backbone network weights were first frozen for preliminary training, after which all network layers were unfrozen for end-to-end fine-tuning. This approach not only ensures training stability but also effectively improves model convergence speed and feature representation capability. To ensure a fair comparison, all control experiments were conducted using the same “freeze-then-unfreeze” training strategy and identical hyperparameter settings. Detailed training configurations are provided in Table 2.
The loss function adopted in our model consists of three components: classification loss, localization loss, and confidence loss. Both the classification loss and the confidence loss employ Binary Cross-Entropy (BCE). The localization loss adopts the Complete IoU (CIoU) loss, which comprehensively considers the overlap area, center-point distance, and aspect ratio, thereby more effectively guiding bounding box regression. The overall form of the loss function is as follows:
l t o t a l = λ c l s · l B E C , c l s + λ b o x · l C I o U + λ o b j · l B E C , o b j ,
where λcls, λbox, and λobj are weighting coefficients for the classification loss, localization loss, and confidence loss, respectively. The classification loss and confidence loss (both using BCE), expressed as:
l B C E = 1 N n N y l i log y i + 1 y l i l o g 1 y i ,
where yi and yli denote the actual value and the label value, respectively, and N indicates the total number of samples.
The localization loss:
l C I o U = 1 I o U + ρ 2 b , b g t c 2 + α ν , α = ν 1 I o U + ν , υ = 4 π 2 ( a r c t a n ω g t h g t a r c t a n ω h ) 2 ,
where b and bgt denote the predicted and ground-truth bounding box centers, ρ() is the Euclidean distance, and c is the diagonal length of the smallest enclosing box covering both predicted and ground-truth boxes. ω, h, and ωgt, hgt are the width and height of the predicted and ground-truth boxes, respectively. IoU is the standard Intersection over Union.

4.2. Evaluation Metrics

To comprehensively compare the performance of different detection models, we introduce Mean Average Precision (mAP), Recall, Precision, and F1-score as evaluation metrics. Among them, Recall refers to the proportion of samples that are correctly predicted as positive out of all actual positive cases, and its formula is:
R e c a l l = T P T P + F N   ,
where FN denotes False Negative. Precision is the proportion of samples correctly predicted as positive out of all samples predicted as positive by the model. It measures the accuracy of positive predictions and is calculated as:
P r e c i s i o n = T P T P + F P   ,
where TP denotes True Positive, and FP denotes False Positive. Precision ranges from 0 to 1, and a higher value indicates greater accuracy in positive predictions. F1-score is a metric that combines both Precision and Recall. It also ranges from 0 to 1, where values closer to 1 indicate better overall performance, and it is calculated as:
F 1 = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l .
mAP is obtained by computing the average of the Average Precision (AP) for each class. mAP reflects the overall performance of the model across multiple classes and is one of the key metrics for evaluating object detection performance. Its value ranges from 0 to 1, where values closer to 1 indicate better performance, and it is calculated as:
A P = 0 1 P ( R ) d R ,
m A P = i = 1 k A P i K ,
where K denotes the total number of classes, P and R represent Precision and Recall, respectively, and i indicates the i-th class. In this paper, all detection models are evaluated using mAP at an IoU threshold of 0.50 (denoted as mAP@0.5).

4.3. Ablation Studies

To validate the effectiveness of each component in SLT-YOLOv7, a series of ablation experiments was conducted on the SDDLB dataset. First, YOLOv7-tiny was used as the baseline network. Building upon the baseline network, the SimAM was added to the P3 layer of the backbone network, and the LKA module was integrated between the P1 and P2 layers and the neck network.
Specifically, the P3 layer features output from the backbone network contain rich semantic information but relatively coarse spatial details. By introducing the parameter-free SimAM module at this stage, deep semantic features can be adaptively recalibrated with minimal computational overhead, which enhances the model’s sensitivity to fine-grained defect features while suppressing background noise interference. Its lightweight design ensures that the inference speed of the backbone remains unaffected.
On the other hand, the P1 and P2 layers preserve richer spatial detail information, which is crucial for precise defect localization and shape extraction. The integration of the lightweight LKA module here leverages its large receptive field achieved through convolutional kernel decomposition, thereby infusing the feature fusion process with broad contextual information at a low computational cost. This design enables the model to more comprehensively perceive the overall structure and morphological relationships of irregular defects when integrating P1 and P2 layer features, thus improving the representation capability for complex defects and the quality of multi-scale feature fusion.
The experimental results are shown in Table 3. From the table, it can be observed that when the SimAM was integrated into the P3 layer, the model’s parameter count remained unchanged, while the mAP@0.5 increased by 2.19%, and the inference speed decreased by only 1 FPS. This indicates that the SimAM is an attention module with high computational efficiency, capable of maintaining high real-time performance while effectively improving the network’s detection capability. Furthermore, after integrating the LKA module into the P1 and P2 layers, the inference speed continued to decrease by 10 FPS, and the parameter count increased by 0.3 M, but the mAP@0.5 value improved. This demonstrates that the LKA module enhances the multi-scale features transmitted from the P1 and P2 layers to the neck network, enabling the neck network to better extract morphological information and thereby improving the overall detection performance of the network.
Figure 8 presents the t-test statistical results of the F1-score between the proposed network and the baseline network. As shown in the figure, the p-value corresponding to our method is less than 0.0001 (*** indicates p < 0.0001), which is substantially lower than the preset significance level of 0.005 (Δ denotes the mean difference in the figure). The results demonstrate that, compared with the baseline network, the proposed network achieves a statistically significant improvement in performance.

4.4. Training Dynamics and Convergence Analysis

Figure 9 presents the training and validation loss curves over 300 training epochs. The training loss monotonically decreases from an initial value of 0.492 to a final value of 0.032, while the validation loss converges from 0.490 to 0.037. The two curves remain closely parallel throughout training, with a maximum gap not exceeding 0.05, indicating effective control of overfitting risk. The model achieves over 90% loss reduction within the first 50 epochs, demonstrating efficient learning capability. In the subsequent 250 epochs, the loss curves maintain stable convergence, validating the effectiveness of the regularization strategy.

4.5. Comparison of Defect Detection Visualization Results

To validate the defect detection performance of SLT-YOLOv7, we conducted algorithm testing and validation using two-stage networks such as Faster R-CNN [12], as well as single-stage networks including YOLOv3 [22], YOLOv5 [18], YOLOv7 [13], and YOLOv7-tiny [13]. The results were visually compared with those of SLT-YOLOv7. Training and testing of the compared methods were performed using their respective open-source codebases. By examining the visualizations in Figure 10, it can be observed that Faster R-CNN exhibits a higher number of false detections, such as multiple detections of the same linear scratch region. In contrast, the single-stage detection networks YOLOv3 and YOLOv5, which eliminate the region proposal step, reduce the false detection rate. However, they also show missed detections of certain defects. Conversely, YOLOv7 accurately identifies all defects on the lithium battery surface, demonstrating excellent detection performance.
Compared to YOLOv7, the network performance of YOLOv7-tiny shows a decline; for example, punctate pinhole defects are not accurately detected, leading to missed detections. In contrast, SLT-YOLOv7, by integrating both the SimAM and LKA modules, achieves outstanding defect detection results. The SimAM module in the backbone network effectively enhances the model’s ability to capture small-target features, reducing missed detections of small-scale defects. The LKA module improves the model’s perception of defect features across different scales, enabling accurate detection of targets with diverse morphologies.

4.6. Comparison of Performance Across Different Models

To investigate the superior performance of SLT-YOLOv7, we conducted a performance comparison on the SDDLB dataset between SLT-YOLOv7 and other methods, including the two-stage network Faster R-CNN and single-stage networks such as YOLOv3, YOLOv5, YOLOv7, and YOLOv7-tiny, as shown in Table 4 (where the top two results are highlighted in bold). Training and testing of the compared algorithms were performed using the open-source code provided in their respective original papers. From the table, it can be observed that Faster R-CNN, as a two-stage object detection network with limited feature extraction capability, exhibits the lowest Precision and F1 scores, despite achieving a relatively high Recall. YOLOv3 introduces the Darknet53 architecture to enhance feature extraction capability and incorporates residual modules, leading to improvements in both Precision and F1 scores. Compared to YOLOv3, YOLOv5 implements several network improvements, including the addition of the Focus module in the backbone to reduce downsampling information loss and the use of more flexible activation functions, such as Leaky ReLU and Sigmoid. As a result, all evaluation metrics of YOLOv5 show further improvement.
In recent years, YOLOv7 has introduced significant improvements over previous YOLO series, further enhancing detection performance through re-parameterization techniques, auxiliary head training, and an efficient ELAN network. YOLOv7 achieves the best test results across all key metrics. YOLOv7-tiny is derived from YOLOv7 through network pruning and simplification operations. Consequently, YOLOv7-tiny improves inference efficiency but experiences a decline in performance metrics. SLT-YOLOv7 builds upon the YOLOv7-tiny architecture and incorporates the SimAM module and the LKA module, significantly enhancing the performance of the base model. It achieves top-two rankings in both mAP@0.5 and Precision metrics. Although Recall experiences a slight decline, the F1 score remains unchanged, demonstrating that SLT-YOLOv7 not only maintains real-time efficiency but also exhibits superior detection performance. Although its absolute accuracy remains slightly lower than that of the full YOLOv7 model, SLT-YOLOv7 achieves comparable performance with significantly reduced model complexity, thereby markedly optimizing the balance between accuracy and efficiency. This makes it more suitable for deployment in real-world industrial environments with limited resources.

4.7. Comparison of Different Model Complexities

To validate the model complexity of SLT-YOLOv7, we compared various complexity metrics across methods, including the two-stage network Faster R-CNN and the single-stage networks YOLOv3, YOLOv5, YOLOv7, YOLOv7-tiny, and SLT-YOLOv7. Training and testing of the compared methods were based on their respective open-source code. Metrics for evaluating model complexity included the number of parameters (Params), floating-point operations (GFLOPs), and inference frame rate (FPS). All test images were sourced from the SDDLB test set, uniformly resized to 128 × 128. The specific values of each metric are detailed in Table 5, with the top two results highlighted in bold. As can be seen from the table, Faster R-CNN has the slowest inference speed at only 12 FPS, along with the highest parameter count and GFLOPs. This indicates that compared to single-stage detection networks like the YOLO series, two-stage detection networks such as Faster R-CNN exhibit higher model complexity, resulting in slower detection speeds. As the YOLO series networks have been iteratively improved and optimized, model complexity has gradually decreased. Among them, YOLOv7-tiny achieves the smallest parameter count, the fewest GFLOPs, and the highest inference frame rate. However, its detection performance falls short of YOLOv7 and our proposed method. Compared to the other methods, SLT-YOLOv7 ranks within the top two across all model complexity metrics while maintaining superior detection performance, making it well-suited for lithium battery defect detection scenarios that demand both high detection accuracy and real-time processing capabilities.

5. Conclusions and Discussion

Aiming at the challenges of complex lithium battery surface defect morphology and difficulty in small target detection, this paper proposes an improved object detection network based on YOLOv7-tiny. The method enhances the model’s capability through two key modules: the SimAM integrated into the P3 layer of the backbone network improves the perception of small target information with low computational cost, while the LKA module introduced into the neck network enhances the model’s feature understanding and adaptability to different defect morphologies through a lightweight design. To validate its performance, experiments on a self-built lithium battery defect dataset demonstrate that the proposed method achieves higher detection accuracy while maintaining efficient inference: the mAP@0.5 reaches 93.14%, an improvement of 3.08% over the baseline YOLOv7-tiny; the detection speed reaches 94 FPS, an increase of 17 FPS compared to the original YOLOv7. The results show that the proposed network outperforms comparative methods in both accuracy and speed, enabling high-precision, real-time defect detection on lithium battery surfaces.
In lithium battery defect detection experiments, limited by the scale of available samples and experimental environmental conditions, the current dataset struggles to cover all lithium battery models on the market or the complex and variable real-world conditions in industrial settings, which may affect the algorithm’s generalization ability and robustness in practical deployment. While the proposed SLT-YOLOv7 demonstrates promising detection performance and real-time capability in experimental settings, its deployment and application in real-world industrial environments still face multiple challenges:
(1)
Diverse lighting. The dataset was collected under relatively uniform illumination, whereas industrial scenes exhibit dynamic lighting. Specular reflection on battery surfaces can locally saturate or shadow regions, corrupting defect-related features. Although data augmentation was used to simulate brightness variations, the model’s robustness under extreme lighting must still be verified with data streamed directly from production lines.
(2)
Single-angle imaging. The images in this study were all acquired from a single imaging viewpoint. Under this condition, specular reflections or background textures on the battery surface can easily obscure subtle defects such as faint scratches and shallow dents, making their features difficult to extract effectively. In contrast, multi-view imaging can enable the same defect to exhibit higher contrast and clarity from at least one viewing angle, thereby significantly reducing the risk of missed detection caused by feature concealment.
(3)
Diverse battery types. The training data used in this study are relatively homogeneous and do not comprehensively cover the diverse battery types encountered in real-world industrial settings. Due to significant differences in casing materials, surface reflective properties, geometric shapes, and manufacturing processes among various types of lithium-ion batteries, the current model may exhibit limited generalization capability when applied across different battery types. In future work, it is necessary to incorporate training data from a wider range of battery types in order to enhance the model’s adaptability and robustness in diverse industrial scenarios.
In future work, we will further expand the dataset scale and systematically collect samples from more models and under broader environmental conditions to enhance the model’s adaptability to real-world scenarios.

Author Contributions

Conceptualization, S.Y. and J.C.; methodology, J.W.; software, M.L. and S.Y.; validation, C.Y., S.Y. and J.C.; formal analysis, J.W.; investigation, M.L.; resources, C.Y. and J.C.; data curation, J.C.; writing—original draft preparation, M.L. and S.Y.; writing—review and editing, J.W., S.Y. and J.C.; visualization, S.Y.; supervision, J.W.; project administration, C.Y. and J.C.; funding acquisition, J.W., C.Y. and J.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Education and Scientific Research Project for Young and Middle-aged Teachers by the Education Department of Fujian Province (No. JAT241073).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data supporting the findings of this study are currently being curated and are planned to be made publicly available after the publication of this article.

Acknowledgments

The author sincerely appreciates the valuable assistance provided by the School of Electronic, Electrical Engineering and Physics at Fujian University of Technology. Particular thanks are extended to the School for its first-class research facilities and vibrant academic environment. The authors are also grateful to all the teachers, classmates, and colleagues who have contributed diligent efforts and support to this research.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ministry of Industry and Information Technology of the People’s Republic of China. Operation Status of the National Lithium-ion Battery Industry from January to April 2025. 2025. Available online: https://www.miit.gov.cn/gxsj/tjfx/dzxx/art/2025/art_d7af22f806cd42928f5ae531aca47f45.html (accessed on 25 December 2025).
  2. Xie, Y.; Xu, X.; Liu, S.Y. Machine vision-based detection of surface defects in cylindrical battery cases. J. Energy Storage 2024, 101, 113949. [Google Scholar] [CrossRef] [Scilit]
  3. Muralidhar, S. Recent Advancements in Machine Vision Systems for Industrial Defect Detection: A Review. J. Eng. Res. Rep. 2025, 27, 385–392. [Google Scholar] [CrossRef] [Scilit]
  4. Wang, B.; Liu, G.; Wu, J. Blind deblurring of saturated images based on optimization and deep learning for dynamic visual inspection on the assembly line. Symmetry 2019, 11, 678. [Google Scholar] [CrossRef] [Scilit]
  5. Chen, X.; Liu, M.; Niu, Y.; Wang, X.; Wu, Y.C. Deep-Learning-Based Lithium Battery Defect Detection via Cross-Domain Generalization. IEEE Access 2024, 12, 78505–78514. [Google Scholar] [CrossRef] [Scilit]
  6. Zhang, J.; Wang, Y.; Jiang, B.; He, H.; Huang, S.; Wang, C.; Zhang, Y.; Han, X.; Guo, D.; He, G.; et al. Realistic fault detection of li-ion battery via dynamical deep learning. Nat. Commun. 2023, 14, 5940. [Google Scholar] [CrossRef] [Scilit]
  7. Lin, Y.H.; Ruan, S.J.; Chen, Y.X.; Li, Y.F. Physics-informed deep learning for lithium-ion battery diagnostics using electrochemical impedance spectroscopy. Renew. Sustain. Energy Rev. 2023, 188, 113807. [Google Scholar] [CrossRef] [Scilit]
  8. Li, S.B.; Yang, J.; Wang, Z.; Zhu, S.D.; Yang, G.C. Review of development and application of defect detection technology. Acta Autom. Sin. 2020, 46, 2319−2336. [Google Scholar] [CrossRef]
  9. Xiao, Y.J.; Qin, H.; Zhou, W.; Peng, K.; Meng, Z.Z.; Zhang, X.H. Detection and recognition of roll surface defects in lithium battery pole rolling mill. J. Electron. Meas. Instrum. 2019, 33, 148–156. [Google Scholar] [CrossRef]
  10. Xu, C.; Li, L.; Li, J.; Wen, C. Surface defects detection and identification of lithium battery pole piece based on multi-feature fusion and PSO-SVM. IEEE Access 2021, 9, 85232–85239. [Google Scholar] [CrossRef] [Scilit]
  11. Wang, Z.J.; Zan, A.; Gu, F. Surface Defect Detection of Pouch Cells Based on Gabor Filtering. Modul. Mach. Tool Autom. Manuf. Tech. 2023, 11, 146–149. [Google Scholar] [CrossRef]
  12. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 39, 1137–1149. [Google Scholar] [CrossRef] [Scilit]
  13. Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar] [CrossRef] [Scilit]
  14. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar] [CrossRef] [Scilit]
  15. Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 7263–7271. [Google Scholar] [CrossRef] [Scilit]
  16. Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar] [CrossRef] [Scilit]
  17. Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [Google Scholar] [CrossRef] [Scilit]
  18. Yan, B.; Fan, P.; Lei, X.; Liu, Z.; Yang, F. A real-time apple targets detection method for picking robot based on improved YOLOv5. Remote Sens. 2021, 13, 1619. [Google Scholar] [CrossRef] [Scilit]
  19. Li, C.; Li, L.; Jiang, H.; Weng, K.; Geng, Y.; Li, L.; Ke, Z.; Li, Q.; Cheng, M.; Nie, W.; et al. YOLOv6: A single-stage object detection framework for industrial applications. arXiv 2022, arXiv:2209.02976. [Google Scholar] [CrossRef] [Scilit]
  20. Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar] [CrossRef] [Scilit]
  21. Hu, B.; Wang, J. Detection of PCB surface defects with improved faster-RCNN and feature pyramid network. IEEE Access 2020, 8, 108335–108345. [Google Scholar] [CrossRef] [Scilit]
  22. Lang, X.; Zhang, Y.; Shu, S.; Liang, H.; Zhang, Y. Lithium battery surface defect detection based on the YOLOv3 detection algorithm. In Proceedings of the Tenth International Symposium on Precision Mechanical Measurements, Qingdao, China, 15–17 October 2021; SPIE: Cergy Pontoise, France, 2021; Volume 12059, pp. 558–565. [Google Scholar] [CrossRef] [Scilit]
  23. Gui, J.; Li, L.; Mao, X.; Wang, Q. Lithium battery defect detection method based on improved YOLOv4. Electron. Meas. Technol. 2022, 45, 144–150. [Google Scholar] [CrossRef]
  24. Hu, H.; Zhu, Z. Sim-YOLOv5s: A method for detecting defects on the end face of lithium battery steel shells. Adv. Eng. Inf. 2023, 55, 101824. [Google Scholar] [CrossRef] [Scilit]
  25. Zhang, Y.; Shu, S.; Lang, X.; Liang, H.; Yu, Z.; Yang, Z. A real-time method for detecting bottom defects of lithium batteries based on an improved YOLOv5 model. Meas. Sci. Technol. 2023, 34, 125149. [Google Scholar] [CrossRef] [Scilit]
  26. Yang, L.; Zhang, R.Y.; Li, L.; Xie, X. Simam: A simple, parameter-free attention module for convolutional neural networks. In Proceedings of the 38th International Conference on Machine Learning, Virtual, 18–24 July 2021; pp. 11863–11874. [Google Scholar]
  27. Webb, B.S.; Dhruv, N.T.; Solomon, S.G.; Tailby, C.; Lennie, P. Early and late mechanisms of surround suppression in striate cortex of macaque. J. Neurosci. 2005, 25, 11666–11675. [Google Scholar] [CrossRef] [Scilit]
  28. Cao, J.; Wang, Q.; Xian, Y.; Li, Y.; Ni, B.; Pi, Z.; Zhang, K.; Zhang, Y.; Timofte, R.; Gool, L.V. Ciaosr: Continuous implicit attention-in-attention network for arbitrary-scale image super-resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023; pp. 1796–1807. [Google Scholar] [CrossRef] [Scilit]
  29. Liu, H.; Huo, G.; Li, Q.; Guan, X.; Tseng, M.L. Multiscale lightweight 3D segmentation algorithm with attention mechanism: Brain tumor image segmentation. Expert Syst. Appl. 2023, 214, 119166. [Google Scholar] [CrossRef] [Scilit]
  30. Guo, M.H.; Lu, C.Z.; Liu, Z.N.; Cheng, M.M.; Hu, S.M. Visual attention network. In Computational Visual Media; IEEE: New York, NY, USA, 2023; Volume 9, pp. 733–752. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Surface Defects of Pouch Lithium Batteries (areas marked by red boxes).
Figure 1. Surface Defects of Pouch Lithium Batteries (areas marked by red boxes).
Energies 19 01044 g001
Figure 2. Soft Pack Lithium Battery Surface Defect Inspection Platform.
Figure 2. Soft Pack Lithium Battery Surface Defect Inspection Platform.
Energies 19 01044 g002
Figure 3. ROI Extraction Workflow.
Figure 3. ROI Extraction Workflow.
Energies 19 01044 g003
Figure 4. Lithium Battery Image Data Augmentation Method.
Figure 4. Lithium Battery Image Data Augmentation Method.
Energies 19 01044 g004
Figure 5. Lithium Battery Defect Detection Network Architecture Diagram.
Figure 5. Lithium Battery Defect Detection Network Architecture Diagram.
Energies 19 01044 g005
Figure 6. The difference between SimAM and other attention modules. In each subplot, the same color indicates that a single scalar is used for every channel, spatial location, or point on that feature.
Figure 6. The difference between SimAM and other attention modules. In each subplot, the same color indicates that a single scalar is used for every channel, spatial location, or point on that feature.
Energies 19 01044 g006
Figure 7. The overview of the Large Kernel Attention Module.
Figure 7. The overview of the Large Kernel Attention Module.
Energies 19 01044 g007
Figure 8. The t-test statistical results of the F1-score between SLT-YOLOv7 and the baseline network.
Figure 8. The t-test statistical results of the F1-score between SLT-YOLOv7 and the baseline network.
Energies 19 01044 g008
Figure 9. Training and Validation Loss Convergence Curves.
Figure 9. Training and Validation Loss Convergence Curves.
Energies 19 01044 g009
Figure 10. Comparative Results of Different Defect Detection Approaches. (“hh” denotes scratches and “zk” denotes pinholes).
Figure 10. Comparative Results of Different Defect Detection Approaches. (“hh” denotes scratches and “zk” denotes pinholes).
Energies 19 01044 g010
Table 1. Validation Results on the SDDLB Dataset (the best values are highlighted in bold).
Table 1. Validation Results on the SDDLB Dataset (the best values are highlighted in bold).
ModelmAP@0.5 (%)Recall (%)Precision (%)F1
YOLOv386.0275.5190.560.82
YOLOv589.7976.7396.780.84
Ours93.1475.3897.370.83
Table 2. Training Configuration for Lithium Battery Defect Detection Network.
Table 2. Training Configuration for Lithium Battery Defect Detection Network.
Parameter ValueDescriptionSetting
Freeze_EpochFreeze Epochs50
UnFreeze_EpochUnfreeze Epochs250
Total_EpochTotal Epochs300
Freeze_Batch_SizeBatch Size (Freeze Phase)32
Unfreeze_Batch_SizeBatch Size (Unfreeze Phase) 16
Init_lrInitial Learning Rate1 × 10−2
lr_decay_typeLearning Rate Decay Schedulecos
Min_lrMinimum Learning Rate1 × 10−4
optimizer_typeOptimizerSGD
momentumMomentum Factor0.937
Table 3. Network Ablation Experiment.
Table 3. Network Ablation Experiment.
BaselineSimAMLKAmAP@0.5(%)Number of ParametersFPS
(Sheets/s)
90.066.2 M105
92.256.2 M104
93.146.5 M94
Table 4. Performance Comparison of Different Detection Networks. The top two results in the table are highlighted in bold.
Table 4. Performance Comparison of Different Detection Networks. The top two results in the table are highlighted in bold.
ModelmAP@0.5 (%)Recall (%)Precision (%)F1
Faster R-CNN86.7889.6471.490.79
YOLOv386.0275.5190.560.82
YOLOv589.7976.7396.780.84
YOLOv793.6279.0997.670.86
YOLOv7-tiny90.0674.4196.710.83
SLT- YOLOv793.1475.3897.370.83
Table 5. Comparison of the complexity of different detection networks. The top two results in the table are highlighted in bold.
Table 5. Comparison of the complexity of different detection networks. The top two results in the table are highlighted in bold.
ModelmAP@0.5 (%)ParamsGFLOPs FPS
(Sheets/s)
Faster R-CNN86.78137 M154.312
YOLOv386.0261.9 M6.268
YOLOv589.7946.6 M4.573
YOLOv793.6237.2 M4.277
YOLOv7-tiny90.066.2 M0.5105
SLT-YOLOv793.146.5 M0.694
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, J.; Liu, M.; Yu, C.; Ye, S.; Chen, J. Lightweight Cooperative Attention for Empowering YOLOv7-Tiny in Lithium Battery Surface Defect Recognition. Energies 2026, 19, 1044. https://doi.org/10.3390/en19041044

AMA Style

Wang J, Liu M, Yu C, Ye S, Chen J. Lightweight Cooperative Attention for Empowering YOLOv7-Tiny in Lithium Battery Surface Defect Recognition. Energies. 2026; 19(4):1044. https://doi.org/10.3390/en19041044

Chicago/Turabian Style

Wang, Jianhua, Mengyu Liu, Caihong Yu, Shilin Ye, and Jian Chen. 2026. "Lightweight Cooperative Attention for Empowering YOLOv7-Tiny in Lithium Battery Surface Defect Recognition" Energies 19, no. 4: 1044. https://doi.org/10.3390/en19041044

APA Style

Wang, J., Liu, M., Yu, C., Ye, S., & Chen, J. (2026). Lightweight Cooperative Attention for Empowering YOLOv7-Tiny in Lithium Battery Surface Defect Recognition. Energies, 19(4), 1044. https://doi.org/10.3390/en19041044

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop