Petrographic analysis of thin sections is one of the most important and routinely used methods in a wide range of energy, earth and environmental science applications. There has been a growing motivation for computer-aided automated analysis of thin sections due to an inherent subjectivity of interpretation by geologists and the ever-increasing need for analysis of new and legacy thin section petrography data. Particularly in carbonate reservoirs, Dunham texture classification and depositional facies prediction based on thin sections are crucial for accurate description and modeling of the reservoir, but these two tasks are labor and time-intensive and their accuracy is highly dependent on the experience and the ability of the interpreter. This study addresses these challenges by exploring deep learning methods in two case studies to predict Dunham textures and depositional facies using thin sections. The proposed methodologies were applied to 1038 thin sections collected from outcrop analogues of the Upper Jurassic Hanifa Formation. To accelerate the learning speed, transfer learning was applied based on various pre-trained models provided by PyTorch. We used a pre-trained DenseNet model to classify Dunham textures from RGB images of thin sections. For the prediction of depositional facies we applied an integrated methodology consisting of two VGG models and a U-Net model. First, one VGG model was used to classify thin sections into three groups, namely, grain-dominated, mud-dominated, and stromatoporoid facies. Then the U-Net model was used to identify oncoids to further classify oncoidal facies from grain-dominated facies. Finally, another VGG model was applied to classify the peloid-rich facies from the left grain-dominated facies. The Dunham classification model resulted in a prediction accuracy of 89%. The most frequent misclassification was mainly from the identification of packstone, particularly mud-supported packstone, which the model misclassified as wackestone. The depositional facies prediction model achieved final accuracy of 86% where the misclassification was often due to oncoids identification. Overall, the results of this study demonstrate the potential of our proposed workflow to obtain automated prediction of petrographic features from a large number of thin sections. Deep learning offers a promising way forward for rapid and accurate prediction of petrographic features for geoscience applications, while minimizing bias associated with manual interpretation.