Efficient mechanical casting defect detection based on state space modeling and multiscale attention
HaoQiong Wu, Yuheng Li
Henan Institute of Technology · Hainan University
Key points
From the paper's conclusion- Extensive experiments on three benchmarks demonstrate that CastMamba achieves state-of-the-art performance, attaining 88.4% mAP@50 on MCDD, 91.2% mAP@50 on BDD, and 99.4% image-level AUROC on MVTec-AD, consistently surpassing seventeen competitive baselines.
Abstract
Automated defect detection in mechanical castings is critical for ensuring product quality in modern manufacturing. However, existing methods struggle to simultaneously achieve micro-defect sensitivity, global contextual understanding, and computational efficiency. In this paper, we propose CastMamba, a novel encoder–decoder network that integrates selective state-space modeling with multi-scale attention mechanisms for high-precision casting defect detection. The encoder employs a micro-defect attention module (MDAM) that leverages multi-scale dilated convolutions with a Bilinear Attention Module to capture fine-grained defect features across varying scales. A state-space global context module (SSGCM) serves as the bottleneck, harnessing the selective state-space mechanism to model long-range spatial dependencies with linear computational complexity. A local-global dual-branch fusion module (LGDFM) further enriches feature representations through patch-based attention at multiple granularities. The decoder utilizes a global-local feature decoding module (GLFDM) that combines dilated convolutions with vision transformers for comprehensive feature reconstruction. Extensive experiments on three benchmarks demonstrate that CastMamba achieves state-of-the-art performance, attaining 88.4% mAP@50 on MCDD, 91.2% mAP@50 on BDD, and 99.4% image-level AUROC on MVTec-AD, consistently surpassing seventeen competitive baselines. The source code is publicly available at https://github.com/wfcyliyuheng-dev/CastMamba .
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- EMamba: A MoE-enhanced state space network for robust steel surface defect detection.PloS one · 2026
- EGONet: edge guided omni-directional attention with multi-scale bilateral feature integration for surface defect detection.Scientific reports · 2026
- MCWS-YOLO: A Steel Surface Defect Detection Method Based on State-Space ModelingEngineering Research Express · 2026
- MFDNet: A Lightweight Mobile Mamba-based Detector for Real-Time Aviation Casting Defect DetectionEngineering Research Express · 2026
- An intelligent SCNNBN-TBiG hybrid model for casting defect classificationAustralian Journal of Mechanical Engineering · 2026
- SH-DETR: Enhancing steel surface defect detection and classification with an improved transformer architecturePLoS ONE · 2025