GithubHelp home page GithubHelp logo

hakincodes / malaria-detection Goto Github PK

View Code? Open in Web Editor NEW
48.0 5.0 41.0 106.4 MB

Detecting Malaria using Deep Learning ๐ŸฆŸ๐Ÿฆ 

License: MIT License

Python 0.22% CSS 0.19% JavaScript 0.01% HTML 0.35% Jupyter Notebook 99.23%
malaria deep-learning flask-application healthcare-application cnn-keras

malaria-detection's Introduction

Detecting Malaria using Deep Learning ๐ŸฆŸ๐Ÿฆ 

Logo

Contributor's Hack 2020 is a program that helps students grow with OPEN SOURCE. This initiative by HakinCodes provides you the best platform to improve your skills and abilities by contributing to vast variety of OPEN SOURCE Projects and opportunity to interact with the mentors and the Organizing Team.

HakinCodes

๐Ÿ“Œ Introduction

This Machine Learning Web Application utilizes a Two-Layered Convolutional Neural Network to process the Cell Images and predict if they are Malarial with an accuracy of nearly 95%. The Dataset to process the Deep Learning Algorithm is taken from the official US National Library of Medicine's NIH Website which is a repository of segmented cells from the thin blood smear slide images from the Malaria Screener research activity.

๐ŸŽฏ Purpose of the Project

Where malaria is not endemic any more (such as in the United States), health-care providers may not be familiar with the disease. Clinicians seeing a malaria patient may forget to consider malaria among the potential diagnoses and not order the needed diagnostic tests. Laboratorians may lack experience with malaria and fail to detect parasites when examining blood smears under the microscope. Malaria is an acute febrile illness.

In a non-immune individual, symptoms usually appear 10โ€“15 days after the infective mosquito bite. The first symptoms โ€“ fever, headache, and chills โ€“ may be mild and difficult to recognize as malaria. If not treated within 24 hours, P. falciparum malaria can progress to severe illness, often leading to death.

This Project aims to provides a handy tool to utilize the power of Machine Learning and Artificial Intelligence in Binary Classification Problems where time and accuracy is the paramount objective of classification.

๐Ÿ Technology Stack

๐Ÿƒโ€โ™‚๏ธ Local Installation

  1. Drop a โญ on the Github Repository.
  2. Clone the Repo by going to your local Git Client and pushing in the command:
https://github.com/HarshCasper/Malaria-Detection.git
  1. Install the Packages:
pip install -r requirements.txt
  1. At last, push in the command:
python app.py
  1. Go to http://127.0.0.1:5000/ and enjoy the application.

๐Ÿ“œ LICENSE

MIT

malaria-detection's People

Contributors

adityaashvin avatar adityaashvin16 avatar akshi149 avatar amandp13 avatar aryanvijaywargia avatar ashishsahu1 avatar balaka-18 avatar bhadreshpsavani avatar bhanvimenghani avatar chttrjeankr avatar cnduc avatar harshcasper avatar imgbot[bot] avatar kritikaparmar-programmer avatar macabdul9 avatar mohit1448 avatar namanshah01 avatar nooras avatar restyled-commits avatar restyled-io[bot] avatar rutujadhanawade avatar sameersrivastava13 avatar sarthakkundra avatar v-sonawane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

malaria-detection's Issues

Create the Web UI Design

AIM

Create the Web UI Design in a widely-supported Design Software (Adobe XD/Figma).

Details

We are currently looking for three pages:

  • Landing Page: An attractive Landing Page which outlines the purpose of the Project and what it aims to achieve.
  • Input Form: This form contains only one required input field, that takes an image of a Cell as input that is to be classified as Malarial Cell or not. [ Assigned to @bhanvimenghani ]
  • Result Page: The Result is either presented as a Malarial Cell or not a Malarial Cell.

Contributors Guideline

  • One can work on one or more pages at a given time. Ask yourself to be assigned that Issue, so that you can make the PR.
  • Submissions should be made in an apt form so that Web Developers can work on them seamlessly.
  • The task is open to creativity. You can combine modern UI/UX philosophies to come up with your own design.

Welcome to HakinCodes Contributor's Hack 2020

Hello, Everyone โœจ๐Ÿ™Œ

Thanks for showing your interest in being a part of the Contributor's Hack ๐Ÿ’ฅ

We are super delighted to have you onboardd for your Contributions on Malaria Detection ๐Ÿ™Œ

Here are the Mentors for the Project:

Name ๐Ÿ“› Social Media #๏ธโƒฃ Github ๐Ÿฑโ€๐Ÿ’ป
Vishnu Varthan Rao LinkedIn Github
Sarthak Kundra LinkedIn Github
Balaka Biswas LinkedIn Github
Bhadresh Savani LinkedIn Github
Abdul Waheed LinkedIn Github
Sanjiban Sengupta LinkedIn Github

Here are some 12 Rules, you should be following while doing Open-Source to make your Contributions shine during the whole process:

  • Be Nice, Be Respectful (BNBR)
  • Check if the Issue you created, exists or not.
  • Make proper commit messages and document your PR well.
  • Always add Comments in your Code and explain it at points.
  • Being a multi-disciplinary project, people with varied specializations are expected to coordinate with each other.
  • Squash your commits before you push them.
  • Always create a Pull Request from a Branch; Never from the Master.
  • Follow proper Code conventions. Using i, j in Loops show a poor understanding of Code Quality. Use proper Variable, Function Names.
  • Issues would be served on "First Come, First Serve" basis.
  • Issues would be tagged as Beginner, Easy, Medium, Hard. Scores would be assigned on the difficulty of Issue you solve.
  • Code would be reviewed by Mentors before they are merged. Every PR requires 3 Reviews.
  • No person can take up more than 2 Issues at a single point of time.

Regards,
Harsh Mishra (@HarshCasper), Project Administrator ๐Ÿค—

Add a CODE_OF_CONDUCT.md

AIM

Create a Code of Conduct which all Project Administrators, Mentors and Participants must abide by.

Details

  • Mention the Standards which everyone should abide by on welcoming and inclusive language including constructive criticism.
  • Add the required responsibilities for Project Maintainers.
  • Mention the Scope of this Code of Conduct.

Create a Holdout Set

Type

Feature

Description

While training, validating and optimizing our model we could over time start to overfit the validation data without realizing it. This means that the model will perform well during training but it will perform poorly on unseen data.

Create a holdout set containing 200 images. We will keep this holdout set aside and only use it at the end to check how the final model performs on unseen data. Keep the code in a Scripts/ directory for future use.

Tools

  • Python

Have you read the Contributing Guidelines on Pull Requests?

Yes

Jinja Templating

Type

new feature / advancement in original

Description

Ability to create reusable templates for our web application. There are lots of elements in the website that are currently common and in future will be common like the header or footer or the navigation bar. So instead of copy pasting the exact same code on every single page of the website we can simply create a common template layout.html which will have all the common elements and then we can inherit that layout.html in other pages using the template engine jinja2 of flask. It also improves the speed and performance as it compiles template source code to Python bytecode when it's first loaded, so the template is only parsed once, resulting in better runtime performance.

Tools

HTML
Python (flask)

Have you read the Contributing Guidelines on Pull Requests?

Yes

Adding a favicon

Type

advancement in original

Description

As we know favicon serves as branding for a website. Its main purpose is to help visitors locate your page easier when they have multiple tabs open. So i would like to add a favicon to our web application.

Tools

HTML

Have you read the Contributing Guidelines on Pull Requests?

yes

Screenshot :

Screenshot (63)

Server is not running

Server is not opening

Description

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

image

Add Documentation on setting Tensorflow

Type

Advancement

Description

Create a Documentation File using Markdown and add it into a specific Documentation/ directory to allow new contributors to get started with setting Tensorflow. The features to be added in the documentation includes:

  • Give a basic idea about Tensorflow.
  • Give a step-wise plan of setting Tensorflow on Windows/Linux/OSX Environment.
  • Add Screenshots wherever possible.
  • Add a sample Tensorflow Code to show the Library up and running.

Tools

  • Markdown
  • Python
  • Pip/Conda

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

To contribute to the Wiki of this Project in the longer run.

Adding a splash screen

Type

I would like to add a splash screen to the web application.

Description

I know the Front end part is still left for the web app but i found this really cool GIF and wanted to use this for our
web application as a loading screen to give an end user immediate feedback that an application is starting and loading in the background.

Tools

Javascript
CSS
HTML

Have you read the Contributing Guidelines on Pull Requests?

yes

Magnify-1s-200px

Designing a 404 page

Type

User Interface
New Feature

Description

The website most definitely needs a 404 landing page in case when someone tries to access an endpoint that does not exist.

Tools

Adobe XD / Figma

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

An issue opened by a participant.

Add Create React App Boilerplate Code

Type

Advancement

Description

I have created a Branch named react-tensorflowjs where our parallel development will go on. Add the React Boilerplate Code using create-react-app to the branch to get started with the UI Development using React. Make sure to add a .gitignore to prevent pushing up your node-modules as well.

Tools

  • NodeJS
  • NPM
  • Create React App CLI

Have you read the Contributing Guidelines on Pull Requests?

Yes

Build a Literature Survey for Transfer Learning + Popular Pre-Trained Models for Binary Classification

Type

Advancement

Description

Build a Literature Survey for Transfer Learning including some Popular Pre-Trained Models for Binary Classification. Add the following there:

  • What is Transfer Learning?
  • Use-Cases of Transfer Learning to solve Complex Problems
  • Popular Pre-Trained Models for Transfer Learning
  • Comparative Case-Study of various Models

Tools

  • Markdown
  • Python

Have you read the Contributing Guidelines on Pull Requests?

Yes

Add a Beginner-Friendly Documentation for the Malarial Cell Dataset

Type

Advancement

Description

Add a Beginner-Friendly Documentation for the Malarial Cell Dataset. It should include the basic EDA and show various aspects of the Dataset as a whole. Remember that you have to submit this as a Jupyter Notebook and it should be a basic walk-around the whole Dataset with proper documentation in the form of Jupyter Markdown. You don't have to carry out any Train-Test Splits or draw up any Model

Tools

  • Python
  • Jupyter Notebook

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

I want the Beginners to get acquainted with the basic features of the Dataset we are working on.

Add a CONTRIBUTING.md guideline

๐Ÿ“š Documentation

Currently, the Project Codebase lacks a Contributor's Guideline which is detrimental for new contributors. We need good documentation that can actually help new contributors to understand how they can start contributing to this Project. The basic features we are currently looking for are:

  • Create a CONTRIBUTING.md to allow new users to get started with knowing how to contribute.
  • Add Screenshots wherever possible.
  • Add the basic information about creating Issues, Pull Requests and Branching.
  • Mention tutorials related to Git and Github to help them better understand.

This Issue would be later a part of our Wiki which we are working on right now.

Create a basic Setup

Type

Feature/Advancement

Description

  • Create a Folder named templates which consists of three HTML Pages. Add mock HTML Code in them to serve them from the Flask App.
  • Create a Folder named 'Static` to serve Static Content and other Assets.
  • Link Style and Script to the HTML Code.

Tools

  • HTML
  • CSS
  • Javascript
  • Python

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

To set a basic boilerplate for our application before we move ahead with the Development Part.

Add Documentation on setting Flask

Type

Advancement

Description

Create a Documentation File using Markdown and add it into a specific Documentation/ directory to allow new contributors to get started with setting Flask. The features to be added in the documentation includes:

  • Give a basic idea about Flask as a Micro Web-Framework.
  • Give a step-wise plan of setting Flask on Windows/Linux/OSX Environment.
  • Add Screenshots wherever possible.
  • Add a sample Flask Code with a mock endpoint to show the Server up and running.

Tools

  • Markdown
  • Python
  • Pip/Conda

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

To contribute to the Wiki of this Project in the longer run.

Adding a 404 page.

Description

To add a 404 error page to keep a visitor on your site even if he/she hits a page that doesn't exist. Also to change the bad User experience to a positive one by adding some links to that 404 page so that the visitor can navigate to some other page.

Tools

python
html
css

Have you read the Contributing Guidelines on Pull Requests?

yes

Create the home page for React application

Type

New feature ( User Interface )

Description

The React app has a pages sub-folder where all the pages will go.
Make the home page as per the approved UI.

Note You don't need to make the navbar as that is a separate component and that work has been assigned to someone.

Tools

JSX
HTML
Bootstrap (react-bootstrap)

Have you read the Contributing Guidelines on Pull Requests?

Yes.

Create a Logo for the Application

Currently, we need a Logo for our Application which would be used on our Web Application Interface.

This Issue is open for all, and will not be assigned to anyone. People interested to work on it, can mention about their work and make a PR.

Tools to be used:

  • Figma
  • Adobe XD
  • Adobe Photoshop

Logo Designs must be added in an appropriate form on a design/Logo-Design/ Directory. The basic criteria we are looking for are:

  • The logo should be optimized to a 500x500 Pixel Size.
  • Transparent Background must be used.
  • Design Philosophy must be documented in the PR.

PRs would be reviewed on a rolling basis. All PRs would be reviewed by Mentors before they are finally acknowledged and merged.

Build the Model using tf.keras

Type

Advancement

Description

Build a Model using tf.keras. Follow these instructions to submit your Notebook:

  • Use the restructured dataset which already has train/val/test set.
  • Create a model using tf.keras
  • Evaluate your Model using Confusion Matrix
  • Test your model against the Holdout/Test Set
  • Use proper Jupyter Markdown to document your Code

Tools

  • Jupyter Notebook
  • Jupyter Markdown
  • Python
  • Tensorflow
  • Keras

Have you read the Contributing Guidelines on Pull Requests?

Yes

Script to read the Images

Type

New Feature/Advancement

Description

Create a Script that can read the Images and their label and save the Data for future purpose. Keep this Script specifically in a /script directory. You must also add a function that loads the Dataset. Make sure to download the dataset from Kaggle.

Tools

  • Python

Have you read the Contributing Guidelines on Pull Requests?

Yes

Updation of numpy version is required

Type

(specify whether it is a bug / new feature / advancement in original)

Description

Upgrade the numpy version to <=1.19.0
Screenshot (61)

(A clear and concise description of what the feature/Bug is.)

Tools

(required tools / coding languages)

Have you read the Contributing Guidelines on Pull Requests?

(Write your answer here.)

Motivation

(Please outline the motivation for the proposal.)

Remove a line from Malaria_detection.ipynb

Type

Refactoring

Description

Malaria_detection.ipynb in Steps to solve the problem section we have following steps,

1. Loading the data.
2. Exploratory Data Analysis (EDA).
3. Data preprocessing.
4. Data augmentation.
5. Ploting images and its labels to understand how does an infected cell and uninfected cell looks like.
6. Spliting data in Train , Evaluation and Test set.
7. Creating a Convolution Neural Network function.
8. Wrapping it with Tensorflow Estimator function.
9. Training the data on Train data.
10. Evaluating on evaluation data.
11. Predicting on Test data
12. Ploting the predicted image and its respective True value and predicted value.

Step 5 which is Ploting images and its labels to understand how does an infected cell and uninfected cell looks like. should be removed since its EDA step and need to reorder the other steps after removal.

Tools

  • Markdown

Have you read the Contributing Guidelines on Pull Requests?

Ya

Motivation

To have better markdown for Notebook by writing more appropriate steps

Create a .gitignore File

Type

Advancement

Description

Our Repository currently lacks a proper Gitignore Setup. Add a .gitignore setup so that we don't actually push code that we don;t actually intend to in the long run.

Create Mock Endpoints in the Flask Application

AIM

Create Mock endpoints for our Flask Application.

Details

We are currently looking for three pages:

  • Landing Page: An attractive Landing Page which outlines the purpose of the Project and what it aims to achieve.
  • Input Form: This form contains only one required input field, that takes an image of a Cell as input that is to be classified as Malarial Cell or not.
  • Result Page: The Result is either presented as a Malarial Cell or not a Malarial Cell.

You have to create mock endpoints which return a JSON Message on various routes.

Refactoring code by using url_for in flask

Type

new feature / advancement in original

Description

url_for in Flask is used for creating a URL to prevent the overhead of having to change URLs throughout an application (including in templates). Without url_for , if there is a change in the root URL of our application then we have to change it in every page where the link is present.

Tools

Python (Flask)

Have you read the Contributing Guidelines on Pull Requests?

Yes

Create requirements.txt

AIM

Create a requirements text file for this project which will contain all the required libraries and frameworks for doing the data modelling.

Make a Contributors Guideline

AIM

Create Contributors Guideline to help new Contributors get started with this Project.

Features

  • Add a CONTRIBUTING.md to allow new users to get started with knowing how to contribute.
  • Add Screenshots wherever possible.
  • Add the basic information about creating Issues, Pull Requests and Branching.
  • Mention tutorials related to Git and Github to help them better understand.

Create an Issue + Pull Request Template

AIM

Create a custom Issue and Pull Request Template.

Features

  • Make an Issue Template. Any new Contributor must be able to specify if it is a new script or enhancement to an older one. It should also be specified which language he is coding it in.

  • Make a Pull Request Template. Any new Contributor must be able to specify if he has met all the requirements like Clean Code, proper README and Documentation, Screenshots (If any) attached and more.

Train the Model using VGG-16

Type

Advancement

Description

Create and Train a Model using VGG-16, using either Keras (Tensorflow) or PyTorch. This Issue can be assigned to two people working on either of the frameworks for Data Modelling. Create a Test Script as well, which can be used to test the Script.

Tools

  • Python
  • Tensorflow
  • PyTorch
  • Jupyter Notebook
  • Jupyter Markdown

Have you read the Contributing Guidelines on Pull Requests?

Yes

Factory Application Pattern for the Flask App

Type

advancement

Description

The current flask application is just a single file with all the routes and configurations defined in a single file. It may happen in the future that this application increases in code and more routes added to the website which will make it difficult to maintain the code. Solution: Converting the current application into a factory application pattern which will make it easier to manage code.

Tools

Python

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

Easier maintainability of code in future, Participant of CH20

Create an EDA Documentation Summary

Type

Advancement

Description

@kritikaparmar-programmer has done an excellent job in creating an EDA on the Malarial Cell Dataset. We need a Markdown Documentation that can help us form our Wiki later using the EDA contributed by her. You can check out the Pull Request here and create basic documentation to explore the basic intuition behind the Dataset.

Tools

  • Markdown

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

To later form part of our Wiki

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.