Neurossia: how I taught a neural network to draw a Russian chthon

Introduction

. : " ", "", "Russian doomer music" . , , - , . , . , - ? .





, , , - . , , , , , , , . - .





Examples of downloaded photos

, python- vk_api. api , . :





import os
import vk_api
import urllib.request

def captcha_handler(captcha):
    print (f"url: {captcha.get_url()}\n")
    key = input("Enter captcha code: ")
    return captcha.try_again(key)

def auth_handler():
    code = input("Enter 2FA code: ")
    return (code, True)

def save_post_pictures(post, imgfolder, imres):
    pictures = []
    
    if not os.path.exists(imgfolder):
        os.makedirs(imgfolder)
    
    for attachment in post['attachments']:
        if attachment['type'] == 'photo':
            photo = attachment['photo']
            for size in photo['sizes']:
                if size['type'] == imres:
                    url = size['url']
                    filename = ('_'.join(url.split('/')[-2:])).split('?')[0]
                    urllib.request.urlretrieve(url, os.path.join(imgfolder, filename))
                    pictures.append(filename)
                    
    return pictures

phone = input("phone ")
password = input("password ")
domain = 'plattenbauten' # vk.com/plattenbauten

sess = vk_api.VkApi(phone, password, captcha_handler=captcha_handler, auth_handler=auth_handler)
sess.auth()
api = sess.get_api()

posts = api.wall.get(domain=domain, count=1)['items']
save_post_pictures(posts[0], domain, 'z') # https://vk.com/dev/photo_sizes - z  
      
      







100 . , . EfficientDet ( , , .., ), - NLP NLTK - . 10 .





Stylegan2 . (, , ) . , - Google Colab ( ).





- .tfrecord ( readme). , tfrecord- , Colab . , , 10 10241024, .tfrecord . , stylegan2 .tfrecord-, .





Why are birches so rustling in Russia?
?

Google Colab 10241024. , " ".





A few eras later

- . - ( mubert). .





, . , ( 512) ( , ), . ( ) , . generate.py , , , .





With the advent of architectures like stylegan, generative art is gaining momentum - some have even successfully sold generative paintings for hundreds of dollars without writing a single line of code. I hope this article will lead someone else to the idea of ​​using neural networks in art, especially since services like Colab significantly reduce the entry threshold and costs to get interesting results.





More pictures
More pictures

Links

Neurossia in VK





Stylegan2-ada neural network





Python wrapper api








All Articles