Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: I built an AI art installation at home generating new pieces on the fly (github.com/maxvfischer)
399 points by mfi on Aug 18, 2021 | hide | past | favorite | 153 comments


I just finished my latest project, building an AI art installation at home, generating 100 % unique artworks on the fly. Just push the button below the screen and another one will be displayed. When the button has been pushed, the old artwork is deleted and can't be retrieved again.

Setup:

* An Nvidia Jetson Xavier NX was used for all logic, machine learning inference, art kiosk GUI etc.

* A StyleGAN was used to generate the artworks, trained on ~5k images of abstract art.

* A passive infrared sensor (SR602) was integrated with the Jetson to reduce screen burn-in. When no movement has been detected around the installation within a pre-defined threshold, the screen shuts off until movement is detected.

* A custom control box was built, encapsulating most of the electronics.


Interesting! I built a generative art frame based on "{Shan, Shui}" by Lingdong Huang

https://dheera.net/projects/einkframe/

but also planning to use it for neural-net based generative art. I wasn't planning on putting a NX in it though, I was thinking of just keeping the Pi Zero in there and have it do all computations in "the cloud" or on a Nano/Xavier box sitting elsewhere on the same network.

I'm currently working on a 3-panel version of the above:

https://imgur.com/a/3IfKpb3

I didn't make my own frame though, I designed the dimensions and had it custom-built by a frame company, which was surprisingly affordable.


That is amazing!! I actually looked into buying an E-ink screen for this project, but decided not to due to the cost and the lack of compatibility.

Was the E-ink screen simple to work with?


As long as you get the HAT, yes. I had to desolder the header and solder on a 90-degree header to get my low-profile layout, that was a pain. They weren't able to ship me a HAT without pins soldered :(

The documentation is sparse but they do have one C++ demo example and that's pretty much good enough as a reference to do whatever you want.

One thing I will caution is to NEVER unplug or plug the display while the board is powered on, I fried one display by doing that, but Waveshare was nice enough to replace it for free one I got a hold of some employee's WeChat.


This is more interesting to me as I'd never suspect it was generated art.


Yeah that was what I was going for, guests who come would not even know that there are electronics in the frame, and suddenly the art would change every now and then.

Requires drilling a fat hole in the wall to send the USB cable down behind the drywall but meh, needing to patch drywall when moving out isn't the end of the world, usually if you chat up the maintainence folk you can get some extra paint of exactly the right color and spackle/paint it yourself.


What would be amusing is gaze detection such that the art would change only when someone wasn't looking for a while, and then maybe only "advance the scroll" an inch or two.


>> Nvidia Jetson Xavier NX

Curious -- since you're only doing the inference/generation on the frame, and since you're not doing it all the time, did you need a Jetson or would an RPI have sufficed? Did you test inference speeds across different edge compute options?


Yeah I think the way I'd do it (personally) is have an RPi constantly generate new images in the background and cache them until storage is maxed out, then when you hit the button it just fetches the next image from cache.

That would allow the frame to be somewhat lower power and also decrease ventilation requirements -- no fan needed.


Is it me or is this more of a woodworking guide than an AI art guide? I only see a small blurb to put AI art code here. Presumably the button/replenish image dir. is a seed component to the AI. I suppose that further removing the art generation from the installation diminishes the magic of art. The engineer in me would further trim this down by pre-generating art on a PC and slap it on an SD card plugged into basic picture digital frame. Or dispense with storage and connect it to Wifi to poll AIArtAsAService.com.


The difference between this project and a digital photo frame is as you’ve described - The AI generation. I think the destruction makes it special too, if every unique image disappears forever at the click of a button.


Ok, so this is cool as fuck.

I don't think much of the actually produced art, but the fact that you laid out your whole process makes this drool-worthy. Now it is just a challenge as to- can I do better?

Great job.


Nobody could include more individual photos in the how to.

This one has how many gazillion photos?


Oooh, next step is to create an AI picture frame that generates images based on the photo documentation of its own creation.


Glad you like it!

Of course you can! Give it a try and share it afterwards ;)


This is really cool! I'd love to seed the GAN with my own artwork and generate new pieces in my style


Thanks! Depending on how many artworks you've created, it might be difficult to train a GAN network on them (due to overfitting). What you might try is to train one network with a lot of random artworks, then use a Style-transfer network to convert the generated pieces into your style.


couldn't you use something like style transfer to take your own artwork's style and apply it to the generated art?


Yeah exactly, that's what I meant!


do you have the code for training ? i wasnt able to find it in your repo. That would be so cool!


I left it out as I wanted people to use their own generative art. Here's the implementation I used: https://github.com/taki0112/StyleGAN-Tensorflow


Hey thanks! so just put your pictures and run the python script ? and we can take the model and drop-in replace in yoru code ?


Sorry for the late reply. Yeah, I used that repo to train the NN. Then I modified and reduced the code to only include the generative part, and that is what I added to the Kiosk-code.


Do you actually want to disseminate your work and have many other people try it? Or is that not actually a goal.

Right now it really feels like this isn't a priority. Which is fine.

But if it is a priority that other people replicate your work, I'm not sure you're making this as easy for people as possible.


My intension is not for people to replicate my work (the trained GAN-network), but rather supply a tutorial over how to build the installation. Then people can add their own generative art/code. It could be ML-generated, or traditional "code-art".


this comment seeded an interesting idea! Many artists and photographers want to get into the NFT space but they don't necessarily have experience in digital art creation.

If you could leverage AI to generate digital art based on real artist/photographer inputs, perhaps you could create a nice little marketplace business.. or maybe just a simple AI generator plugin for an existing marketplace..


Most artists (with some exceptions) want to have nothing to do with AI generative art. They will simply continue to produce art the way they do with older technologies such as paints and brushes, musical instruments, film equipment, writing tools, and so on. Art making involves a process, a state of mind and there's always a human behind it who digests everything around them and spit something out. All these imitative AI art are beautiful in their own way but really have no substance; once the wow factor weans out they won't have much of a leg to stand on in my opinion. Art making is a self discovering journey at the same time.

Having said that, I'm curious and somewhat excited to see how these will evolve. As I said, I find them beautiful. As a painter myself there is nothing out there that will make me not paint. Sure, I sometimes use tools but there's always the me in there who is in control or driven by my human instinct.


As someone who has been a part of the demo scene in the 90s I find this offensive.

Generative art can be a wildly creative process on par with anything a painter works through. It's just a different medium.

The way you express yourself through art is not threatened by people choosing other ways using different tools. Painting did not become obsolete because someone invented art photography.

I do agree with the sentiment about NFT 'artists' though. Copy pasting a colab notebook, replacing a string and selling the result as NFT is just idiotic.

I wonder who the bigger fool is. The one who sells or the one who buys.

Demoscene Wikipedia https://en.m.wikipedia.org/wiki/Demoscene

Wired article about the demo scene from 1995 https://www.wired.com/1995/07/democoders/


A lot of what we call "art" now merely means "pleasant picture", with no regard to the artist intention or any kind of novelty.

I could see AI "art" competing on price with stock pictures and cheap illustrations for throwaway/placeholder usecases, or when uniqueness is preferred.

It's already happening with social media profile pictures for instances. Next up could be the filler artworks in hotel rooms.


That's good insight. I am not an artist but I've also run this idea by a friend who is. He loves the idea and is curious what a technological interpretation of his work might look like. He's also interested in how we might use those interpretations to create a new segment of collections for this brand.



Made by humans and that is key. They digest what came before and spit out something else, a remix as you call it but which does veer in different directions over time


i don't know any real artists who actually want to get into the NFT space, only con-artists.


Thats what I am thinking about, what kind of images to train on


Or seed it with XKCD.


Really beautifully done. Thank you for sharing it with us!

Quick question: can you use the Nvidia Jetson Xavier NX to train a model? Or can it only be used for inference?


Awesome! I'd recommend running your cables behind the drywall, the look is very clean!


Yeah, that would've been optimal, but it's also a lot more work, so I decided to use cable channels in the end.


What country uses those round black outlets?



I'm from Sweden :)


Cool installation! What was the process of obtaining the 5k abstract art images?


I scraped them from various art websites.


Why not use the artworks themselves as a screensaver?


Cool project. How much does this setup cost you?


Hmm, I think The Frame 32" was about $500 and the Nvidia Xavier NX costed as much (including import taxes etc). The other stuff (cable channels, screws, MDF etc) was probably around $50. So a total of around ~$1050.



This says a lot about building MDF housing for a Jetson (BTW why not plywood?), and devotes literally half a dozen pretty generic lines to the actual art generation code. The algorithm is not discussed, and even art examples are not shown.

This is sad, because wooden box building guides are abundant, but art generation guides are less so,


I wonder if using a color e-ink display would make the art look more appealing on a wall.


Here's someone who put in a lot of effort into making a realistic-looking photo frame using an LCD: https://www.claybavor.com/blog/a-canvas-made-of-pixels

(Covered on HN in 2016: https://news.ycombinator.com/item?id=10900439)


A little white balance work would go a long way I suspect. An OLED panel would really make things pop, but the burn-in issue might be a problem unless you had it rotating very regularly.


It probably will! I actually looked into buying a color e-ink display, but ended up using a The Frame instead for a couple of reasons:

* They are incredibly expensive if you want ~32"

* I wasn't sure that it would've worked together with the Nvidia Xavier NX.


How is the samsung frame? I am thinking of getting one..


I think you're trading of the design for a bit of quality, you'll probably get more bang for the buck if you buy a non-designer smart TV. That being said, it's still a good TV!


wow first time I heard of this beast. https://www.samsung.com/us/tvs/the-frame/highlights/ looks incredible thanks for sharing.


I've had the same thought, but alas. Prices are terrible.


Now have it automatically issue one NFT every few minutes. Profit!


Cool! Could also be nice with a A3 color printer and paper shredder. Banksy-style.

This would make it less tv-isih


Would it have been easier to generate these images on some cloud gpu and stream/send the images to a smart tv? To avoid building and fabricating all the hardware components?


But then OP would have skipped a lot of the fun


Exactly, a big part of the project was to learn about edge-computing and integrating sensors with the GPIOs. But sure, that would've been possible to do.


Really cool. One piece of feedback: Try to get the white balance to better match the warm wight light of the room. The tv will blend in much much better.


Thanks, I'll try to improve the balance :)


See 1 for an innovative example of auto-calibrating brightness and white balance.

1. https://www.claybavor.com/blog/a-canvas-made-of-pixels


The creator of ElectricSheep installs large installations like this. https://en.wikipedia.org/wiki/Scott_Draves it uses crowdsourced human preference functions to drive the art evolution


Check out 77 Million Paintings by Brain Eno

https://en.wikipedia.org/wiki/77_Million_Paintings


Max Fischer? By any chance did you petition to keep a Latin class at your private high school? ;)


Haha no, but it has definitely help me to hide embarrassing images from my youth on Google ;) It only show images from Rushmore


Very cool. I work from home in my basement and would enjoy such a device. Any plans to sell them? Or know of similar devices? I could probably build one, but most likely would end up in pieces next to my other random projects…


No, I currently have no plan to sell it. There's a lot of overhead involved when selling stuff, and I mostly enjoy building stuff like this :)


Sounds good. Like others have said an API around the generator would be cool too, then all I need is a webpage and a monitor.


As cool as this is, I have been struggling to find a good non-AI digital photo display for my house.

The common ones you can buy as “digital photo frame” on Amazon sucks in image quality. I would like a minimalistic digital photo display that is colour accurate, hidpi, preferably have a way to store a handful of hi res images(if not, Adding a Pi-zero for this is still okay). Oh I am not so rich or hosting an art gallery or anything, so, it must be less than 700 bucks(the cost of an iPad). I don’t understand why such a thing doesn’t exist already.


I did something like this for an install using cheap 10" android tablets and kiosk software I found on the app store. Worked like a charm.

** https://slobots.com/2019/01/gallery-view-i-love-my-robot-at-...


What about an android tablet?


As an artist and an avid reader of HN, I find this both fascinating and terrifying (!) at the same time. Before I started painting robots, I painted abstracts and was heavily influenced by Abstract Expressionism. The images that your AI are generating (creating?!) are really cool. Equally as cool is that the images are deleted once a new one is generated, because a lot of the famous artists destroyed or painted over old works.


I wonder if you have to push the button or if it could auto-cycle at some interval. Powering is always interesting do usually need a dedicated power source like a wall plug less you had some other means to get power. Low energy/battery/harvesting maybe (I saw this runs on a Jetson).


I actually implemented it so that you have to push the button. By adding a dimension where an artwork you like is just a button-push away from being deleted, it actually makes you enjoy it more.


This is just a thought. I don't know if you're aware of Github pages (probably) but regarding docs/hosting a basic UI with tabbed sections to present a chunked form of the README.


Brilliant: the project itself but also the trouble you took to share the how-to deets!


Nice.

What do you think of this? : https://vimeo.com/241051006

Also, here's a generative art discord : https://discord.gg/gVna7Utm


First, I would like to say well done. Not just the project -- it is neat. I particularly appreciate the fact that it includes all the less obvious, to me, pieces like building appropriate box, sanding and so on.

I wish more projects were like this ( as in, showed most of the steps ).


Thanks, I appreciate it!

I really enjoy writing these guides for others to learn, it forces me to think more about the process :)

If you liked this one, I've also written another guide where I built a full-size arcade machine from scratch: https://github.com/maxvfischer/DIY-arcade


Maybe a stupid question, but why the Samsung connect box if the Jetson already has a HDMI output?


If I remember correctly, The Frame 32" only has a One Connect cable connection on the back. The reason is that you won't get the flat TV-to-wall surface otherwise.


This is awesome. Is the StyleGAN code removed (to keep it private)? I see this commit message: "Remove my ML stuff." I'm interested in understanding the StyleGAN if you are open to sharing it.


Thanks! Yeah, I removed it as I want people to use their own generative art in their own build. But if you're interested, here's the implementation I used: https://github.com/taki0112/StyleGAN-Tensorflow


I'm struggling a little bit with using StyleGANs so far. Are you available for a (paid if you prefer) call where I ask you a few questions about it? If so, xrdawson@gmail.com.

(I have a connection to Sweden, by the way. My brother lived in Eskilstuna in high school. So, I learned a little bit of Swedish when I visited him. His host brother thought it was really weird I met him and said "jag heter Chris, jag älska naturen!"). But, I would not feel comfortable talking to you in Swedish about StyleGAN. :) ).


I've sent you an email :)


Very cool. But have you put it up against the AI Turing test? :) https://gumgum.com/guides/artificial


I love how this read me is as much about woodwork as it is about software


I truly enjoy working on projects that includes both areas, interesting tech and woodwork :)


Very beautiful. If I trained the network on say, just drawings and painting Mondrian did, do you think they'd converge stylistically?

Is a huge (5,000+ items) dataset required to get decent results?


Thanks!

I think it's quite likely that you will heavily overfit the network if you only use a handful of images, where it might end up reconstructing the exact paintings. I only have experience using 5,000+ images.


Really cool that you brought up Mondrian, since I literally implemented a Haskell program that generated art in their signature style during college. No AI required at all, just setting some random parameters. Here are some results: https://imgur.com/a/rtWkTTl


Everything was great until I saw a curved line... Honestly though much better than a lot of people who try to imitate Mondrian


This reminds me a lot of this Japanese Product/Service: https://frm.fm/overview


Non tech nitpick: biscuit joining a box made out of mdf seems like massie overkill when plain old wood glue would have absolutely sufficed.


I was thinking the Frame TV had better color grading for the color temperature of the room. Does your video output not take advantage of this?


The installation is impressive but the output is underwhelming. Then again, I feel the same about the pieces in most contemporary art museums.


He just needs a higher resolution screen, a screen that is much bigger, and placed inside of very nice frame. With the cables hidden.

Then it's ready for the gallery.

Especially if you could come up with a way to filter out some of the images that look too much like how a random broken monitor will output.

This image in particular feels like "real" art to me. https://imgur.com/gaJVSs3


it's okay as it is -- IF, and only IF, the artist says so !

Rauschenberg too, as well as Lichtenstein and many others, wouldn't have liked it a bit being turned into some hotair egomaniac 0-creative wraped in plastic in some fin-groupies Schnabel'oesque or Koons'ian gallery spot


Taking existing art and twisting it is art too. In fact there was a movement I can't recall the name of dedicated to this?


If they're dead we shouldn't worry about what they would think about what we do; we have enough to worry about.


Agreed, but I think the animated GIF and small, extremely compressed JPGs in the repo don't help. Maybe a youtube video?


The art is the installation.


Samsung phones come with an adapter that can output to HDMI. Is there a phone app that could do something like this on a TV?


You can probably run it on a SmartTV directly…


Nice! Art being lost forever is art in itself.


That's what I think as well, it adds an interesting dimension to the installation


Personally believe that art requires intention and some attempt at communication but it's an interesting project.


In this case I suppose the real artwork is the space of all artworks that the machine is sampling from.


I'm not sure that makes this installation art in and of itself.


Who's to say that the AI doesn't have intent, and makes no attempt at communication? These are certainly very philosophical questions and I would be ready to stand by the idea that first, there is possibly intent and communication here, and second, I've never heard of this narrow definition of art before. Art is art, defining it so narrowly seems strange to me.


It's ok to disagree with me - everyone is allowed a different opinion on art. I'll explain a bit more about my opinion, which you are free to disagree with.

Personally I don't think a machine generating pixels from neural networks trained on intentional art can create art - it can create something that seems very similar because it seems to generate the same or similar output but its missing the process and intention of art. If an artist draws random shapes with no intention or intent to communicate or evoke thought/emotion, all they're doing is making shapes, unless the random shapes themselves are an intent to communicate something (which is difficult if they're actually random).

'art is art' is a tautology with no meaning, and defining art in a way that makes some things not art is the only way you can have a useful definition of art.

Change my tire? Art. Spill chocolate milk on the table? art. vomit after drinking too much? art. because art is art, right?

I guess the question is why you think everything, including things done without intention or intent to communicate, is art?


in the semiotic tradition of Peirce, everything is a sign, signaling some sort of message or meaning. even if there is no evident or inherent intent being encompassed in some chunk of reality, there is still something being signified, and therefore something being communicated. in cases like this, the art is the interpretant formulated by the interpreter, a personal value judgment, rather than some intended value encoded by some given creator of art.

just my take on it, maybe it might provide a framework for seeing how even unintentional, stochastic processes can be conceived of as art. :)


>in the semiotic tradition of Peirce, everything is a sign

Again, if you interpret changing a tire, spilling milk, or the vomiting after drinking too heavily as art, I disagree with you. Are traffic signs art, in and of themselves? are all signs art?

I don't think I agree with you. I've never read peirce and I don't do that 'argument from authority' thing, but given your wording here I don't think I agree with what you're saying.

>the art is the interpretant formulated by the interpreter,

So according to pierce, my interpretation of this as not as art is as valid as you thinking its art, since that's how im interpreting it? It doesn't seem like a very self consistent idea.


>I don't do that 'argument from authority' thing

i get what you're suggesting here, and i would be inclined to say that i don't really appeal to someone I would personally consider authoritative as a means of validating my argument, but that being said, citing someone who was fairly prominent in a specific field of study in order to make a point based on their work in that field of study isn't really appealing to authority. it's like if i were to cite Stephen Hawking to make the claim that black holes slowly radiate out their content over time, that wouldn't necessarily be appealing to authority, it would just be citing someone who happened to be an expert in a specific field for their work in it. granted, there are better, more objective things to refer to than the hypothesis of hawking radiation to demonstrate the accuracy of it, but I think the analogy stands.

>So according to pierce, my interpretation of this as not as art is as valid as you thinking its art, since that's how im interpreting it?

precisely. that's the nature of the relationship between interpreter, signs, and the signified.

>It doesn't seem like a very self consistent idea.

that's because the idea isn't necessarily one specifically used to justify the validity of what constitutes art, it's more about categorizing the relationship between an interpretive entity and that which is being interpreted as a triple, namely as a sign (the conveyed meaning or intent), the signifier (the thing which the sign is referring to), and the intepretant (the personal interpretation formed by the interpreter in response to the sign+signifier.)

(note: apologies to anyone reading this if I haven't represented it fully accurately, im still in the process of integrating it completely, but I am confident my summation of it is generally correct)

the connection I made to the subjective interpretation of what constitutes valid art is just my own invocation of this idea in the specific context of art and the criticism thereof. it definitely is a very generalized approach to things, but it's important to note that this process of semiosis isn't about the specific outcome, but rather about the process that leads to it, and therfore despite our personal experiences with it being contradictory, the process itself that leads to it is self consistent, it's just that you bring something different to the process of interpretation than I do because of your own experience, your own Bayesian Net as it were.


I think the generated pixels are not the art. The whole piece is the art, made by the artist, i.e. the OP.


perhaps the whole installation is art, if as a whole there's some kind of overall intention, message, or communication. Personally having trouble seeing that here. It's more a tech demo. It's a digital picture frame that generates its pictures procedurally from a neural network.


I'm glad that you're bringing this up, because it's an interesting (almost philosophical question) around what art is.

In my mind, the interesting part in this installation is not necessarily the generated artworks, but rather the fact that they are one push of a button away from being deleted forever. It adds a consumable aspect to the installation, which I think is interesting. Can that evoke emotions and be art in itself?

But that being said, I don't look at myself as an artist. I'm a simple Data Scientist enjoying building projects at the intersection of technology, woodwork and art (whatever that is).


>but rather the fact that they are one push of a button away from being deleted forever

but how is that expressed or communicated through the installation? Why should anyone value random patterns generated by a machine that had no intention?

I find andy goldsworthy's art incredible, and he bases his work almost entirely on this idea of impermanent art (although his is usually found materials). I'm not sure its communicated by what you've presented.

I think the impermanence of random patterns that don't communicate anything is something you can find interesting rather than something thats communicated by the video screen, or the intention of the installation.

It's a cool project, but ya, still not sold on this being art per se.


Very cool. I now have a reason to get my hands on a Jetson. Also great work on the detailed readme.


Thanks! Yeah, the Xavier NX was way more powerful than what I expected!


Worth considering that you could purchase a very good painting from a local artist or gallery for much less than the money and time that was spent on this project. While I get that this is a fun project, an actual work of art will provide much more enrichment over the many years that it will outlive an AI art installation.


I prefer this over any static art.


I build my own furniture. It costs me more than something I could buy of equivalent or better quality. That's not the point.


Incredible thing about art is that people value it differently and for different reasons, so maybe the idea of "enrichment" isn't something universal?


Really fun stuff, perhaps you should use a computer screen instead of producing one


I'm curious about, beyond time and labor, how much $$$ the project ran you.


The Frame 32" and Nvidia Xavier NX cost ~$500 each (including import taxes etc), the rest (cable channels, screws etc) ~$50. So a total of around $1050


Thanks. Awesome project buddy.


Looks very cool! I think there may be a demand for that!


a possible next step > add a motion sensor to *swipe fwd/back the artworks. using a smooth pixel morphing blended transition.

*or when toilet flushes ;-)


do you find any of the generated images interesting? there is no thought behind any of them which leads me curious to how captivating they might be.


Some of them are nice, but a lot of them are trash as well. So you need to click a few times before you find something you (I) like


Any chance you have a gallery somewhere with some of the nicer images?


use CLIP to generate a title for each piece of art, followed by a description with GPT, and it is ready for exhibition


That's extremely cool. Well done. :)


Thanks, it was a fun project!


This is so freakin cool


Glad you liked it!


This is amazingly cool.


Thanks!


is there a desktop wallpaper version?


I like the idea, but the art is meh.


great write up.


it's funny what tech people consider Art. LOL


I hope you aren't syncing these random images to your iCloud account!


Art shouldn't be unlimited. Its ok to call things screensavers, because screensavers are also cool, its just that it isnt art in the sense of "art" the word, if an AI is doing it, its something else, and making it unlimited is not interesting, it is irresponsible. Its the constraints that make art what it is, not simply the definition of an infinite possibility space


If you're going to gatekeep what art can be, you better have some pretty impressive creative credentials of your own. Some people say "an unlimited edition is meaningless, has no value" and all they really mean is "I'm conservative, I don't see the point of change, and I can't think of any way an unlimited edition could be interesting"


Having a different opinion isn't gatekeeping, it's disagreeing. No one is stopping this person from doing what they want.

Second, if your definition of art is unlimited, it's hardly useful, so I don't think it matters.


It certainly isn't unlimited. It is confined by resolution and color depth.


We could call art, "made-objects that get you high with beauty"

We could also call art, "byproducts of artistic (beauty-guided) action"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: