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 Жыл бұрын
You have to upload the image to directory in Google Colab then pass the path of the image to predict function. Thank you!
@user-ot6yk6ie2f2 жыл бұрын
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
@TheClassofAI2 жыл бұрын
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.
@scottyyieee933 жыл бұрын
A man of culture I see hmm watching gabriel dropout
@fuadrahimov58592 жыл бұрын
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!
@TheClassofAI2 жыл бұрын
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.s38193 жыл бұрын
Supeebb...awesome explained
@TheClassofAI3 жыл бұрын
Many thanks, Shreyas
@lylemarcus3097 Жыл бұрын
11:09 is pretty sus 😝I am very enjoy the class
@TheClassofAI Жыл бұрын
Thank you for your comment.
@jaimeleal42863 жыл бұрын
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?
@TheClassofAI3 жыл бұрын
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.
@yiikiekwang61633 жыл бұрын
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 ?
@TheClassofAI3 жыл бұрын
Can you please share the error with us?
@MaheshReddyVadisena Жыл бұрын
informative!!
@fadilyassin46613 жыл бұрын
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 ?
@TheClassofAI3 жыл бұрын
Thanks for your feedback. Will keep in mind and prepare the tutorial.
@TheClassofAI3 жыл бұрын
@Syeda A Hamdani Official Yes, we will try to do it. Many thanks for the suggestions.
@PepeTostado3 жыл бұрын
How can You use the model to predict a new image
@TheClassofAI3 жыл бұрын
Hi Albert, after training the model you can simply use "prediction = model.predict(image to be predict)"
@PepeTostado3 жыл бұрын
@@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
@sunidhichaudhary24552 жыл бұрын
@@PepeTostado hey were u able to do it?
@Saurabhkumar-tn4uk3 жыл бұрын
great job sir really appriciate sir
@TheClassofAI3 жыл бұрын
Many thanks, Saurabh. Good luck and keep learning.
@Saurabhkumar-tn4uk3 жыл бұрын
@@TheClassofAI Sir make video on pre trained model in image classification problem ... Thanks sir
@TheClassofAI3 жыл бұрын
@@Saurabhkumar-tn4uk do you want to know about different pre-trained models or a video on any specific pre-trained model?
@Saurabhkumar-tn4uk3 жыл бұрын
@@TheClassofAI I want to pre-trained model-specific video with implementation, like alexnet, imagenet how implemetation on multi level class image classification problem. .
@TheClassofAI3 жыл бұрын
@@Saurabhkumar-tn4uk sure will do it soon.
@kaustubhshukla62132 жыл бұрын
Thank You for this 😃. Really helpful.
@TheClassofAI2 жыл бұрын
Thank you for watching :-)
@nirmalamahato55114 жыл бұрын
hi can u tell me how we will classify image without using external libraray only by using numpy
@TheClassofAI4 жыл бұрын
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.
@nirmalamahato55114 жыл бұрын
@@TheClassofAI in this dog cat dataset is it possible to do
@woonie31343 жыл бұрын
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.
@TheClassofAI3 жыл бұрын
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.
@woonie31343 жыл бұрын
@@TheClassofAI Thank u so much !!!!!!!!!!!! So happy
@woonie31343 жыл бұрын
@@TheClassofAI If it is not asking too much use the Food 101 dataset 😌😌
@aparnaneelam4224 жыл бұрын
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
@TheClassofAI4 жыл бұрын
Dear, can you please share your screenshot or email us at theclassofai@gmail.com many thanks!
@aparnaneelam4224 жыл бұрын
@@TheClassofAI okaay sirr
@nikhilshingadiya77983 жыл бұрын
I have question how can we decide input shape with different size of image datasets?
@TheClassofAI3 жыл бұрын
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.
@TheClassofAI3 жыл бұрын
If the above statement is unclear to you. I can give you an example code. Many thanks!
@nikhilshingadiya77983 жыл бұрын
@@TheClassofAI i can understand your statement very well , can you give me example code so in future i will use this code
@nirmalamahato55114 жыл бұрын
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'
@TheClassofAI4 жыл бұрын
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 :-)
@nitishsingla90573 жыл бұрын
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 !!
@TheClassofAI3 жыл бұрын
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)
@nitishsingla90573 жыл бұрын
@@TheClassofAI Thanks !!
@shivamjadhav89474 жыл бұрын
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
@TheClassofAI4 жыл бұрын
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.
@shivamjadhav89474 жыл бұрын
@@TheClassofAI tks alot I'll look into it
@trebestorkoleckando76093 жыл бұрын
Deep learning with python book
@TheClassofAI2 жыл бұрын
Yes, I have taken examples from Deep learning with Python Book.
@math_31602 жыл бұрын
Hi Please I need your help Pleaaaaaaaaaaase
@TheClassofAI2 жыл бұрын
How can I help you?
@__-tr9fb4 жыл бұрын
Dark soldier 57
@sahubiswajit19964 жыл бұрын
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. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------