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.
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 👍
@@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.
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
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.
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
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)
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.
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
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?
@@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.
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.
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
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 ?
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?
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
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)??
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 .
@@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.
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?
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
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
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?
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 ?
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
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
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.
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,) .
Thanks for this video. I tried the same code and I got the following error . ValueError: Error when checking input: expected conv2d_8_input to have shape (150, 150, 3) but got array with shape (299, 296, 3) Any help would be greatly appreciated.
hey thanks for helping me understanding image classification. I got a problem with my code on the result. I tried the cat image but predicted as dog. I dont know whats went wrong. Help mee
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!
The best video till now to make understand the working of neural network and how to build an image classifier
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!
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 ?
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.
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 👍
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.
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
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
Yippee🥳🥳🥳🥳🥳🕺🕺🕺🕺 Bro it helped me a lot to understand image classification please keep it up
Thanks buddy :-)
.Thumbs Up. very good explanation step by step.
Useful, explained easily step by step. Like it and thank you guys!
can you make a video on multiclass classificaition please
BTW great work
Amazingly explained!
Thank you
can you give me source code§§
I loved every minute of this video, it was really informative and you explained things simply. Thank you so much.
Make more videos on image classification with different examples.
Thanks a lot. helped understand the basic implementation of ML model
Thanks Tanmoy
great work. Thank you. hope you will continue this
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.
Much respect for NFS Most Wanted and CS1.6 shortcuts. :)
Those two games will Always be there Aviral. No matter what we do.
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
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.
Dear Sir you video is well explain. thank you verry much for your work and time.
Great Job my boy.Thank you
Hey,Thanks for this. Can I include this in my resume ? Will it be impactful?
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
Thank you for the vedio.. Helped me a lot in right time
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
Very nice tutorial
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.
Thanks. Very good video. I want to add hyperparameter optimisation to the same model. can you please help.
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....
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.
Nice explanation with example
Thanks gagan!
Super super
Make some more on multiclass classification
Practical vedio helped me a lot thank u 💞
Really it is simply awesome...
Thanks for all the explanation
Anyday!
Sir can you please tell which classifier should I use if I have a small dataset of 596 images around including testing and training.
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
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!
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?
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
You can add earlyStopping for stop process when validation curve slightly increases.🤔🤔
this tutorial is really help me a lot
well explained....
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)??
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.
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?
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
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
Thanks a lot man.It helped me learn a lot.
how do we use the predict if we need to compare 4 different classes ?
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?
InvalidArgumentError: Incompatible shapes: [3,3] vs. [3,10]
[[node categorical_crossentropy/mul (defined at
Hello ur video nice
I want multiclass images cnn classification
Please make video
Sure Milind
thankyou so much for this video brother. Really appreciate your work
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 ?
Great explanation. But the loss is too big for more than 2 classes...also prediction is not accurate. How to fix ?
great video bro this helped me alot thank you so much
Awesome video...I was searching for such video from quite long...keep doing more videos on ML
great job how can i get the code please
how to check if the model is not over fitted or we have to change in some of the layers
good work !!
Thank u so much it really helps
My model predicts the same class
Even though the equal amount of images are provided .Can you suggest something?
Bro can you link the videos you were talking about at 16:19 ?
I can't find it in the description :3 Thanks!
I am using google colab in that I am getting error "# Model must be created and compiled with the same DistStrat." please help
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
Can you post some more videos with Data set with detail explanation .?
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
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
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
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
do u have this cold on git
'DirectoryIterator' object has no attribute 'shape'....error in my code...my image dataset is of 640*360 grayscale
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.
i mean how to develope a classifier to distinguish between dogs and cats?
Thanks bro really easy
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,) .
How can we run this code with out using anaconda navigator. But in a flask environment?
Please tell me where to get the dataset which you used in this video
You can go to kaggle website and download almost every kind of database.
Nice video
Image Classification with Keras
th-cam.com/play/PL2RQpt7eyCStZSHJZoPP4B1s4U5x69uUS.html
Which classifier you used?
I want to know whether the batch selected each time, gets selected randomly, or the same batch gets selected epocs time??
awesome!
@vaishviksatyam does the mail works ,i have an query .
Haii could we load confusion matrix with this method?
Does the target_size automatically resize the images to 150*150?
The error code line: img_pred = image.load_img('C:/Users/HP/Desktop/data/test',target_size = (150, 150))
Error showed: PermissionError: [Errno 13] Permission denied: 'C:/Users/HP/Desktop/data/test'
How to solve this error?
you are trying to import whole folder test is that you want but you code doesnot match with that
Thanks for this video. I tried the same code and I got the following error .
ValueError: Error when checking input: expected conv2d_8_input to have shape (150, 150, 3) but got array with shape (299, 296, 3)
Any help would be greatly appreciated.
Where can I get the copy of your code shown in this video?
Did you check with cat image, I think it's biased to class Dog...
hey thanks for helping me understanding image classification. I got a problem with my code on the result. I tried the cat image but predicted as dog. I dont know whats went wrong. Help mee
what accuracy percentage did you get? maybe run it with more epochs...
If we want to get the score of the prediction.How can we do it ?
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" }