Medical imaging, such as chest X-rays, gives an acceptable image of lung functions. Manipulating these images by a radiologist is difficult, thus delaying the diagnosis. Coronavirus is a disease that affects the lung area. Lung segmentation has a significant function in assessing lung disorders. The process of segmentation has seen widespread use of deep learning algorithms. The U-Net is one of the most significant semantic segmentation frameworks for a convolutional neural network. In this paper, the proposed U-Net architecture is evaluated on 565 datasets divided into 500 training images and 65 validation images, For chest X-ray. The findings of the experiments demonstrate that the suggested strategy successfully achieved competitive outcomes with 91.47% and 89.18% accuracy, 0.7494 and 0.7480 IoU, 19.23% and 26.11% loss for training and validation images, respectively.