In this study, with the help of deep learning, we use scanning electron microscope (SEM) images of polypropylene (PP) foams as the original dataset, and fuse the pre-trained VGG16 network into the UNet model, which realizes the feature migration and parameter sharing and effectively reduces the training cost. During the model training process, we also combined binary cross-entropy loss and focus loss to further optimize the training effect. Experimental results show that the improved UNet model performs well in automatically identifying and classifying the microstructure of PP foams. In terms of Precision (P), Mean Intersection over Union (MIoU), and F1-score of pore recognition, they reach 95.25%, 85.54%, and 95.63%, respectively. These values are significantly improved compared to the original UNet model as well as GRFB-UNet, UNext, ParaTransCNN, scSE-UNet, and Swin-UNet models. In addition, we determined the fractal dimension of the samples by the area-perimeter method and found that the samples had significant fractal characteristics. Gray correlation analysis showed that the complexity of pore structure was positively correlated with fractal dimension. The combined Gibson-Ashby strength modeling and fractal analysis demonstrate that both porosity and fractal dimension significantly affect tensile properties. Increased porosity reduces tensile strength, while higher fractal dimensions similarly lead to lower tensile strength.