Image Classification in Keras with explanation || Easy Way

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น •

  • @bob80808
    @bob80808 4 ปีที่แล้ว +7

    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!

  • @sagnikbanerjee4862
    @sagnikbanerjee4862 4 ปีที่แล้ว

    The best video till now to make understand the working of neural network and how to build an image classifier

  • @rohit090893
    @rohit090893 5 ปีที่แล้ว +1

    I was looking for a good explanation but I did not get it anywhere. Your explanation is very simple and accurate. Thanks.

  • @ukasz6592
    @ukasz6592 5 ปีที่แล้ว +12

    it helped me a lot to understand how image classification works, thanks!

  • @agrillhasnoname
    @agrillhasnoname 5 ปีที่แล้ว +3

    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.

    • @RoboticsExplained
      @RoboticsExplained  4 ปีที่แล้ว

      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 ?

  • @nipunarora8
    @nipunarora8 4 ปีที่แล้ว +4

    Heyy brother, please make more videos for deep learning. You explain quite nice, would love to see more content from you.

  • @FindMultiBagger
    @FindMultiBagger 4 ปีที่แล้ว

    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 👍

  • @omkarkhandalkar8869
    @omkarkhandalkar8869 4 ปีที่แล้ว +1

    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

  • @chauhan100990
    @chauhan100990 5 ปีที่แล้ว +4

    Really nice tutorial. I wish for your bright future in DL-ML (AI). Good luck.

    • @aravindswamy7631
      @aravindswamy7631 5 ปีที่แล้ว

      @does this work for u

    • @chauhan100990
      @chauhan100990 5 ปีที่แล้ว

      I already know keras, tensorflow. But its good explanation.

    • @ananyajadebadipta9639
      @ananyajadebadipta9639 4 ปีที่แล้ว

      @@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.

  • @ayushiagarwal528
    @ayushiagarwal528 4 ปีที่แล้ว

    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

  • @technospider1917
    @technospider1917 4 ปีที่แล้ว +1

    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

  • @sushilpandey4949
    @sushilpandey4949 4 ปีที่แล้ว +1

    Yippee🥳🥳🥳🥳🥳🕺🕺🕺🕺 Bro it helped me a lot to understand image classification please keep it up

  • @AQhannan
    @AQhannan 4 ปีที่แล้ว

    .Thumbs Up. very good explanation step by step.

  • @rabbilbhuiyan5666
    @rabbilbhuiyan5666 4 ปีที่แล้ว

    Useful, explained easily step by step. Like it and thank you guys!

  • @srujanwankhede5314
    @srujanwankhede5314 4 ปีที่แล้ว +2

    can you make a video on multiclass classificaition please
    BTW great work

  • @vinyselopal6215
    @vinyselopal6215 4 ปีที่แล้ว +1

    Amazingly explained!

  • @ahmedsabbir5862
    @ahmedsabbir5862 4 ปีที่แล้ว

    I loved every minute of this video, it was really informative and you explained things simply. Thank you so much.

  • @priyajitghosh2790
    @priyajitghosh2790 5 ปีที่แล้ว +5

    Make more videos on image classification with different examples.

  • @tanmoy_official
    @tanmoy_official 4 ปีที่แล้ว +1

    Thanks a lot. helped understand the basic implementation of ML model

  • @samithaduthika2444
    @samithaduthika2444 5 ปีที่แล้ว +2

    great work. Thank you. hope you will continue this

  • @arushjain1768
    @arushjain1768 4 ปีที่แล้ว

    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.

  • @AviralBajpai
    @AviralBajpai 4 ปีที่แล้ว +1

    Much respect for NFS Most Wanted and CS1.6 shortcuts. :)

    • @RoboticsExplained
      @RoboticsExplained  4 ปีที่แล้ว +1

      Those two games will Always be there Aviral. No matter what we do.

  • @mariumhayat8663
    @mariumhayat8663 5 ปีที่แล้ว +4

    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

  • @veerbeniwal120
    @veerbeniwal120 4 ปีที่แล้ว +6

    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)

    • @joydipbose4612
      @joydipbose4612 4 ปีที่แล้ว +2

      yes then you need to check result[0][1] ,result[0][2] so on and so forth

    • @RoboticsExplained
      @RoboticsExplained  4 ปีที่แล้ว

      Thanks.

  • @cabrelngako8877
    @cabrelngako8877 5 ปีที่แล้ว

    Dear Sir you video is well explain. thank you verry much for your work and time.

  • @AbdulWaheed-vl1pc
    @AbdulWaheed-vl1pc 4 ปีที่แล้ว

    Great Job my boy.Thank you

  • @karishmakh5609
    @karishmakh5609 4 ปีที่แล้ว +1

    Hey,Thanks for this. Can I include this in my resume ? Will it be impactful?

  • @naveenchauhanindian
    @naveenchauhanindian 4 ปีที่แล้ว

    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.

  • @poojaerelli1806
    @poojaerelli1806 4 ปีที่แล้ว

    Thank you for the vedio.. Helped me a lot in right time

  • @NaderAlyzayo
    @NaderAlyzayo 4 ปีที่แล้ว +1

    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

    • @RoboticsExplained
      @RoboticsExplained  4 ปีที่แล้ว

      You can. There are some libraries to help you predict the pattern... If given Multiple I puts

  • @princepandey8993
    @princepandey8993 2 ปีที่แล้ว

    Very nice tutorial

  • @justinmathew5776
    @justinmathew5776 4 ปีที่แล้ว +2

    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?

    • @ananyajadebadipta9639
      @ananyajadebadipta9639 4 ปีที่แล้ว +1

      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.

    • @justinmathew5776
      @justinmathew5776 4 ปีที่แล้ว +2

      @@ananyajadebadipta9639 But what if in an image there is both cat and dog, will it predict as cat and dog?

    • @ananyajadebadipta9639
      @ananyajadebadipta9639 4 ปีที่แล้ว +1

      @@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.

  • @yashwanthmachiraju917
    @yashwanthmachiraju917 4 ปีที่แล้ว

    Thanks. Very good video. I want to add hyperparameter optimisation to the same model. can you please help.

  • @tanakablack5271
    @tanakablack5271 4 ปีที่แล้ว +1

    i like the vidz...well explained....buh the last part is not clear though.....like wah if u have more classes....4 or 5

    • @doji-san
      @doji-san 4 ปีที่แล้ว

      i think maybe just add those extra classes in the directory with the dogs and cats folders..

    • @tanakablack5271
      @tanakablack5271 4 ปีที่แล้ว

      @@doji-san yeah yeah but i meant on the data prediction part....

  • @rohit090893
    @rohit090893 5 ปีที่แล้ว +1

    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.

  • @gagangupta7840
    @gagangupta7840 4 ปีที่แล้ว

    Nice explanation with example

  • @shivadarshans3409
    @shivadarshans3409 4 ปีที่แล้ว

    Super super
    Make some more on multiclass classification

  • @unemployedcse3514
    @unemployedcse3514 4 ปีที่แล้ว

    Practical vedio helped me a lot thank u 💞

  • @dkishore599
    @dkishore599 4 ปีที่แล้ว

    Really it is simply awesome...

  • @diahnurkhasanah7499
    @diahnurkhasanah7499 4 ปีที่แล้ว

    Thanks for all the explanation

  • @techpowercoders8009
    @techpowercoders8009 3 ปีที่แล้ว

    Sir can you please tell which classifier should I use if I have a small dataset of 596 images around including testing and training.

  • @DilanTech
    @DilanTech 3 ปีที่แล้ว

    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

  • @St0rm0ne
    @St0rm0ne 5 ปีที่แล้ว +1

    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 ?

    • @rachanadesai7984
      @rachanadesai7984 5 ปีที่แล้ว +1

      where you able to solve this problem? I am facing the same problem!

  • @pianowithnikko8943
    @pianowithnikko8943 4 ปีที่แล้ว

    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?

  • @AQhannan
    @AQhannan 4 ปีที่แล้ว +10

    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.

    • @bobypardamean7355
      @bobypardamean7355 4 ปีที่แล้ว +1

      Hai. What if i have 3 classes? Please kindly tell me how to predict it

    • @shadmansaeed5601
      @shadmansaeed5601 4 ปีที่แล้ว +3

      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

    • @aryantpratapsingh
      @aryantpratapsingh 4 ปีที่แล้ว

      @@bobypardamean7355 for multiple class classification you can use a additional softmax layer at the end of neural net. :)

    • @almasrurkhan9865
      @almasrurkhan9865 4 ปีที่แล้ว

      ind = train_generator.class_indices
      print(ind)
      use it

  • @mahendrasinhgohil44
    @mahendrasinhgohil44 3 ปีที่แล้ว

    You can add earlyStopping for stop process when validation curve slightly increases.🤔🤔

  • @indahmonisafirdiantika2096
    @indahmonisafirdiantika2096 5 ปีที่แล้ว +2

    this tutorial is really help me a lot

  • @bhautikkachhadiya7583
    @bhautikkachhadiya7583 3 ปีที่แล้ว

    well explained....

  • @dadosaid420
    @dadosaid420 2 ปีที่แล้ว

    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)??

  • @harsh7704
    @harsh7704 5 ปีที่แล้ว +2

    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
      @sayedmubashirali9213 5 ปีที่แล้ว +1

      kaggle.com

    • @harsh7704
      @harsh7704 5 ปีที่แล้ว +1

      @@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.

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 3 ปีที่แล้ว

    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?

  • @amrithak1113
    @amrithak1113 3 ปีที่แล้ว

    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

  • @mirzamunib5964
    @mirzamunib5964 4 ปีที่แล้ว

    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

  • @mehakdeepsingh9288
    @mehakdeepsingh9288 4 ปีที่แล้ว

    Thanks a lot man.It helped me learn a lot.

  • @christyzachariah1301
    @christyzachariah1301 3 ปีที่แล้ว +1

    how do we use the predict if we need to compare 4 different classes ?

  • @savagelysavage4187
    @savagelysavage4187 4 ปีที่แล้ว

    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?

  • @kundanseal1650
    @kundanseal1650 4 ปีที่แล้ว +1

    InvalidArgumentError: Incompatible shapes: [3,3] vs. [3,10]
    [[node categorical_crossentropy/mul (defined at

  • @milindkapase2414
    @milindkapase2414 4 ปีที่แล้ว +1

    Hello ur video nice
    I want multiclass images cnn classification
    Please make video

  • @shreejanshrestha1931
    @shreejanshrestha1931 4 ปีที่แล้ว

    thankyou so much for this video brother. Really appreciate your work

  • @rohit090893
    @rohit090893 5 ปีที่แล้ว

    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 ?

  • @khichuri3456
    @khichuri3456 3 ปีที่แล้ว

    Great explanation. But the loss is too big for more than 2 classes...also prediction is not accurate. How to fix ?

  • @toushi100
    @toushi100 5 ปีที่แล้ว

    great video bro this helped me alot thank you so much

  • @shreyapattewar522
    @shreyapattewar522 4 ปีที่แล้ว

    Awesome video...I was searching for such video from quite long...keep doing more videos on ML

  • @nawrasqusay2164
    @nawrasqusay2164 3 ปีที่แล้ว

    great job how can i get the code please

  • @divyanshsahu8750
    @divyanshsahu8750 3 ปีที่แล้ว

    how to check if the model is not over fitted or we have to change in some of the layers

  • @bizharshit
    @bizharshit 5 ปีที่แล้ว

    good work !!

  • @sachinjaiswal8222
    @sachinjaiswal8222 4 ปีที่แล้ว +1

    Thank u so much it really helps

  • @surbhibhatia7629
    @surbhibhatia7629 4 ปีที่แล้ว

    My model predicts the same class
    Even though the equal amount of images are provided .Can you suggest something?

  • @mayanksaxena6273
    @mayanksaxena6273 3 ปีที่แล้ว

    Bro can you link the videos you were talking about at 16:19 ?
    I can't find it in the description :3 Thanks!

  • @raw_oo7756
    @raw_oo7756 3 ปีที่แล้ว

    I am using google colab in that I am getting error "# Model must be created and compiled with the same DistStrat." please help

  • @kinzasardar3039
    @kinzasardar3039 3 ปีที่แล้ว

    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

  • @dkishore599
    @dkishore599 4 ปีที่แล้ว

    Can you post some more videos with Data set with detail explanation .?

  • @khaeruzzahra6252
    @khaeruzzahra6252 4 ปีที่แล้ว +1

    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

    • @syazwanirosli1297
      @syazwanirosli1297 4 ปีที่แล้ว

      hi, have you get the answer for this question cause i having the same problem

    • @almasrurkhan9865
      @almasrurkhan9865 4 ปีที่แล้ว

      ind = train_generator.class_indices
      print(ind)
      use it

  • @Varunkumar-rr4mt
    @Varunkumar-rr4mt 3 ปีที่แล้ว

    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

  • @pradnyadeshmukh6709
    @pradnyadeshmukh6709 3 ปีที่แล้ว

    Can you share the link to the dataset you used in the video

  • @dkishore599
    @dkishore599 4 ปีที่แล้ว +1

    How do we define if we have 5-classes ( Dog, Cat, Rat, Horse , Cow ) ? do we need to do Prepossessing ?

    • @jaysaha1967
      @jaysaha1967 4 ปีที่แล้ว

      You need to hot encode the output and you need to change the classifier from binary to categorical_crossentropy in model.compile

  • @mastermind3778
    @mastermind3778 3 ปีที่แล้ว

    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

  • @TheRandomTecLad
    @TheRandomTecLad 3 ปีที่แล้ว

    do u have this cold on git

  • @jainilpanchal2000
    @jainilpanchal2000 4 ปีที่แล้ว +1

    'DirectoryIterator' object has no attribute 'shape'....error in my code...my image dataset is of 640*360 grayscale

  • @saiteja8207
    @saiteja8207 4 ปีที่แล้ว

    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.

  • @saiteja8207
    @saiteja8207 4 ปีที่แล้ว

    i mean how to develope a classifier to distinguish between dogs and cats?

  • @madannikalje760
    @madannikalje760 5 ปีที่แล้ว +1

    Thanks bro really easy

  • @zeeshanyaseen7233
    @zeeshanyaseen7233 4 ปีที่แล้ว

    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,) .

  • @parvathyks16
    @parvathyks16 4 ปีที่แล้ว

    How can we run this code with out using anaconda navigator. But in a flask environment?

  • @shauryagoyal911
    @shauryagoyal911 4 ปีที่แล้ว

    Please tell me where to get the dataset which you used in this video

    • @RoboticsExplained
      @RoboticsExplained  4 ปีที่แล้ว

      You can go to kaggle website and download almost every kind of database.

  • @lendixful7932
    @lendixful7932 5 ปีที่แล้ว

    Nice video

  • @pixtrust4514
    @pixtrust4514 4 ปีที่แล้ว +1

    Image Classification with Keras
    th-cam.com/play/PL2RQpt7eyCStZSHJZoPP4B1s4U5x69uUS.html

  • @jyotirupamalakar1931
    @jyotirupamalakar1931 4 ปีที่แล้ว

    Which classifier you used?

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 4 ปีที่แล้ว

    I want to know whether the batch selected each time, gets selected randomly, or the same batch gets selected epocs time??

  • @bananaldossary3659
    @bananaldossary3659 4 ปีที่แล้ว

    awesome!

  • @aravindswamy7631
    @aravindswamy7631 5 ปีที่แล้ว

    @vaishviksatyam does the mail works ,i have an query .

  • @bobypardamean7355
    @bobypardamean7355 4 ปีที่แล้ว

    Haii could we load confusion matrix with this method?

  • @shivamhanda7527
    @shivamhanda7527 4 ปีที่แล้ว

    Does the target_size automatically resize the images to 150*150?

  • @nurealomnobel4996
    @nurealomnobel4996 4 ปีที่แล้ว

    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?

    • @dipakaryal7329
      @dipakaryal7329 4 ปีที่แล้ว

      you are trying to import whole folder test is that you want but you code doesnot match with that

  • @sairamjanakiraman8598
    @sairamjanakiraman8598 5 ปีที่แล้ว

    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.

  • @RS-vu5um
    @RS-vu5um 5 ปีที่แล้ว

    Where can I get the copy of your code shown in this video?

  • @Chanakya0075
    @Chanakya0075 4 ปีที่แล้ว

    Did you check with cat image, I think it's biased to class Dog...

  • @nygvn
    @nygvn 4 ปีที่แล้ว

    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

    • @doji-san
      @doji-san 4 ปีที่แล้ว

      what accuracy percentage did you get? maybe run it with more epochs...

  • @emoloic8481
    @emoloic8481 4 ปีที่แล้ว

    If we want to get the score of the prediction.How can we do it ?

  • @jassersaanoun9493
    @jassersaanoun9493 4 ปีที่แล้ว

    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" }