Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

ALL-Detection

This repository provides an implementation for the detection and classification of Acute Lymphoblastic Leukemia (ALL) using machine learning and deep learning techniques. The project focuses on leveraging advanced image processing and model training to identify leukemia in microscopic blood smear images accurately.

Features

  • Data Preprocessing

    • Image normalization, resizing, and augmentation for robust model training.
  • Deep Learning Models

    • Implementation of Convolutional Neural Networks (CNNs) for feature extraction and classification.
    • Support for pre-trained models (e.g., ResNet, VGG, or custom architectures).
  • Evaluation Metrics

    • Precision, Recall, F1-score, and Confusion Matrix to assess model performance.
  • Deployment

    • Model deployment pipeline for real-time leukemia detection from new samples.

Getting Started

#Prerequisites Ensure the following are installed on your system:

  • Python 3.7+
  • Libraries: tensorflow, keras, opencv-python, numpy, pandas, scikit-learn, and matplotlib.
  • GPU setup (optional but recommended for faster model training).

Installation Steps

Clone the Repository

bash

git clone https://github.com/BenedictIbe/ALL-Detection.git  
cd ALL-Detection  

Install Dependencies

bash

pip install -r requirements.txt  

Prepare Dataset

  • Download a publicly available ALL dataset or use the dataset provided in the repository.
  • Place images in the data/ directory with appropriate subfolders for labeled classes (e.g., Healthy/ and Leukemic/).
  • Run the Training Script

bash

python train_model.py  

Test the Model

Use the test script to evaluate the model on unseen data:

bash

python test_model.py  

Project Workflow

  • Data Loading and Preprocessing
  • Load microscopic blood smear images.
  • Normalize and augment images to improve model generalization.
  • Model Training
  • Train a CNN-based model to classify images into healthy or leukemic categories.
  • Evaluate the model using validation data and fine-tune hyperparameters.

Model Evaluation

  • Use test data to compute accuracy, precision, recall, and other metrics.
  • Visualize results with confusion matrices and ROC curves.

Deployment

  • Save the trained model for real-time inference.
  • Deploy using Flask or a similar framework for clinical use.

Folder Structure

bash

ALL-Detection/  
├── data/                   # Dataset directory  
│   ├── Healthy/            # Subfolder for healthy blood smear images  
│   ├── Leukemic/           # Subfolder for leukemic blood smear images  
├── models/                 # Saved model files  
├── notebooks/              # Jupyter notebooks for exploration and visualization  
├── scripts/                # Python scripts for training, testing, and deployment  
│   ├── train_model.py      # Model training script  
│   ├── test_model.py       # Model evaluation script  
│   └── preprocess.py       # Data preprocessing utilities  
├── results/                # Output metrics, plots, and evaluation reports  
├── requirements.txt        # Project dependencies  
└── README.md               # Project documentation  

Usage Examples

Training the Model

Customize parameters in train_model.py and run the script:

bash

python train_model.py --epochs 50 --batch_size 32 --learning_rate 0.001  

Testing the Model

Provide the test data directory and run the script:

bash

python test_model.py --test_dir ./data/test/ --model_path ./models/cnn_model.h5  

Inference on New Images

Use the deployed model to classify a single image:

bash

python predict.py --image_path ./data/sample.jpg --model_path ./models/cnn_model.h5  

Results and Visualizations

  • Model Performance:
    • Accuracy: 95%+ on test data.
    • F1-Score: High precision and recall for both classes.

Plots and Insights:

  • Loss and accuracy curves during training.
  • Confusion matrix and classification reports for evaluation.

Contributing

Contributions to enhance model accuracy, integrate additional datasets, or improve deployment are welcome! Submit issues or pull requests for review.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For queries, suggestions, or collaborations, feel free to reach out:

Author: Benedict Ibe GitHub Profile: BenedictIbe

About

Image prediction and recognition of Acute Lymphoblastic Leukemia (ALL)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages