Binary Image Classification with CNN (Deep Learning) on Kaggle Dogs vs Cats Dataset

  Рет қаралды 16,926

The Class of AI

The Class of AI

Күн бұрын

Пікірлер: 72
@ransaramudalige1235
@ransaramudalige1235 Жыл бұрын
Thank You for the informative session! How to predict whether an image is a cat or a dog by uploading an input image manually?
@TheClassofAI
@TheClassofAI Жыл бұрын
You have to upload the image to directory in Google Colab then pass the path of the image to predict function. Thank you!
@user-ot6yk6ie2f
@user-ot6yk6ie2f 2 жыл бұрын
do we have to save model again after last step? Also, can we run this with webcam? for example, use this h5 file and classify whether dog or cat are classified in webcam
@TheClassofAI
@TheClassofAI 2 жыл бұрын
No model will save after each improvement. Once the training will finish then save the mode. You can capture an image from the webcam then save it and place it as a path to model for prediction.
@scottyyieee93
@scottyyieee93 3 жыл бұрын
A man of culture I see hmm watching gabriel dropout
@fuadrahimov5859
@fuadrahimov5859 2 жыл бұрын
Thank you for the informative lesson! However, could you please share a code about prediction of the model? Particularly, I'd like to see how my models behaves on tested files, then confusion matrix and so on. Thank you!
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Great suggestion! Please used "model.predict" function if you hold data for evaluation. Please see this link for help keras.io/api/models/model_training_apis/ If you have any further queries, please let me know.
@shreyasb.s3819
@shreyasb.s3819 3 жыл бұрын
Supeebb...awesome explained
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Many thanks, Shreyas
@lylemarcus3097
@lylemarcus3097 Жыл бұрын
11:09 is pretty sus 😝I am very enjoy the class
@TheClassofAI
@TheClassofAI Жыл бұрын
Thank you for your comment.
@jaimeleal4286
@jaimeleal4286 3 жыл бұрын
Hi! So, when I run the first cell of code in 3:57 in order to download the data, the result that gives me is 401 - Unauthorized. What am I doing wrong?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
I can see your problem. Please go to www.kaggle.com/c/dogs-vs-cats/rules and accept the terms and conditions to download the data. Then run the code again after refreshing. Hope it will work and if it doesn't work, please give me a shout.
@yiikiekwang6163
@yiikiekwang6163 3 жыл бұрын
hi i want to ask that why it will show running out of input data when i try to use dropout and run the eponch with 32 batch size ?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Can you please share the error with us?
@MaheshReddyVadisena
@MaheshReddyVadisena Жыл бұрын
informative!!
@fadilyassin4661
@fadilyassin4661 3 жыл бұрын
good work, any more techniqes to improve the CNN, may bay a tutorial on more than basic model no one did that can you be the one ?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Thanks for your feedback. Will keep in mind and prepare the tutorial.
@TheClassofAI
@TheClassofAI 3 жыл бұрын
@Syeda A Hamdani Official Yes, we will try to do it. Many thanks for the suggestions.
@PepeTostado
@PepeTostado 3 жыл бұрын
How can You use the model to predict a new image
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Hi Albert, after training the model you can simply use "prediction = model.predict(image to be predict)"
@PepeTostado
@PepeTostado 3 жыл бұрын
@@TheClassofAI How can I convert a single image to an arrag so that the model can predict it, I've tried lots of ways but I feel I'm doing it wrong
@sunidhichaudhary2455
@sunidhichaudhary2455 2 жыл бұрын
@@PepeTostado hey were u able to do it?
@Saurabhkumar-tn4uk
@Saurabhkumar-tn4uk 3 жыл бұрын
great job sir really appriciate sir
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Many thanks, Saurabh. Good luck and keep learning.
@Saurabhkumar-tn4uk
@Saurabhkumar-tn4uk 3 жыл бұрын
@@TheClassofAI Sir make video on pre trained model in image classification problem ... Thanks sir
@TheClassofAI
@TheClassofAI 3 жыл бұрын
@@Saurabhkumar-tn4uk do you want to know about different pre-trained models or a video on any specific pre-trained model?
@Saurabhkumar-tn4uk
@Saurabhkumar-tn4uk 3 жыл бұрын
@@TheClassofAI I want to pre-trained model-specific video with implementation, like alexnet, imagenet how implemetation on multi level class image classification problem. .
@TheClassofAI
@TheClassofAI 3 жыл бұрын
@@Saurabhkumar-tn4uk sure will do it soon.
@kaustubhshukla6213
@kaustubhshukla6213 2 жыл бұрын
Thank You for this 😃. Really helpful.
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Thank you for watching :-)
@nirmalamahato5511
@nirmalamahato5511 4 жыл бұрын
hi can u tell me how we will classify image without using external libraray only by using numpy
@TheClassofAI
@TheClassofAI 4 жыл бұрын
Dear Nirmala, you can have a look towardsdatascience.com/artificial-neural-network-implementation-using-numpy-and-classification-of-the-fruits360-image-3c56affa4491 This tutorial builds artificial neural network in Python using NumPy from scratch in order to do an image classification application for the Fruits360 dataset.
@nirmalamahato5511
@nirmalamahato5511 4 жыл бұрын
@@TheClassofAI in this dog cat dataset is it possible to do
@woonie3134
@woonie3134 3 жыл бұрын
Is this only for binary or can I have 3 classes instead?? I am doing food images and I want more than 2 classes to be identified.
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Dear, surely, I will make a video on multi-class classification for images. Thanks for asking. I will ping you as soon I will upload it.
@woonie3134
@woonie3134 3 жыл бұрын
@@TheClassofAI Thank u so much !!!!!!!!!!!! So happy
@woonie3134
@woonie3134 3 жыл бұрын
@@TheClassofAI If it is not asking too much use the Food 101 dataset 😌😌
@aparnaneelam422
@aparnaneelam422 4 жыл бұрын
Sir for me the cats are not allocating i have taken small data set upto 100 only but it is not working can u pls tell mee
@TheClassofAI
@TheClassofAI 4 жыл бұрын
Dear, can you please share your screenshot or email us at theclassofai@gmail.com many thanks!
@aparnaneelam422
@aparnaneelam422 4 жыл бұрын
@@TheClassofAI okaay sirr
@nikhilshingadiya7798
@nikhilshingadiya7798 3 жыл бұрын
I have question how can we decide input shape with different size of image datasets?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Conventionally, when dealing with images of different sizes in CNN (which happens very often in real-world problems), we resize the images to the size of the smallest images with the help of any image manipulation library (OpenCV, PIL, etc) or some times, pad the images of unequal size to the desired size. Resizing the image is simpler and is used most often.
@TheClassofAI
@TheClassofAI 3 жыл бұрын
If the above statement is unclear to you. I can give you an example code. Many thanks!
@nikhilshingadiya7798
@nikhilshingadiya7798 3 жыл бұрын
@@TheClassofAI i can understand your statement very well , can you give me example code so in future i will use this code
@nirmalamahato5511
@nirmalamahato5511 4 жыл бұрын
I am getting this error in third block of code --------------------------------------------------------------------------- FileExistsError Traceback (most recent call last) in () 1 original_dataset_dir = '/content/train' 2 base_dir = '/content/cats_and_dogs_small' ----> 3 os.mkdir(base_dir) FileExistsError: [Errno 17] File exists: '/content/cats_and_dogs_small'
@TheClassofAI
@TheClassofAI 4 жыл бұрын
Dear, you already made a directory 'cats_and_dogs_small'. Now, you are trying to create once more. Either remove it first and re-run the code or restart your virtual machine on Google Colab and see there is no directory name 'cats_and_dogs_small'. It will work fine. You can see from the error that it is trying to make a new directory with the same name. Hope this help :-)
@nitishsingla9057
@nitishsingla9057 3 жыл бұрын
Sir, after training the model. How do we predict the model, like by uploading an image and whether it classifies it as a cat or dog. Can you provide me code for that ? Thanks !!
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Dear, if you have saved your trained model then please load it. Once your trained model is loaded please use the following 1. Read the image: Example: 1.jpg is your image img = cv2.imread('./test1/1.jpg') 2. Now predict the class of image. model.predict(img)
@nitishsingla9057
@nitishsingla9057 3 жыл бұрын
@@TheClassofAI Thanks !!
@shivamjadhav8947
@shivamjadhav8947 4 жыл бұрын
i have dataset in drive if im using training set(8000 images) from that drive in colab its taking forever to train my CNN can you help me to solve the issue so that training can be done
@TheClassofAI
@TheClassofAI 4 жыл бұрын
Dear, there are several reasons for this. I would recommend uploading your data to Colab virtual env. Other option, put your data on GitHub in a repository and clone it in Colab environment. If still not improving, kindly let me know.
@shivamjadhav8947
@shivamjadhav8947 4 жыл бұрын
@@TheClassofAI tks alot I'll look into it
@trebestorkoleckando7609
@trebestorkoleckando7609 3 жыл бұрын
Deep learning with python book
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Yes, I have taken examples from Deep learning with Python Book.
@math_3160
@math_3160 2 жыл бұрын
Hi Please I need your help Pleaaaaaaaaaaase
@TheClassofAI
@TheClassofAI 2 жыл бұрын
How can I help you?
@__-tr9fb
@__-tr9fb 4 жыл бұрын
Dark soldier 57
@sahubiswajit1996
@sahubiswajit1996 4 жыл бұрын
I am getting this error from this code. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CODE: --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- from keras import layers from keras import models from tensorflow.python.keras.layers import Dense from tensorflow.python.keras import Sequential model = models.Sequential() --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ERROR: --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _get_default_graph() 65 try: ---> 66 return tf.get_default_graph() 67 except AttributeError: AttributeError: module 'tensorflow' has no attribute 'get_default_graph' During handling of the above exception, another exception occurred: RuntimeError Traceback (most recent call last) 7 frames /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _get_default_graph() 67 except AttributeError: 68 raise RuntimeError( ---> 69 'It looks like you are trying to use ' 70 'a version of multi-backend Keras that ' 71 'does not support TensorFlow 2.0. We recommend ' RuntimeError: It looks like you are trying to use a version of multi-backend Keras that does not support TensorFlow 2.0. We recommend using `tf.keras`, or alternatively, downgrading to TensorFlow 1.14. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Can you please share the screenshot?
Download Data from Kaggle into Colab using API
4:58
The Class of AI
Рет қаралды 1,6 М.
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 35 МЛН
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 35 МЛН
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 64 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Dogs vs Cats Image Classification (CNN) | Deep Learning | Python
1:01:44
All Machine Learning algorithms explained in 17 min
16:30
Infinite Codes
Рет қаралды 313 М.
Image Classification using CNN Keras | Full implementation
17:56
Learn With Jay
Рет қаралды 186 М.
Image Classification in Keras with explanation || Easy Way
26:08
Vaishvik Satyam
Рет қаралды 55 М.
Classifying Cat vs Dogs | Kaggle Top 1%, No Ensemble
12:54
Aladdin Persson
Рет қаралды 10 М.
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 35 МЛН