This project is a containerized web application designed for real-time object detection using machine learning. The system is built with Flask for the frontend, a YOLOv5-based ML client for object detection, and MongoDB for backend data storage. This project demonstrates the power of Dockerized microservices for deploying scalable and modular systems.
Reyhan Abdul Quayum | Rashed Alneyadi | Sia Chen | Yu Zhang |
---|---|---|---|
+------------------+
| User Uploads |
+------------------+
|
v
+------------------+ HTTP +---------------------+
| Flask Web App |<------>| ML Client (YOLOv5) |
+------------------+ +---------------------+
| |
| v
+-----------------> MongoDB <---+
Store & Retrieve
4-containers-financiers/
├── machine-learning-client/ # ML Client Service
│ ├── app.py # Flask app for YOLOv5 processing
│ ├── Dockerfile # Docker configuration
│ └── requirements.txt # Python dependencies
├── web-app/ # Flask Web App
│ ├── app.py # Web interface and API endpoints
│ ├── test_app.py # Pytest test suite
│ ├── Dockerfile # Docker configuration
│ ├── templates/ # HTML templates
│ └── requirements.txt # Python dependencies
├── docker-compose.yml # Multi-container setup
└── README.md # Project documentation
- Docker Desktop
- Clone the repo:
git clone https://github.com/software-students-fall2024/4-containers-financiers.git
cd 4-containers-financiers
- If using Docker Desktop application, start Docker Desktop if you haven't already
- Build and start the containers with Docker Compose
docker-compose down
docker-compose build
docker-compose up
- If you are getting errors that ml-client is not healthy anad that web-app is not starting because of that (rare error), running docker-compose up again may solve the issue.
docker-compose up
- Access the Web App.
You should be able to locally access web-app running on http://127.0.0.1:5000/
- Clone the repo:
git clone https://github.com/software-students-fall2024/4-containers-financiers.git
cd 4-containers-financiers
- Each subdirectory
machine-learning-client
andweb-app
have their own Pipfile and pipenv environment respectively a. To start the ml-client environment:
cd machine-learning-client
pipenv install
pipenv shell
b. To start the web-app environment:
cd .. # go to root directory
cd web-app
pipenv install
pipenv shell
- Access the web-app running on http://127.0.0.1:5000/ by accessing your web-app pipenv terminal