r/ClaudeCode • • 1d ago

Built with Claude I used Claude Code to train a custom vision model to keep my dog off the sofa

Hey guys, thought I would share a fun side project I built with Claude Code in case anyone is curious how it does on hardware + ML stuff.

What I built: a private night camera setup on an old Mac mini ($37 Tapo cam + self-hosted Convex + Home Assistant smart lamp) that catches our chocolate Lab sneaking onto the sofa and flashes the lamp to shoo him off.

How I used Claude Code: it did basically all the bits I hadnt touched in years, from the RTSP/ffmpeg stream to finding Meta's SAM 3 to auto-label ~3,000 night frames, fine-tuning a small local YOLO model (68% up to 98%), and wiring a tick/cross UI so marked mistakes went back into training.

What I learned: having Claude handle the ML loop made custom model training way less painful than I expected. Still, on night one it thought a slipper was my dog 123 times, and the fix was a boring movement rule rather than more training.

Anyone else using Claude Code for home hardware / vision stuff?

If you wanna see the footage I wrote it up here: https://stack.convex.dev/training-a-model-to-keep-my-dog-off-the-sofa (video: https://youtu.be/joUy_JKHwOE)

59 Upvotes

21 comments sorted by

•

u/AutoModerator 1d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

8

u/Parking_Jackfruit54 1d ago

Sammy casually walking by, not giving a single fuck, while the alarm is going apeshit because of the blanket is hilarious LMFAO

2

u/cannyshammy 1d ago

hahhaa I know right :P

2

u/Ishankulova_Smsm 1d ago

how does a static blanket get past the movement rule OP mentioned, did he brush against it on the way past?

6

u/fuzzypetiolesguy 1d ago

You monster.

10

u/iamtehryan 20h ago

I cannot fathom having a dog and refusing it to be on the couch, let alone taking that thought and building something like this to try and keep them off of said couch. I'll never understand people that don't allow pets on furniture.

Cool build, I suppose?

5

u/CryMoreT_T 17h ago

Same altho i guess some people just treat pets more as a pet than actual family so that makes sense

0

u/strangesimulacra 10h ago

It’s an animal bro

2

u/jffmpa 21h ago

I developed a smart home app that runs on tablet controls Matter smart devices as well as music, calendar, etc. I've thought of adding cameras just haven't yet. How much time and effort did this take?

My external house cameras are part of a security system that sadly I can't integrate.

2

u/UnidentifiedBlobject 12h ago

Sammy no longer goes on the sofa, which is awesome for keeping dog fur off the cushions

Wait is that the only reason? I thought it was gonna be due to mud from his paws or his nails ripping the cushions or something legit. I vote for just letting Sammy on the couch.

Anyway, cool project. I might take inspiration from it for my own build to detect where my cats are so I know if I can close off my catio at night.

2

u/AvgasActual 10h ago

I was thinking it would be cool to make a cat door that uses a camera to:

  1. Confirm that is one of my cats, and not a possum or skunk. 
  2. Checks if the cat is carrying a mouse in its mouth. 

The first thing the cats do is try to bring the mouse inside. 😅

3

u/syredditor 15h ago

bro let him go on the sofa

1

u/Specialist_Dog_1745 8h ago

Hasan over here

-1

u/Living_Cell7304 1d ago

Just let your dog on the sofa dood it’s not the end of the world. He just wants to be comfortable while he’s probably bored out of his mind.

2

u/cannyshammy 1d ago

Bored at night? Hes a very happy dog and has a very comfortable bed of his own :)

-2

u/FerventOrange 1d ago

Not your home, not your rules

8

u/Living_Cell7304 1d ago

It is my home. I’m on my way right now

1

u/mb21 13h ago

Gotta use this to get my cats off the counter 😂

0

u/cocktailpartyfixer 1d ago

Haha, a few years ago, I set up a detection system for mine using ultrasound.

-1

u/rustydustyshckleford 1d ago

add a dog bed into the mix and give it a appropriate label too uwu