This repository implements a complete Animal Re-Identification (ReID) system for Tiger and Deer, integrating:
- YOLOv11 (Ultralytics) — Fast object detection
- MegaDetector v5a.0.0 — Wildlife-focused detection
- Deep CNN feature extraction (ResNet)
- Pattern feature extraction (LBP + Color Histogram)
- Combined feature embedding
- FAISS similarity search
- SVM classifier for ReID
- Incremental learning (auto-add new animals)
- Top-1 best match retrieval with visualization
The system automatically detects animals, extracts deep + pattern features, stores them in a FAISS index, and retrieves the best match in real-time.
This project supports dual detector mode:
- Specialized for wildlife detection
- More robust in forest/camera-trap environments
- Detects broad categories:
"animal","human","vehicle"
- Very fast
- Detects more specific species (tiger/deer) from training data
- Used when MegaDetector is unavailable or disabled
The pipeline attempts:
- Load MegaDetector → use if available
- Else fallback to YOLOv11
Both models are fully integrated into the detection process.