Skip to content

shrut2702/Brain_Tumor_Image_Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Segmentation Using U-Net

This project focuses on image segmentation using the U-Net architecture. The goal of the project is to train a U-Net model to perform pixel-level classification on a dataset, specifically for segmentation tasks. The project is divided into several stages including data preprocessing, model training, and evaluation.

Repository Structure

The repository contains the following key files and scripts:

1. image_segmentation.ipynb

  • A Jupyter notebook that demonstrates the process of image segmentation using the U-Net model. This includes loading the dataset, preprocessing, loading custom model weights and evaluating the results.

2. model_training.ipynb

  • A Jupyter notebook dedicated to training the U-Net model on the processed dataset. It covers the training loop, loss functions, optimizers and evaluation metrics used to measure the performance of the model.

3. UNet.py

  • A Python script that defines the U-Net model architecture. This script includes the U-Net implementation with customizable layers and configurations for image segmentation tasks.

4. data_prep.py

  • A Python script that handles data preprocessing. This script processes raw data, including image resizing, normalization of mask and splitting dataset, to prepare it for model training.

Key Features

  • U-Net Architecture: Implements a robust U-Net model, which is widely used for biomedical image segmentation.
  • Data Preprocessing: Ensures that the data is appropriately prepared for training with resizing and normalization.
  • Model Training: Supports training with different hyperparameters such as batch size, learning rate, and early stopping.
  • Evaluation Metrics: Uses metrics like Intersection over Union (IoU) and Dice coefficient to evaluate the performance of the model.

Requirements

To run the project, you'll need the following Python packages:

pip install tensorflow keras numpy pandas matplotlib seaborn scikit-learn opencv-python

How to Run

  1. Model Training: Use model_training.ipynb to train the U-Net model on the prepared dataset.
  2. Segmentation: Perform image segmentation using image_segmentation.ipynb, which includes evaluation on test data.
  3. Custom Scripts: You can modify UNet.py for model architecture adjustments and use data_prep.py for any additional data processing needs.

Evaluation

The model is evaluated using two primary metrics:

  • Intersection over Union (IoU): Measures the overlap between predicted and actual masks.
  • Dice Coefficient: Provides a score for similarity between predicted and actual masks, especially useful in segmentation tasks.

Conclusion

This project demonstrates how U-Net can be used for image segmentation tasks, providing scripts for preprocessing, training, and evaluating the model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors