###### Abstract  
The accurate identification of rock types is crucial for understanding geological structures and planning mining activities. Therefore, the precise labeling of rock types is a fundamental requirement for researchers and industry experts in these fields. This study aims to identify rock types by segmenting thin-section rock images using advanced deep learning models. Commonly used models such as DeepLabv3+, SegFormer, ConvNext, and Mask2 Former were evaluated to compare the performance of different segmentation models. Additionally, an improved version of Mask2 Former was analyzed to enhance its performance. Post-segmentation enhancements with SLIC super pixel and morphological operations further improved boundary delineation. An improved version of Mask2 Former achieved a validation accuracy of 91.26% and a mean Intersection over Union (mIoU) of 82.59%, representing an improvement of more than 5% over the base Mask2 Former. Another significant aspect of the study is the detailed analysis of other models using the relevant dataset. The Quartz Feldspar Plagioclase (QAP) diagram was utilized for mineral identification, achieving a mineral recognition accuracy of 85.7%. These results indicate the robustness of the proposed approach, which exceeds the accuracy and mIoU of comparable methods reported in the literature. This study significantly enhances the effectiveness of image processing techniques for rock type identification. Furthermore, the detailed comparison of different models provides valuable guidance for researchers in selecting the most suitable model. for mineral segmentation in thin sections, both time and error can be minimized through the implementation of AI-based segmentation and classification models in geology. The initial study on the segmentation of minerals in thin-section images was conducted by [PERSON] and [PERSON] [PERSON] and [PERSON] (2010). They devised an algorithm based on image processing techniques such as Gaussian smoothing, gradient computation, thresholding, and image skeletonization. [PERSON] (2011) suggested grain boundary detection in thin sections based on gradient filtering using a technique called the Lazy Grain Boundary (LGB) method. [PERSON] et al. [PERSON] et al. (2012) proposed an algorithm employing color features for mineral segmentation in thin-section images. [PERSON] et al. [PERSON] et al. (2013) introduced image processing techniques based on the max-image, representing the maximum intensity of minerals, and an algorithm based on the phi-image, indicating the rotation stage of the petrographic microscope. [PERSON] et al. [PERSON] et al. (2013) presented a method for mineral segmentation based on region-growing techniques and edge detection. The researchers developed a region-growing algorithm for image segmentation by combining the algorithm for detecting color edges with edge operators and the results of the color edge algorithm. [PERSON] (2014) introduced a Watershed-based image segmentation algorithm for mineral segmentation in thin sections, allowing the manual smoothing of grain boundaries. The Watershed algorithm was also utilized for grain segmentation in color spaces such as RGB, CIELuv, CIELab, YUV, and YIQ. [PERSON] (2015) proposed an algorithm based on color space transformation and image processing techniques. [PERSON] and [PERSON] and [PERSON] (2016) explored color, texture, and mineral edges using an Artificial Neural Network (ANN) for mineral segmentation. This algorithm reduced the need for manual correction after the automatic edge detection process. [PERSON] et al. [PERSON] et al. (2017) proposed deep transfer learning models to classify six different types of thin-section volcanic rocks. Convolutional Neural Network (CNN)-based DenseNet121 and ResNet50 networks, which are transfer learning methods, were used to extract features, and the classification process was carried out with a single-layer fully connected neural network. [PERSON] et al. [PERSON] et al.