Real-World Python Neural Nets Tutorial (Image Classification w/ CNN) | Tensorflow & Keras




[ad_1]

In this video we walk through the process of training a convolutional neural net to classify images of rock, paper, & scissors. We do this using the Tensorflow & Keras libraries. This is a follow-up to the first video I posted on neural networks.

Introduction to Neural Nets: https://youtu.be/aBIGJeHRZLQ
Link to my code (github): https://github.com/KeithGalli/neural-nets
Link to Google Colab file: https://colab.research.google.com/drive/1MiRP2fwgGg6zfEnLuOZ_6X7lmeePTFaR?usp=sharing

———————
Resources!

Learn more about CNNs
Good written overview: https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53
Good video overview (@CodeEmporium ): https://youtu.be/m8pOnJxOcqY
Illustrated Examples of CNNs: https://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d
MNIST Example: https://keras.io/examples/mnist_cnn/

Learn more about TensorFlow datasets
https://www.tensorflow.org/datasets/overview
https://www.tensorflow.org/datasets/catalog/overview

Learn more about Kerastuner
Documentation: https://keras-team.github.io/keras-tuner/
@sentdex : https://youtu.be/vvC15l4CY1Q
@Krish Naik : https://youtu.be/OzLAdpqm35E

⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I’ve been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=keithgalli&utm_content=description-only

———————
Video Timeline!
0:00 Video Overview
0:33 Getting Started (Setup & Installation)
2:24 Finding datasets to use
6:02 Data Preparation
10:26 Additional Data Prep (Convert data to NumPy format)
15:22 Reshape Data & Normalize values between 0-1
19:39 Train our first network to classify images
25:06 Convolutional Neural Net (CNN) approach
28:48 Using GPU on Google Colab (speed up training)
31:22 Improving our CNN (reduce image size, max pooling, dropout, etc)
40:18 Using Kerastuner to automatically pick best hyperparameters
52:50 Save & Load our models
54:16 Plot NumPy arrays as images
57:38 Convert JPG/PNG images to NumPy
1:00:20 Final thoughts

———————
Follow me on social media!
Instagram | https://www.instagram.com/keithgalli/
Twitter | https://twitter.com/keithgalli

If you are curious to learn how I make my tutorials, check out this video: https://youtu.be/LEO4igyXbLs

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

Source


[ad_2]

Comment List

  • Keith Galli
    November 15, 2020

    Hey all! Been a little while since I have posted, but trying to get back into the swing of things. Hope everyone is doing well.

    Based on a lot of feedback I have gotten, my current plan is to make a web scraping tutorial with beautiful soup next. Not quite sure what will come after that.

    Does anyone have any suggestions? Would love to hear them :).

  • Keith Galli
    November 15, 2020

    Thank you! From Argentina

  • Keith Galli
    November 15, 2020

    So how do I use this model to make predictions

  • Keith Galli
    November 15, 2020

    Thanks man , you are great , keep going!!!!!!!!!!!!!

  • Keith Galli
    November 15, 2020

    Thanks man , you are great !

  • Keith Galli
    November 15, 2020

    i gladi find your channel. now i know how to resolve my main problem in my rock-paper-scissors exam. youve got a new subs!

  • Keith Galli
    November 15, 2020

    Cozmo can play Rock-Paper-Scissor very well.

    https://youtu.be/vTw8Bl3bRso

  • Keith Galli
    November 15, 2020

    Thank you Keith for such a lovely video.
    While running the code "model.evaluate(test_image, test_label)", I got below error. I am not sure why train and test size should be same.

    "ValueError: Data cardinality is ambiguous:

    x sizes: 2520

    y sizes: 372

    Please provide data which shares the same first dimension".

    I checked the shape of train_images and test_images and they are same "(300, 300, 1)"

  • Keith Galli
    November 15, 2020

    Thank you for the nicely explained video! Helped me a lot. One question: If i use 64 filters in the first layer and 32 in the second (I'm talking about the net architecture around min 30), will i have 64*32=2048 filters in the second layer? Thanks!

  • Keith Galli
    November 15, 2020

    Why are you using epochs = 5? aren't they a little less?

  • Keith Galli
    November 15, 2020

    The most illustrative tutorial on TensorFlow & Keras regarding NN and CNN. (Y)

  • Keith Galli
    November 15, 2020

    Hi Keith,
    If I want to use a dataset that is already on my computer instead of downloaded from the Internet, how do I do it! Much thanks 🙂

  • Keith Galli
    November 15, 2020

    It is very helpful for my preparation for the Tensorflow cert exam. Thanks very much!

  • Keith Galli
    November 15, 2020

    Always good to hear you, Keith. By the way, what'd you recommend for people to get a first job using CNN's? Thanks a lot

  • Keith Galli
    November 15, 2020

    fruitful video, hope to see more in the 3D shape model using CNN with Keras. what if I have an object of 3D and need to train and predict the feature shape as measuring the shape by using CNN prediction and accuracy ?

  • Keith Galli
    November 15, 2020

    good stuff, thanks for the sharing knowledge

  • Keith Galli
    November 15, 2020

    Hi Keith, great job. I have learned a lot from your videos. Hope you will produce more. By the way, I have followed your video and the image classification work as expected. How can I predict one single image? When I pass in test_images[0], the predict function return "… expected ndim=4, found ndim=3 …." obviously it is expecting 4 dimensional array.

  • Keith Galli
    November 15, 2020

    Does the number of neurons have to be even number?

  • Keith Galli
    November 15, 2020

    This is the first time, beyond all the shitty documentation I was able to ACTUALLY USE THE TENSORFLOW LIBRARY. You have no idea how helpful a VIDEO where you walk through everything conceptually while also coding the video. PLEASE MAKE MORE TUTORIALS WITH TF! And I was wondering if I could make another request. I was wondering if you could make a background mathematics video on machine learning, like going over linear algebra and stuff that ML people know!

  • Keith Galli
    November 15, 2020

    Hi Keith, Please I'd like your opinion on something. You have three videos, which are:
    1. Intro to Neural Nets in Python https://www.youtube.com/watch?v=aBIGJeHRZLQ
    2. This one: Image Classification with neural nets in Python https://www.youtube.com/watch?v=44U8jJxaNp8
    3. NLP in python from PyCon 2020 https://www.youtube.com/watch?v=vyOgWhwUmec

    For someone studying to pass the Tensorflow Developer Certification Exam(https://www.tensorflow.org/certificate), do you think these three videos will be sufficient?

    Thank you.

  • Keith Galli
    November 15, 2020

    HOW DID I MISS THIS UPLOAD 🤩

Write a comment