###### Abstract
These properties provide critical insights into the petrographic features of rocks, serving as indispensable tools for understanding the Earth's crust, interpreting geological processes, and discovering economically significant minerals. However, the manual process of mineral classification using a microscope in geology often presents considerable difficulties ([PERSON] et al., 2018; [PERSON] et al., 2018). For instance, images obtained from thin rock sections exhibit heterogeneous colors for each mineral type. This heterogeneity reflects the mineral's physical properties, the weathering and chemical composition of the rock, and any deformation it has undergone. Thin-section analysis involves identifying the mineral types in a rock under a microscope. Additionally, this analysis can quantify the textural parameters of rocks, providing preliminary insights into their formation. The process requires determining the percentage of each mineral within a thin-section image. Typically performed manually by expert petrographers, this analysis often includes subjective observational differences and is generally qualitative, leading to potential inaccuracies. Another challenge lies in the inherent drawbacks of manual microscopy, such as the time-intensive and repetitive nature of the process, errors caused by manual handling, and the dependency on the operator's concentration. With over 3000 known minerals, the manual effort required for identification renders traditional mineral classification approaches insufficient for large-scale projects. Identifying minerals manually necessitates combining multiple petrographic and microscopic classification criteria, including texture, color, cleavage, twinning, and lattice type, which demands significant expertise ([PERSON] et al., 2018). In this study, an improved Masked-attention Mask Transformer (Mask2 Former)-based image segmentation architecture is used, which has been shown to provide high accuracy and sharpness using the color features of minerals, is far ahead of architectures specialized in different segmentation tasks and can be easily trained. The primary hypothesis of this study is that enhancing the Mask2 Former architecture through post-processing techniques such as SLIC super pixel refinement and morphological operations can significantly improve the segmentation accuracy and boundary delineation of thin-section rock images, thereby outperforming existing state-of-the-art segmentation models in identifying complex mineral compositions. This hypothesis is tested by comparing the performance of the proposed model against other popular deep learning-based segmentation models usingmetrics such as accuracy, mIoU, and mineral identification rates. The proposed approach aims to improve model performance with a super pixel-based approach after image preprocessing. Apart from the classical Mask2 Former [28], the proposed approach is compared with popular approaches such as DeepLabV3+ [29], ConvNeXt [30], and SegFormer [31]. The contributions of the proposed approach can be given as follows:  
* Accurate segmentation of complex igneous thin-section images;
* Automatic determination of rock type according to the contained minerals;
* Deep learning-based automatic generation of QAP diagram;
* Improving segmentation performance over classical deep learning models;
* Adding a new dataset to the literature on igneous rocks. The rest of the paper is organized as follows. The second section presents the material part, including information about the dataset used and the region of interest. In the third section, the details of the proposed approach and the other deep learning models used are given. Section four presents the implementation results and concludes the paper with general conclusions.