Skip to content

A scalable web application with a stateless architecture and two persistence services.

Notifications You must be signed in to change notification settings

phuongnamly/mudcracks-detector-cloudapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mudcracks detector

Mudcracks detector is a scalable web application for detecting mudcracks images. The application has a stateless architecture and uses two persistence services: DynamoDB and S3 Bucket.

Purpose

NASA are interested in mud cracks, as they are signs of a watery ancient past on Mars. QUT Space White Belly Sea Eagles Team has been developing a model, trained with 600 images of mud cracks on Earth, for detecting mud cracks in general. The model is available as an Azure Custom Vision endpoint. This leads to the idea of developing a web application for predicting images, along with scalability and persistence. Using our web application, the user will be able to search for images in NASA’s media bank and then, our machine learning model will predict whether there are mud cracks in those images.

Data Flow Diagram

DataFlow

Architecture Diagram

Architecture

Scaling performance

Scaling Policy

ScalingPolicy InServiceInstance

The application scales out when the average CPU utilization is over 20%, scaling between one and three instances. While 20% is a small benchmark for CPU performance, it successfully demonstrates the auto-scaling performance of this application. For achieving higher CPU performance such as 60%, the application is more likely to crash due to Tensorflow exceeding the memory of the t3.medium instance, before using the CPU for prediction capabilities. Therefore, average CPU utilization at 20% would ensure stabilize the performance of the application.

Scaling Performance

CPUPerformance TargetResponseTime

User guide

To use the application, the user must enter the query and the number of images they want to see.

Sample-result

Setup

While the example usage is about mud cracks detection, the web application also works with every TensorFlow model. A TensorFlow model is represented by two files, model.pb and labels.txt.

Prequisites:

  1. Register for an AWS account
  2. Create a DynamoDB database and a S3 Bucket
  3. Add model.pb and labels.txt in server-flask

Installation guides:

  1. Install Docker
sudo curl -fsSL https://get.docker.com/ | sh
  1. Clone the directory
git clone https://github.com/phuongnamly/CAB420-MachineLearning.git
  1. Configure AWS credentials
set AWS_ACCESS_KEY_ID=your_access_key_id
set AWS_SECRET_ACCESS_KEY=your_secret_access_key
  1. Use Docker to build and run the image
docker build -t mudscrack .
docker run -p 80:4001 mudscrack
  1. Run the application on localhost
http://localhost:4001

About

A scalable web application with a stateless architecture and two persistence services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published