In the field of image segmentation, it has been a research topic to pursue the lightweight of the model as much as possible without affecting the segmentation accuracy. The traditional U-Net is the classical segmentation model, but the number of parameters and computation required by the model are too large. To address this drawback, a lightweight network PM-UNet is proposed for lung image segmentation. Firstly, the ordinary 3×3 convolution used in the conventional U-Net is replaced by the new Inverted Residual Depthwise Separable convolution block to lighten the U-Net model. Also, to further compress the model, the four upsampling and downsampling networks of the lightweight U-Net are cut in half to simplify the network model. And atrous spatial pyramid pooling is used to expand the convolutional receptive field and add feature information of different scales. The attention gate can strengthen the information fusion effect of high-level and low-level information in the skip connection. The segmentation experiments were validated by using the LUNA competition lung image dataset, with the improved network model requiring only 2.2% and 14.4% of the number of parameters and computation of the traditional U-Net network, respectively. The experimental results of the network model achieved Accuracy of 0.991 and IOU of 0.958 on the test set, which is 0.6% improvement in Accuracy and 2.6% improvement in evaluation metric IOU compared to the conventional U-Net, and were tested against mainstream and recent segmentation networks. These results demonstrate that PM-UNet, which is improved on the basis of U-Net, has better segmentation effect on medical images.