realtime security diffusion

Have you ever wanted to make realtime ai images from your security camera alerts? I did.

why

The vision was to make something that created dynamic art in an autonomous way.

I wanted to see what it would come up with on its own and to be enthralled by the randomness of it all.

the workflow

  • alert image captured
  • notification pushed over MQTT
  • node-red listener picks up notification
  • image analyzed for scene content (stable diffusion)
  • rich prompt generated (Ollama)
  • image generated (stable diffusion)
  • image published and notification generated
  • dashboard refreshes

Left: the original image

Center: cropped to 512x512px

Right: generated image

Metadata (captions): generated by stable diffusion image analysis

Metadata (prompt): the rich prompt from Ollama