An intelligent queue management system that uses YOLOv8 for real-time person detection and tracking. The system monitors entry/exit events, calculates wait times, and stores all data in a PostgreSQL database.
- Backend: FastAPI (Python)
- Database: PostgreSQL
- AI/ML: YOLOv8 (Ultralytics)
- Computer Vision: OpenCV
Navigate to the backend directory and install the required packages:
cd backend
pip install -r requirements.txt-
Install PostgreSQL (if not already installed)
- Download from PostgreSQL Official Website
-
Create a Database
CREATE DATABASE queue_detector;
Create a .env file in the backend directory with your PostgreSQL database configuration:
DB_HOST=localhost
DB_NAME=queue_detector
DB_USER=your_username
DB_PASSWORD=your_password
DB_PORT=5432Run the create.py script once to create the necessary database tables:
cd backend
python create.pyOpen a terminal and navigate to the backend directory:
cd backend
uvicorn app:app --reloadThe FastAPI server will start on http://localhost:8000
Open a new terminal and navigate to the backend directory:
cd backend
python detection.pyThis will start the camera feed and begin detecting and tracking people. Press Q to quit.