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
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???
great educator
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
This is great, but how can we do opposite, like feeding name to the trained model and it will generate a random image for us , just like MidJourney.
Any suggestions?
If I correctly understand that your test set is a subset of the training set, that’s a rookie mistake.
what version are you using my project is gettin errros
Perfect
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!
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?
Молодець!
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?
It doesnt work. It just says "Deer", even when I predict with the first 16 test images. Bullshit.
I did not benifit anything in this video
You just read what you are writting. You did not explain anythinh
Thanks. Your videos, topics are relevant, your teaching style is great. But please dont torture your viewers, with this low contrast and small text !
Where is the source code he had use?
lovely!
♥♥♥lets mix our code (if you know what I mean 😜)
how to correct the model when prediction is wrong?
please source code
Thanks for helping me with my thesis !
thank you for this tutorial, really helpful but i was wondering how long does it take to run this code?
Have you applied Alex Net Model ??
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?
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
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?
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
i think it would have helped if you had showed us all packages and their versions in your virtual env
because i am getting a lot of dependency errors
Nice lecture, thanks.
Please how do I contact you?
what do i need to do to make it read notes written by people and be able to classify them to which one is who's? please help
link to code?
I can't import tensorflow.keras.
welp time to make the next neurosama
Thank you so much, you're the best teacher!
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.
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?
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?
"cannot import name 'datasets' from 'tensorflow.python.keras'"
How to Solve this error?
this channel is a gem ^^
Tutorial is good but could you be knowing why still tensorfloww won't be imported even after installing it? , Thanks a lot Sir
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
The predictions i am getting for the images are wrong, what can I do to make it more accurate??