EcoGuard AI is a comprehensive, AI-powered computer vision platform designed to tackle industrial pollution, enforce worker safety compliance, and monitor environmental health.
Developed at ESPRIT (École Supérieure Privée d'Ingénierie et de Technologies / Esprit School of Engineering), EcoGuard utilizes advanced deep learning architectures (YOLOv8 & PyTorch U-Net) and is deployed via a modern Django web application. It provides real-time, interactive insights into high-risk industrial zones (like mining operations) and their surrounding ecosystems.
- PPE Compliance Tracking: Real-time YOLOv8 models fine-tuned to detect hard hats, medical masks, and heavy-duty gas masks.
- Explainable AI (XAI): EigenCAM integrations to visualize exactly what the model is looking at when making safety predictions.
- Mining Area Segmentation: PyTorch U-Net models trained on satellite imagery to precisely calculate the footprint of legal and illegal mining operations.
- Soil Health Analysis: The custom "Ghada" U-Net model evaluates land degradation and soil health based on the proximity and density of mining excavations.
- Deforestation Tracking: Automated tracking of forest loss around industrial zones using custom satellite segmentation.
- Smoke & Fire Detection: Early warning systems for industrial exhaust and wildfires.
- Aquatic Contamination Analysis: Advanced fish behavior tracking. The system uses Re-Identification (Re-ID) and trajectory mapping to classify fish swimming patterns (Normal vs. Stressed) as an early indicator of phosphogypsum water contamination.
- Terrestrial Wildlife: YOLO-based animal detection to monitor wildlife displacement near mining zones.
- OCR-Powered Registration: Employees register by uploading their ID cards. The system uses
EasyOCRto automatically extract their First and Last names, auto-generate a corporate email (first_last@EcoGuard.ai), and generate a highly secure random password. - Approval Workflow: New accounts are placed in a "Pending Approval" state.
- Admin Dashboard: Superusers have access to a User Management interface to view ID cards and securely Approve, Reject, or Delete employee access.
Machine Learning & Computer Vision:
PyTorch/TorchvisionUltralytics YOLOv8Segmentation Models PyTorch (SMP)OpenCV/NumPyEasyOCR
Web Development:
Django(Python Web Framework)SQLite3(Database)Bootstrap 5(Mazer Admin Template)Chart.js/ApexCharts(Data Visualization)
-
Clone the repository:
git clone https://github.com/zaabola/Projet_Mining_Pollution.git cd Projet_Mining_Pollution -
Create and activate a virtual environment:
python -m venv venv # On Windows: venv\Scripts\activate # On Mac/Linux: source venv/bin/activate
-
Install dependencies: (Ensure you have PyTorch installed according to your CUDA version first)
pip install -r requirements.txt
-
Run Database Migrations:
cd web_app python manage.py makemigrations python manage.py migrate -
Create an Admin User:
python manage.py createsuperuser
-
Start the Development Server:
python manage.py runserver
Access the dashboard at
http://localhost:8000.
This project was developed at ESPRIT (Esprit School of Engineering) as part of an advanced environmental technology and artificial intelligence initiative. All rights reserved.