Inspiration

This project was inspired by my love for cats and the telegram channel 'cats of smu'. I thought it would be cool to be able to keep track of community cats around the campus through something like a Pokédex for real cats.

What it does

Catdex lets you catch the cats you meet with your phone camera:

  • Detects the cat in each photo and rejects dogs, group shots and blurry images
  • Files it into one of nine coat pages, such as tabby, calico or tuxedo
  • Recognises individual cats it has seen before, and asks you when it isn't sure
  • Creates a trading card for each new cat, with an AI-written personality, stats and lore
  • Tracks your collection with sighting histories, badges and stats

How I built it

I built Catdex solo in Python, using only pretrained models and no custom training:

  • YOLO11 for cat detection, with OpenCV for blur checks
  • CLIP for zero-shot coat classification, refined with hand-labelled examples
  • A pet re-identification model that creates a "fingerprint" for each cat, compared against the database
  • Claude Haiku 4.5 with structured outputs for personalities, and Pillow to draw the cards
  • Gradio for a phone-first web app with custom CSS and JavaScript

Challenges I ran into

  • Coat accuracy: zero-shot CLIP often confused similar patterns. I wrote a labelling rulebook, built dev/test splits and added few-shot examples, which improved results noticeably.
  • Black cats: they were rarely classified correctly, and the blur check wrongly rejected dark photos. Adding contrast stretching before the blur check, plus better prompts and examples, made dark cats much more reliable.

Accomplishments that I'm proud of

  • A working end-to-end pipeline, from photo to trading card, in a single app
  • A polished, cute interface with a cat-ball capture button, card reveals, badges and a collection view

What I learned

How to combine pretrained vision models and an LLM into one product, and how to evaluate them honestly rather than trusting a good demo.

What's next for Catdex

  • Online hosting on Hugging Face Spaces with persistent storage, so anyone can use it
  • A community Catdex: shared records of neighbourhood cats that could help caretakers and cat welfare groups
  • LLM design for my cards: a new, fresh & more customised Pokémon card for each cat instead of the current that follows a design template

Built With

Share this project:

Updates

Submission history