How sharvan-m/goat_precision_livestock works
GoatVision is a livestock vision and biometrics dashboard: users upload images or video, then receive goat detections, tracking and view-quality-gated weight estimates, or ocular FAMACHA anemia results. The backend API coordinates these domain stages, while dedicated services implement anemia scoring and weight-analysis steps. The README also documents herd analytics and CSV/Excel auditing. The main API and video-processing excerpts show orchestration; some frontend-to-backend links and unsampled capabilities are documented or indicated by the tree, so uncertain links are omitted or dashed.
Main entry points: main.py FastAPI gateway · video_processor.py Video processor · anemia_pipeline.py Anemia pipeline · regression_models.py Weight regression
Components 24
Dashboard
- Media upload
components/UploadDropzone.tsx - Image analysis
app/analyze/page.tsx - Goat detection
app/detect/page.tsx - Anemia screening
app/anemia/page.tsx - Tracking view
app/tracking/page.tsx - Records view
app/records/page.tsx - Herd analytics
frontend/app/analytics/page.tsx
API & health screening
- FastAPI gateway
backend/main.py - Video analysis route
backend/routes/video_analysis.py - Anemia pipeline
backend/services/anemia_pipeline.py - Conjunctiva detection
backend/services/conjunctiva_roboflow.py - FAMACHA colorimetry
backend/services/famacha_colorimeter.py
Weight vision
- Video analyzer
goat_video_analyzer.py - Video processor
goat_weight_system/video_processor.py - Goat detector
goat_weight_system/detector.py - View-quality gate
goat_weight_system/view_evaluator.py - Morphology measures
goat_weight_system/measurement_extractor.py - Weight regression
goat_weight_system/regression_models.py - Animal tracking
goat_weight_system/tracker.py - ByteTrack system
goat_weight_system/bytetrack_system.py
Herd records
- Analysis logging
goat_weight_system/data_logger.py - Weight dataset
goat_weight_system/dataset_manager.py
Other components
- Livestock user
- Roboflow service
Connections 28
- Livestock user → Media upload: uploads media
components/UploadDropzone.tsx - Image analysis → Media upload: selects file
app/analyze/page.tsx - Goat detection → Media upload: selects file
app/detect/page.tsx - Image analysis → FastAPI gateway: submits analysis
- Goat detection → FastAPI gateway: posts detection
app/detect/page.tsx - Anemia screening → FastAPI gateway: requests screening
- FastAPI gateway → Video analysis route: routes video
- Video analysis route → Video analyzer: calls analyzer
backend/routes/video_analysis.py - FastAPI gateway → Goat detector: uses detection
backend/main.py - FastAPI gateway → View-quality gate: evaluates view
backend/main.py - FastAPI gateway → Morphology measures: extracts features
backend/main.py - FastAPI gateway → Weight regression: predicts weight
backend/main.py - FastAPI gateway → Anemia pipeline: runs screening
backend/main.py - Anemia pipeline → Conjunctiva detection: gets predictions
backend/services/anemia_pipeline.py - Anemia pipeline → FAMACHA colorimetry: scores color
backend/services/anemia_pipeline.py - Conjunctiva detection → Roboflow service: queries model
- Video processor → Goat detector: detects goats
goat_weight_system/video_processor.py - Video processor → View-quality gate: scores views
goat_weight_system/video_processor.py - Video processor → Morphology measures: extracts measures
goat_weight_system/video_processor.py - Video processor → Weight regression: predicts weight
goat_weight_system/video_processor.py - Video processor → Animal tracking: tracks IDs
goat_weight_system/video_processor.py - Animal tracking → Goat detector: uses detections
goat_weight_system/tracker.py - Video processor → Analysis logging: logs results
goat_weight_system/video_processor.py - Weight regression → Weight dataset: loads data
goat_weight_system/regression_models.py - Tracking view → FastAPI gateway: requests telemetry
- Records view → Analysis logging: views history
- Herd analytics → Analysis logging: summarizes herd
- ByteTrack system → Animal tracking: provides tracking