Petrographic thin section analysis is a critical part of subsurface reservoir characterization and is widely used for initial estimation of porosity and pore types. Compared to micro-CT and SEM images, thin sections are relatively easy and cheap to obtain.In this study we present an optimized machine learning based thin section image analysis workflow that offers an inexpensive and fast approach to pore network characterization, compared to the more expensive and less accessible micro-CT or FIB-SEM techniques. We applied this methodology to carbonate rock samples from Upper Jurassic Jubayla Formation depositionally equivalent to the lower part of the super-giant Arab-D reservoirs in Saudi Arabia. The first step is pre-processing and segmentation of color (RGB) thin section images into binary image representing the pore and solid phases. We tested three machine learning methods for segmentation; 1) K-Means Cluster, 2) Random Forest and 3) Support Vector Machine (SVM). We then applied a numerical reconstruction method to obtain a 3D pore volume based on the 2D thin section images. 2D segmented images were used as training images to generate the 3D pore structure by multiple point statistics (MPS), which is one of the most effective ways to reconstruct 3D porousmedia based on 2D images.We thenextracteda Pore Network Model (PNM) from the reconstructed 3D pore volume using media axis algorithm.We find that the choice of image segmentation method has a significant impact on the final digital rock analysis results.2D to 3D reconstruction by MPS effectively reproduced the connectivity of the macropores in the studied rock sample. Although pore network modelling simplified the porous structure, the topological features were maintained. Pore size distribution and permeability calculated from the extracted pore network model matched well with the laboratory measured data from the Upper Jurassic Jubayla Formation carbonate rocks.The digital image analysis methodology thus applies machine learning for image processing and classification of thin section images for reliable pore network characterization.