• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Flask based web application to predict breast cancer.

Breast Cancer Prediction

Predicts whether the type of breast cancer is Malignant or Benign

Issues Pull Requests Forks Stars License

Please follow the Code of Conduct: Code of Conduct

Aim of the Project

> To predict if a breast cancer is Malignant or Benign using Image Dataset as well as Numerical Data

> Apply ML and DL Models to predict the severity of the Breast-Cancer

> Create a Wonderful UI for this project using Front End Languages and Frameworks (Like Bootstrap)

> Create the Backend using Flask Framework.

> Deploy on Cloud and make this wonderful project available to public

Note: Kindly do not push any changes to Main or Master Branch. A New Branch named "New_Pipeline" is already created and push all the changes to this branch

Don't forget to create an issue before making a PR

👉 Repo Link : https://github.com/srimani-programmer/Breast-Cancer-Predictor/

Table of contents

About Project:

Breast cancer is the most common type of cancer in women. When cancers are found early, they can often be cured. Some devices detect breast cancer but many times they lead to false positives, which results in patients undergoing painful, expensive surgeries that were not even necessary. These type of cancers are called benign which do not require surgeries and we can reduce these unnecessary surgeries by using Machine Learning. I have taken the dataset of the previous breast cancer patients and train the model to predict whether the cancer is benign or malignant. These predictions will help doctors to do surgeries only when the cancer is malignant, thus reducing the unnecessary surgeries for women.

For building the project I have used Wisconsin Breast cancer data which has 569 rows of which 357 are benign and 212 are malignant. The data is prepossessed and scaled. I have trained with Random forest Classifier gives the best accuracy of 95.0%. To provide an easy-to-use interface to doctors I have developed a website that will take the data and display the output with accuracy and time taken to predict.

Languages or Frameworks Used

  • Python: language
  • NumPy: library for numerical calculations
  • Pandas: library for data manipulation and analysis
  • SkLearn: library which features various classification, regression and clustering algorithms
  • Flask: microframework for building web applications using Python.

Project Setup

  • First Clone the repository.
  • Create the virtual environment for the project.
$ conda create -n myenv python=3.6
  • Install the required packages using requirements.txt inside the environemnt using pip.
$ pip install -r requirements.txt
  • run the app.py as python app.py
  • Web Application will be hosted at 127.0.0.1:5000
  • Enter the URL in the browser Application will be hosted.
  • Enter the details of the tumor to detect the type of the cancer with more than 95% accuracy.

Steps to follow 📜

0. Star The Repo 🌟

Star the repo by pressing the topmost-right button to start your wonderful journey.

1. Fork it 🍴

2. Clone it 👥

NOTE: commands are to be executed on Linux, Mac, and Windows

You need to clone (download) it to local machine using

$ git clone https://github.com/Your_Username/Breast-Cancer-Predictor.git

This makes a local copy of the repository in your machine.

Once you have cloned the `Breast-Cancer-Predictor' repository in Github, move to that folder first using change directory command on Linux, Mac, and Windows

# This will change directory to a folder Hacktoberfest_20
$ cd Breast-Cancer-Predictor

Move to this folder for all other commands.

3. Set it up ⬆️

Run the following commands to see that your local copy has a reference to your forked remote repository in Github :octocat:

$ git remote -v
origin  https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin  https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)

Now, let's add a reference to the original Breast-Cancer-Predictor repository using

$ git remote add upstream https://github.com/srimani-programmer/Breast-Cancer-Predictor.git

This adds a new remote named upstream.

See the changes using

$ git remote -v
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)
upstream  https://github.com/Remote_Username/Breast-Cancer-Predictor.git (fetch)
upstream  https://github.com/Remote_Username/Breast-Cancer-Predictor.git (push)

In your case, you will see

$ git remote -V
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)
upstream  https://github.com/manan-bedi2908/Breast-Cancer-Predictor.git (fetch)
upstream  https://github.com/manan-bedi2908/Breast-Cancer-Predictor.git (push)

4. Sync it ♻️

Always keep your local copy of the repository updated with the original repository. Before making any changes and/or in an appropriate interval, run the following commands carefully to update your local repository.

# Fetch all remote repositories and delete any deleted remote branches
$ git fetch --all --prune

# Switch to `New_Pipeline` branch
$ git checkout New_Pipeline

# Reset local `main` branch to match the `upstream` repository's `main` branch
$ git reset --hard upstream/main

# Push changes to your forked `Breast-Cancer-Predictor` repo
$ git push -u origin New_Pipeline

5. Ready Steady Go... 🐢 🐇

Once you have completed these steps, you are ready to start contributing to the project and creating pull requests.

6. Checkout to a new branch ‼️

Whenever you are going to contribute. Please create a separate branch using command and keep your main branch clean (i.e. synced with remote branch).

# It will create a new branch with name Branch_Name and switch to branch Folder_Name
$ git checkout -b New_Pipeline

Create a separate branch for contribution and try to use the same name of the branch as of folder.

To switch to the desired branch

# To switch from one folder to other
$ git checkout New_Pipeline

To add the changes to the branch. Use

# To add all files to branch Folder_Name
$ git add .

Type in a message relevant for the code reviewer using

# This message get associated with all files you have changed
$ git commit -m 'relevant message'

Now, Push your awesome work to your remote repository using

# To push your work to your remote repository
$ git push -u origin New_Pipeline

(Kindly push all the changes to the "New_Pipeline", not main branch) Finally, go to your repository in the browser and click on compare and pull requests. Then add a title and description to your pull request that explains your precious effort.


Application UI

Home Page

Home Page 1


Tumor Data form

Home Page 2


Tumor Data form

Home Page 3


Prediction Output

Prediction Page

Awesome contributors 🤩

Made with contributors-img.

More Repositories

1

AES-Cryptographic-Tool

It is an Encryption and Decryption tool written in python which is used to encrypt any type of file based on AES Standards and the files that are encrypted using this script can also able to decrypt it.
Python
39
star
2

Ping-Pong-Game

Ping Pong Game in python with turtle module.
Python
35
star
3

Phishing-URL-Detector

A Flask Based Web Application which is used to detect the phishing URL's.
Python
10
star
4

pysort

A Powerful package to perform different types of stable and unstable Sorting algorithms. 🔥🔥🔥
Python
7
star
5

Spy-Tool

A Python tool to perform image spy operation on a computer.
Python
6
star
6

Weather-Forecasting-With-ML

GRIET Hackathon Project Abstract and Prototype Source code.
Jupyter Notebook
2
star
7

Practical-System-Programming-with-C

Practical System Programming with C - A Practical guide to master the System Programming with C.
C
2
star
8

Covid19-Tracker

Covid19 Interactive Dashboard
Jupyter Notebook
1
star
9

Body-Detection

A Machine Learning Model to detect our body Gestures using Tensorflow.js
JavaScript
1
star
10

FlaskTutorial

The Complete Guide for flask
HTML
1
star
11

OOPS-WITH-PYTHON

OOPS Concepts with python programming.
Python
1
star
12

Alumni-Tracker

SMART ODHISA HACKATHON
1
star
13

Skill-Development

Telangana Smart City Hackathon final round prototype and its source code
HTML
1
star
14

Speech-Synthesizer

A simple Javascript application to convert text to speech using web synthesis API.
HTML
1
star
15

GeoLocation-Finder

A simple Geo-location tracker using python3.
Python
1
star
16

The_Python_Workshop

The Complete Python Workshop
Jupyter Notebook
1
star
17

Smart_India_Hackathon

Abstract For Smart India Hackathon
1
star
18

DNS-Scanner

DNS LookUp Scanner: A simple Python tool to find DNS Records.
Python
1
star