In this paper, we propose an optimised image segmentation method by structurally innovating and improving the traditional Unet model and integrating the latest GSConv module. In our experiments, we integrate the GSConv module into the encoder and decoder parts of U-Net to take advantage of its excellent feature extraction and information transfer capabilities. In comparing the training process of the two models of Unet and GSConv Unet, it is found that GSConv Unet has faster convergence speed and better generalisation ability, and finally shows higher segmentation accuracy and iou values in the test part. From the segmentation results, GSConv Unet delineates the lung region more accurately and meticulously compared to Unet, providing an effective idea for lung X-ray image segmentation tasks. This research is of great significance, which not only improves the effectiveness of the image segmentation task but also brings new technological breakthroughs in the field of medical imaging. By introducing the GSConv module and optimising the Unet structure, we have successfully improved the precision and efficiency of lung X-ray image segmentation, providing doctors with a more reliable and accurate diagnostic tool.