The project is motivated by the ••overcrowding of hospital beds due to COVID-19••. Another reason is to avoid the repeat of the events which happened at the beginning of the pandemic. Scarce healthcare resources due to COVID-19 require carefully made policies ensuring optimal bed utilization and quality healthcare service. An unsupervised deep learning algorithm is applied to decide the assignment of resources to patients. Further, developing and deploying AI applications is a challenging endeavor requiring a scalable infrastructure of hardware, software, and intricate workflows. This project shows an end-to-end Machine Learning workflow and aims to help for both policy-makers and the public.

What it does

Full-stack Machine Learning Application with data visualization and clustering algorithm. Clustering shows a new way to use the data to assess the impact of COVID-19. Modeling is applied to Geospatial data in order to solve the use case of optimizing the utilization of hospital beds. It uses the number of licensed, staffed, unstaffed, ICU, adult ICU, Paediatrics ICU beds, bed utilization, a potential increase in capacity, and average ventilator usage. This allows us to take into account both the number of resources and the intensity of care needed. It provides the means to optimize bed-occupancy management and evaluate geographical hospital resource allocation.

The data and model are deployed as a web app. The machine learning pipeline is deployed using AWS Fargate which is a serverless compute for containers. This enables us to build and host a fully functional containerized web app on AWS without provisioning any server infrastructure.

How I built it

I used Python for the project. The steps involved are as follows:

  • Import packages, read data, create business features.
  • Data Analysis and visualization with the presentation of the data on the map with folium and geopy.
  • Applying deep learning clustering algorithm called Self Organizing Map (SOM) with ‘minisom’ package. A SOM is a type of artificial neural network that is trained using unsupervised learning to produce a low-dimensional representation of the input space, called a “map”. We use the “clusters” from the algorithm to visualize on the Geospatial plot.
  • Build a front-end web application using Streamlit. It is an open-source Python library that makes it easy to build beautiful custom web-apps for machine learning and data science
  • Create a Dockerfile. Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers are used to package up an application with all of its necessary components, such as libraries and other dependencies, and ship it all out as one package.
  • Installing and running Docker on AWS EC2 instance using Amazon Linux AMI
  • Build and push a Docker image onto Amazon Elastic Container Registry. Amazon Elastic Container Service (Amazon ECS) is a container orchestration platform. The idea behind ECS is similar to Kubernetes (both of them are orchestration services.
  • Deploy web app using serverless infrastructure i.e. AWS Fargate. It is a serverless compute engine for containers that work with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS). It removes the need to provision and manage servers, we specify and pay for resources per application, and improves security through application isolation by design. The application is stateless (A stateless app is an application that does not save client data generated in one session for use in the next session with that client).

Challenges I ran into

I found some integration issues between Streamlit and Folium e.g., showing the legend on the map. It also took me time to access the S3 bucket from within Fargate container.

Accomplishments that I'm proud of

I am really happy with being able to create and deploy an application that can be used by both public and policymakers. It was my first time working with certain AWS technologies e.g., Data Exchange, ECS, and Fargate. Data is also updated in the application as it is updated at the source ensures that it is dynamic and reflects COVID-19 cases.

What I learned

I learned how to develop a Full-stack machine learning application. I also learned about the ease of getting 1000’s of datasets from the data exchange. This application is available for the public using Fargate.

What's next for Optimisation Model for Utilisation of Hospital Beds-COVID-19

This is a really simple algorithm that can be improved in several ways. The application can also benefit from having a domain name and more security. I would like to scale the application using more distributed systems. I also would like to replicate the same information for other countries.

Built With

Share this project: