The detailed characterization of the pore structure in sandstone is pivotal for the assessment of reservoir properties and the efficiency of oil and gas exploration. Traditional fully supervised learning algorithms are limited in performance enhancement and require a substantial amount of accurately annotated data, which can be challenging to obtain. To address this, we introduce a semi-supervised framework with a U-Net backbone network. Our dataset was curated from 295 two-dimensional CT grayscale images, selected at intervals from nine 4 mm sandstone core samples. To augment the dataset, we employed StyleGAN2-ADA to generate a large number of images with a style akin to real sandstone images. This approach allowed us to generate pseudo-labels through semi-supervised learning, with only a small subset of the data being annotated. The accuracy of these pseudo-labels was validated using ensemble learning methods. The experimental results demonstrated a pixel accuracy of 0.9993, with a pore volume discrepancy of just 0.0035 compared to the actual annotated data. Furthermore, by reconstructing the three-dimensional pore structure of the sandstone, we have shown that the synthetic three-dimensional pores can effectively approximate the throat length distribution of the real sandstone pores and exhibit high precision in simulating throat shapes.