How shyaamsundar2310422/livestock_health_ai works
This is a Streamlit livestock-health application combining cattle image screening and explainability with animal digital-twin records, telemetry, and risk scoring. The main user workflow is to select an animal, submit an image for a model prediction, optionally inspect a Grad-CAM explanation, and view the animal’s recorded health and risk state. The repository also includes DMI prediction and feed inventory/procurement functionality. Some app and domain source is excerpted only partially; links for unsampled or unverified behavior are omitted.
Main entry points: app.py Streamlit App · digital_twin.py Twin State · database.py SQLite Persistence · model.py Image Inference
Components 15
Health Screening
- Streamlit App
app.py - Image Inference
src/model.py - Grad-CAM
src/gradcam.py
Animal Digital Twins
- Twin Views
app.py - Twin State
src/digital_twin.py - Risk Assessment
src/digital_twin.py
Nutrition and Supply
- DMI Interface
app.py - DMI Prediction
src/dmi_model.py - Feed Inventory
src/feed_inventory.py - Feed Demand
src/feed_demand.py - Feed Shortage
src/feed_shortage.py - Procurement Planning
src/procurement_optimizer.py
Shared Services
- SQLite Persistence
src/database.py - Model and Data Config
src/config.py
Other components
- Farm User
Connections 18
- Farm User → Streamlit App: uses
README.md - Streamlit App → Image Inference: runs inference
app.py - Streamlit App → Grad-CAM: requests heatmaps
app.py - Grad-CAM → Image Inference: loads model
src/gradcam.py - Image Inference → Model and Data Config: reads settings
src/model.py - Streamlit App → Twin Views: renders twin views
app.py - Streamlit App → Twin State: loads twin state
app.py - Streamlit App → Risk Assessment: shows risk factors
app.py - Twin State → SQLite Persistence: reads records
src/digital_twin.py - Twin State → SQLite Persistence: persists observations
src/digital_twin.py - Risk Assessment → Twin State: scores twin data
README.md - SQLite Persistence → Model and Data Config: uses paths
src/database.py - Streamlit App → DMI Prediction: uses DMI model
app.py - DMI Prediction → Model and Data Config: reads configuration
src/dmi_model.py - Streamlit App → Feed Inventory: uses inventory
app.py - Streamlit App → Procurement Planning: uses optimizer
app.py - Procurement Planning → Feed Inventory: validates items
src/procurement_optimizer.py - SQLite Persistence → Feed Inventory: references inventory logic
src/database.py