My priority this week has been implementing the system architecture for my EDanalysis senior project/research on Amazon Web Services (AWS). First, I'll briefly introduce the project then dive into what I've been up to this week with AWS.
For this project, we trained an instance of the ResNet convolutional neural network to recognize pro-eating disorder images, with the aim of developing software tools (called EDanalysis) to improve eating disorder treatment and patient health outcomes. For more information, check out this video I made describing the project's vision, featuring a sneak peek of some of the software we're building!
This week, we had a 70% Project Demo for GW's CS Senior Design class (see more about the Senior Design aspects of my project here!). My 70% demo goals involved setting up my project on AWS, which is a first for me. My rationale for choosing AWS as a cloud service provider was simple: our project's goal is to publicly deploy the EDanalysis tools; hence, whatever system we make needs room to grow. To my knowledge, AWS offers unparalleled design flexibility--especially for machine learning systems--at web scale (wow, buzzword alert). Disclaimer: my current AWS system is optimized for cost-efficiency (for Senior design purposes ;-)), but I plan to someday use an AWS ECS instance and other beefier architectures/features.
The EDanalysis system has 3 main parts: the R&D server, the website architecture/ backend, and the frontend components, which I refer to as parts 1, 2, and 3 below.
This week, I completed the following:
- part 1: communication from the R&D server to the S3 bucket
- part 2: communication from the R&D server to the S3 bucket triggers a lambda function that forwards the passed data to the EC2 instance
- part 2: a modification of the classifier testing script to download a single image from an input URL, run it through the classifier, and return its classification
- part 2: a proof-of-concept script for the pytorch EC2 instance that creates a Flask server that adheres to the REST API, communicates with the classifier and passes it an image url in JSON format, runs the classifier on that url, and passes back its classification to the server
- the AWS design and architecture above
For the above, I found the Designing a RESTful API using Flask-RESTful and AWSeducate tutorials to be most useful.
My goals for next week are the following:
- containerizing the classifier environment so it's easier to deal with all the requirements
- instantiating the pytorch EC2 instance on AWS and getting the classifier and Flask server working there
- instantiating the user database with DynamoDB (first, modifying my old MySQL schema)
- cleaning up the Flask server code and accompanying classifier test code
- experimenting with (outgoing) communication from GW SEAS servers to my AWS S3 bucket
Here's to learning more about ~the cloud~ and tinkering around with code!