- This subproject utilizes the YOLOv8 model for real-time traffic image analysis.
- Fetches images from a Firebase database, processes them to detect vehicles, and updates congestion levels based on the number of detected vehicles.
- Python 3.12 or above
- Libraries:
os
,io
,requests
,ultralytics
,PIL
,firebase_admin
,dotenv
- Clone the repository
git clone "https://github.com/jiayin04/ecocity-traffic-prediction.git"
cd ecocity-traffic-prediction
- Install dependencies
pip install -r requirements.txt
- Environment variables
- Create
.env
file in root directory and add:
FIREBASE_CREDENTIAL_PATH=<fileName>.json
FIREBASE_DATABASE_URL= <firebase-database-url>
- Click to run the
main.py
file or
python main.py