hemanthh17 / malaria-detection-torch-docker

Using Docker, and ML conepts to deploy an app on local server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Malaria Detection using Pytorch

For this project blood samples with and without parasites have been considered. The overall goal is to make sure we are able to classify whether the person has Malaria or not based on the blood image samples.

Model Structure

The project involved using of pretrained model architecture from timm library which is associated with Pytorch. The pretrained model which was used is the Vision Transformer. The model was able to provide predictions with F1 score of 0.808. The number of epochs trained is 10.

0 YRDqyaLnCJscrYWV

Process Involved

The dataset is from Kaggle. The data was preprocessed and resized to uniformity to (224,224), all of the training and other parameters can be found in the scripts/config.py file. Post training, the model was saved, and a seprate script to define the model and the function call to classify the given image was initialised. The further step is to design a Flask app in order to locally host the application. The results are displayed in a new web page.

Dockerizing

In order to keep the dependencies uniform, the entire environment was dockerized. The image of this can be found in the Docker Hub.

docker pull docker pull hemanthh17/torchmalaria:v1.1

To use this application the image can be pulled and a new container cna be created at the destination to run the application.

docker run --name malariadetection -p 5000 hemanthh17/torchmalaria:latest

If you want to build the image from scratch

docker build -t malariatorch .

To scout for any vulnerabilities

docker scout malariatorch -quickview

About

Using Docker, and ML conepts to deploy an app on local server.


Languages

Language:Python 85.3%Language:HTML 13.1%Language:Dockerfile 1.6%