Project Description

For this Hackweek, I want to focus on building a small application around Raspberry PI, motion-sensors and video capture.
It will use the motion sensor to trigger a clip recording (maybe a 10s clip) that will be uploaded to some kind of storage (probably Cloudinary).

Motivation:

I have many kinds of birds coming to my window for food and water. I wanted to have a way to be able to see them even when I'm not around and to be sure that I don't miss the fun :P
The initial idea was to build it around Node.js since JS is my primary programming language but this might be a good time to learn and use Python since it is meant to be used for this kind of things.

Goal for this Hackweek

Have a public repository with the application that can be used as a DIY starting point.
If the time allows:
- Create a public space to visualize the clips
- Use a pre-trained ML model to tag and categorize the birds species

Resources

All the code will be made available here https://github.com/en3sis/pi-watcher

Hardware:

  • https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
  • https://www.elektor.com/hc-sr501-pir-motion-sensor-module
  • Logitech 720p webcam

Looking for hackers with the skills:

raspberrypi mobilenet ml api

This project is part of:

Hack Week 20

Activity

  • over 3 years ago: dancermak liked this project.
  • over 3 years ago: equill liked this project.
  • over 3 years ago: scuescu started this project.
  • over 3 years ago: kwwii liked this project.
  • over 3 years ago: scuescu added keyword "raspberrypi" to this project.
  • over 3 years ago: scuescu added keyword "mobilenet" to this project.
  • over 3 years ago: scuescu added keyword "ml" to this project.
  • over 3 years ago: scuescu added keyword "api" to this project.
  • over 3 years ago: scuescu originated this project.

  • Comments

    • scuescu
      over 3 years ago by scuescu | Reply

      Day 1 update

      As for the first day, I prepared all the hardware (pi, motion-sensor) and start looking into how to get them to work together in Python. After a lot of work and tweaks, I managed to have the sensor triggering on movement and send the signal to the PI. The first part of the code (for the motion) is available at https://github.com/en3sis/pi-watcher

      progress-day1

      Day 2

      For today I want to get the video recording part ready. For that, I'm looking into OpenCV (probably a little bit overkill but could work as a base for features :P )

    • scuescu
      over 3 years ago by scuescu | Reply

      Day 3

      Yesterday I finished the clip recording part, now a ~10s clip will trigger when motion is detected.

      The plans for today are:
      - Upload the clip to Cloudinary
      - Improve the clip recording part
      - Set a cooldown of X time after a recording starts.

      The latest code was uploaded to https://github.com/en3sis/pi-watcher

    • scuescu
      over 3 years ago by scuescu | Reply

      Day 4

      Yesterday I finished the uploading part and some other improvements plus, a static website where we can preview the uploaded clips. A first demo can be found at https://serverless-en3sis.vercel.app/ with our first Rock-Start add-emoji

      An issue I ran into is that the motion sensor won't trigger if the target is behind the window (it's an infrared motion-sensor, the more you learn... :P ). Since I already started to build the video recording part around OpenCV, I'm now looking into using Object Motion detection.

      Plans for today:
      - Have an Object Detection system with OpenCV
      - If I'm done early, bring Pytorch and look for an ML model that can help me label the bird's species.
      - Improve the preview application (?)

    • scuescu
      over 3 years ago by scuescu | Reply

      Day 5:

      Yesterday I had to implement the motion-detection with OpenCV, I ran into some issues but after all, I could finish it and now I have a solid application (with a looooooot of room for improvements :P ).
      To wrap it up, today I'll focus on the preview space and whatever time I have left for improvements. I have a long list of improvements that I want to take care of.
      Some new clips can be found at https://serverless-en3sis.vercel.app/

    Similar Projects

    This project is one of its kind!