 This paper proposes a new approach for automatically detecting metallic defects in industrial settings. It uses a cascaded autoencoder, KC, architecture to segment, and classify defects in the input image. The KC first segments the image into different regions, then uses a compact convolutional neural network, CNN, to classify each region according to its type of defect. The proposed method was tested on an industrial dataset and demonstrated high accuracy and robustness. This article was authored by Cien Tao, Da Peng Zhang, Wen Ji Ma, and others.