GauSwastha, Camera-Only Cattle Health & Value Assessment

A behind-the-scenes look at how I built GauSwasth, an AI-powered cattle health system that delivers a full veterinary-style report from a single photo. From tackling tiny datasets with smart augmentation, to designing a custom bagging-based computer vision ensemble, to re-engineering deployment for scale, this is the story of turning a simple idea into a production-ready tool used daily by farmers and government clinics.

GauSwastha: From a Simple Idea to a Scalable AI for Cattle Health

It began with a deceptively simple question: Can we replace expensive sensor-based cattle monitoring with computer vision?

In the dairy industry, hardware-based health tracking often costs more than the value it brings. Farmers invest in bulky, wearable sensors, yet the insights they receive are limited. The founder of GauSwasth believed there was a better way — to recreate, through AI, the way a skilled veterinarian can look at an animal and know its condition.


The idea was elegant: one photo of the cow’s side should be enough to tell us everything from weight to udder health to disease risks.


The First Challenge: Weight Estimation


The journey began with weight estimation as a proof of concept. The original approach was technically sound — a combination of keypoint detection, segmentation, and a reference sticker of fixed size to establish scale. On paper, it worked. In practice, it fell apart.


Farmers weren’t willing to print and paste a sticker on a cow, and even if they were, the cow certainly wouldn’t stand still for it. What looked like a minor detail in a lab became a major roadblock in the field. Out of necessity, we abandoned the sticker-based scale. Instead, we pivoted to a statistical weight prediction model based on parameters we could reliably detect — breed, breed purity, body condition score, age, and other derived features.


That workaround not only kept the project alive but also gave us a lightweight, farmer-friendly way to produce a crucial health metric.


Expanding the Scope: Breed, Breed Grade, BCS, Udder Type, and Beyond

With weight estimation running, we moved on to predicting other key health parameters — many of which are listed in the reports you see in GauSwasth today.


For Body Condition Score (BCS), udder type, and other visual traits, we built a mix of object detection and segmentation-based models. In some cases, segmentation masks fed into custom neural networks to classify shapes or detect subtle anatomical variations.


The dataset, however, was painfully small — roughly 500 images. This wasn’t enough for off-the-shelf training, so we worked closely with veterinarians to label each image precisely, body part by body part, class by class. It was an iterative process: build, test, correct labels, retrain, repeat. For certain disease classifications, we fine-tuned lightweight vision models on these curated datasets, creating a domain-specific classifier that could work in the field.


The Deployment Bottleneck

By the time we had models for all the required parameters, we were running around 22 different neural networks to generate a complete report. On a GPU in local development, it worked fine. On AWS, it became a problem.


Running the models serially was too slow. Renting GPUs in the cloud was too expensive for a product that had to stay affordable for farmers. The solution came in stages. First, we fine-tuned the confidence thresholds for each model to minimize unnecessary passes. Then we introduced multiprocessing to parallelize certain predictions.


Next came a major optimization: exporting models to ONNX format, allowing us to run them efficiently on Intel CPUs without the need for a GPU at all. Finally, we re-engineered the backend to support concurrent requests and better multiprocessing, making the system responsive at scale.


Revisiting Weight Estimation


Once the pipeline was stable, I went back to the original problem: weight estimation without physical references or specialized devices.

Using monocular depth estimation models meant we could avoid relying on LiDAR sensors — not every farmer has an iPhone, and even those who do aren’t going to walk a cow through a perfectly controlled scan. We combined depth maps with pose estimation and segmentation outputs, applying geometric and calculus-based methods to arrive at a more accurate, physics-grounded weight estimate.


That part of the work is a story in itself, and I’ll be writing a separate blog post explaining exactly how it works.


What We Have Today

From an idea to replace sensors with AI, GauSwasth has become a production-ready computer vision system that runs 22+ models in harmony, processes thousands of scans a day, and delivers actionable health insights in seconds — all from a single photo.


We built it with a small dataset, augmented it intelligently, designed our own bagging-based regression ensembles, and re-engineered every stage of deployment to make it field-ready. Today, farmers and even government polyclinics in Karnataka use it daily, not as a novelty, but as a tool that saves money, improves yield, and makes preventive care possible.


The technical details of each model — and the engineering trade-offs that made this possible — deserve their own deep dive. Those will come next. For now, GauSwasth is proof that AI doesn’t just belong in labs or urban startups. It can, with enough persistence and creativity, live in the hands of farmers and quietly transform their work.