What to do with 10,000 GAN images?

At the w/e I decided to automate GAN (AI Art) image production by witing a simple little script that used the CLI to generate GAN images en-masse. Basically the script just issues the command …

dae generate -name artwork -output art/art000001.jpg

(I rename DeepArtEffectsCLI to dae all the time)

The script just changes the output filename each time so 1st time it’s a 1, next 2 … eventually 10000 so I’ve now got art000001.jpg - art010000.jpg (10,000 files as intended).

OK - are any of them the same?

I’m not checking that manually so another script was called for. This one just calculates a hash of each file (a hash is a very long code like ff31d7aef3c3a427f81f02c0b0eb22b5 that’s generated from the file contents). Make a big list of all the hashes and just check no two hashes are the same and - voila, duplicate image detection is easy.

Zero dupicate images - all is going well.

Now I’m going to give all 10,000 images away to people who play the game (its a puzzle) I’m writing. Basically if you hit some arbitary set of circumstances - e.g. have solved 25 puzzles then you get one GAN all for yourself with a good chance it’s unique (I don’t know how many images you’d need to create to get two that were exactly the same - hopefully it’s stupidly unlikely). I’ll delete the original from my server and you are now the proud owner of a GAN image that (hopefully) nobody else in the world has - not even me :slight_smile:

Note - The game is free so there’s no cost to the end user…

Enter the “Russian PC”

While exploring this use of DAE I discovered that my new laptop (it’s really good) is actually slower than the “Russian PC” (see elsewhere in forums for that story). My new machine has a 3060, 8 core / 16 thread Ryzen 9 5900HX and 16Gb Memory. DAE won’t work with the GPU (too new for DAE) so I have to use the CPU version. With that I could churn out about 7 GANs per minute.

I’d set my goal on 10,000 images but that’s going to take a full 24 hours on my new laptop. I’ve still got 22+ hours credit on the “Russian PC” - lets give that one a go… At least I get to use my laptop this way as I can run the Cloud PC client on one of the other (the crap ones) machines - problem solved.

I booted up Russia, installed DAE CLI, my scripts and some other stuff (an FTP client is somewhat essential so I could move everything from Russia to England with ease - don’t wanna stick these in some cloud storage, defeats the plan). Anyway, straight away Russia was slightly faster than my new laptop - this was likely as it’s a server with a lot of memory. This made me wonder - what about Tensorflow? I’d already built a TF 1.15.5 that works on older GPUs (which Russian PC has).

With Tensorflow installed in such a way as to take over the task from the DAE version the Russian GPU gets in on the GAN generation game and boosts the output to 14+ GAN images per minute. 11 hours later I’ve got all 10,000 images - transfer them home and we get back to the bit above…

I’ve still got 11 hours on the Russian PC if I need it (thought it’d just be wasted in light of new laptop). If I need to create more GAN images I’ve got the credit to do another 10,000 or so - if I need a lot more then overnight sessions mean I can get 300k in a month for 7.50 GBP :slight_smile: Nahh - this was an experiment with the idea of some little reward for my game and I’ve got that ready to go now so I’m happy…

How cool!

“:dae generate -name artwork -output art/art000001.jpg” is just a tad cryptic. Could you give an example with file names and paths etc.

Thanks

I’ll try to get round to it next week (trying to finish my game - there’s a compo with cash prizes, deadline midnight 30th Nov so after that)

Wow, brilliant idea. Above all, the story is fantastic, especially the hash proof that each picture is unique. Why don’t you give out the images as free minting NFTs? That would also cover the part about being the only owner of one of your artworks. combined with your game its absolutely amazing. the first 10k people that solved all 25 puzzles can each mint 1 of the GAN artworks.if you set the whole thing up on Polygon, the fees for the users are also minimal.

As a variation on the theme nineteen passes of Art Filter is capable of producing the same randomness from one source image. If you read https://en.wikipedia.org/wiki/Universally_unique_identifier you can see that the number of possibilities is endless (almost, but not quite).

I outlined the concept over two years ago - https://peardox.com/genetic-styles/ (dunno if the script will still work)

This would be a little more computational work than the AI Art experiment but you would end up with almost limitless variations of a single image. A GPU obviously helps in this version of the concept.

The Art thing is a stunt for my game - applying multiple filters is a more valid version of the same thing - equally pointless but more robust.

I think I’m in danger of creating Art with zero artistic capacity :slight_smile:

See Extremly Abstract - #3 by Peardox

Basically I’ll be releasing a script to do the GAN stuff this week

It does this…

And it does it faster using the Russian Cloud PC…

1 Like