## 2 Materials and Methods
### First Phase
#### 2.2.1 Data Collection and Preprocessing  
The mineral database was developed by collecting physical samples from the Georama collection housed at the Mineralogical Museum of the School of Mining and Metallurgical Engineering at the National Technical University of Athens. The dataset used for training and testing consists of seven minerals, such as aragonite, a crystal form of calcium carbonate often found in marine environments; azurite, a deep blue copper mineral commonly used as a copper ore and gemstone; hematite, an iron oxide known for its metallic luster and role as a primary ore of iron; obsidian, a volcanic glass formed from rapidly cooling lava, typically dark in color; pyrite, a sulfide mineral often called \"fool\"s gold\" due to its metallic, gold-like appearance; quartz, one of the most abundant minerals, prized for its hardness and used in various industries from jewelry to electronics; and gypsum, a soft sulfate mineral widely used in construction for plaster and drywall due to its white or translucent appearance.  
To capture high-quality images of minerals for classification, a controlled photography setup was created where each mineral was photographed against three different backgrounds (black, green, and white) to improve the model's ability to generalize by highlighting visual features such as texture, luster, and color. Proper lighting was used to eliminate shadows and reduce glares on reflective surfaces like Pyrite or Hematite, ensuring clarity of the mineral's characteristics. Each mineral was photographed from multiple angles to capture its full range of physical properties, including crystal structure, surface texture, and visible fractures or cleavages. The C270 HD Webcam was selected for its automatic light correction feature, which ensures natural and vivid colors. Additionally, the photography process maintained consistent distance, resolution, and lighting, ensuring uniformity across all captured images (Figure 2).  
Post-processing involved resizing the images to 128 \(\times\) 128 pixels, removing background noise, and converting them to RGB format for model analysis to ensure compat  
Figure 1: Flowchart of the following methodology.  
ibility with pre-trained models [29]. Each image was converted into a numerical array facilitating further processing in CNNs, whereas each mineral category is assigned a unique label, allowing the model to learn which images belong to which mineral class. The image data arrays were normalized using Min-Max scaling to a range between 0 and 1, improving the model's training stability and performance. In addition to the training set, a data augmentation process was followed to improve the generalization and robustness of the model. The process involved rotating the sub-images by 90\({}^{\circ}\), 180\({}^{\circ}\), and 270\({}^{\circ}\) to create new variants of the dataset. In addition, the original images were flipped horizontally and vertically [30]. In the final step, the original dataset was divided using 10-Fold Cross-Validation, ensuring robust evaluation and adherence to standard machine learning practices. Specifically, StratifiedKFold was employed to handle the multi-class nature of the dataset, maintaining the class distribution across folds. Each fold was divided into a training set (70%) and a testing set (30%). This approach ensures that the model is trained on the larger portion of the data to learn meaningful patterns and relationships, while the smaller testing set, which remains unseen during training, is used to objectively evaluate the model's ability to generalize to new data [31,32]. Additionally, measures of statistical significance, such as \(p\)-values derived from the Wilcoxon signed-rank test, were included to assess the reliability of the results and compare the model's performance against baseline or alternative methods, ensuring the robustness of conclusions [33].