Point Cloud Deep Learning for High-Voltage Battery Sealing Nail Defect Detection

In the context of the booming electric vehicle industry, the production scale of high-voltage battery packs has expanded tremendously, and the safety and reliability requirements of high-voltage batteries have become increasingly strict. The sealing nail of a high-voltage battery is a small metallic component that welds the injection hole after electrolyte filling. Because of the tiny size and the complex welding process, various defects such as burst points, missed welds, pinholes, and offset welds may appear on the sealing nail. These defects may not be visually evident, but once they exist, they seriously threaten the safety of high-voltage batteries during operation. Continuous improvements in automated defect detection are therefore essential.

Conventional defect detection methods for sealing nails rely on manual visual inspection or two-dimensional image algorithms. Manual detection suffers from low efficiency and strong subjectivity. Two-dimensional image algorithms only exploit pixel intensities and colors, which are often insufficient for evaluating the geometric morphology of welding defects. Three-dimensional point cloud data provides rich spatial geometry, and point cloud deep learning can greatly improve the capability of recognizing small local defects on the sealing nail. The ultimate goal of this research is to develop an accurate and reliable defect detection method for sealing nails on high-voltage battery covers using point cloud semantic segmentation. In my work, I designed a novel preprocessing approach to extract the welding region, improved a graph attention convolution network with spatial attention and cross-density feature fusion, and finally implemented a visualization software platform.

This article is organized based on my complete research pipeline: first, the point cloud acquisition and preprocessing methods are introduced, followed by the improved random sample consensus (RANSAC) algorithm for welding area extraction; second, the improved deep semantic segmentation network and its modules are described in detail; third, extensive comparative and ablation experiments are reported; finally, the deployment software and practical outcomes are presented.

1. Point Cloud Acquisition and Preprocessing

To capture the three-dimensional morphology of sealing nails on high-voltage battery covers, an optic laser line scanning system was adopted. The scanner uses a laser source with a wavelength of 405 nm and provides 3200 points per profile. Its measurement range includes a working distance of 23 mm, an X-axis measurement range of 14.5 mm, and a Z-axis range of 5.2 mm. The raw point cloud contains three-dimensional coordinate values \(x,y,z\) without color, normal vector, or curvature attributes. Because the sealing nail and the battery cover have extremely small dimensions, the measurement precision reaches the micrometre scale, which ensures that the subtle geometric distortion caused by welding defects can be recorded.

1.1 Statistical Outlier Removal

The raw point clouds are polluted by noise caused by environmental reflectance, sensor errors and surface roughness. To suppress noise and improve the signal-to-noise ratio, a statistical filter is first applied. For a point \(p_i\), I compute the average distance to its \(k\) nearest neighbours as:

\[
\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}.
\]

The mean value and standard deviation of all \(\tilde{d}_i\) are calculated by:

\[
\mu = \frac{1}{n}\sum_{i=1}^{n}\tilde{d}_i,\quad
\sigma = \sqrt{\frac{1}{n}\sum_{i=1}^{n}(\tilde{d}_i-\mu)^2}.
\]

If the average neighbour distance of a point is greater than the threshold \(\theta=\mu+\lambda \sigma\), this point is considered an outlier and is removed. In this experiment, \(k\) was set to 30 and \(\lambda\) was set to 1.5. After statistical filtering, the isolated outliers around the sealing nail are removed, while the genuine surface points remain unchanged. This preprocessing step avoids disturbances in the later primitive fitting and network inference.

1.2 Improved RANSAC Algorithm for Welding Region Extraction

The scanning area contains not only the sealing nail but also a large area of the battery top cover. Directly feeding the entire raw point cloud into a defect detection network will create difficulty because the irrelevant background cover points dominate the geometric distribution and increase computational cost. Therefore, I propose an improved RANSAC algorithm to segment the sealing nail patch and the top cover patch. The main flow of this algorithm is shown in the following table.

Improved RANSAC segmentation procedure
Step Operation
1 Build a k-d tree and estimate the normal vector of every point from the covariance analysis.
2 Initialize parameters: distance threshold, minimum number of inliers, and maximum iterations.
3 Randomly select a seed point and search its neighbouring region within a given radius.
4 Compute the mean cosine value between the normal vectors in the neighborhood and the vertical normal vector; if the mean cosine is greater than 0.9, randomly choose three points from this neighborhood as the minimal sample set.
5 Fit a plane model to the sample set and count all points whose distance to the plane is smaller than the distance threshold.
6 Keep the best plane model and its inlier set; repeat until the maximum iteration number is reached.
7 Classify the misclassified points based on their distances to the plane centers and their local k-nearest-neighbor labels.
8 Merge over-segmented patches using Euclidean clustering.

The conventional RANSAC algorithm selects the minimal sample set completely randomly. This strategy is inefficient, especially when the point cloud contains two large planar patches and many curved transition points. Since points located in the same planar region usually have similar normal directions, I first query the neighborhood of an arbitrary point using the k-d tree. Let \(S=\{p_1,\dots,p_n\}\) be this neighborhood and \(N=\{n_1,\dots,n_n\}\) its corresponding normal vectors. The average cosine between these normals and the vertical vector \(n_v=(0,0,1)\) is:

\[
\gamma = \frac{1}{n}\sum_{i=1}^{n} n_v\cdot n_i.
\]

If \(\gamma\) is larger than 0.9, it can be assumed that the local patch belongs to one of the two horizontal planar patches: either the battery top cover or the upper face of the sealing nail. Then three seed points are randomly extracted from this neighborhood. This local sampling strategy greatly accelerates the convergence of the plane fitting procedure and avoids fitting planes on noisy or transition regions.

Another issue of conventional RANSAC is that the inlier set of the extracted plane may contain data points from the other plane patch. A misclassification correction mechanism is therefore introduced. For each point in a plane inlier set, two quantities are evaluated: its signed distance to the center of its own patch and its distance to all patch centers. If both indicators are below specified thresholds, the point is treated as a misclassified point. Then, for each misclassified point, its \(k\)-nearest neighbours are retrieved in the original point cloud. The point is assigned to the patch label that occurs most frequently among its neighbours.

Finally, Euclidean clustering is utilized to fix the over-segmentation problem that often arises from a small distance threshold. Given two point clusters \(C_1\) and \(C_2\), if the minimal point-pair distance between them is less than a threshold \(\delta\), the clusters are merged. After merging, the largest cluster is the battery top cover, the smaller cluster is the sealing nail, and the centroid of the sealing nail cluster is used as the geometric center for defining the welding ring area.

I compared the proposed segmentation algorithm with the traditional RANSAC algorithm, the region-growing algorithm, and the standard Euclidean clustering algorithm. The segmentation performance was evaluated on 196 sealed-nail point clouds. The precise definition of precision, recall and \(F_1\) score is:

\[
P=\frac{TP}{TP+FP},\quad R=\frac{TP}{TP+FN},\quad F_1=\frac{2PR}{P+R}.
\]

Experimental results are listed in the following table. The proposed method achieves the highest macro \(F_1\) score of 87.74% and uses less time than region growing.

Comparison of segmentation algorithms for sealing nail point clouds
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 6.14 82.44 93.76 87.74

The improvement in \(F_1\) proves that the local sampling strategy and the misclassification correction step significantly enhance the extraction capability of the sealing nail area. This pre-segmented result reduces the complexity of the later deep-learning-based defect detection network and offers a clean input that contains only the sealing nail and its surrounding welding zone.

2. Deep Learning-based Defect Detection Algorithm

2.1 Sealing Nail Defect Categories and Dataset

The typical welding defects of high-voltage battery sealing nails can be divided into six categories: normal background, burst, pit, molten bead, warpage, and pinhole. The defect definitions are listed below:

  • Burst: raised protrusion with a defect area larger than 0.2 mm², usually caused by an unclean welding nozzle or laser power fluctuation.
  • Molten bead: a similar protrusion but with an area smaller than 0.2 mm².
  • Pit: a concave dimple caused by insufficient weld energy or impurities on the surface.
  • Warpage: an inclined sealing nail after welding; more than 50% of the nail area is above or below the top-cover height.
  • Pinhole: a small concave hole with tiny diameter.

All points in the raw point cloud are annotated manually using the open-source software CloudCompare. The label file stores \(x,y,z\), the normal vector components, and the semantic label in a seven-column matrix format. In total, 929 raw samples were acquired. Several standard augmentation strategies were applied, including random rotation around the z-axis, translation, mirroring flipping, and random scaling, which increase the total number of samples to 2787. The random rotation operation is expressed as:

\[
\begin{bmatrix}
x’ \\ y’ \\ z’
\end{bmatrix}
=
\begin{bmatrix}
\cos\theta & -\sin\theta & 0\\
\sin\theta & \cos\theta & 0\\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
x\\ y\\ z
\end{bmatrix}.
\]

Translation along the X axis is represented by:

\[
\begin{bmatrix}
x’ \\ y’ \\ z’
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
x\\ y\\ z
\end{bmatrix}
+
\begin{bmatrix}
t_x\\ 0\\ 0
\end{bmatrix}.
\]

Mirroring and uniform scaling transformations are also employed. The resulting number of samples per class is given by the following table. The final dataset is split into 2257 training samples, 251 validation samples and 279 test samples.

Dataset composition after augmentation
Class Count
Normal 655
Burst 406
Pit 271
Molten bead 248
Warpage 316
Pinhole 361

2.2 Baseline Network GACNet

Point cloud semantic segmentation can directly classify each three-dimensional point into a defect class or background. Graph-based networks exhibit a strong ability to exploit local geometric structure. The selected baseline is GACNet, which stands for Graph Attention Convolution Network. GACNet applies a graph attention convolution layer to dynamically assign attention weights over a neighbourhood. For a vertex \(i\), its neighbour set is denoted by \(\mathcal{N}(i)\). The attention weight vector between the centre point and neighbour \(j\) is:

\[
e_{ij} = M_\alpha([\Delta p_{ij} \| \Delta h_{ij}]), \quad j \in \mathcal{N}(i),
\]

where \(\Delta p_{ij}=p_i-p_j\) is the positional difference, \(\Delta h_{ij}=M_g(h_i)-M_g(h_j)\) is the feature difference after a feature transform \(M_g\), and \(M_\alpha\) is a shared multilayer perceptron. The normalized weights are obtained through a softmax operation:

\[
a_{ij}=\frac{\exp(e_{ij})}{\sum_{l\in\mathcal{N}(i)}\exp(e_{il})}.
\]

The output feature is then computed as:

\[
h_i’ = \sum_{j\in\mathcal{N}(i)} a_{ij}\odot M_g(h_j)+b_i,
\]

where \(\odot\) is element-wise multiplication. The original GACNet has a graph pyramid architecture with several downsampling stages, followed by feature interpolation and skip connections. It can perform end-to-end point cloud semantic segmentation.

However, directly using GACNet for sealing nail defect detection causes two major limitations. First, the attention vector directly concatenates the spatial difference and feature difference, which may confuse the coordinate-space information with the feature-space information. Second, the standard graph pooling operation ignores spatial relevance among neighbouring points. These weaknesses lead to partial missed detections around the boundaries of small defect regions. To address these challenges, I have modified the baseline network by introducing a local graph attention filter module and a spatial attention graph pooling module.

2.3 Local Graph Attention Filter (LGAF)

The proposed LGAF module re-models the graph adjacency by using point-pair distances to filter out irrelevant information from distant neighbours. The correlation matrix between the query and key features is calculated using subtraction instead of concatenation:

\[
C_{ij}=\phi_q(x_i)-\phi_k(x_i-x_j),
\]

where \(\phi_q\) and \(\phi_k\) are linear projection functions. The distance-based adjacency matrix \(\hat{A}\) is:

\[
\hat{A}_{ij}=A_{ij} \exp\left(-\|p_i-p_j\|^2\right),
\]

\[
A’ = D^{-1/2}\hat{A}D^{-1/2},
\]

where \(D\) is the degree matrix used for symmetric normalization. Then, I compute the edge weight between point \(i\) and its neighbour \(j\) through:

\[
e_{ij}=M_e\left(C_{ij}\odot A’_{ij}\right),
\]

and normalize the result with a softmax function:

\[
a_{ij}=\frac{\exp(e_{ij})}{\sum_{l\in\mathcal{N}(i)}\exp(e_{il})}.
\]

To further emphasize the geometric relation, a learnable spatial offset \(\sigma_{ij}\) is calculated with:

\[
\sigma_{ij}=M_p(p_i-p_j).
\]

Finally, the output feature of point \(i\) 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),
\]

where \(\phi_v\) is a linear projection and \(\psi\) is a feature transformation. The LGAF module simultaneously uses feature-space subtraction and coordinate-space distance weighting; therefore, the network is able to distinguish the geometry of defects from the background without blurring spatial and feature relationships.

2.4 Spatial Attention Graph Pooling (SAG Pooling)

During the downsampling stage, common graph pooling methods usually aggregate neighboring feature vectors without considering spatial distance between points. In point cloud defect detection, the fine-boundary information of small defects is often lost during pooling. I therefore propose the SAG pooling module, which computes attention weights based on the spatial coordinates of each vertex and its neighbours:

\[
\hat{r}_{ij}=M_w\left(\varphi_q(p_i)-\varphi_k(p_j)\right),
\]

\[
r_{ij}=\frac{\exp(\hat{r}_{ij})}{\sum_{l\in\mathcal{N}(i)}\exp(\hat{r}_{il})}.
\]

Here, \(M_w\) is a multilayer perceptron, and \(\varphi_q,\varphi_k\) are two linear functions. After spatial attention is obtained, the output feature of the pooling layer is:

\[
F_i = \sum_{j\in\mathcal{N}(i)} r_{ij}\odot \varphi_v(F_{ij}),
\]

where \(\varphi_v\) is another linear function and \(F_{ij}\) denotes the feature of the \(j\)-th neighbour of vertex \(i\). The SAG pooling operation is applied after farthest-point sampling reduces the point cardinality. The selected points preserve the spatial distribution of the high-density point cloud, while the spatial attention emphasizes the contributions of closer neighbours. In this way, the boundary and geometric detail information of the original input can be retained more effectively.

2.5 Loss Function Optimization

The sealing nail defect dataset is highly imbalanced. For example, the background points contain tens of millions of data points, while pinhole defects consist of only several thousand points. A standard softmax cross-entropy loss will be dominated by the majority classes. To compensate for this imbalance, I compute class weights based on the point-count ratios:

\[
\hat{w}_i=\left(\frac{n_{\max}}{n_i}\right)^{1/2},
\]

\[
w_i=\frac{\hat{w}_i}{\sum_{j=1}^{K}\hat{w}_j},
\]

where \(n_{\max}\) is the maximum point number among all classes and \(n_i\) is the point number of the \(i\)-th class. The weighted cross-entropy loss function is therefore:

\[
\mathcal{L}=-\sum_{i=1}^{K} w_i\, y_i\, \log\frac{\exp(x_i)}{\sum_{l=1}^{K}\exp(x_l)}.
\]

This weighted loss forces the network to pay greater attention to extremely rare defect classes, such as pinhole and molten bead, and reduces the model bias towards background points.

2.6 Cross-Density Feature Fusion Module (CDF)

Even with the improved LGAF and SAG pooling modules, small-sized defects on high-voltage battery sealing nails still pose a major challenge. The graph pyramid network processes point clouds at various spatial densities; high-density shallow layers contain detail information, whereas low-density deep layers contain rich semantic context. A simple skip connection after interpolation cannot exploit these multi-density clues effectively. To solve this problem, I designed a cross-attention-based cross-density feature fusion module named CDF. The module integrates point features from three hierarchical levels: the current layer \(l\), the higher resolution layer \(l-1\), and the lower resolution layer \(l+1\).

First, the point feature \(x_l\) at layer \(l\) is used as the query. For the high-density layer \(l-1\), its local neighbour set \(\mathcal{N}_{l-1}(i)\) is retrieved via a k-nearest-neighbour search from layer \(l\). The enhanced high-resolution feature is:

\[
y_{l-1,i}=\sum_{j\in\mathcal{N}_{l-1}(i)}
\rho\left(\chi_q(x_l)\cdot\chi_k^{l-1}(x_{l-1,j})\right)
\chi_v^{l-1}(x_{l-1,j}),
\]

where \(\chi_q,\chi_k^{l-1},\chi_v^{l-1}\) are linear projections and \(\rho\) is the softmax function. This scalar attention mechanism focuses on restoring precise morphological details. For the deep sparse layer \(l+1\), a different cross-attention formulation is adopted:

\[
y_{l+1,i}=\sum_{j\in\mathcal{N}_{l+1}(i)}
\rho\left(M(\chi_q(x_{l,i})-\chi_k^{l+1}(x_{l+1,j}))\right)
\odot \chi_v^{l+1}(x_{l+1,j}),
\]

where \(M\) is a multilayer perceptron. The subtraction operation followed by the element-wise multiplication preserves more context information from low-resolution layers. Finally, all enhanced features are concatenated and compressed through an MLP to obtain the fused feature \(F\).

By stacking the CDF module at several layers of the graph pyramid, the proposed network LGANet-CDF enables multi-density feature fusion. The deep layers can still recover high-frequency edge and small-defect information from the shallow dense layer. The shallow layer can also benefit from the context semantic information from the deep layer. Such a design significantly improves the recognition of burst, molten bead, and pinhole defects.

3. Experiments and Discussion

3.1 Training Setup and Evaluation Metrics

The experiments were conducted on a workstation with Ubuntu 22.04, an NVIDIA RTX 4070 GPU, and PyTorch 2.2.1. The training hyperparameters are summarized in the following table.

Training configuration
Hyperparameter Value
Epochs 300
Batch size 8
Sampled points 16384
Optimizer AdamW
Initial learning rate 0.01
Learning rate schedule Multi-step decay

I used the following standard evaluation metrics: overall accuracy (OA), mean class accuracy (mAcc), mean intersection over union (mIoU), and per-class IoU. The overall accuracy is:

\[
OA=\frac{\sum_{i}n_{ii}}{\sum_{i}\sum_{j}n_{ij}}.
\]

The class mean accuracy is:

\[
mAcc=\frac{1}{K}\sum_{i=1}^{K}\frac{n_{ii}}{\sum_j n_{ij}}.
\]

The class IoU and its mean value are defined by:

\[
IoU_i=\frac{|P_{i,\mathrm{pred}}\cap P_{i,\mathrm{true}}|}{|P_{i,\mathrm{pred}}\cup P_{i,\mathrm{true}}|},
\]

\[
mIoU=\frac{1}{K}\sum_{i=1}^{K}IoU_i.
\]

3.2 Comparison with State-of-the-Art Networks

To evaluate the overall defect detection performance of the proposed network, I compared it with PointNet, PointNet++, Point Transformer v1, Point Transformer v3, OA-CNN, and the original GACNet. The evaluation results on the sealing nail dataset are presented in the following table.

Quantitative comparison on the high-voltage battery sealing nail dataset
Model OA (%) mAcc (%) mIoU (%) Burst IoU (%) Pit IoU (%) Molten bead IoU (%) Warpage IoU (%) Pinhole IoU (%)
LGANet+CDF 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
PTv1 98.77 90.96 72.83 68.54 62.83 58.37 89.67 58.37
PTv3 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

The proposed network achieves the highest OA, mAcc, and mIoU. Compared with the original GACNet, the improvements are 2.45% for OA, 8.24% for mAcc, and 10.40% for mIoU. For small defects, the per-class IoU improvements are remarkable: burst improves from 56.88% to 80.06%, molten bead improves from 54.64% to 75.99%, and pinhole improves from 59.37% to 70.03%. These results demonstrate the superiority of the proposed LGAF, SAG pooling, and CDF modules for micro-defect identification on high-voltage battery sealing nails.

I further evaluated the generalization capability of the improved model on the public S3DSS sewer defect dataset. Results are summarized in the table below. The proposed network also ranks first on all global metrics, confirming that it does not overfit to the sealing nail dataset.

Evaluation on the public S3DSS dataset
Method OA (%) mF1 (%) 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

3.3 Ablation Study of the Proposed Modules

Module-level ablation was first performed to isolate the individual contributions of LGAF and SAG pooling. The results are shown below.

Ablation study of LGAF and SAG pooling
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

Introducing only LGAF increases mIoU from 70.85% to 77.17%; introducing only SAG pooling increases mIoU to 74.81%. When both modules are combined, mIoU reaches 79.23%, and mAcc reaches 92.68%. This validates that LGAF and SAG pooling are complementary: LGAF improves the attention calculation and neighbourhood filtering, whereas SAG pooling retains critical spatial details during downsampling.

Feature-flow ablation was then conducted to investigate the top-down information flow and bottom-up information flow in CDF. The table below lists the per-class IoU results.

Ablation of information flow in the CDF module
Down-flow Up-flow Burst IoU (%) Pit IoU (%) Molten bead 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

Adding the downward information flow alone greatly improves pinhole detection from 64.95% to 71.37%. The combined CDF module achieves the best performance for burst and molten bead. A complete CDF balances the high-detail information from the shallow dense layer and the high-context information from the deep sparse layer.

Insertion-position ablation was also performed to decide where the CDF module should be placed inside the graph pyramid. The corresponding mIoU results show that the design with CDF on intermediate layers yields the largest improvement. The final architecture provides a mIoU increment of +2.02% compared with LGANet without CDF.

Comparison of different CDF insertion strategies
Strategy mAcc (%) mIoU (%) ΔmIoU (%)
a (baseline) 92.68 79.23 —
b 92.32 78.96 −0.27
c 94.03 80.11 +0.88
d (final) 96.20 81.25 +2.02
e 94.97 80.69 +1.46

3.4 Robustness to Point Density

To investigate the robustness of the model against varying point density, I randomly sampled the test point cloud to different cardinalities, such as 16384, 8192, 4096, and 2048 points. The accuracy of the proposed method remains almost unchanged when the point number decreases from 16384 to 4096; the mAcc decreases by less than 2%. This robustness is important in real-world high-voltage battery production because occlusion, sensor noise and scanning irregularity may cause non-uniform point densities.

3.5 Visualization of Prediction Results

Visual inspection of the semantic segmentation results shows that the original GACNet often fails at the boundary of the burst region and incorrectly labels small pinholes as background. After the modifications, the proposed method produces more complete defect masks and sharper boundaries. The visual comparison confirms the quantitative improvements and proves that the network can correctly distinguish extremely small molten beads on the high-voltage battery sealing nail. More importantly, the proposed method is able to distinguish a real defect from the rough surface texture that is often produced during the laser welding process.

4. Defect Detection Software System

I developed a practical software platform using PyQt and PyCharm. The platform integrates all the trained models and preprocessing algorithms into an interactive graphical interface. The main interface includes a parameter panel, two image-display areas, and several buttons for loading weights, loading point cloud data, fitting the welding track, detecting defects, saving reports, and quitting the program.

The workflow in the software is as follows:

  1. Click the “choose weight” button and select the pre-trained PTH weight file of the deep network.
  2. Click the “choose point cloud” button to load a sealing nail point cloud. The depth map is generated and displayed on the left side of the main window.
  3. Enter the inner and outer radius values of the welding track according to the actual geometric dimensions of the high-voltage battery sealing nail.
  4. Click the “fit welding track” button. The system uses the improved RANSAC algorithm to find the sealing nail centroid and then marks the welding zone with a semi-transparent overlay.
  5. Click the “detect” button to start inference. The semantic segmentation network outputs point-wise labels for burst, pit, molten bead, pinhole, and normal regions. The classified defect area will be displayed with a green marker.
  6. For warpage defects, the detection can be performed directly on the entire point cloud without fitting the welding track.
  7. Click the “save defects” button to export the detection results to TXT files. The output file contains defect type, defect count, location, decision remarks and other necessary manufacturing information.

The software produces an intuitive and easy-to-use detector that does not require the user to know any deep learning details. It can be run by production line workers and maintenance engineers. The platform was tested on the actual point cloud data and produced stable results, further demonstrating that the proposed method can be applied to the automated quality inspection of high-voltage batteries. The table below summarizes the main functions of the software system.

Functions of the developed detection software
Function Description
Model weight selection Load a .pth file that contains the trained parameters.
Point cloud loading Read an XYZ or TXT point cloud file and show its depth map.
Welding track fitting Segment the sealing nail region using the improved RANSAC and fit the welding annulus.
Defect detection Perform semantic segmentation inference and visualize the defect areas.
Report saving Generate TXT report files that contain the defect type and location information.

5. Conclusion and Future Outlook

I have systematically investigated a method for detecting welding defects on high-voltage battery sealing nails based on point cloud deep learning. The study addresses four key challenges: point cloud noise, large background interference, missed detections of defect edges, and low accuracy for small-sized defects.

The main conclusions of my research are presented below.

  • A statistical filter can effectively eliminate outlier noise and maintain the underlying geometric structure of the sealing nail surface.
  • The improved RANSAC algorithm with local sampling and misclassification correction can accurately segment the sealing nail welding region from the high-voltage battery top cover. It achieves an \(F_1\) score of 87.74%, which is higher than traditional RANSAC and region-growing segmentation.
  • The local graph attention filter (LGAF) and spatial attention graph pooling (SAG pooling) modules considerably improve the feature extraction ability of the baseline GACNet. The improved LGANet raises mAcc by 4.72% and mIoU by 8.38%.
  • The cross-attention-based cross-density feature fusion module (CDF) enhances the performance on small-scale defect classes. With the complete LGANet-CDF model, the per-class IoU value for molten bead increases by about 21%, and the pinhole IoU increases by about 11% when compared with the original GACNet.
  • The developed PyQt-based software platform provides a practical, non-invasive tool for industrial inspectors to automatically detect sealing nail defects on high-voltage battery packs.

Despite the promising progress, there is still room for future work. The current dataset is collected from a limited set of production conditions. Future work could use multi-source data collection from different lighting conditions and material reflectivity to enlarge the dataset. The computational time of the network can be further reduced by adopting lightweight architectures or knowledge distillation. Another promising direction is to integrate the point cloud geometric information with the corresponding gray-scale or RGB images to create a multimodal detection system. Finally, online learning mechanisms could be developed to adapt the model to changing defect patterns in the high-voltage battery manufacturing process. My work lays a solid foundation for automatic laser-sealing quality inspection of high-voltage batteries and contributes to the production safety and life-cycle reliability of electric vehicles.

Scroll to Top