Git Product home page Git Product logo

brain-tumor-detection's Introduction

Brain-Tumor-Detection

This project demonstrates how you can use the TensorFlow Python library to build a deep learning model for image classification. The goal was to create a convolutional neural network that can process brain image scans and determine if a tumor is present.

The image dataset used to train the model was downloaded from Kaggle. The user, who uploaded the dataset, described the images as "X-ray images of Brain." However, these can be more accurately characterized as CT scans, since a basic X-ray scan is meant to visualize dense bone structures, like the skull. The images from dataset highlight the soft tissues inside the brain, which is more consistent with the features of a CT scan.

A model was trained on 80% of the data and evaluated on the other 20%. The final test accuracy came out to ~97%. This model was exported in the SavedModel format to \brain_tumor_detection_model\, so anyone can load same the model and use it to make predictions on new images. To experiment with different model and training hyperparameters, follow the steps below to set up your environment.

How to use

  1. Clone the repository by running the command git clone https://github.com/Nielam-Dass/Brain-Tumor-Detection.git.
  2. While in the project folder, create a virtual environment of your choice. This process may vary depending on your operating system. On Windows, run python -m venv venv, to create an environment folder named venv.
  3. Activate the environment with venv\Scripts\activate.bat.
  4. Once the environment is active, install the necesary packages with pip install -r requirements.txt.
  5. Go to the Kaggle website and generate an API token, which will be downloaded in JSON format. The file will contain values for the username and key fields.
  6. Create a .env file in the project folder, which will define the environment variables KAGGLE_USERNAME="your_username" and KAGGLE_KEY="your_key" according to the downloaded JSON data.
  7. At this point, you can tweak the code in the Jupyter notebook to build and train a new model.

Disclaimer

This project is designed for experimental purposes only! Any models created from this code (or a modified version of it) should NOT be used in a professional medical setting.

brain-tumor-detection's People

Contributors

nielam-dass avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.