top | item 41929804

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

472 points| cataPhil | 1 year ago |matthieulc.com

123 comments

order

GradientSurfer|1 year ago

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

bambax|1 year ago

Ok, but I wonder if it really needs to be real time like this? Wouldn't it make more sense to have some kind of button: somebody makes a pose, takes a picture, the picture is run through some kind of transformation and comes back as a painting that stays there until someone takes another picture? Wouldn't the illusion of art be better that way? (It would not be a "mirror" anymore though.)

MrLeap|1 year ago

yeah yeah yeah, do all these things, and afterwards, look at 2d interpolation methods that don't require AI for your inbetweens. There's some real fast kernel math that can lerp from one blob to another at 8 billion fps.

igornadj|1 year ago

> Making art is hard. But art is mostly about surfacing the inner world, and only in part about skill. It’s unfortunate that art selects so strongly for skill.

Not to sound like a luddite, but I do question the idea that the skill gap is merely an inconvenience. I suspect learning how to paint or make music changes something in yourself which teaches you some deeper life lessons.

I've heard the phrase (paraphrased): No great work of art was made by a genius, genius comes to you unexpectedly like a gust of wind. It seems that cultivating these opportunities is the most an artist can do, and removing the skill gap seems to be removing the cultivation, the thing that changes you, the essence.

There seems to be a few of these inherent deep workings that we as a people keep coming back to, without knowing what they are or how to discuss them (personally at least!). Not to rain on your parade OP, the project looks fun and super useful to a lot people! Just something I ponder on at times.

flir|1 year ago

I think he's on the right lines with "surfacing the inner world", but that's why I see this as more wallpaper than art. He's not doing a deep dive into his own psychology and hauling up pearls; none of these images have that property.

Does the totality of the project have that property? That would be less clear, but IMO, no. I see it as technically driven, not psychologically driven, although I can see how you could write an artist's statement that claims it was (it's about mirrors, after all, which are hugely symbolic).

To be clear I still like it, and if I'd done it I'd be proud of it. But it's more artifice than art.

(If I was him, I'd slow the frame rate down, not speed it up - work with the technical limitation, not against it. Have the system only display "good" images, and not update the display until another "good" image is generated. The code that decides if an image is "good" or not would be the most interesting part of the system, and could fairly be said to embody the artist's intent, and so cross (my own personal) threshold into capital-A Art.

I'd also experiment with buffering the image stream à la _Light of Other Days_ by Bob Shaw.

Oh, and as Halloween is nearly with us, the temptation to occasionally inpaint a figure standing behind the viewer would be massive.

Idle thought: to get some stability in the image, would it be possible to have an LLM generate random video filter code, instead of random images? "Write me a video filter that makes the input video look cubist". "...like an oil painting" "...with a Flash aesthetic". etc etc. Every time a filter gets generated that doesn't actively crash, swap to it. No idea if that's feasible or not.)

sandworm101|1 year ago

Talk like "surfacing the inner whatever" can impress the masses, for a very short while, but good art requires more. All art has a language, standards that are learned though an artist's development as they learn the needed skills. The mona lisa isn't just a good picture of a person. It is full of details and meaning only understandable to people who have studied paintings. AI can generate a good or interesting picture but it cannot speak the language of painting. That requires actual graft to learn and appreciate. Injecting the paintbrush skills into someone's brain, or into an AI tool, isn't going to make them an artist.

wellthisisgreat|1 year ago

> I suspect learning how to paint or make music changes something in yourself which teaches you some deeper life lessons.

I enthusiastically support this notion. A simpler, than painting, example would be writing. Sure everyone has a story to tell, and everyone can write, but to make it worth other people's time would take you days if not years of perfecting the craft, as you inevitably learn things about yourself and crystallize your perspectives on this world.

terhechte|1 year ago

This goes opposite to the saying "Experts say it cannot be done; amateurs accomplish it every day.".

Sometimes it's good to have someone with fresh eyes looking and something and not be shaped by decades of prior history.

Super_Jambo|1 year ago

This is why the greatest art is only made by people who grow the plants to create their own paint from scratch...

Log_out_|1 year ago

? Have you ever read musician interviews: Its like a competition on how much clichee, naivete and reality denying drivel one can compress into 5 minutes.

Idealism is not a victimless crime, millions suffer every day because some artist threw a buggy,idealized world model over the fence and the idiocy stuck hypnotizing millions into permanently damaging themselves.

bravura|1 year ago

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?

esperent|1 year ago

Every time I've looked into building something like this, when I price it out, just using an old Android tablet in kiosk mode and making it a web app ends up being much cheaper.

piva00|1 year ago

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

I'd guess it's to make it work in the dark as well.

bambax|1 year ago

The screen is available on Amazon? But it's a touch screen, which seems overkill; any screen would probably work? One can always build a custom frame around it.

xlii|1 year ago

> But art is mostly about surfacing the inner world, and only in part about skill.

I always thought that art is all about emotions, both preserving and creating them. That’s why I find a banana on the wall art, popular music is still art.

(Might be school influence but I also tend to ask myself „why”)

This invention is definitely work of art, but its output - in my eyes - not. It’s like a cloud. It can make different shapes, and some are funny, some might remind me of my close ones, but it’s still averaged randomness.

However the idea to reflect reality to this digital randomness I find without doubt - art. And, well: while not visual or audible, there is software, hardware, code and design which are also art (and difficult to make so counterpoint to thesis in first paragraph ;)).

khafra|1 year ago

> I always thought that art is all about emotions, both preserving and creating them.

But this leaves the role of intention ambiguous. If I double-park a BMW across two handicap spaces because I'm angry and entitled, is that art? It certainly evokes emotion, and it's also produced by emotion.

lofaszvanitt|1 year ago

Art is something that grabs you and is also unique in the way it presents the subject. Also, there has to be skill involved, otherwise the whole thing goes up in smoke if it feels cheap or superficial.

A banana on the wall is not art, because it involves an everyday object in an everyday setting.

You might feel it's art, but if that's the case, then you haven't exposed yourself to true art enough to have a pool of experience or only seen so far superficial examples.

skeaker|1 year ago

> I always thought that art is all about emotions, both preserving and creating them.

Is that not what was meant by "surfacing the inner world?"

8n4vidtmkvmk|1 year ago

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.

stefs|1 year ago

that's a good idea but something completely different than OP wanted to accomplish.

i remember that this has been done already as an art installation in public places so people could see - and interact - with others from around the world.

edit: like this here - https://www.inavateonthenet.net/news/article/vc-art-installa...

tiborsaas|1 year ago

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.

shermantanktop|1 year ago

Have you considered a high frame rate morph effect between images? That would increase the effective frame rate and probably would look pretty cool.

lancesells|1 year ago

I actually think the high frame rate will look worse unless the styling changes less in between frames. Otherwise, it's going to look erratic and there will be a ton of "popping" if each frame changes as much as the frames in the current video. Or maybe op wants it to be a chaotic feeling.

JKCalhoun|1 year ago

Even a simple crossfade.

viraptor|1 year ago

> It’s unfortunate that art selects so strongly for skill. Can we decorrelate the two?

I really like this direction. I understand why some object to the genai approaches, but in practice sometimes I get an idea of something cool and don't have the skills to create it myself. I'm not going to invest months/years to create each of those ideas and they're not important enough to spend hundreds of dollars that a skilled artist would request. Now there's a way people can try generating the thing and may end up enjoying it - and that's great. (At least for personal use, it gets a bit complicated for commercial purposes)

d0gsg0w00f|1 year ago

This is assuming an unimplemented idea has value. I think the value we attribute to an idea is actually the dissemination of the idea to others. Often a sufficiently radical idea is difficult for others to grasp and therefore an example must be created by the originator of the idea.

So when someone says "That's a great idea" what they mean is "That's great work".

Time will tell if others see an idea backed by AI work as valuable. Can they even tell? Who knows.

happymellon|1 year ago

But unfortunately they did not.

Not everyone could build what is presented here, and inadvertently they have validated that it requires skill to produce a machine that distorts your reality. The pictures being produced isn't the art.

Tepix|1 year ago

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

I think lowering the framerate to something between 0.3 to 1 fps might even be better!

malux85|1 year ago

Let’s hook it up to a sentiment and toxicity model, and then if you’re being too negative online, it will start to deform you into a monster, we could have a real Picture of Dorian Gray!

A4ET8a8uTh0|1 year ago

I chuckled, but that is actually an interesting ( and very doable ) fun project idea.

CaptainFever|1 year ago

This is actually such a cool idea.

amelius|1 year ago

Prize for the most power-hungry mirror.

I also notice that the paintings are not stable over small changes in the inputs.

shermantanktop|1 year ago

To me, that’s the charm.

r00fus|1 year ago

Is there any way to freeze some of the images?

I thought some of them would be awesome to keep (e.g. pfp or lockscreen photo).

imsaw|1 year ago

I think the low framerate adds a unique ambience, at least to me, watching the recorded videos. It gives time to appreciate the art style and generated features. It also feels like a time lapse of gradual changes. I could imagine it being annoying to look at in real time though.

xrd|1 year ago

I would love to see you add a networking layer so that I could connect my frame to a random one somewhere in the universe. Then I could see another person through this style transfer. They could see me. It would be like an art chat roulette.

jaredhallen|1 year ago

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.

unwind|1 year ago

I don't have anything to say about the artistic value, but as a part-time tool collector with dreams of being a handy person, this passage was the most interesting:

I used a puncher to cut a hole in the frame’s cardboard for the camera (drills didn’t work).

I would love some more detail, or just people's interpretations ... in what manner can a drill fail to "work" on cardboard? There can be issues with tearing, perhaps, that I think punching works around nicely.

esperent|1 year ago

It's too soft and layered, the drill tends to chew it up. I've had some luck putting duct tape over both sides and drilling through that, but for very clean holes you'd still probably have to clean the edges with a craft knife.

bambax|1 year ago

My guess is he tried with a wood drill bit, which will tear cardboard and make a big mess. For cardboard, or plastic, you need a metal drill bit.

rnxrx|1 year ago

This really does change the interaction with art. As a future expansion it might be neat to recognize images on camera that would make for interesting art (i.e. detection of people/animals or recognition of certain styles of composition) as well as being able to choose amongst different styles.

It seems sort of akin to some modern art that incorporated TV screens and video to make dynamic installations, like Nam June Paik.

quercus|1 year ago

reminds me of the classic 80's "Take on Me" music video

ogou|1 year ago

The interesting thing to me about this, and most other demos, is what people are simulating as examples of art. In this case, it's a very specific Picasso time period. Others tend to center on fantasy or well-known science fiction painters. This makes sense if your only exposure to art is the internet. Maybe a few Wikipedia sessions and a Google search for "modern art". The actual art world is in a huge transition right now and the idea of this Western dominance of art history is being completely re-evaluated. I haven't seen many demos of these tools, or AI art in general, that makes use of any actual modern art from the past 20-30 years. I definitely don't see examples from non-European art history (except Ukiyo-e or anime). That says a lot about what most of you expect from tools like this. It's not just technical, it's culturally normative. Think of it, (without looking it up) can any of you name any living artists that have been exhibited in the Museum of Modern Art in the past 30 years? I see so many strong opinions here about what art is or isn't, but wonder if anybody actually goes to museums or galleries to see what is considered modern art.

pogue|1 year ago

I'd love to know the cost of all the materials used in the project and how much time it took you to assemble everything (I didn't see it in the article unless I missed it)

This would definitely be a very cool installation piece for a house or commercial property for people to gather around and talk about!

theendisney4|1 year ago

Sounds cool! I would like pictures with people in the room doing weird things energetically like stand on their chair. Dancing. Confetti booze strange outfits. Bordering the offensive then deleted after 30 minutes.

shib71|1 year ago

> Art is ... mostly about surfacing the inner world, and only in part about skill.

I like the phrasing of the first part. But what art is "about" is very subjective.

For me, part of what I look for in art is intentionality - the notion that the artist has crafted each element toward a purpose, consciously or not. The less an artist contributes to the final piece, the less meaning I assign to it.

In this case: I would say that the individual pictures being displayed are not "art" - they have no meaning. But I think the device in whole is a piece of art. That is a creation that surfaces the creator's inner world, because they designed the device, wrote the code, crafted the prompts to achieve pieces that reflected their notion of beauty.

disqard|1 year ago

I love this framing (pun unintended) of "art".

Besides what you articulated as the "intention", I often think of the "story" behind the art -- whether an idea in the creator's head was expressed via the piece (or not) makes me go "yes, this is Art" (or not).

By that token, when I see automated projects like this, I think of the "installation" as art, but the pixels or arrangements generated by the piece itself is less art-like IMO.

d0gsg0w00f|1 year ago

Yes. I think we attribute the cost of the human sacrifice into the value of the art. It's a like owning 1/80th of a human soul and hanging it on the wall.

swayvil|1 year ago

>But art is mostly about surfacing the inner world

Oh good lord.

more_corn|1 year ago

What’s wrong with that? If art is expression shouldn’t everyone have the right to artistic expression? Even people who express themselves with nerdy projects and code and hardware instead of paint and canvas? What do you think art is?

caelinsutch|1 year ago

how much does this end up costing to run?

broast|1 year ago

Super cool! I've had similar ideas when I first saw StreamDiffusion. The possibilities are endless

Mumps|1 year ago

On the low framerate: why get a pi5 when a Jetson Nano could be had for about the same price?

jansan|1 year ago

What do you want a high frame rate for when looking at art? What is the frame rate of the Mona Lisa?

autoexec|1 year ago

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).

beeflet|1 year ago

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

randmeerkat|1 year ago

> It’s unfortunate that art selects so strongly for skill.

Jackson Pollock begs to differ.

aspenmayer|1 year ago

Artistic skill lies not merely in the hand, but also in the eye.

dbspin|1 year ago

This is great and all, but just to address the 'art' issue. It's the creation of the 'mirror' that's artistic (to whatever extent running a copy of stable diffusion is a creative act), not looking in the mirror. The enormous number of affordances of 'AI art' will be like this - passively consumptive, creative only in the sense that chatting about a movie or playing a video game can be creative.

All of us can already 'surface the inner world' (which I think is actually a pretty great definition of art, or part of one at least) - it's not skill based, it's practice based. Just start drawing, or writing or progaming with Processing or futzing with Ableton or what have you. Skill builds over time, expression needs no automation.

king_magic|1 year ago

This is very cool and I applaud you OP.

arathis|1 year ago

This is great.

stonethrowaway|1 year ago

> But art is mostly about surfacing the inner world, and only in part about skill. It’s unfortunate that art selects so strongly for skill. Can we decorrelate the two?

I don’t think the poor lad knows what Art is.

Put another way, we have hundreds of years of recorded philosophical texts and diatribes on what constitutes Art, and what art-making is. Often written by serious practitioners who dedicate their life to it rather than internet-dwelling dabblers and dilettantes. We have people who are deemed artists, not necessarily painters but people who are wired a certain way and are industrious with their abilities. Math geniuses attend certain schools and the other pupils may pick up a thing or two from them, but that doesn’t mean the other pupils are geniuses also. So too, do artists walk among us and may do what we do and we may imitate what they do. But that doesn’t put us on equal footing whatsoever.

Art doesn’t select for skill. This is a red herring and a misunderstanding. Art doesn’t select for anything, because if it did it wouldn’t be Art. This is an old somewhat trite topic that, historically, boiled down to no more than a pithy phrase: “Art cannot be taught.” as expounded by many teachers of incredible talent in their own right who have attempted to distill it into teachable material and realized their talent is not transferable as easily as they had hoped.

Most of what you read on this subject is nonsense sold to you by grifters who want your money. Now and today more than ever. I’m all for, say, “Art and Fear” and “The Art Spirit” and even a bit of “War of Art” to name some household items on the subject. These are all great recent texts. But let’s take these for what they are: self-help literature, and nothing more. The further back in literature you go the less of this patting-on-the-back attitude you get, and more serious the subject matter is treated (example: read the lectures on Art by the presidents of the Royal Academy, they are numerous, Archive has them all. One president basically tells students to choose a different profession, discussed as an aside topic in a book on portraiture from that time.)

Elsewhere in the comments people saying how art is simply good taste seem to be oblivious to the creations of artists that led them to make such a blundering conclusion. Your taste wouldn’t exist had an artist not created a thing to begin with.

We’ve used image generators for decades now. It gets the job done. The person using it may be an artist or just someone who wants a dynamic, changing generated image on the wall.

A4ET8a8uTh0|1 year ago

<< Archive has them all.

Thank you. I added those to my reading list. I don't think I ever delved into the topic.

<< Often written by serious practitioners who dedicate their life to it rather than internet-dwelling dabblers and dilettantes.

And yet, here we have someone not burdened by the serious business of art and gives his personal perspective on it. I am not saying a lot of everything is not mostly crap, because it mostly is, but I found this child-like honesty oddly endearing.

<< Art doesn’t select for skill.

Artist without a skill is just a dreamer, who can't put his vision into place. Barrier of entry has been lowered now, but I am relatively certain that was not always the case.

melony|1 year ago

Some optimization suggestions:

- cache the prompting somehow, unless you are doing dynamic stuff with the prompts, the language embeddings generated should be static (this depends on the architecture of the model that you are using, it's only possible with certain setups where the language processing is a separate part in the pipeline)

- consider fine-tuning an img to img model with your current outputs instead of using a language-coupled model. My intuition is that this is currently significantly over-engineered on the ML side.

- Play around with local hardware acceleration instead of sending everything to the cloud, you also probably don't need particularly high resolution for the images either.

cataPhil|1 year ago

Love it thanks, will look into it!