Linchakin

How to Build A Person-Following Creepy Head for Halloween with a Raspberry PiByRyder Damen Scare your friends and neighbors with a creepy mannequin he...

 October 02, 2021     No comments   

Halloween is coming, and what better way to celebrate the season than by using machine learning and a Raspberry Pi to accomplish something spooky! This year I’ve built a mannequin head that uses person detection and a simple servo motor to detect when a person is walking by and turn the head to follow them. I’m using a simple styrofoam mannequin head with some coloured in eyes from the dollar store, but you’re welcome to dress it up to fit your house’s theme or use a completely different kind of head or object. As long as you can use a servo to rotate it, the result is the same.

This project won’t require any machine learning training, and is more or less plug and play just in time for the season. Here’s how to build it.

What You’ll Need For This Project 

How To Build A Person-Following Halloween Mannequin Head for Halloween 

Before you get started, get your Raspberry Pi set up. If you haven’t done this before, see our article on how to set up a Raspberry Pi for the first time or how to do a headless Raspberry Pi install (without the keyboard and screen). For this project, we recommend a headless Raspberry Pi install.

1. Install git. We’ll need it to download the code from GitHub. 

sudo apt-get update
sudo apt-get -y install git

2. Clone the repository to your home directory. This will ensure we have all the code and audio files we need to run the project. 

cd ~/
git clone https://github.com/rydercalmdown/halloween_mannequin_head.git

3. Run the “make install” command to install all project dependencies. This script will take care of installing lower level dependencies, as well as the Python libraries you need for the project to run. This should take about 10-15 minutes on a Raspberry Pi 4 as it needs some time to install machine learning libraries and models. 

cd ~/halloween_mannequin_head/
make install

4. Choose your camera; if you’re using a Wyze V2 camera, skip to step 6. If you’re using a Raspberry Pi camera, move to step 5. Both will work, but the advantage of the Wyze camera is the ability to mount it in a different place away from your Pi (and mannequin head).

5. Connect your Raspberry Pi camera directly to the Raspberry Pi and test it with the following command. Do not set the STREAM_URI environment variable, it will by default use the Pi camera. Skip to step 8.

sudo raspistill -o test.jpeg

6. Flash the RTSP custom firmware to your Wyze Camera using these instructions. This will allow us to access the stream from the camera wirelessly with the Raspberry Pi. This will only work with a Wyze V2 camera.

7. Get the RTSP URL value from your Wyze application, and edit the STREAM_URI variable in the Makefile to point the Raspberry Pi to your camera. You can find the RTSP URL in the “Advanced Settings” section of your Wyze application on your phone. 

nano Makefile
# Only edit this if you’re using a RTSP camera; leave blank if you’re using a Pi camera
STREAM_URI=rtsp://username:password@camera_ip_address/live

8. Hot glue your servo motor to a base piece of wood, or directly to the place you intend on mounting the mannequin head. I drilled out a small piece of wood to use as my base and fit the motor inside. 

Image 1 of 2

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)
Image 2 of 2

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

9. Hot glue the servo bracket with the motor to the base of the mannequin head. I used a small piece of wood to reinforce the connection, but depending on yours you might not need one. Make sure the bracket can still connect to the motor.

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

10. Using jumper cables attach the 5V and ground pins of the servo motor to Raspberry Pi pins #4 and #6 respectively.

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

11. Using a jumper cable, attach the data pin of the servo motor to board pin #3 on the Raspberry Pi. This pin allows control of the servo motor by the Pi directly.

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

12. Using the bracket, connect the mannequin head so it sits on top of the servo motor and mount the device and camera in your desired location.

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

13. Use the make run command to test the system. Step into frame of the camera and move left to right to have the servo turn. 

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

14. Adjust the mannequin head on the servo by lifting it and recentering it to calibrate it to follow you properly.

Halloween Mannequin Head - Raspberry Pi

(Image credit: Tom's Hardware)

15. Buy your trick or treat candy and get it ready for halloween.

Adblock test (Why?)


You may be interested in:
>> Is a Chromebook worth replacing a Windows laptop?
>> Find out in detail the outstanding features of Google Pixel 4a
>> Top 7 best earbuds you should not miss

Related Posts:
>> Recognizing 12 Basic Body Shapes To Choose Better Clothes
>>Ranking the 10 most used smart technology devices
>> Top 5+ Best E-readers: Compact & Convenient Pen
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • JAPAN WINTER 2017: NAGOYA, TAKAYAMA, KANAZAWAFirst part of my Japan winter trip -> HEREContinuing my Japan winter travel series and this time I am taking you to tour more of what Nagoya, Takay… Read More
  • SENSORY LAB INDONESIA - MAL KELAPA GADINGBrought to you by the friends from Common Grounds and St. Ali: SENSORY LAB all the way from the land of kangaroo and coffee: AUSTRALIA (STRAYA!), yet … Read More
  • (Japan Oct 2016) Day 5: Visit Kurashiki. Stay OkayamaDay 5 (4 Oct 2016): Arima onsen to Okayama. Visit Kurashiki. Stay Okayama.In the morning of this day, we took a train (with a few transfers along the … Read More
  • KAUM JAKARTA (AND A LITTLE PEEK OF KAUM BALI SEMINYAK)I celebrated my birthday last year in Bali and stayed at the fabulous Katamama, back then they were doing the construction of an Indonesian restaurant… Read More
  • ANIMO BAKERY CIPETEJust got back from a brief coffee date at ANIMO Bread Culture Cipete with my best friends and I don't know, I just want to do a short entry about this… Read More
Newer Post Older Post Home

0 Comments:

Post a Comment


Copyright © 2025 Linchakin | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates