Abstract: Ferromagnetic parts are widely used in various industries such as automotive, aerospace, and machinery. The production of these parts involves several processes, including casting, forging, and machining. During these processes, defects can occur in the surface or near-surface of the parts. These defects can compromise the integrity of the parts, leading to potential failures in their performance. Therefore, it is crucial to detect and identify these defects before the parts are put into use. Magnetic particle inspection (MPI) is a non-destructive testing method widely used in the industry to detect surface and near-surface defects in ferromagnetic parts. In this method, magnetic particles are applied to the surface of the part, and a magnetic field is applied to the part. The magnetic particles accumulate around the defects, creating a visible indication of their presence. Qualified operators perform visual inspection of the parts to identify the defects. However, manual inspection by qualified operators can be time-consuming and error-prone. Moreover, the identification of defects can be subjective and dependent on the operator¿s experience and expertise. Therefore, there is a need to develop an automated method for defect identification in ferromagnetic parts based on the magnetic particle technique. In this context, this PhD study aims to investigate and develop a deep learning based method for automatic defect identification in ferromagnetic parts based on the magnetic particle technique. Our proposed system for detecting defects in fasteners is based on the application of convolutional neural networks (CNNs). CNNs are a type of deep learning architecture that are particularly effective in image recognition tasks. They are able to learn complex features and patterns in images without the need for manual feature engineering or preprocessing. This makes them ideal for automating the detection of defects in manufacturing settings. The system is designed to process raw images of fasteners and output the presence and locations of defects. This is achieved through a training process where the CNN is fed a large number of labeled images of fasteners, some with defects and some without. The network learns to recognize the patterns and features associated with the presence of defects and is able to generalize this learning to new images of fasteners. CNNs are a powerful tool for computer vision and machine learning, but they face several challenges. One of these challenges is overfitting, where the model is too closely fit to the training data and performs poorly on new data. Regularization techniques can be used to address this challenge. Additionally, limited data, imbalanced classes, or inconsistent labels can make training and evaluation difficult. There is also a growing demand for CNNs to be explainable, especially in applications such as manufacturing defect detection. Finally, there are often constraints on the size and complexity of CNN models, particularly when they need to be deployed on devices with limited resources or integrated into robotic systems. The starting point of this PhD study is to design a reliable image acquisition system that combines both frame and line scan cameras to capture the head and shank portions of rotating fasteners. This methodology captures high-resolution images of both sections, allowing for detailed analysis of surface finish and dimensional tolerances, which can help identify potential defects. The use of both cameras at high speeds provides for efficient image acquisition while improving the accuracy and repeatability of the image analysis. The proposed methodology represents a significant advancement in the field of fastener inspection and quality control. The second step employs a data-centric approach through the use of data augmentation and GAN-based synthetic images to expand the size and diversity of the training dataset. Combining the data-centric approach with the model-centric approach using multi-task learning improves the performance of the defect detection model by allowing it to learn from multiple sources of information and to generalize better to new tasks. The proposed multi-task learning model can handle multiple tasks simultaneously, making it more efficient and interpretable. Finally, explainable AI techniques are used to make the defect detection model more interpretable and explainable, with GradCAM generating the most interpretable and explainable heatmaps. The combination of knowledge distillation, transfer learning, and fine-tuning is also used to improve the speed and accuracy of the model. Overall, the proposed methodology combines multiple techniques and approaches to improve the efficiency and effectiveness of the defect detection process, with potential applications in various industries.