Deep Learning for Turbocharger Casting Defect Detection

In my research, I investigate how deep learning can be used to detect casting defects on turbocharger components with high speed, high accuracy, and low dependence on human inspection. A casting defect is any undesirable discontinuity, cavity, inclusion, or surface irregularity produced during the casting process. For turbochargers, casting defects are especially important because the component operates under cyclic thermal and mechanical loads. Even a small casting defect can reduce fatigue resistance, disturb air flow, or cause premature failure. My work therefore treats casting defect detection not merely as an image classification problem, but as a complete industrial inspection pipeline that includes image acquisition, noise suppression, data augmentation, object detection, model training, and post-processing.

Manual inspection remains common in many foundries. Inspectors examine cast surfaces under factory lighting, mark suspicious regions, classify the casting defect type, and decide whether the part should be repaired or scrapped. This process is slow, subjective, and difficult to maintain over long shifts. The same casting defect may be labeled differently by different inspectors, and small defects can be missed when the surface is dark, oily, or covered by shot-blast texture. Because turbocharger production volumes continue to rise, I designed a deep-learning-based casting defect detection method that can localize and classify multiple defect categories in a single image. The method is intended to reduce inspection time, improve consistency, and support later analysis of casting defect records.

1. Industrial Background and Problem Definition

Casting is a fundamental manufacturing route for many mechanical components. In automotive production, cast parts appear in engine blocks, housings, brackets, transmission components, and turbocharger bodies. A turbocharger is particularly sensitive to casting quality because it contains thin walls, complex internal passages, and regions that experience high-temperature exhaust gas. A casting defect can create a stress concentration point, reduce sealing performance, or cause leakage. In my study, I focus on surface casting defects that are visible after shot blasting and before final machining. These defects are important because they can often be detected directly from camera images, yet their appearance varies greatly.

I define the casting defect detection task as a multi-object detection problem. Given an input image \(I\), the algorithm must output a set of predictions:

$$
\mathcal{P} = \{(c_k, s_k, x_k, y_k, w_k, h_k)\}_{k=1}^{N}
$$

where \(c_k\) is the predicted casting defect category, \(s_k\) is the confidence score, and \((x_k,y_k,w_k,h_k)\) defines the bounding box. The goal is to maximize both recall and precision while keeping inference time below the industrial limit. For my target application, the required technical indicators are:

Indicator Target Reason
Recall for all casting defect classes Above 95% Missing a casting defect can cause a defective part to reach later production stages.
Precision for all casting defect classes Above 95% Too many false positives waste inspection and repair resources.
Inference time per image Below 1 s The detector must fit into a practical production cycle.
Multi-class output Four defect types The factory needs both localization and classification of each casting defect.

2. Deep Learning Foundations for Casting Defect Detection

Before designing the detector, I reviewed the basic components of deep learning and convolutional neural networks. These components determine how a model learns visual patterns from casting defect images. A casting defect often has low contrast, irregular boundaries, and strong similarity to nearby surface texture. Therefore, the network must learn hierarchical features: shallow layers capture edges and gradients, while deeper layers capture semantic patterns associated with each casting defect class.

2.1 Multilayer Perceptron and Backpropagation

A multilayer perceptron is a feedforward neural network composed of an input layer, one or more hidden layers, and an output layer. For a single neuron, the output can be written as:

$$
O_{\omega,b}(x)=f\left(\sum_{n=1}^{N}\omega_n x_n+b\right)
$$

where \(x_n\) is the input, \(\omega_n\) is the weight, \(b\) is the bias, and \(f(\cdot)\) is a nonlinear activation function. Backpropagation updates the weights and biases by propagating the output error backward through the network. If the loss is \(L\), the weight update is:

$$
\omega \leftarrow \omega – \eta \frac{\partial L}{\partial \omega}
$$

where \(\eta\) is the learning rate. This principle is the foundation of training deeper models for casting defect detection.

2.2 Convolutional Neural Networks

A convolutional neural network replaces fully connected operations with local convolution, weight sharing, and spatial pooling. For an input tensor \(X\) with channel count \(C\), the convolution output at position \((i,j)\) for kernel \(k\) is:

$$
Y_{i,j,k}=\sum_{c=1}^{C}\sum_{u=0}^{H-1}\sum_{v=0}^{W-1} W_{u,v,c,k}X_{i+u,j+v,c}+b_k
$$

Here \(H\) and \(W\) are the kernel height and width. This operation is efficient because the same kernel is applied across the entire image. For casting defect detection, this means that an edge pattern or cavity boundary learned in one region can be recognized in another region.

Layer Type Function in Casting Defect Detection Typical Effect
Convolution layer Extracts local patterns such as rims, holes, and rough boundaries. Produces feature maps for the casting defect.
Nonlinear activation layer Introduces nonlinearity so the model can represent complex defect shapes. Improves separation between defect and background.
Pooling layer Reduces spatial resolution and increases the receptive field. Improves robustness to small shifts in casting defect position.
Batch normalization Stabilizes feature distributions during training. Speeds up convergence and reduces initialization sensitivity.
Fully connected layer Maps high-level features to class scores in classification networks. Not always used in one-stage detectors.

2.3 Activation Functions

The sigmoid activation is defined as:

$$
\sigma(x)=\frac{1}{1+e^{-x}}
$$

It compresses values into \((0,1)\), but it can saturate and slow training. For deep detectors, the rectified linear unit is more common:

$$
\mathrm{ReLU}(x)=\max(0,x)
$$

In my model, ReLU and its variants are used because they avoid the saturation problem and allow faster optimization when learning casting defect features.

2.4 Batch Normalization

Batch normalization normalizes feature maps over a mini-batch. For a channel \(k\), the normalized value is:

$$
\hat{x}^{(k)}=\frac{x^{(k)}-E[x^{(k)}]}{\sqrt{\mathrm{Var}[x^{(k)}]}}
$$

Then a learnable scale and shift are applied:

$$
y^{(k)}=\gamma^{(k)}\hat{x}^{(k)}+\beta^{(k)}
$$

This operation helps the network train stably even when casting defect images vary in illumination, contrast, and surface texture.

3. Object Detection Algorithms for Casting Defect Detection

Object detection algorithms can be divided into two-stage and one-stage methods. In my work, I compared these families before selecting the base algorithm for casting defect detection. Two-stage methods first generate region proposals and then classify them. One-stage methods directly predict bounding boxes and classes from dense feature maps. Because casting defect detection must be fast and deployable in a factory, one-stage detection has a natural advantage.

3.1 Two-Stage Detectors

R-CNN uses selective search to generate region proposals, then applies a convolutional network to each proposal. Fast R-CNN improves efficiency by computing the convolutional feature map once and using region-of-interest pooling. Faster R-CNN introduces a region proposal network, making the detector nearly end-to-end. These methods can achieve high accuracy, but their inference cost is usually higher than one-stage detectors. For casting defect detection, the additional proposal stage is often unnecessary because defects are relatively sparse and can be detected directly by a dense predictor.

3.2 One-Stage Detectors

SSD predicts bounding boxes from multiple feature maps with different scales. YOLO treats detection as a single regression problem and predicts boxes and classes directly. YOLOv2 improves the design with anchor boxes and a stronger backbone. YOLOv3 further introduces a feature pyramid structure, making it effective for small and multi-scale objects. Because casting defects can be very small or relatively large, multi-scale prediction is essential.

Algorithm Family Representative Method Strength Limitation Suitability for Casting Defect Detection
Two-stage Faster R-CNN High localization accuracy Slower inference Good accuracy but less suitable for real-time inspection
Two-stage with FPN Faster R-CNN + FPN Strong multi-scale performance Higher computational cost Useful as an accuracy reference
One-stage SSD300 Simple and fast Weaker small-object recall Moderate suitability
One-stage SSD513 Better resolution Still limited feature fusion Moderate suitability
One-stage YOLOv2 Fast and compact Less effective for small defects Useful baseline
One-stage YOLOv3 Multi-scale prediction and strong performance Path length in detection neck can lose shallow detail Selected as the base for casting defect detection

After comparing accuracy, model size, inference time, and multi-scale behavior, I selected YOLOv3 as the base detector for casting defect detection. However, I did not use it unchanged. I modified its detection network to improve the flow of shallow information, which is important for small and irregular casting defects.

4. Turbocharger Casting Defect Categories

I collected images from a production environment and studied four frequent casting defect categories: blow, hole, inclusion, and binder. Each casting defect has a different formation mechanism and visual appearance. The detector must distinguish them because the corrective action differs. For example, a blow defect often makes the part unusable, while a shallow binder mark may sometimes be repaired.

Casting Defect Formation Cause Visual Appearance Typical Impact
Blow Gas entrapment, poor venting, or excessive pouring speed Large, irregular cavity with rough edges Severe structural weakening; often scrap
Hole Gas that does not escape before solidification Small, nearly spherical dark cavity with smooth inner wall Stress concentration and fatigue risk
Inclusion Slag or nonmetallic material trapped in the melt Irregular depression with rough boundary and variable depth Surface discontinuity and possible leakage
Binder Core binder overflow or decomposition product entering the mold Large, shallow, nearly circular depression with smooth interior Cosmetic and functional surface defect

These four categories are all surface casting defects. They differ in scale, shape, contrast, and boundary sharpness. Some casting defects are only a few pixels wide, while others cover a large portion of the image. This variation motivates my multi-scale detection design and my data augmentation strategy.

4.1 Evaluation Metrics

I evaluate the detector using recall, precision, average precision, and mean average precision. Recall measures how many true casting defects are found:

$$
\mathrm{Recall}=\frac{TP}{TP+FN}
$$

Precision measures how many predicted casting defects are correct:

$$
\mathrm{Precision}=\frac{TP}{TP+FP}
$$

Average precision is the area under the precision-recall curve for one class:

$$
AP=\int_{0}^{1}p(r)\,dr
$$

Mean average precision is the average over all casting defect classes:

$$
mAP=\frac{1}{K}\sum_{k=1}^{K}AP_k
$$

For localization quality, I use intersection over union:

$$
\mathrm{IoU}=\frac{\mathrm{area}(A\cap B)}{\mathrm{area}(A\cup B)}
$$

where \(A\) is the predicted box and \(B\) is the ground-truth box. A prediction is considered correct when the IoU exceeds a threshold and the class label is correct.

5. Image Preprocessing for Casting Defect Images

Factory images contain noise from dust, metal particles, illumination fluctuation, sensor heat, and transmission. If raw images are used directly, the detector may learn noise patterns instead of casting defect patterns. Therefore, I studied several denoising methods before training. The goal was to reduce noise while preserving the edges and boundaries of small casting defects.

5.1 Denoising Algorithms

Median filtering replaces the center pixel with the median of its neighborhood:

$$
g(x,y)=\mathrm{med}\{f(x-k,y-l),(k,l)\in W\}
$$

Gaussian filtering uses a two-dimensional Gaussian kernel:

$$
G(x,y)=\frac{1}{2\pi\sigma^2}e^{-\frac{x^2+y^2}{2\sigma^2}}
$$

Mean filtering computes the local average:

$$
g(x,y)=\frac{1}{m}\sum_{(k,l)\in W}f(x-k,y-l)
$$

Bilateral filtering combines spatial distance and intensity similarity:

$$
g(x,y)=\frac{\sum_{(k,l)\in W}f(x-k,y-l)\omega(x,y,k,l)}{\sum_{(k,l)\in W}\omega(x,y,k,l)}
$$

where

$$
\omega(x,y,k,l)=\exp\left(-\frac{(k-l)^2}{2\sigma_d^2}\right)\exp\left(-\frac{\|f(x,y)-f(x-k,y-l)\|^2}{2\sigma_r^2}\right)
$$

Discrete cosine transform converts the image to the frequency domain and suppresses high-frequency noise. It can preserve details, but it is slower and less convenient for multichannel images.

5.2 Quantitative Comparison

I compared peak signal-to-noise ratio, structural similarity, and average processing time. The definitions are:

$$
\mathrm{MSE}=\frac{1}{mn}\sum_{i=0}^{m-1}\sum_{j=0}^{n-1}[I(i,j)-K(i,j)]^2
$$

$$
\mathrm{PSNR}=10\log_{10}\left(\frac{\mathrm{MAX}^2}{\mathrm{MSE}}\right)=20\log_{10}\left(\frac{\mathrm{MAX}}{\sqrt{\mathrm{MSE}}}\right)
$$

$$
\mathrm{SSIM}(x,y)=[l(x,y)]^\alpha[c(x,y)]^\beta[s(x,y)]^\gamma
$$

Denoising Method PSNR (dB) SSIM Average Time (s)
Median filtering 34.499 0.812 0.870
Gaussian filtering 35.715 0.925 0.150
Mean filtering 34.057 0.801 0.165
Bilateral filtering 38.572 0.963 0.346
Discrete cosine transform 37.917 0.959 2.046

The bilateral filter achieved the best balance. It produced the highest PSNR and SSIM while keeping processing time well below one second. Therefore, I applied bilateral filtering before feeding casting defect images into the detector.

6. Data Annotation and Augmentation

Deep learning requires labeled data. I annotated each casting defect with a bounding box and a class label. The annotation file contains image size, object class, and box coordinates. Because the original dataset was limited, I designed a data augmentation pipeline to increase the number and diversity of casting defect samples without changing the underlying defect semantics.

6.1 Geometric Augmentation with Prior Labels

Simple random cropping can cut a casting defect into two parts and create incorrect labels. To avoid this, I proposed a random cropping and translation method based on prior annotation information. Let the union bounding box of all defects in an image be \(B=(x_{\min},y_{\min},x_{\max},y_{\max})\). The four surrounding regions are:

$$
S_1=x_{\min}y_{\min}
$$

$$
S_2=(W-x_{\max})y_{\min}
$$

$$
S_3=x_{\min}(H-y_{\max})
$$

$$
S_4=(W-x_{\max})(H-y_{\max})
$$

I choose the smallest region and sample a point \((x_1,y_1)\) inside it. For example, if \(S_1\) is the smallest:

$$
x_1=\alpha x_{\min},\quad y_1=\beta y_{\min}
$$

where \(\alpha,\beta\in(0,1)\) are random numbers. The crop side length \(l\) must satisfy:

$$
l_{\max}=\min(W-x_1,H-y_1)
$$

$$
l_{\min}=\max(x_{\max}-x_1,y_{\max}-y_1)
$$

Then a square crop of side length \(l\in[l_{\min},l_{\max}]\) is taken. This guarantees that every casting defect remains complete while also randomizing the position of the defect inside the image.

6.2 Color-Space Augmentation

I also augmented the images in RGB and HSV color spaces. In RGB space, brightness and contrast were adjusted by:

$$
g(x,y)=a f(x,y)+b
$$

where \(a\) controls contrast and \(b\) controls brightness. In HSV space, I applied random changes to hue, saturation, and value:

$$
H_o(x,y)=H(x,y)+h
$$

$$
S_o(x,y)=sS(x,y)
$$

$$
V_o(x,y)=vV(x,y)
$$

These transformations simulate changes in factory lighting, surface reflectivity, and camera exposure. They make the casting defect detector more robust to real production variation.

Dataset Stage Number of Images Purpose
Original collected images 304 Initial raw casting defect samples
Training set after augmentation 1,952 Model parameter learning
Validation set 240 Hyperparameter tuning and early stopping
Test set 240 Final performance evaluation
Total augmented dataset 2,432 Complete casting defect dataset

7. Proposed Casting Defect Detection Network

My detector is based on YOLOv3, but I modified the detection network and the downsampling operation. The backbone remains Darknet53 because it provides strong feature extraction with a reasonable number of parameters. The detection network is redesigned with multi-path fusion. I also use depthwise separable convolution for downsampling to control the parameter increase.

7.1 Backbone Network

The backbone uses residual blocks. A residual block can be written as:

$$
y=F(x)+x
$$

where \(x\) is the input and \(F(x)\) is the residual mapping learned by two or more convolutional layers. This design allows very deep networks to train without degradation. Darknet53 contains repeated residual blocks and produces feature maps at three scales: \(13\times13\), \(26\times26\), and \(52\times52\).

Stage Layer Pattern Output Size Role for Casting Defect Detection
1 Convolution + residual block 208×208 Fine edges and surface texture
2 Convolution + residual blocks 104×104 Small cavity boundaries
3 Convolution + residual blocks 52×52 Small casting defects and local depressions
4 Convolution + residual blocks 26×26 Medium casting defect shapes
5 Convolution + residual blocks 13×13 Large casting defect regions and context

7.2 Multi-Path Fusion Detection Network

The original YOLOv3 detection neck uses a feature pyramid network. It passes deep semantic information to shallower layers. However, the path from shallow layers to deep layers remains long. For casting defect detection, shallow features contain critical boundary information for small holes, inclusions, and irregular blow defects. If these features are lost, small casting defects may be missed.

I therefore added a bottom-up augmentation path. The detection network now fuses features through multiple paths. The main idea can be expressed as:

$$
F_{\mathrm{out}}=\phi\left(\mathrm{Concat}\left(\mathrm{Upsample}(F_{\mathrm{deep}}),F_{\mathrm{shallow}}\right)\right)
$$

for the top-down path, and

$$
F_{\mathrm{out}}=\phi\left(\mathrm{Concat}\left(\mathrm{Downsample}(F_{\mathrm{shallow}}),F_{\mathrm{deep}}\right)\right)
$$

for the bottom-up path. Here \(\phi(\cdot)\) denotes a convolution block. This structure shortens the information path from shallow to deep layers and preserves more edge information for casting defect localization.

7.3 Depthwise Separable Downsampling

To avoid a large increase in parameters, I replaced some standard downsampling convolutions with depthwise separable convolutions. For an input with \(C\) channels and an output with \(N\) channels, a standard convolution with kernel size \(H\times W\) has:

$$
P_{\mathrm{std}}=H\times W\times C\times N
$$

A depthwise separable convolution first applies one filter per channel, then applies a \(1\times1\) convolution:

$$
P_{\mathrm{dw}}=H\times W\times C+C\times N
$$

The parameter ratio is:

$$
\frac{P_{\mathrm{dw}}}{P_{\mathrm{std}}}=\frac{1}{N}+\frac{1}{H\times W}
$$

This ratio shows that depthwise separable convolution greatly reduces computation when \(N\) and \(H\times W\) are large. It allows my detector to add multi-path fusion while still training on a moderate GPU.

8. Training Strategy for Casting Defect Detection

Because the number of annotated casting defect images is limited, I used transfer learning. I first initialized the backbone with pretrained weights. Then I trained the detector in two stages. In the first stage, I froze the backbone and fine-tuned the detection layers. In the second stage, I unfroze all parameters and trained the entire network with a smaller batch size. This strategy helped the model adapt to casting defect features without overfitting.

8.1 Loss Function

The loss function combines localization loss, confidence loss, and classification loss. A simplified form is:

$$
L=L_{\mathrm{box}}+L_{\mathrm{obj}}+L_{\mathrm{cls}}
$$

The localization loss for positive predictions is:

$$
L_{\mathrm{box}}=\sum_{i=0}^{M}\sum_{j=0}^{N}\sum_{k=0}^{B}\mathbb{1}_{ijk}^{\mathrm{obj}}\left[(x_i-\hat{x}_i)^2+(y_i-\hat{y}_i)^2+(w_i-\hat{w}_i)^2+(h_i-\hat{h}_i)^2\right]
$$

The confidence loss separates object and non-object predictions:

$$
L_{\mathrm{obj}}=\sum_{i,j,k}\mathbb{1}_{ijk}^{\mathrm{obj}}\mathrm{BCE}(c_i,\hat{c}_i)+\lambda_{\mathrm{noobj}}\sum_{i,j,k}\mathbb{1}_{ijk}^{\mathrm{noobj}}\mathrm{BCE}(c_i,\hat{c}_i)
$$

The classification loss is:

$$
L_{\mathrm{cls}}=\sum_{i,j,k}\mathbb{1}_{ijk}^{\mathrm{obj}}\sum_{c\in\mathcal{C}}\mathrm{BCE}(p_{i,c},\hat{p}_{i,c})
$$

where BCE is binary cross entropy:

$$
\mathrm{BCE}(p,\hat{p})=-p\log(\hat{p})-(1-p)\log(1-\hat{p})
$$

8.2 CIoU for Box Regression

Standard IoU cannot distinguish between two boxes that do not overlap. I therefore use CIoU, which considers overlap, center distance, and aspect ratio:

$$
\mathrm{CIoU}=\mathrm{IoU}-\frac{\rho^2(b,b^{gt})}{c^2}-\alpha v
$$

where

$$
v=\frac{4}{\pi^2}\left(\arctan\frac{w^{gt}}{h^{gt}}-\arctan\frac{w}{h}\right)^2
$$

$$
\alpha=\frac{v}{(1-\mathrm{IoU})+v}
$$

This improves box regression for small casting defects, especially when the initial prediction is far from the ground-truth box.

8.3 Label Smoothing

To prevent overconfident classification, I applied label smoothing:

$$
l_k=(1-\epsilon)y_k+\frac{\epsilon}{K}
$$

where \(y_k\) is the original one-hot label, \(K\) is the number of classes, and \(\epsilon\) is a small smoothing factor. This reduces the gap between the target class and other classes, improving generalization on unseen casting defect images.

Training Parameter Stage 1 Stage 2
Backbone state Frozen Unfrozen
Batch size 24 4
Epochs 5 Until early stopping
Learning rate policy Fixed Reduced by factor 10 after 3 epochs without improvement
Early stopping No 15 epochs without validation improvement
Optimizer Adam or SGD variant Adam or SGD variant

9. Experiments and Results

I evaluated the method on the turbocharger casting defect dataset. The test set contains 140 binder defects, 112 hole defects, 111 blow defects, and 60 inclusion defects. I used recall, precision, and mAP as the main metrics. I also compared the proposed detector with the original YOLOv3.

9.1 Effect of Dataset Size

I trained the model with three augmented dataset sizes: 1,096, 1,644, and 2,192 images. The validation set ratio was kept constant. The results show that increasing the amount of augmented data improves performance, although the gain diminishes because augmentation does not create entirely new information.

Number of Images Termination Epoch mAP at IoU=0.5
1,096 47 89.94%
1,644 58 95.25%
2,192 64 97.66%

9.2 Model Size and Inference Time

The proposed detector adds multi-path fusion, so its parameter count is larger than YOLOv3. However, depthwise separable downsampling reduces the extra cost. The single-image inference time remains below the required one second.

Metric Original YOLOv3 Proposed Detector
Total parameters 61,592,497 75,630,769
Trainable parameters 61,539,889 75,565,105
Inference time per image 0.297 s 0.313 s

9.3 Recall and Precision

The proposed detector outperforms the original YOLOv3 on most casting defect classes. The overall recall reaches 97.9%, and the overall precision reaches 96.7%. This satisfies the industrial requirement of more than 95% for both metrics.

Casting Defect Class YOLOv3 Recall Proposed Recall YOLOv3 Precision Proposed Precision
Binder 98.6% 97.9% 93.9% 97.9%
Hole 90.2% 97.3% 89.4% 92.4%
Blow 95.5% 98.2% 93.0% 100.0%
Inclusion 95.0% 98.3% 91.9% 96.7%
Overall 95.0% 97.9% 92.2% 96.7%

9.4 Mean Average Precision

The proposed method improves mAP by 3.66 percentage points compared with YOLOv3. This confirms that the multi-path fusion detection network is beneficial for casting defect detection.

Model mAP at IoU=0.5 Improvement
Original YOLOv3 93.99% Baseline
Proposed detector 97.66% +3.67%

Visual inspection of the outputs shows that the detector correctly localizes casting defects with confidence scores. The bounding boxes cover the defect regions and the class labels match the ground truth. Small hole defects, which were often missed by the baseline, are detected more reliably because the shallow feature path is shorter and better preserved.

10. Post-Processing of Casting Defect Images

After detection, I designed post-processing methods to support defect recording, repair planning, and process analysis. Different casting defect categories require different post-processing because their shapes and edge properties differ. Binder and hole defects are approximately circular, while blow and inclusion defects are irregular.

10.1 Circular Defects: Binder and Hole

For binder defects, the boundary is smooth but sometimes low contrast. I crop the detected region, convert it to grayscale, apply Otsu thresholding, perform morphological erosion and dilation, extract the largest contour, and compute the minimum enclosing circle. The morphological operation is important because it separates the casting defect from noise and prevents the fitted circle from becoming too large.

For hole defects, the cavity is usually darker than the surrounding surface. I use grayscale conversion, Laplacian sharpening, Canny edge detection, and Hough transform to fit the circular boundary. This produces a clean circular region for each hole casting defect.

10.2 Irregular Defects: Blow and Inclusion

Blow and inclusion defects have complex boundaries. I enhance contrast, apply grayscale conversion, use Otsu binarization, perform morphological operations, and extract the largest contour. This gives a segmented region that follows the irregular shape of the casting defect. The result can be mapped back to the original image using coordinate transformation.

Operation Binder Hole Blow Inclusion
Grayscale conversion Yes Yes Yes Yes
Contrast enhancement Yes Yes Yes Yes
Laplacian sharpening No Yes No No
Otsu thresholding Yes No Yes Yes
Canny edge detection No Yes No No
Morphological processing Yes No Yes Yes
Largest contour extraction Yes No Yes Yes
Minimum enclosing circle Yes No No No
Hough transform No Yes No No

These post-processing steps make the detector output more useful. Instead of only providing a bounding box, the system can produce a segmented casting defect image. This supports defect database construction, defect severity estimation, and further analysis of the casting process.

11. Discussion

The experimental results show that deep learning can handle casting defect detection with high recall and precision. The main improvements in my method come from three directions. First, bilateral filtering reduces noise while preserving defect boundaries. Second, prior-label-based augmentation increases data diversity without corrupting casting defect labels. Third, multi-path fusion preserves shallow information and improves detection of small casting defects.

The proposed detector still has limitations. The number of original casting defect images is small compared with public detection datasets. Although augmentation helps, it cannot fully replace new real samples. The distribution of casting defect classes is also uneven, which may bias the model toward frequent classes. In future work, I plan to use generative models and stronger data synthesis to enrich the casting defect dataset. I also intend to reduce the model size further so that it can run on lower-cost edge devices. Finally, I plan to extend the method from casting defect detection to machining defects and coating defects, creating a broader industrial surface inspection system.

12. Conclusion

In my research, I developed a deep-learning-based method for turbocharger casting defect detection. I analyzed the characteristics of four common casting defect categories: blow, hole, inclusion, and binder. I built a preprocessing and augmentation pipeline that includes bilateral filtering, prior-label random cropping, geometric transformation, and color-space augmentation. I selected YOLOv3 as the base detector and improved its detection network with multi-path fusion and depthwise separable downsampling. I trained the model using a two-stage transfer learning strategy with CIoU regression and label smoothing. On the turbocharger casting defect dataset, the method achieved 97.9% recall and 96.7% precision, exceeding the industrial requirements. I also designed post-processing methods for circular and irregular casting defects, enabling segmentation and record generation. The results demonstrate that the proposed approach is practical for automated casting defect detection and provides a foundation for further intelligent inspection in foundry production.

Scroll to Top