## 3 Results and Discussion
Unlike conventional methods, Mask2 Former incorporates transformer blocks in its architecture. These transformer blocks leverage parallel processing capabilities, facilitating efficient inference despite the substantial increase in parameter volume. Particularly adept at modeling long-distance dependencies, transformer blocks empower deep learning models to deliver more precise and accurate results in complex visual tasks. Throughout training, Mask2 Former demonstrates linear loss while maintaining accuracy and mIoU levels consistent with state-of-the-art standards. However, beyond 70,000 steps, the model exhibits minimal improvement, leading to the termination of training. Figure 8 provides a visual comparison between the proposed method and other methods across several examples. Compared to the models in Figure 8, the training graphs of Mask2 Former+Refining show that the sample outputs are successful. As seen in the outputs, Mask2 Former+Refining made very detailed inferences in all classes. Although there are some missing corners, it was generally able to easily identify any instance and capture even objects that are not fully visible. Keeping in mind the importance of not confusing one class with another class, which is critical for the QAP diagram, it was seen that the model obtained very successful results. The QAP values obtained are also used for the detection of minerals in the rock. Figure 9 shows the result of segmentation on a sample rock and the ratios of Q, A, and P minerals in the image. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Accuracy** & **MioU** &
\begin{tabular}{c} **Inference Speed** \\ **(Seconds/Image)** \\ \end{tabular} \\ \hline DeepLabV3+ & 86.76 & 78.09 & 0.92 \\ \hline SegFormer & 76.36 & 59.16 & 1.06 \\ \hline ConvNext & 73.56 & 57.37 & 0.88 \\ \hline Mask2 Former & 86.73 & 76.89 & 1.47 \\ \hline Mask2 Former+Refining & 91.26 & 82.59 & 1.51 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance metrics of each model for validation data. Figure 9 illustrates the mineral detection in each image based on the QAP values acquired. These values are then utilized to predict the accurate recognition of minerals within the dataset through a confusion matrix representation. In this representation, minerals are determined based on the Q, A, and P ratios obtained from segmentation. If the mineral in the actual image matches the mineral value calculated from segmentation, it is indicated in the corresponding cell of the matrix. Figure 10 displays the confusion matrices for both the Mask2 Former and the proposed Mask2 Former+Refined models. These matrices provide insights into the models' performance in accurately identifying minerals based on segmentation results. Figure 8: Comparison of the proposed method and other segmentation methods on sample images. Figure 9: The representation of mineral composition from the segmented image. In Figure 10, performance metrics are obtained according to the confusion matrices obtained for both models. Precision, recall, F1, and accuracy metrics were obtained for each mineral type from the confusion matrix for mineral recognition. The results are given in Table 6.