## 2 Materials and Methods
### Image Typology Classification to Identify Specific Workflow
#### 2.1.3 Assessment of Image Usability  
In metallographic analysis, the quality of the etching process is critical to the success of microstructural characterization. An etched specimen is considered _\"usable\"_ when the chemical attack properly reveals the relevant structural features, enabling accurate visual interpretation. More accurately, the image must fulfill the following aspects:  
1. Clear microstructural details: The etched surface must display distinct and discernible features such as grain boundaries, phases, inclusions, or precipitates, depending on the material and the purpose of the analysis. 2. Uniform etching: The etching should be consistent across the specimen without over-etched or under-etched areas. 3. Absence of artifacts: The surface should be free from scratches, smearing, or any preparation artifacts that may obscure the microstructure. 4. Reproducibility: The etching should be repeatable, producing consistent results in similar samples. 5. Contrast and clarity: The contrast between different phases or microstructural components must be sufficient for accurate interpretation under the microscope. Since etching is a delicate procedure, if it is improperly conducted, it can compromise the usability of the gathered image. Some known issues, such as over-etching or under-etching, incorrect reagent concentration, or inadequate polishing, can obscure or distort the microstructure, rendering, in this case, the specimen as _\"non-usable\"_ (Figure 4 illustrates the types of non-usable images). According to [PERSON] [46], such defects, usually caused by poor preparation or contamination, can significantly affect the interpretability of metallographic images. In addition, [PERSON] [47] emphasized that even slight surface deformation or residue can introduce artifacts that mask key features, especially under high magnification. For this reason, our methodology incorporates a verification step to assess the quality of etched images before proceeding with the final analysis of the image, helping ensure the robustness of downstream processes. Again, in attempting to address the challenge of _\"usable\"_ and _\"non-usable\"_, we created a subset from the overall image dataset used in this research, in which the images were manually labeled for this purpose. Specifically, the number of images extracted was 55 for the _\"usable\"_ class and 16 for the _\"non-usable\"_ class. As it was a small and imbalanced dataset for the learning phase of a machine learning (ML) classifier, we conducted a DA process, as previously defined in this section. For this work, we designed a custom CNN architecture inspired by common lightweight CNN models [48], which we refer to as _CNN98_. The network consists of five convolutional blocks with batch normalization and ReLU activations [34], each one followed by max-pooling layers to progressively reduce spatial dimensions while increasing feature abstraction. The output of convolutional layers is a feature map of 128 channels by 4 \(\times\) 4 spatial dimensions, which are flattened and passed through three fully connected layers with dropout regularization to prevent overfitting. Then, the final output layer corresponds to the number of target classes, adapted here to our two categories after loading pre-trained weights. This architecture balances depth and complexity, enabling effective feature extraction while maintaining computational efficiency, similar to common approaches in image classification tasks [35; 49]. Please note that the CNN model was tested using a percentage split (PS) of \(k=0.8\). In this specific case, the DA techniques developed included rotations by 90\({}^{\circ}\), 180\({}^{\circ}\), and 270\({}^{\circ}\), as well as deterministic horizontal and vertical flips, expanding the effective size of the training dataset and enforcing rotational and reflectional invariance in the model. The model evaluation for this _\"usable\"/\"non-usable\"_ classification was primarily conducted using the following two key metrics: (i) loss and (ii) accuracy.