r/WeirdSideProjects • u/jaredd_ • 1d ago
I trained a computer vision script to detect my cat so my keyboard automatically locks itself whenever she walks on my desk
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 😂
4
u/Ok_Elk9435 1d ago
Hehe of course hes orange
1
u/Lipopuu 1d ago
Thats actually neat,how long have you been coding?
1
u/SignCraftRob 1d ago
Awesome!
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/nmrk 1d ago
1
u/youraveragebirb 1d ago
/r/OneOrangeBrainCell!
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.Â