Getting Started with Python Deep Learning for Beginners
Vložit
- čas přidán 30. 05. 2024
- Not too sure where or how to start?
In this video, you'll learn how to setup your machine and begin using some of the most common tools and libraries when it comes to deep learning. You'll go from absolute beginner to successfully running your own image classification model by the end of this tutorial.
Get the Code github.com/nicknochnack/Image...
Links
Anaconda: www.anaconda.com/products/dis...
Git: git-scm.com/download/win
Venv Documentation: docs.python.org/3/library/ven...
Tensorflow CUDA/cuDNN Versions: www.tensorflow.org/install/so...
CUDA 11.2: developer.nvidia.com/cuda-11....
cuDNN Archive: developer.nvidia.com/rdp/cudn...
Visual Studio 2019: visualstudio.microsoft.com/vs...
Chapters
0:00 - Start
1:58 - PART 1: Setting up Python and Jupyter with Anaconda
3:38 - Installing Anaconda
7:38 - Working with Jupyter
12:32 - PART 2: Environment Creation Workflows
13:44 - Working with Git and GitHub
19:12 - Creating Environments for DL
24:11 - Activating a Virtual Environment
32:05 - PART 3: Installing Tensorflow for Deep Learning
39:23 - Running the Image Classifier Pipeline
41:32 - PART 4: Configuring your GPU
57:06 - PART 5: Training a Deep Image Classifier
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!
#deeplearning #python - Věda a technologie
This man really can't stop giving us some quality resources.
That’s why I’m here my homie! Spreading the ML love! Thanks for checking it out 🙏
Truu! Thank you so much ❣️💓💓💓
for real!!
Tensorflow has dropped native windows support for GPU usage in their latest versions of tensorflow, so if you are having an issue with tensorflow recognizing your GPU, what I did to fix it is to reinstall the virtual environment, and put this for the pip install code: "!pip install tensorflow==2.8 tensorflow-gpu==2.8 opencv-python matplotlib protobuf==3.19.1". This should make tf recognize your GPU
thanks bro ! that saved a lot of time as i was searching everywhere to resolve this ! (but still after following everything GPU is not showing at last..it kind of blinked first it was there but when i executed command before the check command it disappered and now model in not using GPU, taking a lot f time to train model) any idea how to resolve issue ? (we can chat on discord) please
@@ujjawaltyagi8540have you installed CUDA and CUDNN ??
It's not working either
I use the tensorflow == 2.12.0
But it's just gives a long error
Guys if you did the same and there is no gpu, here is what you should do. First create new environment with python not more than 3.10. Also Tensorflow version should be less than 2.11.
Here is commands you should run in cmd:
conda create -n newenvname python=3.10
conda activate newenvname
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
python -m pip install "tensorflow
@@piyushvarshney6724 check my answer to this comment
Thanks, Nicholas, I followed every inch of this tutorial and I was able to properly set up my Machine Learning environment by carefully selecting the versions that you used for Tensorflow, Cuda, cuDNN and boom my GPU came alive. Keep more tutorials rolling in.
For those who are getting some errors at the moment of installing tensorflow, tensorflow-gpu, opencv-python and matplotlib (!pip install tensorflow tensorflow-gpu opencv-python matplotlib) make sure to check documentacion about versions.In this moment (March, 2024):
- The last Python supported version by Tensorflow is 3.11
- 'tensorflow-gpu' has been removed, so you just have to type '!pip install tensorflow opencv-python matplotlib'
when installing CUDA, i have an error "no supported visual studio version found". I know this is out of topic, but do you maybe know how to fix it?
Thank you soooo much Nicholas! The quality of your videos combined with your contagiousness is amazing. I'm doing my senior thesis at the moment and didn't know where to start (i have no experience at all) and this video (and in general your videos) helped me a lot. Much love from Greece!
I always like the vibe that you have in this video, it's not boring to watch even it's 1 hr and a minute length vid
Thanks a million @John, seriously means a ton!
This was great! Can't wait for the next one, absolute legend
Great content. Teaching the way of creating the virtual environment and understanding the appropriate versions of tensorflow, cudnn and CUDA were brilliant.
Glad you enjoyed it @shehan! It seemed trivial but it's so helpful in the long run!
Thank you so much Nicholas, so many people need this basics, and will enable many to follow the tutorials
Agreed, that was the goal with this! Have a kick start and then that way everyone can try out the tutorials regardless of skill level.
You really have the best videos to get started with deep learning.
Wow, another awesome content landed! this is really excellent. I really love your content nick
Thanks for checking it out @Haruna Abdu 🙏
When's there's a ton of content about AI and stuffs, no one really says about the environment setup and setting the local machine and stuffs
But you! Giving us this kind of content is just simply amazing!
Thank you so much Nicholas.
As the other part of this video I'd to see the model deploying in fast api or something related
Hope you consider it
Thank you
Thanks a mil @jame john! Yah, will do some deployment stuff soon!
!pip install tensorflow tensorflow-gpu opencv-python matplotlib
let me know how to resolve this
I was waiting for this video . Thank You.
Thank you so much for the quality content. You are my fav teacher on ML ❤
Best thing to wake up to in the morning is a notification message on your cell phone saying the Sir Nic uploaded a new video! thanks brother for the amazing job.
Have an awesome day @Siraj, glad I could make it that little bit extra!
Weird enough, there was one picture of a sad in the happy folder... after putting taking that out, I reran the model and it worked. But great content! This is exactly what I've been looking for.
Caught it!!
Thanks always look at you videos and I consider is the best way for learning about IA with python. Always use your tutorials.
Man, your content is so good! You are a legend, thank you!
I am starting to learn Ai for myself and i am extremely lucky to have a mentor like you on my side
Thank you for your work and I'm going to search the next steps (tutorials) on your channel
The quality of the content! Thank you sir.😊😊😊😊.
Thank you soooo much Nich!!!! This was amazing TF configuration tutorial. I followed each and every step and got mu device configured. 😍😍😍😍😍😍😍😍
outstanding setup video! many of the setup steps eg environments/git/github aren't often talked about
aha a lewis fan !! btw the best tutorials i've come across. thanks Nicholas
thanx for amazing tutorial bro
its really help for beginners
i'm kind of people who start learning new thing by project not by in depth
after 2-3 project, i have an idea about what i'm going to learn then i start learning things in depth
and your this playlist help me a lot bro again thanx
I'm just about to bite the bullet and get my first pc build underway for deep learning. I've been using colab for a while now to train and I've found it has really hampered getting a good understanding. Thanks for the vid, this has been favourited to rewatch when the build is complete and I am configuring my GPU!
Go getem Tom! It makes a huge difference having a machine you can quickly get access to and hammer with some prototypes! lmk how you go!
!pip install tensorflow tensorflow-gpu opencv-python matplotlib
let me know how to resolve this
I really appreciate this quality content!!
Thanks for the tutorial, love your advice and introduction for deep learning for beginners
Anytime @Just A Cat!!
The ultimate tutorial! Appreciated!
love ❤ the content, thanks for the extra ordinary efforts
Thank you Nicholas Renotte for the amazing content followed your tensorflow object detection tutorial .
My humble query is can we apply the save model in this tutorial for real time detection using webcam to classify whether a person is happy or sad like the one with tensorflow sign language detection tutorial where we load the checkpoints for real time sign language detection when it was testing? Is this classification model works only for images?
Really really great video❤, for those who have problems installing tensorflow-gpu make sure that the conda env that u are using have the pyrhon version that you need as well of the kernel that you create with that conda env
Yea im having problems because im on windows 11
@@ShadowkingX Hey friend, I've also encountered the same situation as you. I want to know how you handled it in the end
@@XieYuting nope. The only solution is to wait for them to update or do it in a virtual environment
@@ShadowkingX Okay thank u
Impressive Nicholas your infectiousness in your teaching style is amazing! The quallity of the content is great, is very helpfull, not boring and your vibe is awesome! Thanks for all!
I have some questions for you:
1. If we are running this on a mac machine is it unnecessary to install git and microsoft visual studio right? Furthermore, should we omit the setup involving GPUs in part 4, because we arent have nvidia gpu?
2. On the mac enviroment are there any spesific lines of code that we must modify? For instance, the line addressing the prevention of OOM errors through GPU Memory Consumption Growth - should we replace 'GPU' with 'CPU' to cater to CPU utilization?
3. Expanding the model's classification capabilities to encompass more categories - let's say, 9 classes. Would achieving this involve solely uploading 9 data folders of images within the 'data' directory? Or are there code adjustments required to accommodate the altered CNN architecture?
Your insights are greatly appreciated.
Great tutorial and production quality
The best instructor! Thank you so much for such simple educative explanation! I've been into ML since 2018 when Keras was a baby still. It was so difficult back in the day to find good explanation for algorithms and what they do, especially in my country where we can't buy books easily from Amazon and such. I was doomed to Indian youtubers. 😂 Thumbs up!
I refer to those days as the wild wild west of deep learning, seriously there was so little back then to learn 😅. Anyone that was doing this in 2018 is probably an absolute wizard now though!! Thanks a mil for checking this out @Fasso!
@@NicholasRenotte Totally. There were scientific papers on arxiv and Siraj who had an awesome high level channel but turned out to be a scammer in the end. So sad.
Thank you Nicholas, you are my hero💪
Thank you so much Nicholas
Hi Nicholas! i just followed all your tutorial and I loved it, i learnt a lot of things. I got a M1 so i had to install tensorflow in other way but after some funny moment I finally reach the end.
One problem is that the model returns always a "sad" prediction. I tried to remove some noise from sad and happy folder but the result was the same. Do you have any advice? I didn't chance the code
The "tensorflow-gpu" package has been removed!
Please install "tensorflow" instead.
Thats what I got when I run the command below!
!pip install tensorflow-gpu
And instead of tensorflow-gpu there is tensorflow-intel installed through the tensorflow installation , so it has the whole package
Thank you so much for sharing these valuable tools. I am a beginner in Python so this type of tutorial fits very well to me.
Now, when I try to install the Anaconda, the first check box in the Advanced Options is gray out. Any thoughts? My guess is that my OS is Windows 11. It has been giving me a bunch of headaches with restrictions... but idk.
Hello. I've seen a lot of your video tutorials especially about object detection, license plate recognition, and others. It was quite helpful for my campus assignments to my project. From several tutorials on object detection (and the like), have you made a tutorial on how to get the confusion matrix, accuracy, precision, and more after we train, test, and validate the dataset of these images? Thank you before!
Don't think I have one out there yet, will add it to the list!
@@NicholasRenotte Cool! Waiting for the next content! Thank you!
dude omg you're so goated for this TYSMMM
You are Great Nick
Thank you verymuch for your tutorial this has help me alot
Thank you, amazing tutorial
Nice tutorial on the install, additional question: what about using spyder, would that need to be installed within that environment or globally on the drive and then bound to a specific env? And what about using 2 tf versions which require different cudaversions? Ty anyways so far!
Haven't done too much with Spyder but I'd imagine it would need to sync with the venv as well. For 2 CUDA versions, I normally install both and ensure I've got them both in the env variables.
Hi Nick. I've trained a classification model according to your instructions. But I have a question how to use this model for classification in realtime videos, like drawing a box surrounding an object?? Finally, Thank you so much !!
thank you! loved it
Great content on deep learning, but it would have been even better if the installation and configuration part were covered more efficiently or separately. Nonetheless, the deep learning portion at the end was fantastic and made it worth the wait!
is there any dis/advantages between installing packages in an environment using pip vs conda and making new environments using pip vs conda??
hey Nico. Thanks for this work. Can you show us how we can test again in our own computer environment after training in Colab? I don't have CUDA. GPU is too bad. so is RAM
Hi Nicholas, I accidently installed Visual Studio 2022 instead of 2019. As you said in the video that it was working for you. Although when I installed CUDA software it showed a note where it said that it didn't install Nsight for 2019 Visual Studio. Will that be a problem? I am installing everything for the first time here, don't really know what I am doing so I don't to make a mistake and do the things all over again.
Hey Nicholas thank you for the great video, but I have a problem concerning the installation of ipykernel it doesn't install in my prompt command, I am blocked here, and I can't find the answer. Do you know how where the problem can be, please?
Thanks Nicholas! Is there any way to train image classifier without GPU, only using cpu?
I want to share a tip regarding a tutorial advice for troubleshooting errors during the installation of TensorFlow and TensorFlow-GPU. Even if newer versions are available, installing the exact versions mentioned in the tutorial can resolve the issue. Personally, I created a new virtual environment and installed Python 3.9, despite my Anaconda defaulting to Python 3.11. Then, I installed TensorFlow 2.10.0 and TensorFlow-GPU 2.10.0, and everything worked smoothly.
Hello! How did you install the python 3.9 version in you jupyter lab environment?
THANK YOU so much, you are always my hero
🙏 thanks for checking it out!
I downloaded anaconda but it just had python 3.11. When I tried running the first pip install to get tf and matplotlib etc. I got an error . What can I do?
Thanks Sir Nicholas.
Question : Are we going to install all the dependencies(tensorflow and all) everytime in each project?
Thank you so much for this.
Thank you very much
Is the deep dive with more than 2 classes online?
When activating the venv I have both, (base) and (venv) running. I can only open jupyter lab when both are running, but not when (base) is decativated. To open jupyter lab with only the (venv) running I would have to install it there. Now I am wondering whether it is fine to have both activated or should I better only activate (venv) and install everything that I need there?
How did you log the metrics every epochs?
I mean, the logger runs at the same time in every epoch without using tensorboard?
It doesn't seem like there's a way to download cuda or cudnn on Mac M2? What should I do instead? Will I still be able to do these deep learning projects on Mac? Thank you for the channel. This is amazing!
great tutorial really helpful for beginners, can someone pls tell me if i have to run the tensorflow installation line every time i restart the jupyter lab or is it saved for that project and if i start to work in a new project do i need to reinstall tensorflow cus it took a bit of time for me
Amazing video!
Hi there, i have python 3.10.11 and TensorFlow 2.1 installed on my machine, what version of CUDA &cuDNN should i install?
Some of my code work with py 3.10 only...
Hi Nicholas! i have one dbt,what if we already have newer version of nvidia cuda?
Hi , I have a question... i have tried creating the virtual environment using the "python -m venv name" command that you told but i keep getting this error..."Error: Command '['C:\\projecttut\\ImageClassification-main\\frass\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1."
i uninstalled and re installed anaconda both with single user and multiple users and tried both times still it didn't work...
Exciting stuff! I would really like a robogarden and to know the best resources...I am working on a raspberry pi garden, learning what it can do...I'm a big fan of learning the ai and it will be really cool to see what it can do for real life applications like agriculture!
Ooooh cool, I know crop yield prediction and leaf disease detection are some interesting use cases @Matt!
@@NicholasRenotte oh wow! I would love to see some tutorials on that,as well as setting the right humidity and temperature and how to make a good spectrometer to see how many vitamins the plants are producing...I'm a big fan of your videos!
Thanks for great content
Hey guys, @28:50 if you're installing ipykernel on mac, you might wanna enter the command as follows
python -m ipykernel install --user --name=imageclassification
Happy DeepLearning!
Thank you so much! I use Linux and this worked for me as well!
Works on Linux too! Thank you!
(24.10.2023) if you do this today and get an error at first line (pip install tensorflow etc) remove tenserflow-gpu.
****please pin this comment**** @NicholasRenotte
Hello, a great content. However after I run the code I get an error :
code : hist = model.fit(train, epochs=20, validation_data=val, callbacks=[tensorboard_callback])
error : "'Function' object has no attribute '_concrete_stateful_fn'"
Hey nick I am having a problem with switching the C to D for the command prompt because it is saying device is not ready and I don’t know what the problem is.
'imghdr' is deprecated so you can use pillow library to determine the format of image
You're the best.
which command prompt are u using anaconda power shell?
hi sir will these tutorials might have the chance to work with RPI?
I expected to see more speed increase with the GPU.
Would it be better if you use cache() and prefetch()?
oya dude you are great, sorry no the GOAT!
cudnn 8.1 isnt publically available now. you are required to have a premium nvidia membership to have that. so, im unable to complete the setup. i tried it with other newer cudnn versions, but none of them are working.
0.02s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Installed kernelspec faceDetection in C:\ProgramData\jupyter\kernels\facedetection
i am getting this after installing the kernel
is something wrong ?
sir i clone image classification in comman propmt but not all get it in model its just the imageclassifier.h5 are there.in happy folder
Thank you bro highly needed this thing!!! Loving you content Nicholas!!
Can you also give some tips like how to get a job as Deep Learning Engineer in a tech giant with 0 experience and no college? 😅😅
Step one: build stuff! 😅 nah, I kid I kid. I'll do some career stuff soon!
@@NicholasRenotte thank u sir...btw ur so cool, like I am too learning Machine Learning since 2 years and am no where near u... how efficiently and smartly u are able to do so many complex projects and topic. Really appropriate that sir 😆
Hello!! My tensorflow is not downloading onto my Jupyter Lab. Do you have any advice for what I should do?
Isn't it better to use google colab because machine learning and deep learning stuff takes too much memory when running on the system
can u help me in this error
TypeError Traceback (most recent call last)
File ~\ImageClassification\imageclassification\lib\site-packages\tensorflow\python\data\util\structure.py:102, in normalize_element(element, element_signature)
101 if spec is None:
--> 102 spec = type_spec_from_value(t, use_fallback=False)
103 except TypeError:
104 # TypeError indicates it was not possible to compute a `TypeSpec` for
105 # the value. As a fallback try converting the value to a tensor.
While installing kernels in virtual enviornment only two kernels were installed -
1. ImageClassification
2. python.
I mapped the entire instructions explained above but still encountered the same problem. How to solve this issure?
Nicholas have you created a ML course? I cant seem to find one. I think you would crush it and help many!
Thanks!
is it okay to create and activate virtual environment through anaconda?
You are the best!
when I run the code for TensorFlow gpu its shows an error and it is saying that tensor flow gpu has been removed
Hey, can you please tell me what the alternative is for AMD GPU users. Because, like you said, it still doesn't recognise my GPU at all and I keep getting a myriad of errors.
Thanks in advance! :)
Tensorflow-gpu has been removed. Please install tensorflow instead. The tensorflow package supports GPU accelerated operations via Nvidia CUDA. Thank you!
love you man
Can't activate the environment using the given command, its giving an error saying "".\ev_3\bin\activate' is not recognized as an internal or external command, operable program or batch file." PLease HELP..
Great tutorial!
I have a quick question. I keep getting this error "[Errno 13] Permission denied: '/usr/local/share/jupyter'" when I run the code "python -m ipykernel install --name=imageclassification" inside the virtual environment. What might be the problem? I'm using Ubuntu for this build.
Can you try this for me @Willies (add the user flag):
python -m ipykernel install --name=imageclassification --user
@@NicholasRenotte It worked! Thanks
@@NicholasRenotte Loving your content, pretty much exactly what I'm after and cool to have a local tutor (I'm in Melbourne!) Just wondering what does adding the user flag do here?
@@NicholasRenotte Had the same on macOS and it worked with --user!
What if you installed python already on your computer? Will Anaconda disturb/interfere with it? Or they install happy next to each other?
Yeah normally it causes a bit of a pain, if you already have Python you can install jupyter using pip!
new version of tensorfflow has no cuda and cudnn what should do now