A production-ready MLOps pipeline for real-time African wildlife object detection using Flask, TensorFlow Serving, and Docker, with GPU-accelerated inference via gRPC and a full MLOps metrics dashboard.
# AnimalDetect — African Wildlife Detection Platform
> A production-ready MLOps pipeline for real-time African wildlife object detection using Flask, TensorFlow Serving, Docker, Prometheus, and Grafana, with GPU-accelerated inference via gRPC and a full MLOps observability stack.
**Tech Stack**: TensorFlow Serving • Flask • Docker • Docker Compose • Faster R-CNN ResNet50 • gRPC • Prometheus • Grafana • Python • PIL
---
## Problem Statement
Deploying machine learning models in enterprise environments requires more than just a trained model — it demands a robust, scalable, and observable serving infrastructure. This platform demonstrates a production-grade MLOps pipeline where a custom-trained Faster R-CNN ResNet50 model for African wildlife detection is served via TensorFlow Serving in a GPU-accelerated Docker container, consumed by a Flask web application through gRPC, and monitored via a real-time MLOps observability stack built with Prometheus and Grafana. The system is fully containerised using Docker Compose, enabling reproducible deployments across any environment.
---
## Key Features
- **Custom wildlife model**: Faster R-CNN ResNet50 trained on three African wildlife species
- **GPU-accelerated inference**: TensorFlow Serving runs on NVIDIA GPU via Docker with full CUDA support
- **gRPC communication**: High-performance binary protocol between Flask and TensorFlow Serving (port 8500)
- **Prometheus monitoring**: Automatically scrapes inference metrics from Flask every 15 seconds
- **Grafana dashboards**: Real-time visualisation of inference time, detection counts, and confidence scores
- **Side-by-side visualisation**: Original vs. classified image comparison with PIL-rendered bounding boxes
- **File validation**: Upload restricted to .jpg, .jpeg, .png with user-friendly error messages
- **Containerised microservices**: Four-container architecture orchestrated via Docker Compose
- **Persistent image storage**: Original and classified images saved to se …