This project leverages Pytorch defined U-net in order to perform semantic segmentation on MRI scans. between brain tissues and the skull , providing a reliable mask overlay for medical analysis.
Features MRI Scan Visualization: Displays the middle slice of each axis (axial, coronal, sagittal) of MRI scans along with the corresponding brain masks. Slice Distribution: Presents evenly distributed slices along the z-axis of the MRI scan for comprehensive visualization. Interactive Mask Overlay: An interactive slider that overlays the brain mask on the MRI scan, allowing for detailed inspection. Evaluation Metrics: Calculation and display of Dice coefficients and accuracy scores to assess the performance of the segmentation model. Prediction vs. Ground Truth: Visual comparison of the predicted segmentation masks with the ground truth masks to evaluate model accuracy. Notebooks The repository includes a Jupyter notebook skullclean.ipynb which contains:
Data loading and preprocessing steps. Model training and evaluation processes. Visualization of results and performance metrics.
Clone the repository and install the required dependencies:
git clone https://github.com/yourusername/DL-Skull_Strapping.git;
cd DL-Skull_Strapping;
pip install -r requirements.txt;
Load the Data: Ensure your MRI data is in the specified directory or update the paths in the notebook. Run the Notebook: Execute the cells in skullclean.ipynb to preprocess data, train the model, and visualize the results. Use the interactive widgets and plots in the notebook to explore the segmentation results.
License This project is licensed under the MIT License. See the LICENSE file for details.