Real-time cattle detection and movement prediction system for Sudan using YOLOv8, sklearn, and ML models
# Sudan Livestock Tracker 🐄
Real-time cattle detection and movement prediction system for Sudan using computer vision and machine learning.
## 🌟 Features
- **Cattle Detection**: YOLOv8-based cow detection from satellite/aerial imagery
- **Movement Risk Prediction**: Predicts movement risk based on environmental factors (NDVI, water distance)
- **Path Prediction**: Forecasts where cattle will move over 6-24 hours
- **Interactive Map**: Real-time visualization with Leaflet.js
- **REST API**: Complete FastAPI backend with prediction endpoints
## 🚀 Quick Start
```bash
# Install dependencies
cd backend && pip install -r requirements.txt
# Start API server
python app.py
# Open frontend
open cow-tracker.html
```
Server runs at: `
localhost`
## 📊 Models
1. **YOLOv8 Detector** - Finds cows in images
2. **Risk Predictor** - Predicts movement risk (sklearn)
3. **Path Predictor** - Forecasts future positions (trained in 2.5s!)
## 🧪 Test
```bash
python backend/test_complete_pipeline.py
```
## 📡 API
- `GET /health` - Health check
- `POST /api/movement-risk` - Predict risk
- `POST /api/predict` - Predict paths
- `GET /docs` - Interactive API docs
See full documentation for details.
---
**Status**: Production Ready ✅