Detecting weld defects in battery trays is crucial for the safety of new energy vehicles. Existing methods for weld surface defect detection, relying on traditional computer vision algorithms and convolutional neural networks with substantial image-level labeled data, face challenges in accurately identifying small defects, especially with limited samples. To address these issues, we developed an innovative Segmentation-Assisted Classification with Convolutional Neural Networks (SACNN) model. SACNN integrates a common feature extraction subnet, a segmentation subnet enhanced by a multi-scale feature fusion module, and a classification subnet specifically designed for precise defect detection. A joint loss function co-trains the segmentation and classification subnets using both image-level and pixel-level labels, enhancing the model’s ability to accurately detect small defect regions. Our model demonstrates notable improvement, achieving accuracy gains ranging from 2% to 18% compared to existing state-of-the-art methods, with an overall accuracy of 94.09% on an industrial dataset of battery tray welds. To further evaluate the generalization capability of our model, we evaluated it on the publicly available Magnetic Tile dataset, achieving state-of-the-art results in this challenging context. Additionally, we conducted comprehensive ablation studies to validate the contribution of each component in our approach and utilized visualization techniques to enhance the interpretability of our model. These advancements represent a significant contribution to the state of the art in aluminum alloy weld defect detection.