Skip to content

jilinzheng/DIYML

Repository files navigation

Do-It-Yourself Machine Learning!

Table of Contents

  1. Purpose and Summary
  2. Features
  3. Installation Instructions
    1. Installing from source code
    2. Installing from Docker image (recommended)
  4. Demonstrations (please see here for course assignments)
    1. Final Project Demo

Summary and Purpose

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.

Features

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.

Installation Instructions

Installing from source code

  1. Prerequisites: MongoDB and Redis running on default ports.
  2. Clone this repository.
  3. cd into the repo, create and activate a virtual environment, and run python3 -m pip install -r requirements.txt.
  4. Start the actual API-serving Flask app with python3 src/diyml.py.
  5. Start a (or many!) Redis worker(s) with python3 src/worker.py.
  6. See API documentation for usage.

Installing from Docker image (recommended)

  1. Simply pull the image.
  2. 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.
  3. See API documentation for usage.

Demos

Below are images/videos demonstrating certain functions of the API, which also serve as course assignment submissions:

About

RESTful API that allowing users to easily train image classification models.

Topics

Resources

Stars

Watchers

Forks