To enhance the precision and efficiency of petrographic thin section image classification and reduce the subjectivity resulting from manual classification methods, a new classification model (DC-PC-Dilated-IR-V2) in term of the deep convolutional network is constructed in this study. In the DC-PC-Dilated-IR-V2 model, the depthwise separable convolution (DSC) is applied to avoid the increase problem of parameters and calculations due to too many convolutional layers; the attention module is introduced to obtain a better representation of characteristics through information fusion and weighting, which allows the model to focus on the target area of thin section images; in addition, the dilated convolution is taken in, which enables the model to extract more global characteristics and higher-level semantic characteristics without increasing the convolution parameters, thereby improving the classification precision of the model. The model was evaluated using a dataset comprising 4000 thin section images, classified into categories such as small pores with fine throats, medium pores, feldspar dissolution pores, dissolution-enlarged pores, and microfractures. Our extensive experiments demonstrate the superior performance of DC-PC-Dilated-IR-V2 compared to other classifiers, including back propagation (BP) neural networks, support vector machines (SVM), AlexNet, VGG-16, ResNet-101, ResNeXt-101, and DenseNet. Specifically, DC-PC-Dilated-IR-V2 achieves the highest accuracy (99.84%), Macro_F1 score (0.9787), and Kappa coefficient (0.9763) among all tested methods. Additionally, it significantly reduces the parameter count and computational load with only 15.9 million parameters and 1259 billion FLOPs, ensuring efficiency without sacrificing accuracy. The average training time is also significantly lower than that of its counterparts. These improvements highlight the potential of DC-PC-Dilated-IR-V2 for more efficient and accurate petrographic image classification.