All Projects → DoDuy → Lung Diseases Classifier

DoDuy / Lung Diseases Classifier

Licence: apache-2.0
Diseases Detection from NIH Chest X-ray data

Projects that are alternatives of or similar to Lung Diseases Classifier

Kaggle Web Traffic Time Series Forecasting
Solution to Kaggle - Web Traffic Time Series Forecasting
Stars: ✭ 29 (-44.23%)
Mutual labels:  kaggle, jupyter-notebook, cnn
Allstate capstone
Allstate Kaggle Competition ML Capstone Project
Stars: ✭ 72 (+38.46%)
Mutual labels:  kaggle, jupyter-notebook, udacity
Deeplearning
深度学习入门教程, 优秀文章, Deep Learning Tutorial
Stars: ✭ 6,783 (+12944.23%)
Mutual labels:  kaggle, jupyter-notebook, cnn
Cvnd Udacity
Computer Vision Nanodegree program from Udacity
Stars: ✭ 52 (+0%)
Mutual labels:  jupyter-notebook, udacity
Interview
Interview = 简历指南 + LeetCode + Kaggle
Stars: ✭ 7,207 (+13759.62%)
Mutual labels:  kaggle, jupyter-notebook
Servenet
Service Classification based on Service Description
Stars: ✭ 21 (-59.62%)
Mutual labels:  jupyter-notebook, cnn
Deepfake Detection
DeepFake Detection: Detect the video is fake or not using InceptionResNetV2.
Stars: ✭ 23 (-55.77%)
Mutual labels:  kaggle, jupyter-notebook
Gaze Estimation
A deep learning based gaze estimation framework implemented with PyTorch
Stars: ✭ 33 (-36.54%)
Mutual labels:  jupyter-notebook, cnn
Particle Filter Prototype
Particle Filter Implementations in Python and C++, with lecture notes and visualizations
Stars: ✭ 29 (-44.23%)
Mutual labels:  jupyter-notebook, udacity
Dl Colab Notebooks
Try out deep learning models online on Google Colab
Stars: ✭ 969 (+1763.46%)
Mutual labels:  jupyter-notebook, cnn
Machinelearningcourse
A collection of notebooks of my Machine Learning class written in python 3
Stars: ✭ 35 (-32.69%)
Mutual labels:  kaggle, jupyter-notebook
Kaggle Carvana Image Masking Challenge
Top 15% ranked solution to the Carvana Image Masking Challenge on Kaggle
Stars: ✭ 13 (-75%)
Mutual labels:  kaggle, jupyter-notebook
Neural Image Captioning
Implementation of Neural Image Captioning model using Keras with Theano backend
Stars: ✭ 12 (-76.92%)
Mutual labels:  jupyter-notebook, cnn
Healthcheck
Health Check ✔ is a Machine Learning Web Application made using Flask that can predict mainly three diseases i.e. Diabetes, Heart Disease, and Cancer.
Stars: ✭ 35 (-32.69%)
Mutual labels:  kaggle, jupyter-notebook
Keras basic
keras를 이용한 딥러닝 기초 학습
Stars: ✭ 39 (-25%)
Mutual labels:  jupyter-notebook, cnn
4th Place Home Credit Default Risk
Codes and dashboards for 4th place solution for Kaggle's Home Credit Default Risk competition
Stars: ✭ 23 (-55.77%)
Mutual labels:  kaggle, jupyter-notebook
Qa Rankit
QA - Answer Selection (Rank candidate answers for a given question)
Stars: ✭ 30 (-42.31%)
Mutual labels:  jupyter-notebook, cnn
Svhn Cnn
Google Street View House Number(SVHN) Dataset, and classifying them through CNN
Stars: ✭ 44 (-15.38%)
Mutual labels:  jupyter-notebook, cnn
Webinar Titanic
Stars: ✭ 16 (-69.23%)
Mutual labels:  kaggle, jupyter-notebook
Tensorflow Tutorial
Some interesting TensorFlow tutorials for beginners.
Stars: ✭ 893 (+1617.31%)
Mutual labels:  jupyter-notebook, cnn

Diseases Detection from Chest X-ray data

Machine Learning Capstone Project - Udacity MLND

Project Overview

With so many lung diseases people can get, here is just one example of diseases we can save if we find them out earlier. With the technology machine and computer power, the earlier identification of diseases, particularly lung disease, we can be helped to detect earlier and more accurately, which can save many many people as well as reduce the pressure on the system. The health system has not developed in time with the development of the population.

Analysis

Data Exploration

Exploratory Visualization

Datasets

Sample dataset

  • File contents: this is a random sample (5%) of the full dataset: sample.zip: Contains 5,606 images with size 1024 x 1024 sample_labels.csv: Class labels and patient data for the entire dataset
  • Class descriptions: there are 15 classes (14 diseases, and one for "No findings") in the full dataset, but since this is drastically reduced version of the full dataset, some of the classes are sparse with the labeled as "No findings": Hernia - 13 images, Pneumonia - 62 images, Fibrosis - 84 images, Edema - 118 images, Emphysema - 127 images, Cardiomegaly - 141 images, Pleural_Thickening - 176 images, Consolidation - 226 images, Pneumothorax - 271 images, Mass - 284 images, Nodule - 313 images, Atelectasis - 508 images, Effusion - 644 images, Infiltration - 967 images, No Finding - 3044 images.

Full dataset

  • File contents: images_00x.zip: 12 files with 112,120 total images with size 1024 x 1024 README_ChestXray.pdf: Original README file BBox_list_2017.csv: Bounding box coordinates. Note: Start at x,y, extend horizontally w pixels, and vertically h pixels Data_entry_2017.csv: Class labels and patient data for the entire dataset
  • Class descriptions: there are 15 classes (14 diseases, and one for "No findings"). Images can be classified as "No findings" or one or more disease classes: Atelectasis, Consolidation, Infiltration, Pneumothorax, Edema, Emphysema, Fibrosis, Effusion, Pneumonia, Pleural_thickening, Cardiomegaly, Nodule Mass, Hernia.

Algorithms and Techniques

  • CNN
  • Spacial Transformer
  • VGG finetuning
  • Capsule Network

Architecture

Vanilla CNN

Optimized CNN

CapsNet

Metrics & Result

F-beta score with β = 0.5 to represent precision will be more important than recall in this case.

Result: In sample dataset:

Model Precision Recall F 0.5 score Accuracy Training time/ epoch no. parameters
Vanilla rgb 0.617 0.589 0.611 0.503 2 s 322793
Vanilla gray 0.577 0.48 0.555 0.517 2 s 321225
CNN + VGG 0.645 0.555 0.624 0.667 16 s 15252133
CNN + VGG + data 0.647 0.588 0.634 0.675 16 s 15240769
CNN + VGG + data + STN 0.642 0.614 0.636 0.677 19 s 15488051
CapsNet basic 0.614 0.599 0.611 0.581 75 s 14788864
CapsNet changed 0.735 0.073 0.261 0.575 37 s 12167424

In full dataset:

Model Precision Recall F 0.5 score Accuracy Training time/ epoch no. parameters
Vanilla rgb 0.672 0.594 0.655 0.672 53 s 322793
Vanilla gray 0.672 0.572 0.649 0.667 51 s 321225
CNN + VGG 0.675 0.619 0.663 0.688 384 s 15252133
CNN + VGG + data + STN 0.684 0.621 0.67 0.693 431 s 15488051
CapsNet basic 0.64 0.498 0.605 0.635 1815 s 14788864
CapsNet changed 0.625 0.474 0.588 0.625 856 s 12167424

Installation

Jupyter Notebook with python3

$ sudo apt-get update
$ sudo apt-get install python3-pip python3-dev
$ pip3 install --upgrade pip
$ pip3 install jupyter

Tensorflow for GPU

$ pip3 install tensorflow==1.8.0     # Python 3.n; CPU support (no GPU support)
$ pip3 install tensorflow-gpu==1.8.0 # Python 3.n; GPU support 

Keras for GPU

$ pip3 install keras

Others

  • numpy
  • pandas
  • seaborn
  • matplotlib
  • opencv
  • glob
  • tqdm
  • sklearn
  • pickle

Note

  1. Run Data preprocessing first to create preprocessing file in Sample dataset before run other notebook for Sample dataset.

  2. Following are the file descriptions and URL’s from which the data can be obtained:

  • data sample/sample_labels.csv: Class labels and patient data for the sample dataset
  • data sample/Data_entry_2017.csv: Class labels and patient data for the full dataset
  • data sample/images/*: 10 chest X-ray images
  1. Following are the notebooks descriptions and python files descriptions, files log: Notebooks:
  • Capsule Network - FullDataset.ipynb: Capsule Network with my architecture in full dataset
  • Capsule Network - SampleDataset.ipynb: Capsule Network with my architecture in sample dataset
  • Capsule Network basic - FullDataset.ipynb: Capsule Network with Hinton's architecture in full dataset
  • Capsule Network basic - SampleDataset.ipynb: Capsule Network with Hinton's architecture in sample dataset
  • Data analysis - FullDataset.ipynb: Data analysis in full dataset
  • Data analysis - SampleDataset.ipynb: data analysis in sample dataset
  • Data preprocessing - SampleDataset.ipynb: Data preprocessing
  • Demo.ipynb: Demo prediction 20 samples
  • optimized CNN - FullDataset.ipynb: My optimized CNN architecture in full dataset
  • optimized CNN - SampleDataset.ipynb: My optimized CNN architecture in sample dataset
  • vanilla CNN - FullDataset.ipynb: Vanilla CNN in full dataset
  • vanilla CNN - SampleDataset.ipynb: Vanilla CNN in sample dataset

Python files

  • capsulelayers.py: capsule layer from XifengGuo
  • spatial_transformer.py: spatial transformer layser from hello2all So thank you guys for support me with capsule layer and spatial transformer layer in Keras-gpu

Log:

  • FullDataset Log: all log file in full dataset
  • SampleDataset Log: all log file in sample dataset
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].