Videos

Image Classification with Neural Networks in Python



NeuralNine

In this tutorial we are going to use neural networks in order to classify images and recognize what they are representing.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
💻 The Algorithm Bible Book: https://www.neuralnine.com/books/
🐍 The Python Bible Book: https://www.neuralnine.com/books/
👕 Programming Merch: https://www.neuralnine.com/shop

🌐 Social Media & Contact 🌐
📱 Website: https://www.neuralnine.com/
📷 Instagram: https://www.instagram.com/neuralnine
🐦 Twitter: https://twitter.com/neuralnine
🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/
📁 GitHub: https://github.com/NeuralNine

🖥️ My Coding Setup 🖥️
⌨️ Keyboard: http://hyperurl.co/neuralkeyboard
🖱️ Mouse: http://hyperurl.co/neuralmouse
🖥️ Monitor: http://hyperurl.co/neuralmonitor
🎙️ Microphone: http://hyperurl.co/neuralmicrophone
✏️ Drawing Tablet: http://hyperurl.co/neuraldraw

🎵 Outro Music From: https://www.bensound.com/

Source

Similar Posts

41 thoughts on “Image Classification with Neural Networks in Python
  1. The tutorial is fake. I get an error with the line plt.xticks([]) – TypeError: 'list' object is not callable. How can you call a list???

  2. i hope you do the same for text, for example try to check if a book translated Ok by raining the model on good translation of the same book. Kind of correcting the second translation

  3. I was working on a CNN for image classification but I couldn't wrap my head around after training the model, how to actually get the specific image classification on a random image from online. I was stuck on this issue for hours until your step-by-step video explained it perfectly and I finally got my model to output image labels after classifying. Thank you so much for this video!

  4. Hello sir actually I wanted to know that is there any another method for pattern recognition from image except cnn , if yes then please tell me how many algorithms are there?

  5. Hi, i'm using a dataset that i downloaded from github. It has a .json archive with the labels and a file with the images but i dont know how to import it to my python project. Someone can help me pls?

  6. ValueError: `labels.shape` must equal `logits.shape` except for the last dimension. Received: labels.shape=(32,) and logits.shape=(512, 10)

    Getting this error when compiling the CNN model. Any Help?

  7. i'm getting an error like –
    File format not supported: filepath=image_classifier.model. Keras 3 only supports V3 `.keras` files and legacy H5 format files (`.h5` extension). Note that the legacy SavedModel format is not supported by `load_model()` in Keras 3. In order to reload a TensorFlow SavedModel as an inference-only layer in Keras 3, use `keras.layers.TFSMLayer(image_classifier.model, call_endpoint='serving_default')` (note that your `call_endpoint` might have a different name).

    Please help
    @NueralNine

  8. I think this was an EXCELLENT tutorial and I definitely will use the treasures that you gave on this difficult topic!

    I wish you had gone over the data that you were using I little bit more in detail and stated how you have to adjust the convoluted2D layers, because of the size difference of the images. In your example you used 32 pixel x 32 pixel Cifar10 dataset, but how does this change, if your input_shape is more complex ie. trying to classify whether there is an apartment building OR a detached house in a certain address => even my thumbnails that I am trying to classify are more complex 400 pixels x 400 pixels pictures and I do not want to make them smaller, because I am afraid that I would lose some features that make them more recognizable (although a very quick rule of a thumb would be the amount of asphalt and grass; lot of asphalt > an apartment building, lot of grass a detached house with its own garden).

    So evidently I am increasing my input_shape to match the size of my images, but how does that reflect the size of the convoluted 2D layers, do I need one that is exactly the size of my image 400 and three that are twice as large 800?

  9. I used Open Cv's resize() function to resize any image i need for me since when I tried resizing manually i got black borders around the image which caused problems. Not only did this fix that issue it also helped save me time.

    img = cv.resize(img, (32, 32))  
    img = cv.cvtColor(img, cv.COLOR_BGR2RGB)

    super easy

  10. 00:02 Building an image classification script in Python using convolutional neural networks with TensorFlow
    02:14 Preparing data for image classification with neural networks
    07:02 Code explanation for displaying and labeling images in a grid
    09:30 Reducing the amount of images for training neural network
    14:34 Neural network model includes convolutional layers, flatten layer, dense layers, and output layer
    16:59 Training and validation of neural network for image classification
    21:25 Loading the trained model and classifying random images from the internet
    24:01 Preparing and scaling images for classification
    28:46 Neural network predicts and classifies images
    31:05 Neural networks can classify complex images with impressive results.

  11. I'm planning to make one that can distinguish between dog and cat pictures. I have a folder titled "train" that has a 1000 of pictures. What should I do to use those images instead?

  12. Thanks for the instructions. I have an issue though. When I tried to run the code while following your vid, it gave me this error: ValueError: Invalid filepath extension for saving. Please add either a `.keras` extension for the native Keras format (recommended) or a `.h5` extension. Use `model.export(filepath)` if you want to export a SavedModel for use with TFLite/TFServing/etc. Received: filepath=image_classifier.model. Does this have anything to do with the current version of tensorflow? Which should I use?

  13. try this
    training_image = training_images[:20000] / 255.0

    training_labels = training_labels[:20000]

    testing_images = testing_images[:4000] / 255.0

    testing_labels = testing_labels[:4000]

    output will be
    [1m125/125
    [0m [32m==================== [0m [37m [0m [1m1s [0m 5ms/step – accuracy: 0.1100 – loss: 4.7163

    Loss: 4.744203090667725

    Accuracy: 0.0989999994635582

Comments are closed.

WP2Social Auto Publish Powered By : XYZScripts.com