## 5 Conclusions  
In this paper, a methodology for analysing and classifying materials based on their hardness by measuring their internal magnetic fields was described in detail. The sensors were used to detect weak magnetic fields in combination with advanced data processing methods and a CNN. The experimental measurements provided detailed magnetic maps of the materials, which were then analysed to classify the samples into 13 classes according to their hardness. The SGDM algorithm was used to train and optimize the CNN, which significantly improved the stability and accuracy of the model.  
Figure 12: Computational results: example of classification of 4 different samples: (**a**) \(T\) = 300 \({}^{\circ}\)C; (**b**) \(T\) = 500 \({}^{\circ}\)C; (**c**) \(T\) = 1100 \({}^{\circ}\)C; (**d**) \(T\) = 1200 \({}^{\circ}\)C.  
The aim was to develop a reliable and efficient approach for automated material analysis that would allow for the accurate classification of their hardness based on magnetic properties without the need for contact with the material. This approach has the potential to significantly improve processes in materials engineering and manufacturing where high accuracy and efficiency are required. Automating the classification of materials using magnetic profiles could simplify and speed up the analysis of materials, which has a direct impact on improving manufacturing and research processes.  
For the experimental part, a sensor system was used to measure the weak magnetic fields in a 3 \(\times\) 3 matrix arrangement, which provided detailed 2D maps of the magnetic fields of the samples. These maps were processed using spline interpolation to produce continuous functions describing the magnetic fields. The measurement results were analysed and classified using CNNs, specifically a GoogleNet model adapted to 13 classes. The training process was optimized using the SGDM algorithm to ensure stability and faster convergence during learning. A 15% test set of samples was used to evaluate the classification success, which yielded excellent results with classification accuracies between 0.95 and 1, with median accuracies ranging from 0.975 to 0.99 for most samples.  
The classification results for the material samples showed excellent accuracy, with classification success rates ranging from 0.95 to 1. This result indicates that the proposed system can reliably recognize materials according to their magnetic properties with minimal errors. The results showed an interesting trend: the magnetic field strength decreased with increasing annealing temperature, with the largest decrease observed around 1000 \({}^{\circ}\)C. This phenomenon suggests that the magnetic properties of materials are sensitive to heat treatment, which may significantly impact the fabrication of materials with desired magnetic properties.  
This approach has significant potential in the field of automated materials analysis, which can lead to advances in materials engineering and manufacturing.  
Conceptualization, M.S. and D.G.; methodology, M.S.; software, M.G.; validation, M.S., D.G. and P.K.; formal analysis, D.G.; investigation, M.S.; resources, M.S. and P.K.; data curation, M.G.; writing--original draft preparation, M.S.; writing--review and editing, M.S. and D.G.; visualization, M.S.; supervision, M.S. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. Not applicable. Not applicable. Data Availability Statement: The data that support the findings of this study are available from the corresponding author, [M.S.], upon reasonable request. This research was supported by the Slovak Research and Development Agency (contract numbers APVV-19-0214 and APVV-23-0162). The authors declare no conflicts of interest.