Style Transfer Photography: Using your Nvidia graphics card to make artwork

in science •  6 years ago  (edited)

fourcombined.jpg

A few years ago there were some breakthroughs in machine learning. Some examples would be the Deepdream project by Google. Which was in a way a CAPTCHA algorithm ran in reverse. Other algorithms that identify objects by picture were developed, interestingly these can be ran in reverse as well. And by doing that, the algorithm is able to impose what it sees between two images and does its best to merge them. Since the algorithm is trained on everyday objects, The lower layers close to the input image can only recognize different lines and edges in them while the upper layers have more advanced shapes such as circles, triangles.

lovelylogictransfer.jpg

The algorithm extracts the style from the lower layers (edges, curves) and the content from the upper layers (shapes). Then it compares them to the input style image and content image and minimizes the differences until it is close enough.

powerlinestransfer.jpg

The algorithms above are also known as convolutional neural networks. And have such names as VGG16, or VGG19, Alexnet, NIN-Imagenet and many more.

ryulaketransfer.jpg

Many CNN's simply function as a feature extractor, it extracts the most important features from the images, and it can be used for different tasks. VGG16 and VGG19 which were commonly used in 2015. These networks actually really large receptive fields early on which causes them to use far more parameters than more modern networks like ResNet and InceptionV3, which are being used now.

https://arxiv.org/abs/1512.03385.

A common trend is to use the weights trained on ImageNet as a starting point, and then to "fine-tune" your network for a new task (object detection, generative modeling (style transfer)). To learn more about CNNs check out the cs231n course

http://cs231n.stanford.edu/

ryulincolnfishing.jpeg

Using a Python script, and installing such dependencies like Pytorch, PIP, and a few others. You can use a content image as your base image. And then add Style images that are used by the CNN to "Stylize" the content photo.

teslatransfer.jpeg

Besides the Python scripts, commands and the dependencies you will need a CUDA compatible video card. Which newer Nvidia cards are, I have a 1060 and a 1080 which are compatible and work great for this rendering small to medium size images.

A list of CUDA enabled cards:

https://developer.nvidia.com/cuda-gpus

Link to Python scripts:

https://github.com/ProGamerGov/neural-style-pt

#nvidia #machinelearning #tensorflow #pytorch #python #art #digitalart #technology #learning #education #cuda #rendering


PlatformURL/Username
Steemithttps://steemit.com/@solominer
D.Tube
Wekuhttps://deals.weku.io/@solominer
Bit.Tubehttps://bit.tube/solominer
MithrilSolominer
Bitcointalkhttps://bitcointalk.org/index.php?action=profile;u=83228
CryptoPanichttps://cryptopanic.com/solominer
Whaleshareshttps://whaleshares.io/@solominer
Bearshareshttps://bearshares.com/@solominer

HyedqTBryV.gif

thanks @nevlu123 for the animation

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

about Nvidia they are developing new AI , when you draw something let's say about nature it's turn it to a real natural image check it out:

@cityofstars yeah they seem to be innovating alot right now. Oh cool I have not heard of GauGAN, reminds me of pix2pix. I may need to play around with that, thanks for the link.

Posted using Partiko Android

Anytime brother :)

Hi @solominer!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 3.020 which ranks you at #10697 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 247 contributions, your post is ranked at #97.

Evaluation of your UA score:
  • You're on the right track, try to gather more followers.
  • The readers like your work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

beautiful photography...

Posted using Partiko Android

@shuvo35 thanks alot

Posted using Partiko Android

Congratulations @solominer! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 42000 upvotes. Your next target is to reach 43000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

You can upvote this notification to help all Steem users. Learn how here!

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Loading...