Zombie Mirror is a project created by Ben Rush and Josh Brown Kramer for Halloween 2019. Look into the Zombie Mirror, wait for it to find your face, and ... POOF! ... you're a Zombie. It's a lot of fun at parties.
Behind the scenes, Zombie Mirror consists of a monitor or TV connected to a Raspberry Pi running a program that finds faces. If it finds one, it sends it up to DeepGrave.me (also created by Josh and Ben) which uses a type of deep neural network called a CycleGAN to zombify the face.
This is the repo for the Raspberry Pi side of the Zombie Mirror project. If you would like to create your own, follow the instructions below to set up the Raspberry Pi, and see the Instructables page for the rest.
The following will be part of the final build.
- Raspberry Pi. Note, this build has been tested on a Rasberry Pi 3 Model B+, but it will likely work with other configurations.
- Raspberry Pi Camera Module or a web cam. We've tested with the Camera Module V2.
- Power supply. Must be 5V, at least 2.5Amps, and end in Micro USB.
- MicroSD Card.
- HDMI Cable
- A monitor or TV that supports HDMI
While setting up, you'll also want
- A USB Keyboard
- A USB Mouse.
- An SD Card Reader
- Follow the instructions from raspberrypi.org to get your Pi up and running.
- Follow the instructions from raspberrypi.org to set up the Raspberry Pi Camera Module. Or plug in your USB web cam.
- Open a terminal.
- Clone this repo.
git clone https://github.com/jbrownkramer/zombiemirror/
- Navigate to the repo.
cd zombiemirror
- Follow these instructions to install opencv.
- Install required pacakages.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libjpeg-dev
pip3 install -r requirements.txt
- Test.
python3 ui.py
- Press q to exit.
-
Open a root terminal in raspberry Pi.
-
Open "lightdm.conf" file located in,
/etc/lightdm/lightdm.conf
-
Add the following line to the
Seat:*
section.[Seat:*]
xserver-command=X -s 0 -dpms
Source: https://raspberrypi.stackexchange.com/questions/4773/raspberry-pi-sleep-mode-how-to-avoid
You may need to change some things if your setup isn't exactly like the one described in the Instructables. Here is an example of all the optional configs. Details of each configuration appear below.
python3 ui.py --cameraorientation 180 --displayorientation 270 --mirrored False --minfacesize 128 --zombietime 5 --fontsize 128 --cameraresolution 1280x720 --webtimeout 6
--cameraorientation
. Use this argument to indicate how the camera is oriented. Default is 180.
--cameraorientation 0 |
--cameraorientation 90 |
--cameraorientation 180 |
--cameraorientation 270 |
--displayorientation
. Use this argument to indicate how the monitor/TV is oriented. Default is 270.
--displayorientation 0 |
--displayorientation 90 |
--displayorientation 180 |
--displayorientation 270 |
--mirrored
. Configure True if unaltered image from the camera is mirrored. Default is False.--minfacesize
. Set this smaller if the mirror tells you to move closer but you're already close. Default is 128.--zombietime
. Amount of time, in seconds, to display the zombie image. Default is 5.--fontsize
. How large the font is. Default is 128.--cameraresolution
. Desired camera resolution. Set it smaller if you want the framerate to be higher. Default is "1280x720".--webtimeout
. Time in seconds to wait for zombie image before timing out. Default is 6.