Web-based solution that allows users to upload images for analysis using an AI model running in a Dockerized FastAPI server. The model detects and identifies banknotes.
- Backend: Django, Django REST Framework, FastAPI (Dockerized)
- AI Model: YOLO (Ultralytics)
- Image Processing: OpenCV
- Frontend: React, JavaScript, Axios
- Server & Storage: Django Media Storage, Local Development Server, FastAPI in Docker
- User uploads an image via the web interface.
- The image is sent to the Django API.
- Django forwards the image to the FastAPI model server running in Docker.
- The AI model detects banknotes and marks them on the image.
- The processed image is returned to Django, then displayed on the frontend.
- Clone the repository:
git clone https://github.com/rusenaite/money-detection-api.git cd money-detection-api
- Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
- Apply migrations and run the server:
python manage.py migrate python manage.py runserver 0.0.0.0:8000
-
Navigate to
model_server
directory:cd model_server
-
Build and run the Docker container:
docker build -t model_server . docker run -p 8001:8001 model_server
-
FastAPI should now be running on:
http://localhost:8001
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the React app:
npm start
- Open
http://localhost:3000
in your browser.
- The system correctly identifies and highlights banknotes.
- The processed image is displayed alongside the original.
- Optimize model performance and inference speed.