## 3 Results and Discussion  
### Training Details  
The training utilized the PyTorch deep learning framework, with all the processes conducted on a device equipped with an Nvidia GeForce 3080 Ti GPU and running Windows 10. For the image generation task, the frequency of saving image snapshots and network weight snapshots was set based on the number of training iterations, with each iteration generating an image snapshot and network weight snapshot, storing sample image data and model weights. The adaptive learning rate adjustment targeted a value of 0.6 for loss function smoothness, aiming to approximate this target. During the actual training loop, a custom sampler continuously fetched data from the dataset in an infinite loop. The DataLoader iterator's batch loading and data shuffling functions ensured different data orders in each training session, preventing dependency on a specific data sequence.  
For the image segmentation task, our primary goal was to accurately annotate the pore regions in the images to enhance data usability. Given the vast amount of image data, manual annotation was not only time-consuming but also labor-intensive. To address this issue, we initially experimented with the OTSU algorithm, an automatic segmentation method that determines the global threshold based on maximizing inter-class variance.  
As shown in Figure 6, the OTSU algorithm performed excellently on the images with distinct pore features and low clay content. However, when dealing with images where pore features were indistinct or clay content was high, the OTSU algorithm struggled to find an appropriate global threshold, resulting in suboptimal segmentation performance.  
While manual annotation can provide higher accuracy, especially for complex or detail-rich images, relying solely on manual annotation for a vast dataset remains prohibitively expensive. Therefore, we chose a semi-supervised learning model combining Adaptive Bagging with pseudo-labeling. First, we generated an enhanced dataset named Synthetic20000 consisting of 20,000 high-quality images using the trained StyleGAN2-ADA model. From Synthetic20000, we meticulously selected 600 images for professional manual annotation to accurately delineate pore regions. Of these, 420 images were used as initial training data, named train420, and the remaining 180 images were split equally into test and validation sets, named test90 and valid90, respectively. In the first training round, we trained ten U-Net420 models using these 420 images. The initial weights of these models were random, but they were adaptively adjusted during iterative training to optimize the ensemble strategy. Subsequently, we performed preliminary segmentation on the remaining unannotated images in Synthetic20000, initially set at \(n=1000\). After segmentation, we calculated the porosity consistency of the results. High porosity consistency indicated a high confidence level in the models' predictions for that image, which could then be included in the training set as pseudo-labeled images. Ultimately, the ten trained models were integrated into a final model. This iterative training strategy not only enhanced the models' generalization capabilities but also effectively handled large-scale image datasets while maintaining high annotation accuracy and efficiency.