Neural Style Transfer Tutorial with Tensorflow and Python in 10 Minutes

  Рет қаралды 44,742

Nicholas Renotte

Nicholas Renotte

Күн бұрын

Пікірлер: 93
@Andy-rq6rq
@Andy-rq6rq 3 жыл бұрын
back at it again Nick, love the unique intros
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
🤣 I never know if people like them but I lmao when i'm making them!
@daidraich
@daidraich Жыл бұрын
Wow thank you so much!
@ashleysami1640
@ashleysami1640 3 жыл бұрын
Nick R, the next Monet 🧑🏾‍🎨
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
🤣 painting is my passion *furiously paints portrait*
@noahorosw
@noahorosw 2 жыл бұрын
Hi Nick! I just wanted to say this is so cool . I've always wished I could paint like Van Gough , and now I have like 50 brand new Masterpieces I just keep making more and more so cool . And I have so many pictures I've taken over the years with my drones from way up high and I haven't even tapped into those files yet . If you come up with anything new on this subject please make another video for all of us artist's so we can dive deeper into this , and create some serious real stuff . Like to take an image such as one we have created here . A profile picture with a Van Gough , and a deep learning code that will actually enhance , and beatify our finished image ? I don't know ? You are the master .
@joshcummins3916
@joshcummins3916 3 жыл бұрын
Very straight forward and awesome brother. Can't wait to make some art with this.
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Awesome!! Let me know how you go! Got some music generation vids planned as well!
@LuddeWessen
@LuddeWessen 2 жыл бұрын
Thank you for the demo, and code! You are very enthusiastic and inspiring! (I have spent hours tinkering with it.) It is amazing how these powerful things are available at our fingertips! When I started using NN:s 6 years ago, you had to script your caffee models in bash, on your own workstation, for days. And not reach very far, compared to today.
@5minupsc723
@5minupsc723 6 ай бұрын
code is working ? I went through the github repository link but couldn't find code in the repository
@zbmadon
@zbmadon 3 жыл бұрын
Hey Nicholas, is there a way to add multiple images to create a mash GAN artwork?
@NoMercy8008
@NoMercy8008 3 жыл бұрын
This is super super fascinating :D I love art, I love ML .. this is perfect
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Did you check out the projects video then come straight here? 🤗🤗 Definitely, I think there's so many sick applications for GANs, I only really just got my head around them this week when building the super res project. I think I've kinda got it down pat, ready to start building some sick stuff!!
@NoMercy8008
@NoMercy8008 3 жыл бұрын
@@NicholasRenotte Yup, as soon as the projects video ended, I hurried over to this one like a madman :D As I said, I love ML, I love art, I love programming, so I really enjoy doing "generative/procedural art" and have done a couple of smaller creative coding projects with it in the past. And it constantly keeps blowing my mind what we can do with machine learning and AI in general, again for example this style transfer model is super interesting and fascinating to me :)
@funny11744
@funny11744 3 жыл бұрын
Hi ! Do you kow some free software to increase the size of image obtained with NICK software without affecting the quality ?
@NoMercy8008
@NoMercy8008 3 жыл бұрын
@@funny11744 There are ML super-resolution models that can be used to up-res an image, I think Nick is doing that kind of project more or less right now, so he might have a video about exactly that soon :)
@NoMercy8008
@NoMercy8008 3 жыл бұрын
@@funny11744 In the meantime, there's also a project on github called image-super-resolution (ISR), you can check that out if you wanna take a little dive into that topic before Nick releases his video.
@newnewkidsontheblock
@newnewkidsontheblock 3 жыл бұрын
What is the before steps to this? As far as actually trying to run this in Anaconda and Jupyter? So the images can import?
@onetwo203
@onetwo203 3 жыл бұрын
Top notch quality, keep going
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Definitely, thanks @one two!
@apristen
@apristen 2 жыл бұрын
nice tutorial for total beginners without deep tech details :-)
@creativebeetle
@creativebeetle 3 жыл бұрын
Excellent video! Unfortunately I get an error "NameError: name 'load_image' is not defined" in the "content_image =" cell. Any idea as to why?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Heya @Dennis, there was an error I made in the video. The function and function call should be load_image. Try out the baseline code: github.com/nicknochnack/Python-Neural-Style-Transfer/blob/main/Neural%20Style%20Transfer-Template.ipynb
@newmoneyideas
@newmoneyideas 2 жыл бұрын
Video is good...pls also tell where you are writing this code..i mean software to write and execute the code.
@im_yuri_24
@im_yuri_24 Жыл бұрын
Hello, Nicholas! Help needed! You do a great job and I've used your notebook as a showcase and it was working fine just 2 weeks ago, but now something happened - I've got error message at step 2 - ValueError: Trying to load a model of incompatible/unknown type. How this can be?
@im_yuri_24
@im_yuri_24 Жыл бұрын
In case someone meets same problem - check folder \AppData\Local\Temp\tfhub_modules - empty folders there block the model. Interesting, that in fact you can use 2 models = /magenta/arbitrary-image-stylization-v1-256/2 as in Nickolas's video or this /magenta/arbitrary-image-stylization-v1-256/1 - but they both can be blocked by matching empty folder in the folder, mentioned above. You need just delete empty folder and it will work
@waishingwong3208
@waishingwong3208 3 жыл бұрын
Hi Nick! Thanks for the tutorial. What versions did you use for tensorflow and tensorflow_hub? I keep getting errors on my tensorflow_hub import (cannot import name 'Layer' from 'keras.engine') or (cannot import __version__ from keras). I tried changing my tensorflow version a few times, and I get an error on my tensorflow_hub import everytime.
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
For this, I think I was using TF 2.3.1 and Python 3.7.3, lmk how you go!
@WingtoKwong
@WingtoKwong 3 жыл бұрын
"stylized_image = model(tf.constant(content_image),tf.constant(style_image))[0]" this line it gave me a Unknowerror...and it told me that 'Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.'
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Hmmm, this is normally a TF error. What version of TF are you running?
@doudou3580
@doudou3580 3 жыл бұрын
hi Nick! I followed your fantastic tutorial but was stuck in ‘ Loading a Neural Style Transfer model from Tensorflow Hub’. My program just could not run further and it's driving me crazy! I'm wondering if it's the Internet problem or the model itself. Lots of thanks.
@tracywang1
@tracywang1 9 ай бұрын
Thanks for sharing I'm wondering how to train my own stylization model? Can you shaed some light on that? or is there resources to learn that? Thanks!
@vikashchand.
@vikashchand. 3 жыл бұрын
If Bob Ross was a programmer 🔥😂 Cool stuff man! 🤘
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
🤣🤣 *in Bob Ross voice* "And now we're going to paint some happy little trees"
@vikashchand.
@vikashchand. 3 жыл бұрын
😂😂
@hazel3899
@hazel3899 3 жыл бұрын
Hopefully you're still checking comments on this! ;) i get this error when trying to call the image "Error! is not UTF-8 encoded" - looking for solutions on stackoverflow but no luck so far
@riis08
@riis08 3 жыл бұрын
@Nicholas Renotte. Great video again... thanks... Is it possible that you can do this in Nodejs with realtime images??
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Thanks so much!! Yah, let me add it to the list.
@funny11744
@funny11744 3 жыл бұрын
@@NicholasRenotte Hi Nick. I let you know that I solved the problems from ColabNotebook using Google drive for upload . So I erased my comment wit errors found for Colab Notebook . Thanks for support and for understanding.
@SpecialAgentOso
@SpecialAgentOso Жыл бұрын
woah back up... what even is that page you're on? what am i supposed to install to get this going?
@_ept_
@_ept_ 2 жыл бұрын
Thanks, it's so just and beautiful
@Revathi-hb9rs
@Revathi-hb9rs 4 ай бұрын
sir,please provide the complete end to end neural network style transfer projects with web application
@kathib2571
@kathib2571 3 жыл бұрын
can i use this code in google colab, too? or what has to be different there? i don´t know how to upload own pictures and so much more. what is the easiest solution to work with style transfer? thanks
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Yep, you should be able to execute the same code in Colab!
@esmatpoya
@esmatpoya 3 жыл бұрын
for the last line of code I got error "stylizedimage can you please help me
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Heya @Esmat, can you share the full error?
@ashitashetty1038
@ashitashetty1038 3 жыл бұрын
Hi, this is a great video. How can we do the same for a video?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Let me dig into that!
@Comegax
@Comegax 3 жыл бұрын
Good day! I have been trying for a while now, but I don't seem to quite get this SSL URL Error "URLError: " any ideas on the fix?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
On this project @Cian?
@alexijohansen
@alexijohansen 3 жыл бұрын
How does this handle the difference in resolution?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Didn't read into it too much, but this is the paper behind it: arxiv.org/abs/1705.06830
@funny11744
@funny11744 3 жыл бұрын
Hi Nick. A kindly request and question : how to increase the size of stylized_image to 1or 2 MB at least, without affecting the quality of image ? The stylized_image is very small. Maybe you can find a solution to add some codes to this software , or please mention few free of charge Photo editing software . Many thanks.
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Would likely require a rearchitect of the model as far as I understand @Costache Bicu. Definitely possible to do though.
@funny11744
@funny11744 3 жыл бұрын
@@NicholasRenotte Sorry for trouble Nick, I hardly wait your next video to increase (improve) the quality of result in order to use that software in place of basic image filters- very boring as you mentioned. I have important plans using that technique , please help to improve the quality- the size of image. thanks
@ATHARVA89
@ATHARVA89 2 жыл бұрын
Nick if you could zoom in a bit from next time !!! great tutorial
@martinkaiser5263
@martinkaiser5263 3 жыл бұрын
Can i run this on Windows 10 ? Because i have a RTX 2080 TI only available on windows . And how to do it ? Have Anaconda installed
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Definitely, you should be able to open a Jupyter Notebook, pip install any packages you need, and run the code: github.com/nicknochnack/Python-Neural-Style-Transfer
@martinkaiser5263
@martinkaiser5263 3 жыл бұрын
@@NicholasRenotte Which packages do i need and wich version ?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
@@martinkaiser5263 for this run through you'll need tensorflow, tensorflow_hub, matplotlib, numpy and OpenCV (aka cv2).
@brunohuf9016
@brunohuf9016 3 жыл бұрын
your code worked?
@martinkaiser5263
@martinkaiser5263 3 жыл бұрын
@@brunohuf9016 I set up Ubuntu 20.04 on a external SSD and doing all this stuff in Ubuntu and it works great
@gareven
@gareven 3 жыл бұрын
Can we get output image size bigger than 2000 x 2000 pixels?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Would need a new model, but definitely possible!
@ianmarlowe3936
@ianmarlowe3936 2 жыл бұрын
did you ever find a model for this?
@MohamedAli-hh3qm
@MohamedAli-hh3qm 3 жыл бұрын
What is your idea about quantum computing sir...
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
That it's AWESOME! I haven't done anything yet but I work pretty closely with some of the team that uses this www.ibm.com/quantum-computing/ hoping to do a video on it soon!
@faraheldeshnawy1202
@faraheldeshnawy1202 3 жыл бұрын
stylized_image = model(tf.constant(content_image),tf.constant(style_image))[0]" this line it gave me a key and type error I am using TF 2.0
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Heya @Farah, can you share the error?
@robotixIIIX2017
@robotixIIIX2017 Жыл бұрын
can u give link to site where we can do this?
@thicccrusade2302
@thicccrusade2302 2 жыл бұрын
Whole thing is broken, nothing is defined. No idea what's going on.. EDIT: Ok, now it's working, had to pip install some packages.. pip install tensorflow pip install tensorflow-hub pip install matplotlib pip install numpy pip install opencv-python
@NicholasRenotte
@NicholasRenotte 2 жыл бұрын
All good now? 🙂
@allenwong9918
@allenwong9918 3 жыл бұрын
how do i choose the image quality?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
I think you're kinda limited with this model, possibly look at using an alternate model would be my suggestion.
@iammayurn
@iammayurn 3 жыл бұрын
How to part 2 of this video optimization and gradient descent.
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
You got it!
@bashirmanafikhi
@bashirmanafikhi 2 жыл бұрын
wow that's great thanks
@saichowdhury7294
@saichowdhury7294 2 жыл бұрын
Import tensorflow_hub as hub(there I got module error
@Moctop
@Moctop 3 жыл бұрын
Seems it uses vegetation and water to draw the portrait simply because it was in the reference...vegetation and water isn't the "style". It should look at the brush strokes, palette use, not copy the colors straight off. It's a big ask, I know.
@syahrulhidayatullah9666
@syahrulhidayatullah9666 3 жыл бұрын
hi sir, why i cant install a tensorflow on python 3.9?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Doesn't look like it's supported yet www.tensorflow.org/install/pip, try 3.8.x!
@iammayurn
@iammayurn 3 жыл бұрын
Why we need channel 3 and dtype flot32?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
It's part of the requirement for the model inputs!
@anticipate_tv
@anticipate_tv 3 жыл бұрын
legend
@muditrustagi5775
@muditrustagi5775 3 жыл бұрын
wowowowow superrrrrrr
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Thanks so much @Mudit!
@ezequielaguilera130
@ezequielaguilera130 3 жыл бұрын
can load more than 1 image ?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
Haven't tested it @Ezequiel Aguilera
@funny11744
@funny11744 3 жыл бұрын
@@NicholasRenotte Does the software work with bigger file size? 1 or 2 MB photos ?
@NicholasRenotte
@NicholasRenotte 3 жыл бұрын
@@funny11744 I think it scales them down when transforming. I haven't tried anything that big tbh.
Basic Theory | Neural Style Transfer #2
15:20
Aleksa Gordić - The AI Epiphany
Рет қаралды 20 М.
Tensorflow Tutorial for Python in 10 Minutes
11:33
Nicholas Renotte
Рет қаралды 465 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 11 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 124 МЛН
Муж внезапно вернулся домой @Oscar_elteacher
00:43
История одного вокалиста
Рет қаралды 7 МЛН
Upscale your Images using DEEP SUPER RESOLUTION with ESRGAN
21:24
Nicholas Renotte
Рет қаралды 111 М.
Pytorch Neural Style Transfer Tutorial
24:38
Aladdin Persson
Рет қаралды 23 М.
I tried to build a ML Text to Image App with Stable Diffusion in 15 Minutes
18:44
Training a GAN from your Own Images: StyleGAN2 ADA
20:04
Jeff Heaton
Рет қаралды 76 М.
Neural Style Transfer - Python Tensorflow Tutorial
13:24
NeuralNine
Рет қаралды 2,3 М.
Machine Learning Projects You NEVER Knew Existed
15:20
Nicholas Renotte
Рет қаралды 183 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 381 М.
CS 152 NN-15:  Neural Style Transfer: Overview
10:23
Neil Rhodes
Рет қаралды 6 М.
What is Transfer Learning? | With code in Keras
10:52
AssemblyAI
Рет қаралды 27 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН