Defect Detection of Traction Battery Sealing Nails with Point Cloud Deep Learning

In this research, I concentrate on the automated inspection of sealing nails of traction batteries. With the rapid growth in electric vehicles, traction battery production scale has expanded continually. The quality of the sealing nail connection has become a dominant factor in safety, because every traction battery cell has an electrolyte injection hole that must be closed by a welded sealing nail. During high-speed laser welding, a variety of weld defects can appear, such as burst, pit, molten bead, pinhole, and warpage. These defects may lead to electrolyte leakage, terminal short circuit, thermal runaway, and eventually catastrophic failure of the traction battery. Therefore, reliable and precise detection of these welding defects is essential in traction battery manufacturing.

Traditional quality control depends on manual visual inspection and conventional two-dimensional image algorithms. These approaches suffer from low efficiency, strong subjectivity, and limited ability to measure the spatial geometry of defects. Although two-dimensional imaging is fast and inexpensive, it cannot completely characterize shallow dents, small protrusions, or micro pinholes because such defects are heavily dependent on depth information. Three-dimensional point clouds acquired by laser scanners can directly represent surface geometry, providing height, curvature, and shape information that is particularly valuable for welding defect analysis. However, applying semantic segmentation directly to point clouds remains difficult because disorder, irregular density, noise, and small defect size create unique challenges.

I therefore developed a complete point-cloud-based defect detection framework specifically for traction battery sealing nails. The framework consists of three major parts. First, I developed a denoising and region extraction pipeline that removes noise and excludes irrelevant parts of the traction battery top cover. Second, I improved a graph attention convolution network by introducing a local graph attention filter and spatial attention graph pooling to reduce missed defect regions and improve recognition of defect boundaries. Third, I designed a cross-density feature fusion module based on cross-attention to enhance detection of small defects such as pinholes, molten beads, and tiny burst points. The final model was integrated into a visual software platform for practical traction battery production inspection.

1. Overview of the Proposed Inspection Pipeline

The proposed pipeline can be summarized by the following stages. First, a line-laser scanning system captures three-dimensional coordinates of the sealing-nail region on the traction battery top cover. Second, statistical filtering removes outliers caused by ambient light, dust, mirror reflection, and sensor noise. Third, an improved random sample consensus algorithm fits planar patches, relabels misclassified points, merges over-segmented patches, and extracts the sealing nail together with its weld ring. Fourth, the extracted point cloud is sampled to a fixed number of points and semantically segmented by a deep network. The network assigns each point to either the background or one of five defect classes. Finally, defect regions are visualized, quantified, and reported in a software interface.

Compared with conventional two-dimensional algorithms, this three-dimensional approach can measure the actual size, depth, and morphology of each defect. I selected point-cloud semantic segmentation as the main recognition method because it directly produces pixel-level or point-level classification, which is beneficial for evaluating whether a traction battery sealing nail must be repaired or scrapped.

2. Point Cloud Acquisition and Preprocessing

2.1 Acquisition Setup

I used a compact line-laser scanning camera with a 405 nm laser source. The scanner projects a laser line onto the sealing-nail surface and records the reflected light by a complementary metal-oxide-semiconductor sensor. The X-axis measurement range is 14.5 mm, the Z-axis range is 5.2 mm, and the working distance is 23 mm. The camera provides more than 3,000 points per profile. The resulting point cloud contains only spatial coordinates without color or intensity. The scanning precision reaches micrometer level, which is necessary for small sealing-nail weld defects.

2.2 Noise Removal via Statistical Filtering

The raw point cloud is polluted by isolated outliers and sparse low-intensity points. Such points severely disturb geometric feature estimation and lead to inaccurate defect segmentation. I chose statistical filtering because it is simple and robust for removing isolated points whose local average distances substantially deviate from the global distribution.

For a point \(p_{i}\), I first search its \(k\) nearest neighbors \(p_{ij}\). The mean distance between \(p_{i}\) and its neighbors is
$$
\tilde{d}_{i} = \frac{1}{k}\sum_{j=1}^{k}\sqrt{(x_{i}-x_{ij})^{2}+(y_{i}-y_{ij})^{2}+(z_{i}-z_{ij})^{2}}.
$$
Assuming these mean distances obey a normal distribution, the global mean and standard deviation are
$$
\mu = \frac{1}{n}\sum_{i=1}^{n}\tilde{d}_{i}, \qquad
\sigma = \sqrt{\frac{1}{n}\sum_{i=1}^{n}(\tilde{d}_{i}-\mu)^{2}}.
$$
A point is declared as an outlier when its mean neighbor distance is larger than the threshold
$$
\epsilon = \mu + \theta \sigma.
$$
In this work, \(\theta\) was set to \(1.0\), and the neighborhood size was set to \(16\). Statistical filtering effectively suppresses high-flying noise points, while preserving the fine geometry of sealed welds.

2.3 Improved RANSAC for Welding Region Extraction

The sealing nail is welded on a flat aluminum battery cover. The top cover and the nail head both appear as nearly planar surfaces with slightly different heights. Other elements, such as busbars, structural ribs, and outside clutter, are also visible in the original scan. Directly feeding the entire scene into a deep network increases computational cost and confuses the segmentation model. Therefore, I designed an improved random sample consensus method to extract only the sealing nail and its weld ring.

Conventional RANSAC fits a plane by randomly sampling three points from the whole point cloud. In the sealing-nail scan, planar surfaces occupy only part of the data, so many random samples come from edge areas and produce inefficient or incorrect plane hypotheses. I addressed this issue by replacing purely random sampling with local sampling in a smooth and planar region.

For each point, the normal vector is estimated by principal component analysis. Given a local neighborhood \(X\) with centroid \(\bar{p}\), the covariance matrix is
$$
C = \frac{1}{n}\sum_{i=1}^{n}(p_{i}-\bar{p})(p_{i}-\bar{p})^{T}.
$$
The eigenvector associated with the smallest eigenvalue of \(C\) provides the normal direction. The local smoothness criterion is:
$$
\gamma = \frac{1}{n}\sum_{i=1}^{n}\frac{\boldsymbol{n}_{v}\cdot \boldsymbol{n}_{i}}{\lVert \boldsymbol{n}_{v}\rVert \lVert \boldsymbol{n}_{i}\rVert},
$$
where \(\boldsymbol{n}_{v}=(0,0,1)\) is the vertical reference vector. If \(\gamma\) is larger than \(0.9\), the points in that neighborhood are considered to belong to a common planar face, and three seeds are randomly chosen inside this neighborhood to estimate a plane model.

After a plane is detected, all points whose distance to the plane is less than \(\theta\) are labeled as inliers. The RANSAC procedure is repeated on the remaining points until no plane with more than \(2000\) inliers remains. Since the threshold is intentionally conservative, some patches belonging to the same surface may be split into several clusters. I therefore performed an Euclidean cluster extraction on the segmented plane patches. The distance threshold for merging was set slightly smaller than the distance between the nail surface and the top-cover surface. This step merges over-segmented patches and preserves two large clusters: the traction battery top cover and the sealing nail head.

Misclassification is another challenge. Because the edges of the sealing nail are close to the top-cover plane, some points from the nail may be incorrectly assigned to the top-cover plane and vice versa. I corrected these points by comparing their distance to each plane and their distance to the corresponding cluster centroid. If both measurements are below predefined thresholds, the point is treated as misclassified. The final category is then determined by a majority vote among its \(k\)-nearest neighbors in the original cloud.

Let precision, recall, and F1 score be defined as
$$
P = \frac{TP}{TP+FP}, \qquad
R = \frac{TP}{TP+FN}, \qquad
F_{1} = \frac{2PR}{P+R},
$$
where \(TP\), \(FP\), and \(FN\) denote true positives, false positives, and false negatives, respectively. On a dataset of 196 preprocessed sealing-nail point clouds, I compared the improved RANSAC with four methods. The results are reported in Table 1.

Method Time (s) Precision (%) Recall (%) F1 Score (%)
Traditional RANSAC 6.82 76.24 82.19 79.10
Region growing 8.73 83.10 81.57 82.33
Euclidean clustering 3.45 36.23 99.73 53.15
Improved RANSAC (proposed) 6.14 82.44 93.76 87.74

The results show that the improved RANSAC is faster than traditional RANSAC and region growing, while achieving the best F1 score. The competitive time performance is mainly due to the local sampling strategy, which reduces the number of ineffective plane hypotheses. The fusion with Euclidean clustering also corrects over-segmentation and improves recall.

3. Defect Categories and Dataset Construction

In the traction battery production line, the sealing nail is inspected after laser welding. I defined six semantic classes: normal background, burst, pit, molten bead, warpage, and pinhole. Burst and molten bead are raised protrusions. Burst has an area larger than or equal to \(0.2\text{ mm}^{2}\), while molten bead covers a smaller area. Pit and pinhole are concave defects; they can be repaired if the depth is below \(0.4\) mm. Warpage means that the entire nail is tilted relative to the battery cover plane. Typical defect point clouds exhibit very low point counts. In many samples, a defect occupies fewer than 1,000 points while the whole cloud contains more than 100,000 points. This severe class imbalance is one of the core difficulties in traction battery sealing-nail detection.

I collected 929 raw samples, including 271 normal samples and 658 defective samples. To enlarge the training set, I applied geometric data augmentation: random rotation about the vertical axis, random translation, random flipping, and random scaling. I also added random coordinate jitter during training and randomly disabled the normal vector feature. These operations generate shape-preserving variants and improve model generalization. After augmentation, the total number of samples was 2,787. The number of samples in each class is summarized in Table 2.

Class Normal Burst Pit Molten bead Warpage Pinhole
Number of samples 655 406 271 248 316 361

All point clouds were manually annotated with CloudCompare software. The annotation format contained \(X\), \(Y\), \(Z\), three normal components, and a semantic label. I partitioned the whole dataset into 2,257 training samples, 251 validation samples, and 279 test samples. During training, every point cloud was subsampled to 16,384 points to fit the memory and stabilize the mini-batch.

4. Base Network: GACNet

Graph attention convolution network, abbreviated as GACNet, was chosen as the base architecture. In GACNet, the point cloud is first converted into a directed graph. For each point \(p_{i}\), its neighborhood \(\mathcal{N}(i)\) is obtained by searching points within a radius \(\rho\). A graph attention convolution kernel generates attention weights according to both spatial offsets and feature differences. Let \(\Delta p_{ij}=p_{i}-p_{j}\) and \(\Delta h_{ij}=M_{g}(h_{i})-M_{g}(h_{j})\). The attention coefficient before normalization is
$$
e_{ij}=M_{\alpha}([\Delta p_{ij}\,\|\,\Delta h_{ij}]),
$$
and the normalized attention is
$$
a_{ij}= \frac{\exp(e_{ij})}{\sum_{l\in \mathcal{N}(i)}\exp(e_{il})}.
$$
The output feature for vertex \(i\) is
$$
h_{i}^{\prime} = \sum_{j\in\mathcal{N}(i)} a_{ij}\odot M_{g}(h_{j}) + b_{i}.
$$
GACNet builds a graph pyramid by farthest point sampling. At each pyramid level, graph attention convolution is followed by a graph pooling operation to reduce point resolution. After the deepest level, trilinear interpolation restores the point density. Skip connections merge features from encoder and decoder paths.

Despite its success on public datasets, the original GACNet has two weaknesses in traction battery sealing-nail inspection. First, it concatenates spatial and feature differences to compute attention, entangling coordinate-space information with feature-space information. This may cause ambiguous feature propagation at defect boundaries. Second, maximum pooling in the graph pyramid is not spatially aware and may discard useful local structure around small defects. I therefore modified the network in two directions.

5. Improved Network: LGANet

5.1 Graph Construction and Feature Initialization

I define a graph \(\mathcal{G}=(\mathcal{V},\mathcal{E})\), where \(\mathcal{V}\) is the vertex set and \(\mathcal{E}\) is the edge set. For a point cloud with \(n\) points, the neighbor set is constructed by ball querying:
$$
\mathcal{N}(i)=\{j:\;\lVert p_{i}-p_{j}\rVert\le \rho\}\cup\{i\}.
$$
The adjacency matrix is \(A_{ij}=1\) if \(j\in\mathcal{N}(i)\), and zero otherwise. When a point cloud is processed by the graph pyramid, I reinitialize the graph after sampling or interpolation. The search radius decreases for high-density layers and increases for low-density layers. The initial feature is composed of the normalized coordinates and the estimated normal vector.

5.2 Local Graph Attention Filter

I designed a local graph attention filter, denoted LGAF, to replace the original graph attention convolution. The motivation is to model spatial and feature relationships separately, avoiding unreasonable mixing of different metric spaces. In LGAF, the relevance between a center point and its neighbor is obtained by subtracting the transformed neighbor from the transformed center:
$$
C_{ij} = \phi_{q}(x_{i})-\phi_{k}(x_{i}-x_{j}),
$$
where \(x_i\) is the feature vector, and \(\phi_{q}\) and \(\phi_{k}\) are learnable linear projections. This subtraction operation allows the network to focus on feature changes along the edge direction rather than on absolute feature magnitudes.

Because the original graph topology only records whether two points are neighbors, I further incorporate a spatial distance matrix. Let
$$
\hat{A}_{ij} = A_{ij}\exp\left(-\lVert p_{i}-p_{j}\rVert^{2}\right).
$$
Degree normalization gives
$$
A^{\prime} = D^{-1/2}\hat{A}D^{-1/2},
$$
which emphasizes local points while suppressing far neighbors. In addition, a learnable spatial encoding is created by a multilayer perceptron:
$$
\sigma_{ij}=M_{p}(p_{i}-p_{j}).
$$
Then the final attention score becomes
$$
e_{ij}=M_{e}\left(C_{ij}\odot A^{\prime}_{ij}\right),
$$
where \(M_{e}\) is a multilayer perceptron. The coefficients are normalized by softmax:
$$
a_{ij}=\frac{\exp(e_{ij})}{\sum_{l\in\mathcal{N}(i)}\exp(e_{il})}.
$$
Finally, the output feature produced by LGAF is
$$
y_{i}=\psi(x_{i})+\sum_{j\in\mathcal{N}(i)}a_{ij}\odot\left(\phi_{v}(x_{i}-x_{j})+\sigma_{ij}\right).
$$
Here \(\phi_v\) is a linear projection, and \(\psi\) is a non-linear feature transformation. The local graph attention filter has two benefits for traction battery sealing-nail detection. It suppresses noise from distant points, and it explicitly embeds spatial offsets, which are essential for distinguishing raised defects, concave defects, and normal surface curvature boundaries.

5.3 Spatial Attention Graph Pooling

The second improvement is spatial attention graph pooling, abbreviated as SAG Pooling. In the original GACNet, graph pooling simply aggregates neighbor features by max or average pooling. Such pooling is spatially blind. SAG Pooling determines aggregation weights according to spatial coordinates and then performs a weighted sum of neighbor features.

For vertex \(i\) and neighbor \(j\), the raw spatial attention weight is
$$
\hat{w}_{ij}=M_{w}\left(\varphi_{q}(p_{i})-\varphi_{k}(p_{j})\right),
$$
where \(\varphi_{q}\) and \(\varphi_{k}\) are linear transformations. After normalization,
$$
r_{ij}=\frac{\exp(\hat{w}_{ij})}{\sum_{l\in\mathcal{N}(i)}\exp(\hat{w}_{il})}.
$$
The pooled feature of vertex \(i\) at the next pyramid level is
$$
F_{i}=\sum_{j\in\mathcal{N}(i)}r_{ij}\odot\varphi_{v}(F_{ij}),
$$
with \(\varphi_v\) being another linear projection. This pooling operation can preserve location-dependent geometric information during downsampling. In every stage of the graph pyramid, I first sample new centers using farthest point sampling and then apply SAG Pooling to the original graph. The output dimension is then processed by LGAF layers.

5.4 Loss Function

The dataset is severely imbalanced because normal points dominate the point clouds. To reduce the bias toward the majority class, I weight each semantic class in the cross-entropy loss. The unnormalized class weights are computed as
$$
\hat{w}_{c}=\sqrt{\frac{n_{\max}}{n_{c}}},
$$
where \(n_c\) is the number of points of class \(c\), and \(n_{\max}\) is the largest class point number. After normalization,
$$
w_{c}=\frac{\hat{w}_{c}}{\sum_{k=1}^{K}\hat{w}_{k}},
$$
where \(K\) is the number of classes. The final loss is
$$
\mathcal{L}=-\sum_{i=1}^{K} w_{i}y_{i}\log\left(\frac{\exp(x_{i})}{\sum_{k=1}^{K}\exp(x_{k})}\right),
$$
where \(x_i\) is the predicted logit for class \(i\), and \(y_i\) is the one-hot label. The weighting term increases the influence of small-area defects such as pinhole and molten bead.

6. Cross-Density Feature Fusion for Small Defects

After building LGANet, I noticed that small defects were still difficult to separate in deep layers. The graph pyramid repeatedly subsamples a point cloud; after downsampling, details of pinholes and beads may disappear. To solve this problem, I developed a cross-density feature fusion module based on cross-attention, abbreviated as CDF. The rationale is to combine high-density features from lower layers with low-density semantic features from upper layers.

6.1 Information Flows

The final network, LGANet-CDF, has a five-layer graph pyramid. At each layer \(l\), there are three possible information flows:
– horizontal flow for features of the same resolution,
– downward flow that projects high-density features to lower resolution,
– upward flow that interpolates low-density sparse features to higher resolution.

The downward flow is implemented by graph pooling: first performing farthest point sampling to reduce the point number, then applying max-pooling in the original graph. The upward flow is implemented by inverse-distance interpolation. Suppose layer \(l-1\) has coordinates \(p_{l-1}\), and layer \(l\) has coordinates \(p_l\). Let \(\mathcal{P}(i)\) denote the three nearest points of \(p_{l-1,i}\) in \(p_l\). The interpolated feature is
$$
x_{l-1,i}= \frac{1}{\mathrm{norm}} \sum_{j\in\mathcal{P}(i)}
\frac{x_{l,j}}{\left\lVert p_{l-1,i}-p_{l,j}\right\rVert^{2}},
$$
where
$$
\mathrm{norm}=\sum_{j\in\mathcal{P}(i)}
\frac{1}{\left\lVert p_{l-1,i}-p_{l,j}\right\rVert^{2}}.
$$
These downsampling and upsampling streams align the point densities so that the cross-density fusion module can process corresponding points without complicated data structures.

6.2 Cross-Attention Fusion

The CDF module receives three input feature sets: the middle-level feature \(A=x_l\), the sparse high-level feature \(B=x_{l+1}\), and the dense low-level feature \(C=x_{l-1}\). The middle-level feature is used as the query, while the high-level and low-level features are used as keys and values. For the dense low-level stream, the enhanced feature is
$$
y_{l-1,i}=
\sum_{j\in\mathcal{N}_{l-1}(i)}
\rho\left(\chi_{q}(x_{l,i})\cdot \chi_{k}^{l-1}(x_{l-1,j})\right)
\, \chi_{v}^{l-1}(x_{l-1,j}),
$$
where \(\chi_q\), \(\chi_k\), and \(\chi_v\) are linear functions, and \(\rho\) is the softmax operation. This scalar dot-product attention focuses on local detail and preserves the fine shape of small defects.

For the sparse high-level stream, I use a subtraction-based relation to encourage semantic context transfer:
$$
y_{l+1,i}=
\sum_{j\in\mathcal{N}_{l+1}(i)}
\rho\left(M\left(\chi_{q}(x_{l,i})-\chi_{k}^{l+1}(x_{l+1,j})\right)\right)
\odot \chi_{v}^{l+1}(x_{l+1,j}),
$$
where \(M\) is a multilayer perceptron. The elementwise multiplication in the weighted sum preserves more contextual information about defect types. After computing the two enhanced streams, I concatenate \(x_l\), \(y_{l-1,i}\), and \(y_{l+1,i}\), and use a multilayer perceptron to reduce the feature dimension. The output \(F\) then integrates detailed geometry from dense layers and semantic context from sparse layers. This design strengthens the network in traction battery sealing-nail defect segmentation because small pinhole defects benefit from high-resolution geometric detail, while warpage defects require deep global semantic context.

7. Experimental Configuration

The models were implemented in PyTorch 2.2.1 with CUDA 12.1. Training was performed on an NVIDIA RTX 4070 GPU and an Intel Core i5-13400F CPU. The optimizer was AdamW, the initial learning rate was \(0.01\), the batch size was \(8\), and the point-cloud input size was \(16,384\) points. I trained each model for 300 epochs and applied a multi-step learning-rate decay schedule.

I used three main metrics to evaluate the semantic segmentation results. Overall accuracy is defined as
$$
OA = \frac{\sum_{i=1}^{K} n_{ii}}{\sum_{i=1}^{K}\sum_{j=1}^{K} n_{ij}},
$$
where \(n_{ij}\) is the number of points from class \(i\) predicted as class \(j\). The mean class accuracy is
$$
mAcc = \frac{1}{K}\sum_{i=1}^{K}\frac{n_{ii}}{\sum_{j=1}^{K}n_{ij}}.
$$
The intersection-over-union for a single class is
$$
IoU_{i} =
\frac{P_{i,\text{pred}}\cap P_{i,\text{true}}}{P_{i,\text{pred}}\cup P_{i,\text{true}}},
$$
and the mean IoU is
$$
mIoU = \frac{1}{K}\sum_{i=1}^{K} IoU_{i}.
$$
These metrics provide a balanced evaluation of the network in the presence of severe class imbalance.

8. Network Comparison on Sealing-Nail Data

I benchmarked LGANet-CDF against seven models: GACNet, PointNet, PointNet++, Point Transformer v1, Point Transformer v3, and OA-CNN. All models were trained under the same data partition, same input size, and same optimizer settings. The results are shown in Table 4.

Model OA (%) mAcc (%) mIoU (%) Burst IoU (%) Pit IoU (%) Molten beads IoU (%) Warpage IoU (%) Pinhole IoU (%)
LGANet-CDF (proposed) 99.13 96.20 81.25 80.06 71.91 75.99 89.89 70.03
GACNet 96.68 87.96 70.85 56.88 67.52 54.64 87.93 59.37
PointNet 82.66 72.46 45.74 28.33 30.01 21.53 62.64 34.95
PointNet++ 89.33 84.65 62.67 47.91 59.32 42.37 81.64 46.53
Point Transformer v1 98.77 90.96 72.83 68.54 62.83 58.37 89.67 58.37
Point Transformer v3 99.03 94.96 75.13 77.32 67.98 60.44 89.17 56.21
OA-CNN 98.72 91.13 74.04 64.89 66.91 64.87 88.37 60.04

I observed that the proposed method achieved the highest overall accuracy, mean class accuracy, and mean IoU. More importantly, the per-class IoU values for tiny defects improved notably. Compared to the original GACNet, LGANet-CDF increased the burst IoU by \(23.18\) percentage points, the molten-bead IoU by \(21.35\) percentage points, and the pinhole IoU by \(10.66\) percentage points. This demonstrates that the combination of local graph attention and cross-density fusion is particularly suitable for tiny welding anomalies on traction battery sealing nails.

9. Generalization on a Public Dataset

In order to validate whether the proposed network can generalize beyond the sealing-nail dataset, I also evaluated LGANet on the public sewer defect dataset S3DSS. The dataset contains multiple structural defect classes in point clouds. I followed the same training and evaluation protocol used in related work. The results are shown in Table 6.

Model OA (%) mF1-score (%) mIoU (%)
LGANet 98.94 95.33 91.12
DLNet 97.51 87.26 79.24
PointNeXt 96.25 73.55 65.64
DeepGCN 83.96 41.73 32.68
DGCNN 82.96 44.36 28.29
PointNet++ 83.42 42.31 32.22

The proposed network achieved the highest metrics on the public dataset as well. These results suggest that the improved graph attention mechanism is not over-fitted to traction battery sealing nails; it also benefits other point-cloud semantic segmentation tasks with fine-grained defects.

10. Ablation Study of the Improved Modules

I performed ablation experiments to isolate the contributions of LGAF and SAG Pooling. The baseline was the original GACNet. I then progressively added each module. The results are summarized in Table 7.

LGAF SAG Pooling OA (%) mAcc (%) mIoU (%)
✗ ✗ 96.68 87.96 70.85
✓ ✗ 97.38 90.14 77.17
✗ ✓ 97.96 88.95 74.81
✓ ✓ 99.47 92.68 79.23

The results show that both modules improve every metric. The synchronous combination of LGAF and SAG Pooling improves mIoU by \(8.38\) percentage points and mAcc by \(4.72\) percentage points compared with baseline. This proves that separating spatial encoding from feature encoding and using spatially aware pooling are effective for traction battery welding defect segmentation.

11. Ablation of the Cross-Density Information Flow

I evaluated two variants of the fusion network: one using only the downward dense-to-sparse information flow and one using only the upward sparse-to-dense information flow. The results are reported in Table 8, using the latest LGANet without any cross-density branch as the reference.

Down-flow Up-flow Burst IoU (%) Pit IoU (%) Molten beads IoU (%) Warpage IoU (%) Pinhole IoU (%)
✗ ✗ 78.17 72.17 71.33 91.61 64.95
✓ ✗ 79.63 71.24 74.31 87.64 71.37
✗ ✓ 76.62 73.81 71.12 92.94 63.14
✓ ✓ 80.06 71.91 75.99 89.89 70.03

The downward information flow is particularly helpful for pinholes and molten beads, while the upward flow mainly benefits pit and warpage. The final LGANet-CDF retains both flows. Compared to LGANet, the complete cross-density design increases the molten-bead IoU by \(4.66\) percentage points and the pinhole IoU by \(5.08\) percentage points. In addition, the burst IoU improves by \(1.89\) percentage points. These improvements verify that dense details extracted from lower layers are necessary for detecting very small welding defects.

12. Placement of the Fusion Module

I also studied where to place the cross-density fusion module in the graph pyramid. The baseline LGANet used simple skip connections. I inserted the proposed module at different depths, producing variants \(a\), \(b\), \(c\), \(d\), and \(e\). The final architecture is variant \(d\), in which fusion starts from the second level and combines low-level dense information with high-level sparse information. The mIoU values are compared in Table 9.

Variant mAcc (%) mIoU (%) ΔmIoU (%)
a (baseline LGANet) 92.68 79.23 –
b 92.32 78.96 -0.27
c 94.03 80.11 +0.88
d (proposed) 96.20 81.25 +2.02
e 94.97 80.69 +1.46

The placement significantly influences performance. A shallow fusion position may not provide enough semantic context, while a very deep fusion position may not help because the point cloud has already lost small defects. The selected position provides a balanced combination of local spatial details and global context, making it suitable for small defects in traction battery sealing nails.

13. Robustness under Different Point Densities

Because production data can vary in point density, I evaluated the final network by randomly sub-sampling the test point clouds to 16,384, 8,192, 4,096, 2,048, and 1,024 points. The mAcc curves show that LGANet-CDF loses less than \(2\%\) when the number of points decreases from 16,384 to 4,096. Other models degrade more severely. This robustness is important for industrial deployment because measurement speed and data resolution may vary across different traction battery assembly lines.

14. Verification of Convergence

During training I recorded the validation loss and validation mAcc for both GACNet and LGANet-CDF. The improved network converged faster and reached a lower validation loss. It also exhibited less fluctuation in the later epochs, suggesting that the distance-based graph attention filter regularizes the learning process. The mAcc curve of LGANet-CDF continued to rise to about \(96.2\%\), while the original network saturated around \(88\%\) with higher variance. This is consistent with the quantitative metrics presented in previous tables.

15. Software Platform for Sealing-Nail Inspection

To demonstrate the practical value of the algorithm, I developed a software platform using PyQt. The platform integrates the point-cloud preprocessing pipeline, the improved deep semantic segmentation model, and a defect report generator. The main interface contains a model-selection button, a point-cloud-selection button, a weld-area fitting button, a detection button, a save-report button, and two display panels.

The operational workflow is as follows. First, the user selects the trained network weight file. Second, the user selects a point-cloud file of a traction battery sealing nail. The software converts the point cloud into a depth map and displays it in the left panel. Third, the user enters the inner and outer radii of the welding ring, and clicks the fitting button to calculate the sealing-nail center. The extracted welding region is then overlaid on the image. Fourth, the user clicks the detection button. The network classifies each point in the weld region as normal or one of the defect types. Detected defect regions are rendered with green marks in the right panel. Finally, the user clicks the save-report button to export a text report containing the defect type, defect count, and additional comments.

For warpage defects, the sealing nail is tilted and does not lie in the same plane as the welding ring. The software therefore has an additional detection mode that directly classifies the input point cloud without weld-region fitting. The platform was tested on multiple point-cloud samples collected from the production line. It successfully detected all five defect classes and generated readable reports. The system can be used by non-specialist operators, lowering the skill barrier of traction battery sealing-nail inspection.

16. Conclusions and Outlook

I have presented a point-cloud deep-learning defect detection framework for sealing nails in traction battery manufacturing. The complete framework includes point-cloud denoising, improved RANSAC for welding-region extraction, a modified graph attention semantic segmentation network, and a cross-density feature fusion module for tiny defect recognition.

The empirical study shows that the improved RANSAC reaches an F1 score of \(87.74\%\), outperforming conventional RANSAC and other segmentation methods. The proposed LGANet with LGAF and SAG Pooling improves mIoU by \(8.38\) percentage points and mAcc by \(4.72\) percentage points compared with the original GACNet. The further introduction of the cross-density fusion module raises the mIoU to \(81.25\%\), while improving the detection accuracy of burst, molten bead, and pinhole defects. The model also generalizes to a public point-cloud-segmentation dataset, achieving state-of-the-art results. The designed PyQt software platform demonstrates that the algorithm can be conveniently deployed in a routine inspection environment.

In the future, I plan to investigate more efficient graph constructions to reduce inference time. I also intend to combine two-dimensional texture information with three-dimensional geometric features, because the welding seam often shows color and reflectance variations that complement height information. Finally, online learning and few-shot adaptation may help the model adjust to novel defect patterns caused by welding equipment aging or new battery box designs. These directions will further improve the reliability of traction battery quality inspection.

Scroll to Top