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

КОМЕНТАРІ • 207

  • @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!

  • @rohit090893
    @rohit090893 4 роки тому +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!

  • @sagnikbanerjee4862
    @sagnikbanerjee4862 4 роки тому

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

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

  • @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 ?

  • @srujanwankhede5314
    @srujanwankhede5314 3 роки тому +2

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

  • @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 👍

  • @chauhan100990
    @chauhan100990 4 роки тому +4

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

    • @aravindswamy7631
      @aravindswamy7631 4 роки тому

      @does this work for u

    • @chauhan100990
      @chauhan100990 4 роки тому

      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

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

  • @sushilpandey4949
    @sushilpandey4949 4 роки тому +1

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

  • @priyajitghosh2790
    @priyajitghosh2790 5 років тому +5

    Make more videos on image classification with different examples.

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

  • @samithaduthika2444
    @samithaduthika2444 5 років тому +2

    great work. Thank you. hope you will continue this

  • @ahmedsabbir5862
    @ahmedsabbir5862 4 роки тому

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

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

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

  • @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 3 роки тому

      ind = train_generator.class_indices
      print(ind)
      use it

  • @rabbilbhuiyan5666
    @rabbilbhuiyan5666 4 роки тому

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

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

  • @tanmoy_official
    @tanmoy_official 4 роки тому +1

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

  • @princepandey8993
    @princepandey8993 2 роки тому

    Very nice tutorial

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

  • @AQhannan
    @AQhannan 4 роки тому

    .Thumbs Up. very good explanation step by step.

  • @indahmonisafirdiantika2096
    @indahmonisafirdiantika2096 4 роки тому +2

    this tutorial is really help me a lot

  • @cabrelngako8877
    @cabrelngako8877 4 роки тому

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

  • @kundanseal1650
    @kundanseal1650 3 роки тому +1

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

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

  • @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)

  • @vinyselopal6215
    @vinyselopal6215 4 роки тому +1

    Amazingly explained!

  • @shivadarshans3409
    @shivadarshans3409 4 роки тому

    Super super
    Make some more on multiclass classification

  • @AbdulWaheed-vl1pc
    @AbdulWaheed-vl1pc 3 роки тому

    Great Job my boy.Thank you

  • @poojaerelli1806
    @poojaerelli1806 4 роки тому

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

  • @karishmakh5609
    @karishmakh5609 3 роки тому +1

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

  • @christyzachariah1301
    @christyzachariah1301 3 роки тому +1

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

  • @khichuri3456
    @khichuri3456 3 роки тому

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

  • @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?

  • @divyanshsahu8750
    @divyanshsahu8750 3 роки тому

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

  • @unemployedcse3514
    @unemployedcse3514 3 роки тому

    Practical vedio helped me a lot thank u 💞

  • @diahnurkhasanah7499
    @diahnurkhasanah7499 4 роки тому

    Thanks for all the explanation

  • @dkishore599
    @dkishore599 4 роки тому

    Really it is simply awesome...

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

  • @mehakdeepsingh9288
    @mehakdeepsingh9288 4 роки тому

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

  • @sachinjaiswal8222
    @sachinjaiswal8222 4 роки тому +1

    Thank u so much it really helps

  • @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?

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

  • @mahendrasinhgohil44
    @mahendrasinhgohil44 3 роки тому

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

  • @shreejanshrestha1931
    @shreejanshrestha1931 4 роки тому

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

  • @rohit090893
    @rohit090893 4 роки тому +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.

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

  • @shreyapattewar522
    @shreyapattewar522 4 роки тому

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

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

  • @bizharshit
    @bizharshit 5 років тому

    good work !!

  • @madannikalje760
    @madannikalje760 5 років тому +1

    Thanks bro really easy

  • @jainilpanchal2000
    @jainilpanchal2000 4 роки тому +1

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

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

  • @toushi100
    @toushi100 4 роки тому

    great video bro this helped me alot thank you so much

  • @bhautikkachhadiya7583
    @bhautikkachhadiya7583 3 роки тому

    well explained....

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

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

  • @gagangupta7840
    @gagangupta7840 4 роки тому

    Nice explanation with example

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

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

  • @pixtrust4514
    @pixtrust4514 4 роки тому +1

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

  • @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 2 роки тому

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

  • @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!

  • @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 3 роки тому

      ind = train_generator.class_indices
      print(ind)
      use it

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

  • @rohit090893
    @rohit090893 4 роки тому

    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 ?

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 4 роки тому

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

  • @surbhibhatia7629
    @surbhibhatia7629 3 роки тому

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

  • @TheRandomTecLad
    @TheRandomTecLad 3 роки тому

    do u have this cold on git

  • @harshvardhantiwari4438
    @harshvardhantiwari4438 3 роки тому

    Thank You

  • @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!

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

  • @yashwanthmachiraju917
    @yashwanthmachiraju917 4 роки тому

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

  • @aggyasinghal7932
    @aggyasinghal7932 4 роки тому

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

  • @savagelysavage4187
    @savagelysavage4187 3 роки тому

    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?

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

  • @nawrasqusay2164
    @nawrasqusay2164 2 роки тому

    great job how can i get the code please

  • @RS-vu5um
    @RS-vu5um 4 роки тому

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

  • @lendixful7932
    @lendixful7932 5 років тому

    Nice video

  • @emoloic8481
    @emoloic8481 4 роки тому

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

  • @milindkapase2414
    @milindkapase2414 4 роки тому +1

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

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

  • @kathiravan6003
    @kathiravan6003 4 роки тому

    super bro...

  • @parvathyks16
    @parvathyks16 4 роки тому

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

  • @bananaldossary3659
    @bananaldossary3659 4 роки тому

    awesome!

  • @saiteja8207
    @saiteja8207 4 роки тому

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

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

  • @BatteryPassport
    @BatteryPassport 2 роки тому

    where i can find the code?

  • @dkishore599
    @dkishore599 4 роки тому

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

  • @z1pppyyyy
    @z1pppyyyy 4 роки тому

    thank you man, really helped :)

  • @aravindswamy7631
    @aravindswamy7631 4 роки тому

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

  • @gerelbatbatgerel1187
    @gerelbatbatgerel1187 4 роки тому +1

    Thank you so much! :D

  • @jyotirupamalakar1931
    @jyotirupamalakar1931 4 роки тому

    Which classifier you used?

  • @someoneudontknow3470
    @someoneudontknow3470 Рік тому

    where is the label step? Can anyone explain it to me?

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