UNT CS Capstone · Spring 2026

Goat grading, automated.
No more guesswork.

Hybrid cloud and edge AI for livestock management and real-time computer vision grading. Provides an easy to use, consistent, solution.

The problem
No existing standard.

Clean Chicken and Co. is a small livestock facility in Elk River, Minnesota. They process goats, lambs, and chickens for providers across their region. Their current operation runs on an outdated, difficult-to-use database system, and grading is done entirely by eye, with different associates evaluating animals and risk delivering different grading cost standards for their customers.

The grades determine what the facility pays their providers for each animal. With no reproducible criteria and no paper trail, providers have no way to understand why one animal may be worth more on a different day. It's a trust problem as much as a consistency problem, and most small facilities in the region faces the same issue.

Beef cattle don't have this issue. USDA yield grading gives cattle operations a standardized, measurement-based system that's consistent across facilities and inspectors. Nothing equivalent exists for goats and lambs. We set out to build it.

The gap

Goat and lamb grading is done by eye. Different people, different angles, different results. No measurements, no documentation, no way for providers to verify or dispute a grade.

What exists for cattle

USDA yield grades use standardized body measurements with ribeye area, fat thickness, carcass weight, to produce consistent, reproducible scores. The system works because it removes subjectivity.

What we built

Camera-based body measurement using computer vision. Three angles, automated segmentation, careful calibration, and a grade with documented reasoning. Consistent every time, hands-free, with a receipt for every animal.

The build
Our Solution.
One system manages the data. The other handles cameras and AI systems. They work together and solve real world problems.
Web platform

HerdSync

Livestock management across species. Track animals, manage providers, record grades, and run daily operations from a dashboard served through CloudFront.

  • RS256 JWT auth with JWKS discovery, asymmetric keys, no shared secrets
  • Role-based access: admins manage users, operators grade and record
  • Unified serial IDs spanning goats, lambs, and chickens
  • Provider tracking with head counts and transaction history
  • Auth-gated DB proxy, every request verified before forwarding
  • Dashboard with grade history, search, filtering by species
AI + edge hardware

Goat grading

Computer vision pipeline across a Raspberry Pi and EC2. Three camera angles, YOLO segmentation, calibrated measurements, USDA-style grade in under 5 seconds.

1
Capture
2
Upload
3
Segment
4
Grade
5
Archive
  • 3x Arducam 16MP USB cameras with pair rotation for controller limits
  • YOLO segmentation: side, top, front views with calibrated pixel-to-cm
  • MJPEG streams through Cloudflare Tunnel for facility bandwidth
  • DS18B20 thermostat solution for robust outdoor temperauture management
  • 20-frame burst capture for training data, direct to S3
  • SPI LCD showing server health, temps, cameras, WiFi
System design
Hybrid cloud + edge.
AWS runs the platform and inference. A Raspberry Pi at the facility owns cameras and sensors. Cloudflare Tunnel bridges them. GitHub Actions deploys everything.
HerdSync Architecture
Architecture diagram—see GitHub
Under the hood
Built with.

HerdSync

  • FastAPI 0.115
  • PostgreSQL 17.2
  • SQLAlchemy 2.0
  • asyncpg 0.29
  • PyJWT RS256
  • bcrypt
  • CloudFront + ALB
  • Vanilla JS

Shared infra

  • AWS EC2 t3.medium
  • RDS db.t4g.micro
  • S3 4 buckets
  • ECR 4 repos
  • Docker
  • GitHub Actions
  • Cloudflare Tunnel
  • Tailscale VPN

Goat grading

  • PyTorch 2.5 CPU
  • YOLO ultralytics
  • OpenCV
  • Raspberry Pi 4 4GB
  • Flask + gunicorn
  • Caddy
  • 3x Arducam 16MP
  • DS18B20 + GPIO