How I use "AI" to entertain my cat

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ultralytics

    NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite

  • Next, I needed to figure out, how can I access the stream, recognize an animal, then let Max know? There are tons of examples of recognizing an object via camera frames, but I ultimately found this python library called ultralytics that supports RTSP streams and classifying objects in the video frames using pre-built models. The docs looked like it would be pretty low effort, so after some experimentation, I was successful in having the ultralytics library recognize objects from my cheap camera!

  • Home Assistant

    :house_with_garden: Open source home automation that puts local control and privacy first.

  • Next, I needed to wire this up to my home speakers and play a sound familiar to Max. In the before times of not watching live animals outside, Max liked it when I'd play some bird videos on YouTube for him and they would all start with the same "chirp" sound. He knew this sound meant bird watching time. So I downloaded the video, extracted the audio, then split the chirp out into a custom 4 second .mp3 and stored it on my local Home Assistant instance which was already integrated with my Google Nest speakers. Luckily, Home Assistant's API is pretty friendly, but the docs definitely suck. Once I added the .mp3 file onto my Raspberry Pi where Home Assistant is hosted, I was able to trigger the sound to play on my speakers with this simple request to its REST API:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • cv-notifier

    Easily detect objects using computer vision and call configurable webhooks

  • Then it dawned on me. This should be a configurable open source program that can be configured to do a thing, when a camera sees a thing, but also let a user pick how frequently they want to be annoyed with bird chirp sounds in their house. I wanted to make the program very configurable because there's no way I was going to write all of this again for my next computer vision related project. So I created cv-notifier. A program that's super configurable and allows anyone to replicate what I've done so far.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts