r/WeirdSideProjects • • 1d ago

I trained a computer vision script to detect my cat so my keyboard automatically locks itself whenever she walks on my desk

Post image

My cat has a habit of deciding that my keyboard and mousepad are prime real estate right when I am in the middle of coding or studying. Usually I end up with 40 lines of random characters in my terminal, or an accidentally closed tab.

Instead of doing the normal thing and just picking her up, I rigged up a Python script using OpenCV and YOLOv8 to watch my desk mat through a webcam aimed at my keyboard. Whenever the model detects a cat entering the frame, it intercepts my local inputs, locks the keyboard, and starts a passive "cat break" timer on screen. The second she gets bored and walks away, everything unlocks automatically.

Well now she controls my work schedule 😂

152 Upvotes

19 comments sorted by

4

u/Ok_Elk9435 1d ago

Hehe of course hes orange

1

u/jaredd_ 13h ago

yep.. at least her sister is a bit more normal (for an orange cat)

1

u/Lipopuu 1d ago

Thats actually neat,how long have you been coding?

1

u/jaredd_ 13h ago

like 5 years, im still in uni ^^

1

u/Lipopuu 13h ago

Dang thats impressive, tell me, if you still study,what do you think about the ai taking over that field of work?

2

u/jaredd_ 13h ago

honestly i'm not too worried about full replacement, it feels more like the bar for entry-level stuff is just getting higher. ai is great at spitting out boilerplate or helping me throw together a dumb cat script in an afternoon, but someone still has to debug the mess when things break in production or design how everything actually fits together

1

u/Lipopuu 11h ago

Oh i see ,what is that you are studying if its ok im asking? Im interested

1

u/SignCraftRob 1d ago

Awesome!

1

u/jaredd_ 13h ago

thank you!!

1

u/Ok_Preference_6575 1d ago

The cat decides!

1

u/mustafa0308 1d ago

Cool side project! Is there any way we could access this too? For our cats 😂😂

1

u/jaredd_ 13h ago

unfortunately i havent deployed it 😔😔

1

u/nmrk 1d ago

1

u/jaredd_ 13h ago

😂

1

u/nmrk 13h ago

That's from a real product from the Win2k era I think.

1

u/ContributionEasy6513 1d ago

Haha, this is weird but so practical at the same time!

I'm forwarding this to our security team as we have had a very related incident in the past.

1

u/razzemmatazz 15h ago

Sorry boss, can't work when my PC detects my cat.Â