This study aims to tackle the obstacles linked with geological image segmentation by employing sophisticated deep learning techniques. Geological formations, characterized by diverse forms, sizes, textures, and colors, present a complex landscape for traditional image processing techniques. Drawing inspiration from recent advancements in image segmentation, particularly in medical imaging and object recognition, this research proposed a comprehensive methodology tailored to the specific requirements of geological image datasets. To establish the dataset, a minimum of 50 images per rock type was deemed essential, with the majority captured at the University of Las Palmas de Gran Canaria and during a field expedition to La Isla de La Palma, Spain. This dual-source approach ensures diversity in geological formations, enriching the dataset with a comprehensive range of visual characteristics. The study involves the identification of 19 distinct rock types, each documented with 50 samples, resulting in a comprehensive database containing 950 images. The methodology involves two crucial phases: initial preprocessing of the dataset, focusing on formatting and optimization, and subsequent application of deep learning models—ResNets, Inception V3, DenseNets, MobileNets V3, and EfficientNet V2 large. Preparing the dataset is crucial for improving both the quality and relevance, thereby to ensure the optimal performance of deep learning models, the dataset was preprocessed. Following this, transfer learning or more specifically fine-tuning is applied in the subsequent phase with ResNets, Inception V3, DenseNets, MobileNets V3, and EfficientNet V2 large, leveraging pre-trained models to enhance classification task performance. After fine-tuning eight deep learning models with optimal hyperparameters, including ResNet101, ResNet152, Inception-v3, DenseNet169, DenseNet201, MobileNet-v3-small, MobileNet-v3-large, and EfficientNet-v2-large, comprehensive evaluation revealed exceptional performance metrics. DenseNet201 and InceptionV3 attained the highest accuracy of 98.49% when tested on the original dataset, leading in precision, sensitivity, specificity, and F-score. Incorporating preprocessing steps further improved results, with all models exceeding 97.5% accuracy on the preprocessed dataset. In K-Fold cross-validation (k = 5), MobileNet V3 large excelled with the highest accuracy of 99.15%, followed by ResNet101 at 99.08%. Despite varying training times, models on the preprocessed dataset showed faster convergence without overfitting. Minimal misclassifications were observed, mainly among specific classes. Overall, the study's methodologies yielded remarkable results, surpassing 99% accuracy on the preprocessed dataset and in K-Fold cross-validation, affirming the efficacy in advancing rock type understanding.