This project implements a custom Attention U-Net architecture for the segmentation of breast cancer images using the Breast Ultrasound Images Dataset. The model focuses on accurately segmenting breast ultrasound images by combining the strengths of U-Net and attention mechanisms to enhance segmentation performance.
- Model Architecture: The model is based on U-Net, enhanced with attention gates for better focusing on important regions in the images.
- Dataset: Utilizes the Breast Ultrasound Images Dataset, which includes 780 images categorized as normal, benign, and malignant.
- Training Strategy: The model is trained with binary cross-entropy loss and optimized using the Adam optimizer. Metrics such as accuracy and Intersection over Union (IoU) are used to evaluate model performance.
- Evaluation: Model performance is validated using unseen data to ensure generalization and segmentation quality.
- TensorFlow & Keras: For model implementation.
- Attention Mechanism: To selectively focus on relevant parts of the input image during segmentation.
- Python Libraries: Includes NumPy, TensorFlow, Matplotlib, and more for data processing, model training, and visualization.
-
Clone the repository:
git clone https://github.com/yourusername/breast-cancer-segmentation.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Download the dataset from Kaggle and place it in the
data/folder. -
Run the training script:
python train_model.py
-
Visualize results using:
python visualize_results.py
This project demonstrates the effectiveness of combining attention mechanisms with U-Net architecture for semantic segmentation, achieving high performance in breast cancer image segmentation tasks.