- Purpose and Summary
- Features
- Installation Instructions
- Demonstrations (please see here for course assignments)
Do-It-Yourself Machine Learning is an easy-to-use REST API that allows users to easily train image classification models and create inference requests. This project was completed Spring 2024 for EC530 Software Engineering Principles @ Boston University.
This project showcases the following features:
- Manage a simple user database
- Upload/delete images
- Train image classification models with scikit-learn
- Create inference requests
- Get inference results
- Document database with MongoDB
- Task queues with Redis
For more specific details on API usage, please see the API documentation.
- Prerequisites: MongoDB and Redis running on default ports.
- Clone this repository.
cd
into the repo, create and activate a virtual environment, and runpython3 -m pip install -r requirements.txt
.- Start the actual API-serving Flask app with
python3 src/diyml.py
. - Start a (or many!) Redis worker(s) with
python3 src/worker.py
. - See API documentation for usage.
- Simply pull the image.
- You may choose to use your own container orchestration, but I have included a Docker Compose file that includes the necessary dependencies, MongoDB and Redis, as well as a nice MongoDB visualizer, Mongo Express.
- See API documentation for usage.
Below are images/videos demonstrating certain functions of the API, which also serve as course assignment submissions:
-
Full API Demo Video
-
Containerization
-
Database Schema (MongoDB)