This project focuses on the application of U-Net, a convolutional neural network, for segmenting lung masks in chest X-rays. Utilizing the "Chest Xray Masks and Labels" dataset from Kaggle, this project aims to enhance the accuracy and efficiency of lung mask segmentation, which is crucial in medical image analysis.
The "Chest Xray Masks and Labels" dataset from Kaggle comprises 7047 high-resolution chest X-ray images (1024x1024 pixels) and corresponding expert-annotated lung masks. The images are in DICOM format, a standard for medical imaging, with mask annotations in PNG format. The dataset is pre-divided into training, validation, and test sets, facilitating the development and evaluation of segmentation models. Sourced from the "Shenzhen Hospital X-ray set" and the "Montgomery County X-ray set," this dataset is an excellent resource for deep learning applications in medical imaging, particularly for lung segmentation tasks. The dataset is available under a CC0: Public Domain license, allowing unrestricted use.
To run this project, the following environment and dependencies are required:
- Python 3.x
- Libraries: NumPy, Pandas, Matplotlib, TensorFlow, Keras
- Jupyter Notebook
- Clone the project repository (if hosted on a platform like GitHub).
- Install the required dependencies using
pip install -r requirements.txt
(assuming a requirements file is provided).
gather_dataset.ipynb
: Notebook for gathering and preprocessing the dataset.LungSeg_Final.ipynb
: Main notebook containing the U-Net model implementation and training process.
To use this project:
- Run
gather_dataset.ipynb
to preprocess the dataset. - Execute
LungSeg_Final.ipynb
to train the U-Net model and perform lung segmentation on the X-ray images.
Special thanks to the creators of the "Chest Xray Masks and Labels" dataset on Kaggle, particularly Nikhil Pandey, and all those who contributed to the development of the U-Net architecture.