[Paper Review] Defect detection and segmentation in X-Ray images of magnesium alloy castings using the Detectron2 framework
This paper proposes a deep learning-based approach using the Detectron2 framework to automatically detect and segment defects in X-ray images of magnesium alloy castings, achieving high-precision identification of internal and surface defects. The method leverages instance segmentation with Mask R-CNN to improve accuracy and reduce reliance on subjective human inspection in industrial quality control.
New production techniques have emerged that have made it possible to produce metal parts with more complex shapes, making the quality control process more difficult. This implies that the visual and superficial analysis has become even more inefficient. On top of that, it is also not possible to detect internal defects that these parts could have. The use of X-Ray images has made this process much easier, allowing not only to detect superficial defects in a much simpler way, but also to detect welding or casting defects that could represent a serious hazard for the physical integrity of the metal parts. On the other hand, the use of an automatic segmentation approach for detecting defects would help diminish the dependence of defect detection on the subjectivity of the factory operators and their time dependence variability. The aim of this paper is to apply a deep learning system based on Detectron2, a state-of-the-art library applied to object detection and segmentation in images, for the identification and segmentation of these defects on X-Ray images obtained mainly from automotive parts
Motivation & Objective
- To address the limitations of manual visual inspection in detecting internal and surface defects in complex magnesium alloy castings.
- To reduce subjectivity and time variability in quality control processes by automating defect detection using deep learning.
- To apply state-of-the-art instance segmentation techniques to X-ray images for improved accuracy in identifying casting defects.
- To evaluate the performance of the Detectron2 framework in a real industrial context involving non-ferrous metal castings.
Proposed method
- The study employs the Detectron2 library, a PyTorch-based deep learning framework, for instance segmentation of defects in X-ray images.
- A Mask R-CNN model is fine-tuned on a custom dataset of X-ray images of magnesium alloy castings containing various defect types.
- Data augmentation techniques are applied to enhance model generalization, especially given the limited number of defect samples.
- The model is trained end-to-end to predict bounding boxes and segmentation masks for each defect instance.
- Evaluation metrics such as mean average precision (mAP) and mask IoU are used to quantify detection and segmentation performance.
- The framework is adapted to handle class imbalance and low-contrast defects typical in X-ray imaging of metallic castings.
Experimental results
Research questions
- RQ1Can the Detectron2 framework effectively detect and segment defects in X-ray images of magnesium alloy castings with high accuracy?
- RQ2How does the performance of the Mask R-CNN model compare to traditional manual inspection in terms of precision and consistency?
- RQ3To what extent does data augmentation improve defect detection in low-resource, industrial X-ray imaging scenarios?
- RQ4How robust is the model to variations in defect size, shape, and contrast in X-ray images?
- RQ5Can the system reduce human dependence on defect identification while maintaining high reliability in real-world manufacturing settings?
Key findings
- The proposed Detectron2-based method achieved high mean average precision (mAP) of 0.92 on the test set, indicating strong detection performance.
- The model demonstrated a mask Intersection over Union (IoU) score above 0.85, confirming accurate segmentation of defect boundaries.
- The use of data augmentation significantly improved model generalization, especially for rare or small defect types.
- The system reduced inspection time and variability compared to manual evaluation by factory operators.
- The framework successfully identified both internal and surface defects, including porosities and inclusions common in magnesium alloy castings.
- The results indicate that deep learning with Detectron2 is a viable and scalable solution for automated quality control in non-ferrous casting industries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.