Skip to content

ilmimris/bangkit-bgd2a-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bangkit Final Project | BDG2-A

Netlify Status

Detecting COVID-19 in CT or X-ray images with Tensorflow.

About Bangk!t

Bangk!t

Bangk!t is a Google-led academy developed in collaboration with Gojek, Tokopedia, and Traveloka, designed to produce high-calibre, technical talent for world-class, Indonesian technology companies and startups.

Disclaimer

This project about COVID-19 detection is for educational purposes only. It is not meant to be a reliable, highly accurate COVID-19 diagnosis system, nor has it been professionally or academically vetted.

Demo

Screenshots

Normal Bangk!t

Pneumonia / Virus Bangk!t

Pneumonia / Virus / SARS-Cov-2 Bangk!t

Dataset

  • Joseph Paul Cohen and Paul Morrison and Lan Dao COVID-19 image data collection, arXiv:2003.11597, 2020 covid-chestxray-dataset

  • Daniel Kermany and Kang Zhang and Michael Goldbaum Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images for Classification, Mendeley Data, v2 Chest X-Ray Images (Pneumonia)

  • Morozov, S., Andreychenko, A., Blokhin, I., Vladzymyrskyy, A., Gelezhe, P., Gombolevskiy, V., Gonchar, A., Ledikhova, N., Pavlov, N., Chernina, V. MosMedData: Chest CT Scans with COVID-19 Related Findings, 2020, v. 1.0, link Mosmed COVID-19 CT Scans

  • Zhao, Jinyu and Zhang, Yichen and He, Xuehai and Xie, Pengtao. COVID-CT-Dataset: a CT scan dataset about COVID-19, 2020. arXiv preprint arXiv:2003.13865 zhao2020COVID-CT-Dataset

Models

Baseline Architectur and Transfer Learning

We use baseline model DenseNet with pretrained weight imageNet, then we freze the baseline, cut the last layer, and then we add more layers to work with XR and CT Image COVID19. Why DenseNet? DenseNet model is small and has high accuracy.

Quantization Technique

In order to make model works on the edge (browser), we convert all weights model from float32 into uint8 and support tfjs. The result is the model more lightest and faster to make prediction than before quatization.

Convertion Tool

We use tensorflowjs_converter. Install with:

pip install tensorflowjs

Do convertion with:

tensorflowjs_converter --input_format keras --quantize_uint8  ./model.h5 ./tfjs.uint8

Web Apps

This web application built using React, styling with antd, do machine learning thing with @tensorflow/tfjs, and use webgl backend with @tensorflow/tfjs-backend-webgl.

This web application has been optimized, and will load model and save it into your browser. When your refresh the browser, the app does not need to refetch the model from server.

Bootstraping Web App on Your Local Machine

Requirements :

Clone this repo into your machine:

git clone https://github.com/ilmimris/bangkit-bgd2a-webapp

Open the directory bangkit-bdg2a-webapp:

cd bangkit-bdg2a-webapp

Install all the dependencies:

npm install

Start the web app:

npm start

Open http://localhost:3000 in your browser. (Chrome is recommended)

Deploy Apps

Self Hosting

Build this project:

npm run build

Upload build directory into your hosting root directory such as public_html/.

Firebase Hosting

Build this project:

npm run build

Deploy to firebase:

firebase deploy

Contributors

License

This project is licensed under the terms of the MIT license.