Close
0%
0%

Pizza Clock

A simple desktop clock that displays the time using pieces of pizza.
(RPi Zero 2W, NixOS, SD, SolidPython, OpenSCAD, Astro, React)

Similar projects worth following
- Stable Diffusion to generate clock faces 🍕
- NixOS to define the OS image for the Raspberry Pi Zero 2 W. ❄️
- SolidPython, OpenSCAD to model the case. 📐
- Astro, React to build the clock app, hosted on GitHub Pages. 🚀

How to generate a pizza image

To generate an image with the correct number of pizza slices, a two-stage (or twice baking) workflow is used.

Stage 1: An image is generated using a relatively strong ControlNet guide strength with an artificially-generated segmentation map. The result tends to be correctly positioned but less realistic.

Stage 2: A depth map of the stage 1 image and the same segmentation map are used to guide image generation, but with a relatively weak ControlNet guide strength. This allows us to obtain a correctly positioned and highly realistic image.

A similar approach can be used to generate images of other "circular objects." An LLM generates a prompt for a Stable Diffusion model. This prompt, along with a segmentation map, is then used as input to generate the image.


From the hardware aspect, it's just a Kiosk Web App built on top of NixOS and Raspberry Pi Zero 2 W.

Running `cmatrix` with the `foot` terminal emulator.

Hi Hackaday!

TODO

  • Create a case/enclosure for the Raspberry Pi.
  • Generate more appetizing (or at least not-weird) pizza images (using Flux or SDXL).

  • 1 × RPi Zero 2 W
  • 1 × 4 inch 720x720 round LCD (w mini HDMI board)
  • 10 × M2 4mm self tapping screws
  • 2 × M2 6mm self tapping screws
  • 1 × mini HDMI - mini HDMI male-to-male adapter https://github.com/likeablob/HDMI-A2C

  • Update: A Cheesy Slice of Progress

    likeablob02/15/2025 at 17:35 0 comments

    Alright, I have to admit that for the initial release, I rushed things a bit to get the project finished.

    While SD1.5 has its limitations in terms of expressiveness, the CFG scale (classifier-free guidance scale) was set too high. CFG controls how strictly the generated images stick to the prompt, but too much makes them look… well, not quite right.

    After some tweaking, I've managed to generate (relatively) slightly better images of pizza-ish things.


    I also experimented with generating "Something circular" images using SDXL. It's clear that SDXL offers significantly improved expressiveness compared to SD1.5.

View project log

Enjoy this project?

Share

Discussions

Richard Hogben wrote 02/20/2025 at 03:15 point

Funny

  Are you sure? yes | no

Ken Yap wrote 02/12/2025 at 03:04 point

Such a clock could, er, positively affect my weight. 😛 But it's cute. 👍

  Are you sure? yes | no

likeablob wrote 02/15/2025 at 16:39 point

Haha, yeah, maybe I need a improved "salad o'clock" version with less AI-blobs.
Your clock projects are fantastic!

  Are you sure? yes | no

Dan Maloney wrote 02/12/2025 at 00:45 point

Cool build, just wrote it up for the blog. Thanks for tipping us off!

  Are you sure? yes | no

likeablob wrote 02/15/2025 at 16:41 point

Awesome, thank you for featuring the project.

  Are you sure? yes | no

davedarko wrote 02/11/2025 at 10:33 point

hey, nice project! What display is that?

  Are you sure? yes | no

likeablob wrote 02/11/2025 at 10:46 point

Hi! Thanks :)

I'm using this 4-inch, 720x720 LCD with a miniHDMI interface board.
https://a.aliexpress.com/_omLb7H7

  Are you sure? yes | no

davedarko wrote 02/12/2025 at 09:03 point

appreciate the link, thank you and congrats for being featured on the blog :)

https://hackaday.com/2025/02/11/its-always-pizza-oclock-with-this-ai-powered-timepiece/

  Are you sure? yes | no

likeablob wrote 02/15/2025 at 16:28 point

@davedarko 
Thanks so much for the awesome post! Working on those image quality improvement :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates