Skip to content

MohaYass92/Brain-Tumor-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brain Tumor Detection Using AI

This repository contains a simple AI-based approach for brain tumor detection using image histograms. The model is trained on grayscale histograms extracted from medical images and predicts whether an image contains a tumor or not based on Euclidean distance comparison.

📌 Features

  • Preprocessing: Converts images to grayscale and splits them into regions.
  • Feature Extraction: Generates histograms for each region.
  • Training: Computes optimal histograms for tumor and non-tumor images.
  • Testing: Classifies new images based on distance comparison with trained histograms.
  • Accuracy Calculation: Evaluates model performance on a test dataset.

🛠️ Installation & Usage

1️⃣ Clone the Repository

git clone https://github.com/MohaYass92/Brain-Tumor-Detection.git
cd Brain-Tumor-Detection

2️⃣ Install Dependencies

Ensure you have Python installed, then install the required libraries:

pip install -r requirements.txt

3️⃣ Dataset Download

Download the dataset from the following link and place it in the dataset/ folder: 📂 [Dataset Link](#)

4️⃣ Training the Model

Run the training script to process the dataset and generate trained histograms:

python train.py

The script will ask for:

  • Number of rows and columns to split images
  • Number of bins for histograms
  • Paths to tumor and non-tumor image folders

5️⃣ Testing the Model

Run the testing script to evaluate the model:

python test.py

It will ask for:

  • The test dataset path
  • Number of rows, columns, and bins used in training

The accuracy will be disp

📄 Report

There is a detailed report available in the root directory of the repository, which contains an organigram outlining the entire process of the project. You can view or download it from the following link:

📂 Project Report (Organigram)

About

Brain Tumor Detection Using Image Histograms: A lightweight Python project for detecting brain tumors in medical images. It uses grayscale histograms and Euclidean distance for classification. The model is trained on labeled tumor and non-tumor datasets and predicts with customizable grid sizes and bins. Ideal for quick experimentation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages