In medical imaging, automatic lung segmentation from Chest X-ray (CXR) images helps doctors to diagnose various diseases and guide for further treatment. U-Net is the most popular model for biomedical image segmentation. But it does not consider regions outside the target, thus its performance decreases for complex images. An advanced U-Net++ model provides better performance on complex images than U-Net. In this paper, we propose a modified UNet++ framework for the segmentation of lungs in CXR images. This model is a deep supervised encoder-decoder architecture with dense skip connections. The proposed model used an easily accessible NLM-China CXR dataset and achieved promising performance for the segmentation of the lung fields. The experimental results showed that the modified UNet++ model achieved a Dice Similarity Coefficient (DSC) score of 0.9680 for lung segmentation that identifies tuberculosis disease.