Projects / Computer vision
Case study · Vision AI · Behavioral science · Smart glasses

Pet Glasses

A real-time AI vision platform that reads an animal's emotional state, pain level and safety signals. Developed and trained on a PC with a webcam, it now runs on XREAL One Pro augmented-reality glasses with a Beam Pro: a mood tag floats above the pet in 3D and the glasses speak the result. A Brilliant Labs Halo version comes next.

The problem

Animals signal stress, pain and aggression in ways most people miss. Veterinary behaviorists have published rigorous coding systems for these signals, but nobody can apply them in real time while walking a dog or meeting a stranger's.

What I built

Four applications on one shared "brain". A detector on the glasses tracks the pet many times a second. Every few seconds a cloud backend runs frontier vision AI against encoded behavioral-science frameworks and returns a structured assessment.

The result

Running on the glasses: a world-anchored mood tag and ring that follow the pet, spoken results with safety warnings first, a Deep Dive panel with today's mood timeline, and switching between all four apps. Outdoor testing over cellular is under way.

4production applications
5behavioral-science frameworks
7shared core modules
32–36 fpsapp frame rate on the Beam Pro
3hardware platforms: PC → XREAL → Halo

Running on the glasses with Cabo

Photographed with a phone held behind the lens of the XREAL glasses, so the real dog and the AI overlay appear together as the wearer sees them. Click any image to see it full size.

View through the XREAL glasses: a green mood ring arcs around Cabo lying on a coffee table, with the analysis panel floating above him
Through the lens: the ring around Cabo is colored by mood (green = relaxed), and the analysis panel floats above him with needs, body-language signals and today's mood summary.
Close-up of the glasses panel reading: Needs, a short game of fetch or tug with the red ball; Signals, lying in a loose sphinx-like posture, mouth relaxed and open; today's readings, relaxed 46 percent, calm 24 percent, happy 14 percent
The assessment: it noticed the red ball in front of him and suggested a short game of fetch. Today's 37 readings: mostly relaxed and calm, no worrying moods.
Cabo lying on a round mosaic coffee table with a red ball on the floor below
The real scene: Cabo on the coffee table, with the red ball the AI picked up on just below him.
Product family

Four applications, one platform

Companion dog wellbeing

Our Dog

Ten composite emotional-state profiles drawn from tail, ear, eye, mouth and posture signals, with practical care recommendations.

Rugaas Calming Signals · AVSAB / ASPCA / AKC standards · McConnell ethology
Unfamiliar dog safety

Other Dog

A four-level safety verdict for dogs you don't know, based on aggression and bite-risk signals, with urgent spoken warnings.

4-level safety rating · priority alerts
Developmental stage

Our Puppy

Interprets puppy behavior in the context of developmental fear periods, so owners respond appropriately at critical ages.

Fear periods (8–11 wks, 6–14 mo) · IAABC puppy protocols
Feline emotion & pain

Our Cat

The most complex app, combining three frameworks. It includes cat-specific safety flags such as belly-trap risk, overstimulation bites, and open-mouth panting as a medical emergency.

CatFACS (22 action units) · Feline Grimace Scale (0–10) · EFSI ethogram
Hardware path

Train on the PC, deploy to the glasses

Each platform reuses the same knowledge bases and backend. Only the client changes.

Done
STAGE 1 · DEVELOPMENT

PC + webcam

All four apps were built, trained and tested on a Windows PC with a Logitech C920. Inputs included live camera, an Android phone stream, test image sets and recorded video, with a dual-window HUD and speech.

Where the behavioral knowledge bases were tuned
Running
STAGE 2 · SPATIAL AR

XREAL One Pro + Eye + Beam Pro

A Unity app on the Beam Pro. It detects the pet in the Eye camera feed, anchors a mood tag and ring to it in 3D, speaks results, and opens a Deep Dive panel. Brought up on hardware in October 2026.

Outdoor testing over cellular under way
Next
STAGE 3 · EVERYDAY WEAR

Brilliant Labs Halo

A lightweight client: Halo camera → phone → the same cloud backend → short text and speech. No 3D, but the same "brain" in glasses meant for all-day wear.

Starts when the Halo glasses arrive
Architecture

A fast loop on the glasses, a smart loop in the cloud

The vision AI responds every few seconds, but a tag that stays on a moving pet needs its position about ten times a second. So I split the work: a detector on the device answers "where is the pet?", and the cloud answers "how is the pet feeling?"

On the glasses
XREAL Eye camera, 1280×720YOLO pet detector on the GPURay to the floor → 3D tag position, smoothedCrop of the pet every few seconds
Cloud backend
FastAPI /analyzeSpecies knowledge bases (shared with the PC apps)Claude vision with a schema-enforced JSON responseSmoothing over recent readingsHistory database
Knowledge bases
Dog signal taxonomyCatFACSFeline Grimace ScaleEFSI ethogramSafety-verdict rules
What the wearer sees
Mood word floating above the petMood ring in mood colour"STAY BACK" safety bannerDeep Dive panel + mood timelineSpoken results, warnings first
Technical depth

For the engineers in the room

Porting to spatial AR
  • Kept the knowledge bases in Python, unchanged, behind a cloud API, rather than rewriting them in C# and ending up with two copies that drift apart
  • The API key lives only on the backend. Nothing secret ships in the glasses app, and the backend requires device tokens
  • The One Pro reports no floor planes to developers, so I added a one-tap "Set floor" calibration from eye height and placed the tag by casting a ray through the bottom of the pet's bounding box
  • Converted the Eye camera's YUV frames to RGB on the GPU; colour accuracy was checked in the editor before the hardware arrived
  • Measured on the Beam Pro: app at 32–36 fps, camera at 23–27 fps, 2.5–3 detections per second
  • Sending crops of the pet instead of full frames cuts cost and cellular data, and gives better readings
Turning research into AI behavior
  • Turned peer-reviewed coding systems into structured prompts with clinically meaningful output fields: pain score, belly-trap risk, urgent medical alert, developmental context
  • Carried those fields all the way through the system, from AI output to HUD display to speech priority
Platform problems solved
  • Replaced an unreliable text-to-speech library with direct Windows SAPI5 COM calls after diagnosing thread-affinity and stale-engine caching failures
  • Found a gap where app-specific response fields were being dropped in the shared vision client
  • Fixed environment variables overriding configuration, Python version incompatibilities, and video streams dropping over Wi-Fi
Delivery sequencing
  • Built the shared infrastructure first, then the baseline dog app, the safety variant, the developmental variant, and finally the cat app with three combined frameworks
  • Used an Android phone as an interim camera platform for real-world testing until the glasses arrived
  • Built and tested the glasses app, camera pipeline and speech in the Unity editor before the hardware arrived, so bring-up went quickly
Applying it to your business

Expert knowledge, in real time

The core pattern is encoding a professional assessment framework and applying it to live video with vision AI. It carries over directly to:

  • Veterinary, shelter and animal-welfare assessment
  • Livestock and agricultural monitoring
  • Industrial inspection and safety-behavior observation
  • Field guidance on wearable or mobile devices
Technology

Stack

PythonAnthropic Claude VisionFastAPISQLiteOpenCVUnity 6C#XREAL SDK 3.1Unity Inference EngineYOLO11nAndroid TTSXREAL One Pro + Eye + Beam ProBrilliant Labs Halo (next)

Have expert knowledge that should work in real time?

I can turn your domain framework into a working vision-AI system.

Start a conversation

← Back to all projects