Image Classification in Keras with explanation || Easy Way
Вставка
- Опубліковано 11 вер 2024
- Want to know more about Robots
BLOG POST: vaishviksatyam.wordpress.com
Host and Creator - Vaishvik Satyam
WEBSITE: vaishviksatyam.wordpress.com
QUESTIONS: themechatronicsolutions@gmail.com
Man I'm only 4 minutes into the video and... you diserve a like and subscribe, honestly. Thank you for explaining things in such detail and so good!
I was looking for a good explanation but I did not get it anywhere. Your explanation is very simple and accurate. Thanks.
it helped me a lot to understand how image classification works, thanks!
The best video till now to make understand the working of neural network and how to build an image classifier
Heyy brother, please make more videos for deep learning. You explain quite nice, would love to see more content from you.
Sure Nipun. I would do so. Thank you.
Congratulations for the good and simple explanation, easy to read code. I encountered issues following another tutorial online for this dogs and cats project but found your video much easier to follow. I noticed in the end of training, your model has the accuracy of 77%. Mine is almost like yours, with different parameters, it reached 85% accuracy, still I'm not happy with it because I gave it 3 new photos as test, of 3 cats, he identified 2 as dogs (wrong) and only 1 right, as cat. I'm trying Inception now, still training, takes longer than your model but looks promising, on Epoch 5 of 10, accuracy is already 90%, let's see what we can get.
Thank you. It's amazing you are able to get such high accuracy with this dataset. how did it go with another model ? Did it work ?
can you make a video on multiclass classificaition please
BTW great work
First of all thank you for your efforts 😇
We need more such videos for Ann , rnn, LSTM , transformers .. etc
Hit like to if you looking for this videos 👍
Really nice tutorial. I wish for your bright future in DL-ML (AI). Good luck.
@does this work for u
I already know keras, tensorflow. But its good explanation.
@@aravindswamy7631 I tried with the plant this with rice disease and Healthy leaf classification. The first time it worked but then it did not work. Both the time, program run successfully but second time it could not classify the image.
great explanation. You actually took lot of efforts to explain in great detail. Appreciate that. Has made me interested to watch all your videos now
Thanks bro for this video
I have to create image classification of leafs this video really help me alot
It's just quick and understandable video
Thanks Codrino.
Yippee🥳🥳🥳🥳🥳🕺🕺🕺🕺 Bro it helped me a lot to understand image classification please keep it up
Thanks buddy :-)
Make more videos on image classification with different examples.
Much respect for NFS Most Wanted and CS1.6 shortcuts. :)
Those two games will Always be there Aviral. No matter what we do.
great work. Thank you. hope you will continue this
I loved every minute of this video, it was really informative and you explained things simply. Thank you so much.
Thank you bro you are predicting two class (dog/cat) right so i think in your neural network must have the parameter set as 2 in the last layer DENSE layer
what would be the class mode for non-binary classification?like i have 5 categories to predict from ,what would be the class mode in that case?
and how can i write
I have just 1 question in last part why you have established that 1=Dog or Else=Cat. Why not 1=Cat ?, any technical reason. Kindly Brief.
Hai. What if i have 3 classes? Please kindly tell me how to predict it
Okay here is it how it works in 'binary classification' with 'sigmoid' activation, the output of the network will be a single scaler between 0 and 1 encoding the probability that the current predicting image is class 1(as opposed to class 0) higher the probability higher chance of the image to be type class 1 not class 0 therefore in this case cat is class 0 and dogs is class 1. Hence the predict function encodes the probability that the current image is class 1 which is dog. therefore if the probability of the current image is 1 then it is type class 1, in this case dog and if probability 0 then class 0 cat. The main thing is that the predict function encodes the probability that the current predicting image is of type class 1.And talking about why cat is class 0 and dog is class 1 the directory is labelled like this since cat is the first directory then dog, Hope it helps
@@bobypardamean7355 for multiple class classification you can use a additional softmax layer at the end of neural net. :)
ind = train_generator.class_indices
print(ind)
use it
Useful, explained easily step by step. Like it and thank you guys!
Thanks a lot brother it has taught me a lot and some concept which were not clear are now clear. It will be good if you share your code and dataset link so that we can too make our neural network.
Thanks a lot. helped understand the basic implementation of ML model
Thanks Tanmoy
Very nice tutorial
honestly i cant find enough word to thank you Keep the great work up and do your best bro Thank you so much
i have i a question if i want to can prediction function using python wpf application after this training how can that be possible
You can. There are some libraries to help you predict the pattern... If given Multiple I puts
.Thumbs Up. very good explanation step by step.
this tutorial is really help me a lot
Dear Sir you video is well explain. thank you verry much for your work and time.
InvalidArgumentError: Incompatible shapes: [3,3] vs. [3,10]
[[node categorical_crossentropy/mul (defined at
Nice explanation...bro can you help me with one doubt? If suppose in a image there is a cat and dog, I want to display the count of the dogs and cats in the image and also predict that cat and dog both are there in the image? How can I do it?
Yes it is possible but you need to import os library and to run for loop for all files. Each time, it predict a dog, you have to add 1.
@@ananyajadebadipta9639 But what if in an image there is both cat and dog, will it predict as cat and dog?
@@justinmathew5776 it will choose either dog or cat depending on maximum features of cat or dog matched to the trained parameters. I don't know the right answer.
thanx bro it did help me....but can you tell me how this prediction model can work for more than 2 outputs.(result=model.predict(img_pred)
print (result)
if result[0][0]==1:
prediction = "cat"
else:
prediction = "dog"
print (prediction)
yes then you need to check result[0][1] ,result[0][2] so on and so forth
Thanks.
Amazingly explained!
Thank you
can you give me source code§§
Super super
Make some more on multiclass classification
Great Job my boy.Thank you
Thank you for the vedio.. Helped me a lot in right time
Hey,Thanks for this. Can I include this in my resume ? Will it be impactful?
how do we use the predict if we need to compare 4 different classes ?
Great explanation. But the loss is too big for more than 2 classes...also prediction is not accurate. How to fix ?
Suppose in my CNN model, I have created 3 cases:-
1. 2 convolution layers, in the 1st layer number of filters are 32, and for the 2nd it is also 32
2. 2 convolution layers, in the 1st layer, no of filters are 56, and for the 2nd it is 32
3. more than 2 layers, with the filter numbers for all the conv layers is more than 32
what is the difference, I mean what will happen for the above 3 cases, and what will be the impact on the classification model?
how to check if the model is not over fitted or we have to change in some of the layers
Practical vedio helped me a lot thank u 💞
Thanks for all the explanation
Anyday!
Really it is simply awesome...
why do you add the validation_generator while fitting your model ? should we just fit it with the train generator and then use model.evaluate(validation_data)??
Thanks a lot man.It helped me learn a lot.
Thank u so much it really helps
Lovely tutorial!
I have 1 question: instead of specifying the number of train samples (1000 in the tutorial) is there a way to use as train samples all of the images inside the data folder?
what should be the prediction code for multi-class classification?
my input shape is (150, 150, 3)..
Input 0 of layer sequential_1 is incompatible with the layer: expected axis -1 of input shape to have value 1 but received input with shape (None, 150, 150, 3)
this error always popping up
You can add earlyStopping for stop process when validation curve slightly increases.🤔🤔
thankyou so much for this video brother. Really appreciate your work
Can we use this classification model for Object detection. Can you please make a video on How will we do Object detection (Human) in images and videos using Tensorflow CNN from scratch. I want to make my own model but even on tensorflow website they are using pre-trained model for object detection.
May I know how to upload folder with folders to colab sir..I want to upload iris eye database with images directly taken and each folder has its variations also
Awesome video...I was searching for such video from quite long...keep doing more videos on ML
i like the vidz...well explained....buh the last part is not clear though.....like wah if u have more classes....4 or 5
i think maybe just add those extra classes in the directory with the dogs and cats folders..
@@doji-san yeah yeah but i meant on the data prediction part....
good work !!
Thanks bro really easy
'DirectoryIterator' object has no attribute 'shape'....error in my code...my image dataset is of 640*360 grayscale
Superb, nicely explained every bit of the CCN two-class classification. One question, once we had saved the model .h5. now, how can I call the model for further prediction? Suppose I am calling this model using remote machine, so connect it with socket, and server code will call your model.h5.
Yes... It can be. Look into. Load model
great video bro this helped me alot thank you so much
well explained....
How to use object oriented approach to solve this problem: to make my code optimize; like what according to you can be made as a class for this project and what specific functions can be used accordingly
.
kaggle.com
@@sayedmubashirali9213 I know about kaggle, for this particular project; I try to analyse what can be made as a class or a function but just to verify with the producer of this video; I am curious to know, if it's kaggle I won't go there; I just need a basic human logical thinking here.
I am using google colab in that I am getting error "# Model must be created and compiled with the same DistStrat." please help
Nice explanation with example
Thanks gagan!
Hello Sir nice explanation. I want to know one thing when you limit validation data to 200. it will pick 200 from cats and 200 from dogs separately. Thank you
ImportError: `load_weights` requires h5py when loading weights from HDF5. igot this error .... when running this statement .. i searched alot but not found any solution please guide me
Image Classification with Keras
ua-cam.com/play/PL2RQpt7eyCStZSHJZoPP4B1s4U5x69uUS.html
hey man, do you mind telling us which dataset you used? i have an error saying the model cannot be compiled because it has no loss to optimize
Can you share the link to the dataset you used in the video
Bro can you link the videos you were talking about at 16:19 ?
I can't find it in the description :3 Thanks!
hi your video helps me a lot, but i'm confused about how we decided 1 for cat and 0 for dog? if i have 3 classes how should i give the rules 2 or 1 or 0 for each classes? thank you
hi, have you get the answer for this question cause i having the same problem
ind = train_generator.class_indices
print(ind)
use it
Sir can you please tell which classifier should I use if I have a small dataset of 596 images around including testing and training.
How many number of neurons are there in Input layer, Conv2D layer 1 and 2 and dense layer? And Is the model taking 1 Image at a time or 20 images(batch size) in the CNN model ?
I want to know whether the batch selected each time, gets selected randomly, or the same batch gets selected epocs time??
My model predicts the same class
Even though the equal amount of images are provided .Can you suggest something?
do u have this cold on git
Thank You
Thank you for your explanations, helps a lot, I'm facing a problem, I would like to determine wheter a person has long, mid, short hair, my train dataset has 1000 images (300each classes), my test dataset has 300 images (100each classes), the result of the prediction is always [[1. 0. 0.]] so always long ... my model is getting 87% accuracy and 0.2 loss and validation accuracy is 81% and validation loss 0.5. Could you help me to understand why I'm I getting the same results ?
where you able to solve this problem? I am facing the same problem!
How do we define if we have 5-classes ( Dog, Cat, Rat, Horse , Cow ) ? do we need to do Prepossessing ?
You need to hot encode the output and you need to change the classifier from binary to categorical_crossentropy in model.compile
Thanks. Very good video. I want to add hyperparameter optimisation to the same model. can you please help.
how do I update my model when I have new images? do we need to train the model again for all images and can be done for only those new images??
can you help me in modelling a CNN architecture which will take two inputs separately and also provides the feature map separately as output using Functional API model?
what if we give input data not as seperate dogs and cats? what happens or how to classify if the images are combined and we need to extract or seperate them from the combination of both of those images? please get back to me ASAP.
great job how can i get the code please
Where can I get the copy of your code shown in this video?
Nice video
If we want to get the score of the prediction.How can we do it ?
Hello ur video nice
I want multiclass images cnn classification
Please make video
Sure Milind
hello there, i have train data soil of 4 different types , at last step then how to predict that types. what are conditions should be
plz any one help
super bro...
How can we run this code with out using anaconda navigator. But in a flask environment?
awesome!
i mean how to develope a classifier to distinguish between dogs and cats?
i wanna know how to predict the class without writing it (the if statement at the end) like for example from a file that has { index: "className" }
where i can find the code?
Can you post some more videos with Data set with detail explanation .?
thank you man, really helped :)
@vaishviksatyam does the mail works ,i have an query .
Thank you so much! :D
Which classifier you used?
where is the label step? Can anyone explain it to me?
I am having this error . Can anybody help . I can not understand .
Error when checking target: expected activation_25 to have shape (64,) but got array with shape (2,) .