An AI-powered Animal Detection System built with Flask, YOLOv11, OpenCV, and MySQL. The application detects people and supported animal classes from uploaded images or a live webcam feed, stores results in a relational database, generates reports, provides REST APIs with Swagger documentation, and visualizes detection statistics using NumPy and Matplotlib.
- User Registration & Login
- Secure Session Management
- Image Upload
- YOLOv11 Animal & Person Detection
- Live Webcam Detection
- Detection Results with Confidence Scores
- MySQL Database Integration
- CSV Report Generation
- PDF Report Generation
- Detection Analytics (Bar Graph)
- REST APIs
- Swagger API Documentation
Layer Technologies
Frontend HTML, CSS, Jinja2 Backend Python, Flask AI Model YOLOv11 (Ultralytics) Database MySQL Computer Vision OpenCV Analytics NumPy, Matplotlib Documentation Swagger (Flasgger)
+----------------------+
| Web Browser |
+----------+-----------+
|
v
Flask Web Application
|
+-----------------+-----------------+
| | |
v v v
Authentication YOLOv11 Detector REST APIs
| | |
+--------+--------+ |
| |
v v
MySQL Database Swagger Documentation
|
v
CSV / PDF Reports / Graph Analytics
Create a folder named screenshots and place the following images inside it.
Method Endpoint Description
POST /api/register Register a user
POST /api/login Login
POST /api/logout Logout
POST /api/upload Upload images
GET /api/detect Run detection
GET /api/history Upload history
GET /api/results/<image_id> Detection results
GET /api/profile User profile
DELETE /api/image/<image_id> Delete image
Swagger UI:
http://127.0.0.1:5000/apidocs
- Flask Development
- REST API Design
- Swagger Documentation
- MySQL Database Design
- SQL Relationships
- Session Authentication
- Computer Vision
- YOLOv11 Integration
- OpenCV
- NumPy
- Matplotlib
- PDF & CSV Report Generation
- Git & GitHub
- JWT Authentication
- Docker Support
- Cloud Deployment
- Object Tracking in Video
- React Frontend
- Email Notifications
- Admin Dashboard
git clone <repository-url>
cd AnimalDetection
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
python app.pyOpen:
http://127.0.0.1:5000
Divyam Choudhary
AI-powered Animal Detection System built as a portfolio project demonstrating Computer Vision, Flask backend development, REST APIs, MySQL integration, analytics, and reporting.






