X-ray images of castings are widely used in manufacturing for quality assurance. This article investigates the X-ray-image-based defective detection. The main contributions this twofold: first, a new full-image method is proposed to classify and nondefective ones; second, by combining two technologies, spatial attention mechanism bilinear pooling deep convolutional neural networks (CNNs), CNN e...