AI generated fantasy portraits!

 

NO ARTIST CREATED THESE.
IT'S ALL MADE BY AN ARTIFICIAL INTELLIGENCE.

  Well, not exactly "made"... There is a source image indeed created by a human artist, but using it as reference, the AI has transformed it into thousands of original portraits!   Hi, everyone! Since Homework Week 3 of World Ember is all about artwork, I want to share this magnificent piece of code. Basically, there are these guys who wrote a rudimentary AI (we call those "Neural Networks" here in Russia, but I don't know if the term is different in other parts of the world) that transforms one reference image into a myriad of others. The result is these magnificent Neverwinter Nights-like portraits that are distributed with the CC0 license and are free to use in all projects, even commercial, with no attribution required. Though I'd still attribute these magnificent coders, cause this is something sorely needed in the RPG community ;)   Here are some examples of these portraits generated by me:

    And here is their image gallery as well. Looks like it's being updated daily. And this is stil alpha! Now they're training their network not on one image, but on many more made by artists around the world. If you're an artist, it'd be awesome if youy  

How the hell do I use it?

  Easy! So, if you wanna use it, they've got a quite simple guide over here, but I'm doing an even more simple one. Looks like they've also forgot to reupload the modelling file, but gladly I've got it, and the link will be provided.   For it to work, you need to have a Google Drive. It's free for any Google account, which most have. It provides 15GB free.
Check spoilers in this guide for image references on how to complete a step ;)
 
  1. Open your drive.google.com, or create a new Google account if you're not comfortable with giving permissions to outside scripts.
  2. Create a folder called Networks. Download this file and upload it to Networks.
  3. Proceed to this github notebook. Github is a space for programmers to share their work. Naturally, this code is distributed there ;)
  4. Click "Open in Colab"
  5. There are five pieces of code inside that can be launched by mouseovering the brackets before them, and then clicking the "run" button.
  6. Run the first script - tensorflow.
  7. It'll warn you that this github notebook isn't authored by Google. Press Run Anyway.
  8. Run "from google.colab import drive" piece of code.
  9. It'll give you a link that grants the code permissions to use Google Drive.
  10. Click on it. Choose the google account you wanna use, allow it access, then copy the access code.
  11. Get back to the tab with the code, and paste the access code into the window below the link. Press Enter, wait for it to install.
  12. So, the next code downloads a repository called "colab-sg2-ada", it'll appear as a folder on your Gdrive. Run the code.
  13. Run the code "cd "/content/drive/My Drive..." for the script to understand where should it put the images.
  14. Now, to the meat. There is this last piece of code that creates images.
There are two variables here you can change. I've marked them in bold red.
!python generate.py --network /content/drive/My\ Drive/Networks/fantasy.pkl --outdir /content/drive/My\ Drive/colab-sg2-ada/stylegan2-ada/avatars --seeds=80,3200,1600,2005 --trunc=0.5
  You can change --seeds=. Those are different methods the network use to generate an image, which results in, well, different images. Just replace the numbers after the = sign with any random numbers you can. There can be any number of those. I usually generate 4 at a time, since sometimes the script lags and doesn't want to work so I have to reinstall it all over again.   So, you can just replace 80,3200,1600,2005 with 822,8200,1500,2105 after --seeds=. You can use any numbers!Just don't forget about the commas between them! Instead of the numbers of seeds, you can also go for ranges: 2500-2700 means it'll render 200 portraits. The highest I've tried in the "seeds" is 8200 but I'm sure it can go higher.   The other variable is --trunc=. It can have values between 0 and 1. 0 is the original image, and the closer it is to 1, the more it deviates from this image. I advise you to keep it between 0.5 and 0.7 if you want to have a more clear of an image, but sufficiently different from the original one ;)   You can find the portraits in My Drive/ colab-sg-ada / stylegan2-ada / avatars on Google Drive.  
If you still can't get it to work, you can always contact me in WA Discord: Teywiłł#3167. I can even do voicechat and screensharing, provided it's somewhere between 9 AM and 6 PM GMT+3 ;)
   
This is what this AI can do with just one image (maybe more, but doesn't look like it when trunc is set to 0).
  Hope this will help many worldbuilders and TTRPG Game Masters with their characters! Right now, since it's in Aplha, these are mostly humans with occasional elves and half-elves, but then again, they want to add orcs and other less humaney species there, and for that - they need artists. You can read all about it HERE.   Enjoy!   From Russia with love,
Teyvill Dost.
 
While you're at it, or if you wanna say "thank you" to me, check out my current main project - Fringe Earth and my World Ember 2020 Pledge. I'll participate in WE to build up an encyclopedia for a YouTube series out of a D&D game called "Vicissitudes of Time" that we're currently trying to edit together, so I hope to see y'all there too, when it releases ;)

Comments

Please Login in order to comment!