TooZ Family sELFie Station
A vacation that turned into a holiday-based Raspberry Pi photo booth.

Background
This one started on a summer road trip to The Inn at Christmas Place hotel in Pigeon Forge, TN (which, if
you haven’t been, is exactly as awesome as it sounds). They had a selfie station in the lobby that was constantly drawing kids in to take a custom photo with an overlaid elf hat (my kids included). We snapped a pic, and Michelle looked at me and said “we need one;” and the project went straight onto the never-ending TODO list. But unlike some of the other projects, this one started to take shape before the vacation even ended!
From the outside the idea looks simple: walk up, press a button, get a photo with a Santa hat or witch hat on your head, scan a QR code, and you’re done. The execution is where it gets interesting.
I started with PiBooth, an open-source photo booth framework built for the Raspberry Pi. It worked, and it got me maybe 70% of the way there. But the last 30% is where things started to fall apart. Plugins didn’t quite behave the way I needed, timing between capture and display felt off, and every new feature I wanted to add meant working around the framework instead of building on top of it.
This turned into one of those projects where I kept saying “I’ll just tweak this one thing,” and then a week later I was rewriting everything from scratch.
This is that rewrite. It’s doing a lot more than I was originally planning for, but that’s kind of how these builds go.


Goals
Rather than copying the hotel’s approach directly, we wanted something that fit our display, could handle cold outdoor evenings, didn’t require anyone to navigate a touchscreen, and let people get their photos easily. That narrowed it down to a short list of must-haves:
- Simple, family-proof operation: two big illuminated buttons instead of a touchscreen that needs to survive weather and mittens.
- Pictures that work at night: a dedicated light for the photo zone, rather than hoping the yard display happens to illuminate everyone.
- Easy photo pickup: upload to Google Drive and let guests scan a QR code, with no phone number, account, or typing required.
- Seasonal theming: Christmas and Halloween frames, accessories, and attract screens that belong with the display.
The Hardware
The whole system runs on a Raspberry Pi 4B. I already had one sitting on the workbench from another project, so it became the natural choice. It’s definitely overkill for simply snapping pictures, but it turns out to be the right kind of overkill here. Between Picamera2, OpenCV, dlib, Wi-Fi, and the GPIO-controlled buttons and lighting, there’s a fair bit going on behind the screen. The important thing is that guests don’t need to know any of that. They just want to press the glowing button and look ridiculous in antlers.
The enclosure is a Bud Industries PN-1343-AC polycarbonate box. I wanted something that looked intentional rather than “temporary project box duct-taped to a post.” Polycarbonate is durable, easy to drill and cut, and weathers well. Everything but the relay, external light, and lit buttons is housed in the enclosure (i.e. the display, buttons, camera ribbon, and power).
| Part | Notes |
|---|---|
| Raspberry Pi 4B (4GB) | The brains. The Pi handles the camera, preview, image processing, and uploads. |
| Pi Camera Module 3 Wide | 12MP Sony IMX708 sensor. The Wide variant is important for groups and side-by-side families. |
| 10.1″ HDMI display (1024×600) | The screen guests look at. Weather-resistant enclosure or cover required for outdoor use. |
| Bud Industries PN-1343-AC enclosure | Polycarbonate project box. Sturdy, clean-looking, easy to modify. |
| START + NEXT illuminated buttons | Two momentary pushbuttons. Big and lit so guests can actually find them. START begins the sequence or resets to intro; NEXT cycles through results. |
| 2-channel optocoupled relay module | Switches the photo-zone lighting under software control. Teyleten 3.3V Songle relay works well here. |
| 256GB microSD | OS card. Working photos and pending uploads are saved under /opt/selfieStation/data. The durable queue helps protect files against interrupted transfers, but it does not make the SD card immune to power loss. A smaller card can work, depending on photo volume. |
| 5V / 5A USB power supply | Don’t cheap out. Camera + display + processing under load draws more than you’d think. |

3D Printed Parts
I designed three 3D printed parts for this build, and I’ve listed the STL files in the Downloads section so I can add the links when they’re ready.
The first two parts work together as a single visual treatment for the screen and camera area. The bezel mounts on the inside of the enclosure against the clear acrylic front window. It holds the Camera Module 3 Wide and the LCD screen in a fixed alignment, keeps the lens centered, and blocks glare from the side illumination bouncing around inside the box. The matching set of side baffles are thin black panels that block the viewing angles into the enclosure from the sides. Together they solve a cosmetic problem: the acrylic window looked nice from the front, but at certain angles you could see straight through to the circuit boards and wiring. Not a great look. The bezel and baffles clean that up, and the camera mounts through a hole below the screen with all the wiring running behind everything out of sight.
Between the two of them, the station went from looking like a Pi taped in a box to something that looks (mostly) purpose-built and finished.
The third printed part is a mount for the top of a 4×4 PVC post cover that holds the 120V AC lawn spotlight used for the photo-zone lighting. More on that in the Lighting section below.
The Lighting
The relay-controlled lighting is less about decoration and more about making the pictures actually work. The software turns the light on when the preview and countdown start, keeps it on through capture, and turns it off during processing and review.
That sounds minor, but it matters a lot. The yard display provides plenty of ambient light, but not always where you need it. A dedicated spotlight during the photo sequence gives the camera a consistent exposure and the face detector a better chance of finding everybody, instead of trying to make sense of faces illuminated by eight different colors of Christmas lights.
For the light itself I used a 120V AC lawn spotlight mounted on a 3D printed bracket that sits on top of a 4×4 PVC post cover (the same kind of post cover you’d use for a mailbox or fence post). It aims the beam directly at the photo zone from above. I’ve listed the STL alongside the other printed pieces in Downloads. It’s a simple part but it keeps the spotlight aimed correctly and stops it from rotating or drooping over a season of outdoor use.
BCM 22 on the Pi controls the relay input; the relay switches the spotlight circuit. That keeps the Pi GPIO away from the mains wiring, provided the relay and power wiring are installed correctly. There is still 120V AC inside the switching hardware, so this is not the part to improvise.
The Camera
I started with the standard Raspberry Pi Camera Module 3 (same sensor, same autofocus system, just the normal field of view). This quickly became an issue with framing. With families crowding in together, the standard FOV was too tight: tall people would get clipped, wide groups might have to step back into the street to fit, etc. Not great.
Switching to the Camera Module 3 Wide solved that. The wider field of view lets groups fit without retreating, and the autofocus is more reliable when it isn’t being forced to the extreme near edge of its range. The Wide variant uses the same Sony IMX708 sensor and the same phase-detection autofocus system, so everything else about the software side stayed the same.
But there was still a focus problem, and it turned out to be partly mechanical.
The Autofocus Rabbit Hole
Even after switching to the Wide, focus still wasn’t solved. And this is where it gets a little embarrassing,

because I spent over a week chasing what I thought was a software problem that turned out to be half mechanical.
The mechanical issue took the longest to find: the camera PCB was mounted flush against the inside of the enclosure’s acrylic window. The tiny movements the Camera Module 3’s autofocus actuator makes were bumping directly into the glass and disturbing the camera’s focus. Not visible to the eye, but enough to throw focus off at the moment of capture.
The fix for the mechanical problem was simple once I found it: a few rubber washers between the camera PCB and the bezel, so the camera has a few millimeters of breathing room and isn’t physically coupled to the enclosure. If you’re mounting this camera behind glass or acrylic, don’t skip that step.
The software fix was switching to fixed manual focus entirely. The lens is set to 0.75 dioptres (roughly 1.3 meters), which covers multiple people standing at a normal selfie-taking distance. That position is locked in at startup and re-forced right before every capture, because the preview and still-capture paths do not always behave like one continuous camera operation. Not as elegant as “let autofocus figure it out,” but dramatically more predictable for a kiosk where people are standing in roughly the same spot every time.
0.75 puts sharp focus at about 1.3m, good for most selfie scenarios. Set MF_ENABLE = True and tune MF_OVERRIDE_POS for your specific photo zone distance.The Software
The station now runs through a main Python program, selfieStation.py, with the more complicated pieces split into a few supporting modules. I still use Picamera2 for the camera, OpenCV for the live display, and Pillow for assembling the finished pictures. The accessory positioning lives in accessory_processor.py, with its tunable values in accessory_settings.py. Uploading has its own upload_spool.py module. It started as one script; there were eventually enough moving parts that pretending otherwise was no longer helping anybody.
The overall structure is a finite state machine; the program is always in a particular stage, and button presses or timeouts move it along:
Where each stage is responsible for:
- INTRO: the attract screen, waiting for someone to press a button.
- INSTRUCTIONS: explains what to do and returns to the start after 60 seconds of inactivity.
- PREVIEW: a mirrored live view, a five-second countdown, and the actual capture (followed by a quick flash to confirm it happened).
- PROCESSING: the original gets its seasonal frame, the software tries the two accessory styles, and the resulting files are staged for upload while the screen shows its sparkly processing animation.
- REVIEW: the finished pictures appear one at a time with a QR code when the corresponding Google Drive link is ready. NEXT cycles through the available results; START returns to the beginning.
Getting the timing right took a lot of iteration. Early versions blocked the screen while doing the expensive work, which made the thing look broken even when it was behaving perfectly. Moving processing to a worker thread let the animation keep going. More recently I had to put a firm limit on how long the station waits for guest-facing uploads. A slow connection shouldn’t leave a family staring at “processing” for the rest of the night.
The less glamorous pieces matter too: debounced buttons, a 1.5-second START long-press to return to the intro, rotating logs, disk checks, and systemd restart support. The upload queue lives separately from routine photo cleanup, so an unconfirmed transfer isn’t discarded just because it has been waiting a while.
One detail worth calling out specifically: the live preview is mirrored. Without that, when guests move to their right, they see themselves move to their left, which gets confusing fast (especially for kids). The frame artwork has to be mirrored with the preview too. The actual saved photograph is not mirrored, so it looks normal when you download it. It sounds like a tiny distinction until you watch a child try to move into the correct part of the frame.
Switching themes is just a command-line flag:
python3 selfieStation.py --theme christmas python3 selfieStation.py --theme halloween


The Frames and Accessories: What Makes It Feel Finished


Each theme has two accessory styles plus an undecorated, framed original. Christmas gets a Santa hat and reindeer antlers; Halloween gets a witch hat and cat ears. Guests cycle through the versions with NEXT and download whichever they like. The original always exists, but an accessory version only appears if the software manages to put that accessory on at least one face.




The current version uses dlib to detect faces and a five-point landmark model to estimate eye position and head tilt. The accessory code then works out a sensible place and size for the artwork. Christmas hats and antlers even have separate attachment points, because a floppy Santa hat and a pair of reindeer antlers don’t exactly sit on your head the same way.
The first season used MediaPipe Face Mesh. That got the project off the ground, but groups were a lot more troublesome than a single person standing in front of the camera. The move to dlib for Halloween 2026 turned into a much bigger tune-up of the whole placement process. MediaPipe can still be enabled as an optional refinement in the code, but it is not what the current configuration uses.
The tricky part is groups. Rather than blindly sticking a hat wherever the face detector suggests, the code tries a limited set of sizes, positions, and rotations while protecting the eyes, nose, and mouth of other people in the picture. If a placement would cover someone else’s face, it tries another. If none look acceptable, it skips that accessory for that person. A missing hat is better than putting one across Grandma’s eyes. If the detector finds nobody at all, guests still get the original framed photograph. Fail gracefully, always.
Landmarks aren’t always trustworthy, so the software can fall back to simpler face-box placement. Detecting faces before adding the decorative frame also keeps the artwork out of the detection math.
A session can produce up to three guest-facing JPEGs (the filenames also include a unique capture suffix so two sessions don’t overwrite each other):
toozFamilyChristmas_YYYYMMDD_HHMMSS_UNIQUE_0.jpg # Framed original, always toozFamilyChristmas_YYYYMMDD_HHMMSS_UNIQUE_1.jpg # Style 1, if placed toozFamilyChristmas_YYYYMMDD_HHMMSS_UNIQUE_2.jpg # Style 2, if placed
Sharing the Photos
A selfie station that traps photos on a Raspberry Pi is only half the idea. Guests need to take something home. Finished pictures go to Google Drive through rclone, and each picture with a ready share link gets a QR code on the review screen. Scan it, save it, done. No typing an email address into a box in the cold.
The hotel station that inspired this one offered delivery by phone number or email. I skipped that. Partly because I wasn’t putting a touchscreen or keyboard outside, and partly because I didn’t want some nefarious elf using my mail server to send questionable pictures to strangers. Letting people scan their own photo seemed much less exciting to support.
The first version used a temporary file host. It worked in testing, until some visitors discovered their mobile carriers blocked the links. That pushed me to Google Drive. The photos now go into date-based folders, but the old one-hour link-expiration rule no longer applies.
Then came the Wi-Fi problem. A photo can be perfectly good even when the connection isn’t. The station now makes a durable local copy before trying to upload. The separate upload_spool.py module checks those files, retries unsuccessful transfers in the background, and keeps each queued file until the transfer is confirmed (including a share link for a guest-facing image). A new family’s photos get priority over the backlog, so last night’s network problems don’t slow down tonight’s line.
There is one catch: QR codes only appear for links that are actually ready during review. The station puts a limit on how long it waits, rather than making a family stare at a processing screen all night. A delayed file can still upload later, but the QR code won’t appear retroactively after the guest has walked away. The original unframed capture and any diagnostic files are uploaded separately without public guest links.
GPIO Wiring
For anyone wiring this up from scratch, the full pin layout using BCM numbering:
| Function | BCM GPIO | Notes |
|---|---|---|
| START button | 17 | Internal pull-up. Active LOW. Long-press ≥1.5s forces reset to intro screen. |
| NEXT button | 27 | Internal pull-up. Active LOW. Cycles images during review. |
| Relay / light | 22 | Active HIGH. Starts LOW. Goes HIGH during preview and capture only. |
The buttons use the Pi’s internal pull-ups, so each switch goes to ground without an external pull-up resistor. GPIO is optional for development; there’s a keyboard fallback (Enter to proceed, Space or N to advance results, and Q or Esc to exit). In the yard, though, the big illuminated START and NEXT buttons are the whole interface. Nobody needs to explain a touchscreen to a kid wearing mittens.
Setting Up the Pi
If you’ve never set up a Raspberry Pi from scratch, the official tools have gotten pretty friendly. The important thing here is that this is the current setup, not the older MediaPipe recipe. The camera, dlib model, Google Drive connection, and theme artwork all need to be in place; copying just one Python file won’t give you a working kiosk.
1. The OS and camera
This build uses Raspberry Pi OS with libcamera/Picamera2. My build is based on Raspberry Pi OS Bookworm. Use the Raspberry Pi Imager to prepare the card and configure the username, Wi-Fi, and SSH. Connect the Camera Module 3 Wide and verify that the OS can actually see it before worrying about the selfie station code.
On current Pi camera software, use rpicam-hello --list-cameras to check detection. Older releases may call the tool libcamera-hello. On Bookworm, camera auto-detection is normally handled by the modern camera stack.
2. Install the system tools
The Pi camera stack, OpenCV, dlib, and its numerical dependencies have compiled pieces, so I prefer the distro packages where available rather than starting with a random pip command and hoping for the best:
sudo apt update sudo apt install -y python3-picamera2 python3-opencv python3-dlib \ python3-numpy python3-pil python3-qrcode \ python3-rpi.gpio rclone unclutter
Package availability and names can vary by Raspberry Pi OS release. These commands describe the components the application uses; they’re not a promise that every distribution has exactly the same package list. You’ll also need GPIO access, a functioning graphical desktop session, and appropriate permissions for the service user.
3. Install the face-landmark model
The current accessory code detects faces with dlib’s HOG detector and uses its five-point landmark predictor to estimate eye position and head angle. Download and decompress that model into /opt/selfieStation/models/shape_predictor_5_face_landmarks.dat. If the model is unavailable or produces implausible landmarks, the code falls back to face-box placement. Install the model to get the eye-based alignment and head rotation used by this build.
4. Put the application and artwork in place
There are several Python modules now, not just selfieStation.py. Keep selfieStation.py, accessory_processor.py, accessory_settings.py, and upload_spool.py together under /opt/selfieStation/. You’ll also need the theme frames, the four accessory PNGs, and the attract/instruction screens. The current layout looks like this:
/opt/selfieStation/
selfieStation.py
accessory_processor.py
accessory_settings.py
upload_spool.py
models/shape_predictor_5_face_landmarks.dat
frames/{theme}_frame_16x9.png
accessories/{theme}_1.png, {theme}_2.png
assets/screens/{theme}_intro.png, {theme}_instructions.png
data/ # created/used by the application
Give the service user ownership of the application and write access to its data folder. The example service below uses placeholders for the account name; replace them with the user who owns these files. I haven’t published a one-command installer for the whole thing, so treat these as the pieces to assemble rather than a magic copy-and-paste deployment script.
5. Set up Google Drive
Install and configure rclone’s Google Drive remote using the account that will own the uploaded photos. In my setup the remote is named gdrive:, and the script writes under gdrive:selfieStation/, organized by event date. Run rclone config as the same user that runs the station so the service can see the credentials. Test a small upload and the ability to create a share link before you try a live photo session. The upload queue handles interruptions, but it can’t repair nonexistent credentials.
6. Test it from the desktop
Once the camera, artwork, model, permissions, and Drive remote are ready, start the program from the Pi’s graphical session:
cd /opt/selfieStation python3 selfieStation.py --theme christmas
You should get the full-screen attract display if the graphical desktop and camera are available. Press Enter (or the hardware button) to start a session. Try Halloween with --theme halloween. Check that the picture saves, that at least the original framed photo appears, and that a working QR code leads to the uploaded image. Once that’s all behaving, enable the service in the next section.
Autostart with systemd
For this to work automagically, it has to start itself when I plug it in. On Linux that’s systemd, which also brings the program back if it crashes. This is the service configuration corresponding to the current setup. Replace YOUR_USER and YOUR_GROUP with the account that owns the application and has a working desktop session and rclone configuration:
[Unit] Description=Selfie Station (system-wide) After=graphical.target Wants=graphical.target StartLimitIntervalSec=60 StartLimitBurst=10 [Service] User=YOUR_USER Group=YOUR_GROUP Type=simple WorkingDirectory=/opt/selfieStation ExecStartPre=/usr/bin/install -d -m 750 -o YOUR_USER -g YOUR_GROUP /dev/shm/selfieStation ExecStart=/usr/bin/python3 /opt/selfieStation/selfieStation.py --theme christmas --purge-all --purge-older 72 UMask=0027 Restart=always RestartSec=2 [Install] WantedBy=graphical.target
Save that as /etc/systemd/system/selfieStation.service, then enable it:
sudo systemctl daemon-reload sudo systemctl enable --now selfieStation.service
The --purge-all --purge-older 72 options remove ordinary photo files and old session folders after 72 hours when the service starts. They do not delete pending files in the durable upload queue or remove photos from Google Drive. Restart=always tells systemd to relaunch the program two seconds after a failure. Not glamorous, but I’d rather have the Pi restart itself than walk across the yard in the cold to do it.
For Halloween, change the theme argument to --theme halloween and restart the service. The application also expects access to the Pi’s graphical display; your OS and desktop setup still have to provide that environment.
Downloads
The current software is more than a single Python file. I haven’t published a verified, all-in-one release yet, so I don’t want to put a misleading download link here and have somebody wonder why it doesn’t run.
selfieStation.py— camera, buttons, guest screens, processing flow, and photo review.accessory_processor.pyandaccessory_settings.py— dlib detection and accessory placement.upload_spool.py— durable Google Drive transfers and retries.selfieStation.service— starts the station automatically.- dlib’s five-point landmark model — download separately.
screen-bezel.stl— the inside-enclosure screen bezel and camera mount (link to be added).side-baffles.stl— panels that block side views into the enclosure (link to be added).spotlight-post-mount.stl— the spotlight bracket for the 4×4 PVC post cover (link to be added).- Christmas and Halloween theme images — download links to be added.
For now, the setup section above documents how the pieces fit together. I’ll add the actual software and STL downloads here once they’re packaged and checked.
What Worked and What Didn’t
What Worked
- Scrapping PiBooth and owning the whole pipeline; once I stopped fighting the framework, things moved fast.
- Fixed manual focus and a dedicated photo light, which are much more consistent than asking autofocus and the yard lighting to guess.
- Framing and a mirrored live preview that actually feel like a finished attraction rather than a webcam on a post.
- The two-button interface. Kids figure it out immediately.
- The switch to dlib and the 2026 accessory-placement work: better control of group pictures, head tilt, and situations where the hats really should not overlap someone’s face.
- Google Drive QR sharing, backed by a durable retry queue instead of assuming every Wi-Fi upload will succeed the first time.
- systemd restarting the program and cleaning up ordinary old files without throwing away unconfirmed uploads.
What Didn’t
- Continuous autofocus. It seemed like the obvious choice until it kept hunting at exactly the wrong moment.
- Blocking the screen while processing. Technically working is not much comfort to a guest staring at a frozen kiosk.
- Relying entirely on the display’s ambient lighting, especially with several people in a photo.
- Trying to stretch PiBooth beyond its limits.
- The original temporary file host, which some phones could not reach even though the upload itself was fine.
- Assuming an accessory that looked right on one person would look right in a crowded group photo. Halloween 2026 cured me of that idea.
- No obvious pointer toward the camera below the screen. People still look at themselves on the display instead.
What I’d Do Differently
One thing I would still add is a small arrow or “look here” label on the bezel pointing at the camera. A surprising number of guests had trouble figuring out exactly where to look when the countdown started. The camera is below the screen, and once people are watching themselves on the live preview, it’s not obvious that the actual lens is somewhere else. A dedicated indicator right next to the camera opening should solve it without changing anything in the software.
A Heads-Up if You Build Your Own
What works on the bench isn’t necessarily what survives a season outside. I learned that with autofocus, photo links, and (especially) Halloween group pictures. One cooperative face in a well-lit test shot is a lousy substitute for three kids leaning into the frame at different angles.
Start by testing with real groups, and don’t judge the results by whether everybody gets a hat. A skipped accessory is sometimes the correct answer. Also remember that the framed guest photos, private raw captures, and diagnostic files serve different purposes; they shouldn’t all get the same sharing permissions.
And if you use the 120V spotlight idea, treat the wiring as an electrical project, not just another GPIO connection. The Pi can decide when to switch the light, but it doesn’t make the mains side any safer.
Wrapping Up
Could I have kept patching PiBooth? Probably. Would it have been as satisfying? No.
Owning the whole pipeline (buttons, camera, framing, overlays, sharing, cleanup, and the boring reliability pieces) means I can fix anything, improve anything, and know exactly what the system is doing at 8pm on Christmas Eve when there’s a line of neighbors waiting. That’s worth the extra build time.
The response from families has been great! People who stopped by last year specifically bring family members over to try it. There’s something a little silly and a little magical about watching a Santa hat land on your head, and the QR code makes the whole thing feel finished. Halloween 2026 gave me a fresh list of improvements I didn’t know I needed, especially for group pictures and handling uploads that take their sweet time. I’m sure using it again will teach me something else. It usually does. But even as it sits right now, it’s one of my favorite builds.