Dogs vs Cats Image Classification (CNN) | Deep Learning | Python

  Рет қаралды 36,643

Hackers Realm

Hackers Realm

Күн бұрын

Пікірлер: 90
@HackersRealm
@HackersRealm Жыл бұрын
Hey Hackers, I have updated the code to test the model with real image. You can find the code in my website or GitHub. Happy Learning!!!
@lebaminhdat2402
@lebaminhdat2402 2 жыл бұрын
Thank you so much for the video, without it I wouldn't be able to pass my final project, wish you can develop your channel further in the future
@kwanshinoda7859
@kwanshinoda7859 2 жыл бұрын
very true bro
@HackersRealm
@HackersRealm 2 жыл бұрын
Glad it was helpful!!! I will try my best to create more content!!!
@lebaminhdat2402
@lebaminhdat2402 2 жыл бұрын
@@HackersRealm many thanks you again
@PraveenKumar-ob7gd
@PraveenKumar-ob7gd 2 жыл бұрын
@@lebaminhdat2402 u do that project u create ppt slides is available to send me plsss..... I want 😊
@lebaminhdat2402
@lebaminhdat2402 2 жыл бұрын
@@PraveenKumar-ob7gd sorry for reply too late, can you give me your email or something I can send to you!!
@Tis_I98
@Tis_I98 4 ай бұрын
Awesome class Very clear abd understanding
@myhaluu4277
@myhaluu4277 3 жыл бұрын
Thanks for your video clip, it helped me a lot of in my graduation thesis
@HackersRealm
@HackersRealm 3 жыл бұрын
Glad it was helpful!!!
@vikrammane-xu6qn
@vikrammane-xu6qn Жыл бұрын
What kind of pre-requisites do i need before going through the project? except python basic syntax
@HackersRealm
@HackersRealm Жыл бұрын
You can watch it as it's basic deep learning project
@kirushanthuthayakumar7769
@kirushanthuthayakumar7769 3 ай бұрын
Its so nice and very helpful. Thank you so much ❤
@HackersRealm
@HackersRealm 3 ай бұрын
Glad it was helpful!!!
@erwanerwan6196
@erwanerwan6196 Жыл бұрын
hello sir !!! i am still on it...i tried to do the same code on jupyter nb CREATE DATAFRAME ETC...But i find 1 for any sample cats dogs why..?? do you have any idea to fix this issue ?
@ahmadshabaz2724
@ahmadshabaz2724 11 ай бұрын
awesome tutorial bro. lot of respect
@HackersRealm
@HackersRealm 11 ай бұрын
Thanks for your kind words!!!
@fatmanursefer1482
@fatmanursefer1482 11 ай бұрын
Can I do the same operations for more than 2 classifications?
@HackersRealm
@HackersRealm 11 ай бұрын
No, there should be some changes done on the model side for that but you can still try
@jimgolias9745
@jimgolias9745 2 жыл бұрын
Hello and thank you for the video! Why from keras.preprocessing.image import load_img gives me an error? How do i fix it?
@HackersRealm
@HackersRealm 2 жыл бұрын
I think, the module may get updated in some version, try to check how to import the module for that version, it will fix the issue.
@sadikaljarif9635
@sadikaljarif9635 2 жыл бұрын
is it possible to use this for alexnet model???
@HackersRealm
@HackersRealm 2 жыл бұрын
yes, you can use any model for this
@sadikaljarif9635
@sadikaljarif9635 2 жыл бұрын
@@HackersRealm what about image procesing ..if i use alexnet i have to change it right???
@HackersRealm
@HackersRealm 2 жыл бұрын
@@sadikaljarif9635 a little, may be, it depends on the input size you're specifying, or you can use the same steps for alexnet
@sadikaljarif9635
@sadikaljarif9635 2 жыл бұрын
@@HackersRealm ok thanks
@jimgolias9745
@jimgolias9745 2 жыл бұрын
Hello and great job on the video. I get an error in plt.figure(figsize=(25,25)) that says KeyError: 'images' . How do i fix this?
@HackersRealm
@HackersRealm 2 жыл бұрын
the column name is not present. Are you using the same dataset from the video?
@maedeha.b4714
@maedeha.b4714 9 ай бұрын
I am having the same issue
@ashmikajayharinkhede5197
@ashmikajayharinkhede5197 3 жыл бұрын
10k subs incoming!!!
@HackersRealm
@HackersRealm 3 жыл бұрын
Hope so!!!
@erwanerwan6196
@erwanerwan6196 2 жыл бұрын
ok with class_name it's better ..no invalid syntaxe now !! ..because i ve seen you added it ...
@Kaijoh
@Kaijoh 2 жыл бұрын
haarcascade ? to really differ both of them using webcam
@HackersRealm
@HackersRealm 2 жыл бұрын
didn't get you, can you rephrase the question?
@saitarun6562
@saitarun6562 Жыл бұрын
Thanks Liked & Subscribed ❤
@HackersRealm
@HackersRealm Жыл бұрын
Thanks mate😄
@amaobirufusbobo3707
@amaobirufusbobo3707 2 жыл бұрын
Your explanation was superb, but i noticed there is no prediction in this project and how can I add it if possible
@HackersRealm
@HackersRealm 2 жыл бұрын
You can see other similar projects in the playlist, those videos will have prediction part
@sumaiyasafdar6845
@sumaiyasafdar6845 2 жыл бұрын
i wanted to ask that how can we present this project in our college? like do we need to write frond end too? of just the code in google collab??
@HackersRealm
@HackersRealm 2 жыл бұрын
you can show the result by giving the image input to the model and display the result
@ghitalazrek4759
@ghitalazrek4759 Жыл бұрын
i have this ValueError: Input 0 of layer "max_pooling2d_8" is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: (None, 2000, 78, 78, 32)
@HackersRealm
@HackersRealm Жыл бұрын
I think there is some problem with the reshape of input. You can see the None at the start. Try to reshape it and check whether you have the shape (2000, 78, 78, 32)
@kaziranga_national_park
@kaziranga_national_park Жыл бұрын
Hello sir, apporox images 18 lakhs, how to Wild animal images classify and automatically segregation move on folder wise. Please help
@HackersRealm
@HackersRealm Жыл бұрын
if you have class labels like this dataset, with few changes you can do it!!!
@kaziranga_national_park
@kaziranga_national_park Жыл бұрын
@@HackersRealm Sir, i am begginger, please video provide. I am from Kaziranga National park (Assam) India. data oparator.
@kaziranga_national_park
@kaziranga_national_park Жыл бұрын
@@HackersRealm no idea.
@deeber35
@deeber35 Жыл бұрын
I'm getting an invalid syntax error on this line {which matches your code}:: "for class in os.listdir("dog-vs-cat-classification"): ^^^^^ SyntaxError: invalid syntax The next line in the code gives same syntax problem . Any ideas why? Thanks
@kaziranga_national_park
@kaziranga_national_park Жыл бұрын
Are Spyder software is working. this Coding
@HackersRealm
@HackersRealm Жыл бұрын
you can use this code in spyder as well
@priyabratmohanty6610
@priyabratmohanty6610 Жыл бұрын
For the generators I am getting "found 0 validated images file names belonging to 0 class" and same response for class 1. Could you please help me with this, why I am getting this . plz help, I have my project submission in 2days
@HackersRealm
@HackersRealm Жыл бұрын
Are you using the same dataset and in colab?
@priyabratmohanty6610
@priyabratmohanty6610 Жыл бұрын
@@HackersRealm yes the data set is same only for my project. However I am using Kaggle notebook bcz my laptop is a bit slow. So is it happening because of this !?
@HackersRealm
@HackersRealm Жыл бұрын
@@priyabratmohanty6610 yes you could you colab or you can update the folder path and use it in kaggle
@merosinchan8048
@merosinchan8048 3 жыл бұрын
Hello. Can I ask why my my dogs and cats images can load, at first and afterwards it’s just figsize x figsize = so,e digits output? And my accuracy is not moving :[
@HackersRealm
@HackersRealm 3 жыл бұрын
you're saying the images are not loading?
@rushikeshchavanke9198
@rushikeshchavanke9198 2 жыл бұрын
29:19 testing time stamp
@darthyrabecka1472
@darthyrabecka1472 2 жыл бұрын
Why length of values doesn't match length of index
@darthyrabecka1472
@darthyrabecka1472 2 жыл бұрын
plz reply
@HackersRealm
@HackersRealm 2 жыл бұрын
@@darthyrabecka1472 is it showing error while running the code?
@HackersRealm
@HackersRealm 2 жыл бұрын
@@darthyrabecka1472 it's usually have same values only
@tanvivarak6185
@tanvivarak6185 2 жыл бұрын
Hello i really need your help. After successfully running this code I ma trying the prediction part which apparently I am not able to. i tried every possible way that I could. plz also provide the prediction code.....i really need it
@HackersRealm
@HackersRealm 2 жыл бұрын
you have to load and resize the image based on the training we have set. img = np.array(PIL.Image.open(image_name)) pred= model.predict(img) If you face any issues, reach out to me in linkedin or insta, links are in the description
@jervx829
@jervx829 2 жыл бұрын
img = cv2.imread('imagehere.jpg') img = cv2. resize(img, (128, 128)) /255. res = model.predict(np.array(img).reshape(-1,128,128,3)) print(res)
@erwanerwan6196
@erwanerwan6196 2 жыл бұрын
hello i run only the first loop and get invalid syntax i triple checked it but still same error how possible ?????
@HackersRealm
@HackersRealm 2 жыл бұрын
which loop you're referring to? Could you give more detail on that.
@erwanerwan6196
@erwanerwan6196 2 жыл бұрын
@@HackersRealm glad to hear from you !i thi s is my code !input_path = "parentfx" label =['cats','dogs'] for class in os.listdir('parentfx'): for path in os.listdir("parentfx/"+class): if class == "Cat": label.append(0) else label.append(1) input_path.append(os.path.join("parentfx ", class , path )) print( input_path [0] ,label[0] ) File "", line 4 for class in os.listdir('parentfx'): ^ SyntaxError: invalid syntax
@erwanerwan6196
@erwanerwan6196 2 жыл бұрын
maybe TF version is the issue ?
@fahadhos
@fahadhos Жыл бұрын
@@HackersRealm i have ques is it the actual binary classification , i just curious i thought i have to put the dog image then model will tell that this is dog
@HackersRealm
@HackersRealm Жыл бұрын
@@fahadhos yes it's a binary classification problem as the output is 2 only
@cuocsongquanhta5398
@cuocsongquanhta5398 Жыл бұрын
Please export model.h5😢
@HackersRealm
@HackersRealm Жыл бұрын
You could train the model quickly using colab itself
@deeber35
@deeber35 11 ай бұрын
What do you do if you have hundreds of corrupt files, like in the kagglecatsanddogs_5340 files?
@HackersRealm
@HackersRealm 11 ай бұрын
You could automate the cleaning process in a loop if the file is not opening
@deeber35
@deeber35 11 ай бұрын
@@HackersRealm Which opening of an image command would you advise I use to find the corrupt ones?
@HackersRealm
@HackersRealm 11 ай бұрын
@@deeber35 any library will throw error if you try to open a corrupted file
@erwanerwan6196
@erwanerwan6196 2 жыл бұрын
HI I have only 48 images not more.....batch size =20 then model .fit does not work Epoch 1/50 why ?? --------------------------------------------------------------------------- InvalidArgumentError Traceback (most recent call last) in 4 epochs =50, 5 validation_data =validation_generator , ----> 6 validation_steps = 1.2,
@HackersRealm
@HackersRealm 2 жыл бұрын
what is that validation steps parameters?
@aditya_r_k__
@aditya_r_k__ 3 жыл бұрын
When I'm trying to predict some results by this model it's going to show [[0.]] which makes no sence
@HackersRealm
@HackersRealm 3 жыл бұрын
is it showing the same for all the images?
@aditya_r_k__
@aditya_r_k__ 3 жыл бұрын
@@HackersRealm usually the output will be [cat percentage, dog percentage], but in this case the output will be like [[0.]] that I tried 2 images showing same result
@HackersRealm
@HackersRealm 3 жыл бұрын
@@aditya_r_k__ Are you getting the proper validation score result; If yes, most probably the error may be in the loading of test data
@tanvivarak6185
@tanvivarak6185 2 жыл бұрын
plz provide the prediction code
@phanthong0212
@phanthong0212 2 жыл бұрын
Dataset link : 404 Not Found. Please fix it !
@HackersRealm
@HackersRealm 2 жыл бұрын
I will check it
@HackersRealm
@HackersRealm 2 жыл бұрын
www.microsoft.com/en-us/download/confirmation.aspx?id=54765 try downloading the data from this link
@phanthong0212
@phanthong0212 2 жыл бұрын
@@HackersRealm Thank you so much !
@foggypoggy6143
@foggypoggy6143 Жыл бұрын
there is nothing called load_img in keras.preprocessing.image
@HackersRealm
@HackersRealm Жыл бұрын
the modules might be updated.. you could use keras.utils instead. keras.io/api/data_loading/image/
1. Introduction to Web Scraping | Web Scraping Tutorial
13:18
Hackers Realm
Рет қаралды 3,3 М.
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 128 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 32 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 2,8 МЛН
Image Classification using CNN Keras | Full implementation
17:56
Learn With Jay
Рет қаралды 186 М.
Classifying Cat vs Dogs | Kaggle Top 1%, No Ensemble
12:54
Aladdin Persson
Рет қаралды 10 М.
Image Classification Using Pytorch and Convolutional Neural Network
21:29
Train Neural Network by loading your images |TensorFlow, CNN, Keras tutorial
18:29
When Maths Meet Coding
Рет қаралды 318 М.
Cat vs. Dog Image Classification (CNNs) - Data Every Day #207
34:50
Gabriel Atkin
Рет қаралды 11 М.