Live data from Hacker News

Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

matthieulc.com

21–30 of 126 posts

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#23
Nice! I peeked at the code and thought I’d share a few tips for improving the low frame rate:

Base64 encoding the JPEG bytes will increase payload size up to ~30% and burns CPU cycles on both client and server. This is unnecessary, as Websocket protocol can send binary payloads (doesn’t need to be text).

Consider removing lossy jpg compression as well, ie just send the raw RGB bytes over the network. Then on the server side you can simply call Image.frombuffer(…).

StreamDiffusion can achieve high frame rates because of extensive batching in the pipeline. You’re not benefiting from that here as the client is only sending one frame at a time and then waiting for a response. See this example for an idea of how to queue input frames and consume them in batches https://github.com/cumulo-autumn/StreamDiffusion/blob/main/e... .

Alternatively you could take a look at the SDXL Turbo and Lightning models. They are very fast at img2img but have limited resolution of 512² or 1024² pixels respectively. Which appears a bit lower than what you’re aiming for here, but they can be run locally in real time on a high end consumer grade GPU. For reference I have some code demonstrating this here https://github.com/GradientSurfer/Draw2Img/tree/main

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#25

It would be cool to intercept the input from a webcam, transform it like this, and then present it to the OS as another virtual camera so you could select it in Teams or Zoom or whatever.

You can do this with OBS.

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#26
FYI, the link to the frame used to mount the display just blocks you:

https://www.leroymerlin.fr/produits/decoration-eclairage/dec...

For those curious, it's a MILO 21 x 29.7 cm black frame. These links work for me:

https://www.leroymerlin.pt/produtos/decoracao-e-tapetes/mold...

Also, the screen he uses (HMTECH Raspberry Pi Screen 10.1) is pretty hard to find. Do people have other good recommendations for screens with similar quality and specs?

Any idea why this uses infrared light and an infrared camera?

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#28
post #18
post #8

It's pretty neat, but I'd never have a webcam steaming everything in view to someone else's server on the internet. It'd be cool if the server ran on my own hardware, and ideally in the frame itself. The privacy policy at runpod.io wouldn't even display in my browsers. (their ToS loaded without an issue).

I wonder if you could do something like this with hardware acceleration (like google coral)

Unfortunately no, they only have a TensorFlow target and none of the hobbyist / released big model image stuff works with it

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#29
Really neat idea, I'd also love to have on my bookshelf.

> The main issue with the current setup is the low frame rate.

I'd call it a feature rather a limitation, it's not bad that I have second to process the image for a bit.

I would even increase the update frequency to 5 - 15 minutes and let it capture and generate a new image whenever it detects something changing / moving.

Re: Show HN: Wall-mounted diffusion mirror that turns reflections into paintings

#30
I think this would be cooler if the camera was somewhere different than the frame. Looking at an artistic mirror seems a little boring. Maybe make a 2nd one, and put it in someone else's house, and then feed the camera from one into the other. So you can look at the 'reflection' of someone else and have these little moments where you're both looking at the picture at the same time. Heck, make many so you never know who you're looking at. It'll be the Omegle of picture frames.
Post reply on HN