Multi-class Image Classification using Keras (Python) on Weather Dataset (Kaggle)

  Рет қаралды 17,349

The Class of AI

The Class of AI

Күн бұрын

Пікірлер: 74
@akinboyeyusuff215
@akinboyeyusuff215 2 жыл бұрын
​ @The Class of AI Thank you for the video. The dataset I am currently using has no test.csv. How do I generate my test.csv such that I can use it to test the model. Or do I do that manually. I have the test folder that contains the all the images I want to use to test. Thank you.
@prashilramteke5622
@prashilramteke5622 Жыл бұрын
thank you so much sir this is very good explanation, but i question sir can this model will classify only one image? and it should give me class of that image?
@TheClassofAI
@TheClassofAI 9 ай бұрын
You can classify each at a time and pass them as a batch, totally upto you!
@turbophilable
@turbophilable 2 жыл бұрын
Thanks sir i hv been searching for this for quite some time now..most helpful
@TheClassofAI
@TheClassofAI 2 жыл бұрын
You are most welcome Philip
@neelabhsomani5129
@neelabhsomani5129 2 жыл бұрын
Amazing video! Just had a small doubt. How did you make the csv file of your labels?
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Dear Neelabh, I have downloaded the data from Kaggle and labels are already stored in the CSV file. Hope this helps.
@joker2ify
@joker2ify 2 жыл бұрын
Great video! Just a quick question, how do you print the images in the train or validation folders?
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Please share the screenshot of where and what you are trying to print.
@shahafraz3200
@shahafraz3200 8 ай бұрын
Hi. Can you plz guide me how to create this test.csv file
@TheClassofAI
@TheClassofAI 8 ай бұрын
Your submissions usually have two columns: an ID column and a prediction column. The ID field comes from the test data (keeping whatever name the ID field had in that data, which for the housing data is the string 'Id'). The prediction column will use the name of the target field. We will create a DataFrame with this data, and then use the dataframe's to_csv method to write our submission file. Explicitly include the argument index=False to prevent pandas from adding another column in our CSV file.
@chintanparmar7533
@chintanparmar7533 3 жыл бұрын
Thanks for video!! There was a step to check the number of images across classes(cloudy, fog etc)...is it required to be balanced across classes to get better accuracy?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Yes, we can use resampling to balance the classes. Otherwise, better to use Sensitivity-Specificity Metrics and use a confusion matrix to see the performance.
@chintanparmar7533
@chintanparmar7533 3 жыл бұрын
Given a training dataset which has pdf having scan image of restaurant invoice...need code for nlp model to extract subtotal from receipts...any such sample code available?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
I believe the only way to do it is by using Optical Character Recognition (OCR). Use OCR to read the number/total and then learn it.
@ibrahimsincap3705
@ibrahimsincap3705 2 жыл бұрын
How can I use my own dataset for this?
@indointanchannel
@indointanchannel Жыл бұрын
Amazing video. Thank you so much for your content. it is advantageous. it solved my problem of splitting datasets in folder management.
@TheClassofAI
@TheClassofAI Жыл бұрын
Glad it helped! Keep learning :-)
@AghaKhan9
@AghaKhan9 3 жыл бұрын
One of the best videos and solved my problem... Thank you so much sir ❤️
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Most welcome
@ayushpratap6311
@ayushpratap6311 2 жыл бұрын
Sir , i am getting error in CCN model section, My epochs are not running and giving the erroe as : InvalidArgumentError: logits and labels must be broadcastable: logits_size=[16,5] labels_size=[16,4] [[node categorical_crossentropy/softmax_cross_entropy_with_logits (defined at /usr/local/lib/python3.7/dist-packages/keras/backend.py:5010) ]] [Op:__inference_train_function_3283] plese solve the issue
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Can you please retry or share the screenshot?
@IntanMire
@IntanMire Жыл бұрын
sir, How do split dataset if we have 3 splits(train, valid, and test). I have an error like below. split_size = .85 split_data(YES_SOURCE_DIR, TRAINING_YES_DIR, VALID_YES_DIR, TEST_YES_DIR, split_size) split_data(NO_SOURCE_DIR, TRAINING_NO_DIR, VALID_NO_DIR, TEST_NO_DIR, split_size) TypeError: split_data() takes 4 positional arguments but 5 were given Please you give a problem solver about this. Thank you so much. Greeting.
@TheClassofAI
@TheClassofAI Жыл бұрын
Can you please share the screenshot of the error to theclassoai@gmail. com
@sheetalnagar3882
@sheetalnagar3882 Жыл бұрын
Very Nice video. Can you guide me how to find RECALL value for MULTICLASS IMAGE CLASSIFICATION in keras?
@TheClassofAI
@TheClassofAI Жыл бұрын
Please try this code: def macro_recall(y_true, y_pred): # find the number of classes num_classes = len(np.unique(y_true)) # initialize recall to 0 recall = 0 # loop over all classes for class_ in list(y_true.unique()): # all classes except current are considered negative temp_true = [1 if p == class_ else 0 for p in y_true] temp_pred = [1 if p == class_ else 0 for p in y_pred] # compute true positive for current class tp = true_positive(temp_true, temp_pred) # compute false negative for current class fn = false_negative(temp_true, temp_pred) # compute recall for current class temp_recall = tp / (tp + fn + 1e-6) # keep adding recall for all classes recall += temp_recall # calculate and return average recall over all classes recall /= num_classes return recall
@jaswanthchowdary3700
@jaswanthchowdary3700 2 жыл бұрын
can u tell the model name u have used in this?
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Hi Jaswanth, it is a simple CNN model with Data Augmentation. I have not used any transfer learning or pre-trained model for this multi-class classification. If you have any further queries, please get in touch. Thank you!
@abhijeetkumar8070
@abhijeetkumar8070 2 жыл бұрын
Kindly help me with this error, i'm a complete newbie trying to apply this process to another model. InvalidArgumentError for model.fit_generator (deprecated)
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Model.fit_generator is deprecated starting from TensorFlow 2.1.0 which is currently in rc1. You can find the documentation for tf-2.1.0-rc1 here: www.tensorflow.org/versions/r2.1/api_docs/python/tf/keras/Model#fit
@whatsmyname8778
@whatsmyname8778 Жыл бұрын
Did you ever fix the problem?
@ghulammustafa01
@ghulammustafa01 2 жыл бұрын
what is inside the test.csv file
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Hi Ghulam, it has ground truth or you can say true values of the test dataset. In my code, please see cell 33, where I have used it. If you have any further doubts, please get in touch. Thank you!
@akinboyeyusuff215
@akinboyeyusuff215 2 жыл бұрын
​@@TheClassofAI Thank you for the video. The dataset I am currently using has no test.csv. How do I generate my test.csv such that I can use it to test the model. Or do I do that manually. Thank you.
@moisesdesouzafeitosa3364
@moisesdesouzafeitosa3364 3 жыл бұрын
Congrats and thank you for the video.
@TheClassofAI
@TheClassofAI 3 жыл бұрын
You are most welcome. Thank you for watching.
@eranfeit
@eranfeit 2 жыл бұрын
Thanks for this video
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Most welcome
@anthonymipawa8830
@anthonymipawa8830 3 жыл бұрын
Very informative video, thank you
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Many thanks!
@beda4209
@beda4209 2 жыл бұрын
Thank you for the video! I have the problem though, that the prediction comes out as integers, meaning it predicts like so [0 0 1 0]. I would like it to give me floats like [0.5 0.7 0.1 0.5] for example
@TheClassofAI
@TheClassofAI 2 жыл бұрын
In line 32: Please don't use "argmax" because it returns the indices of the maximum values along an axis. Try this code when predicting test dataset array = model.predict(test_preprocessed_images, batch_size=1, verbose=1) print(array)
@poraspatle7980
@poraspatle7980 Жыл бұрын
Is it possible to create multi-class image classification and captioning without using Tensorflow, Keras, or sklearn
@TheClassofAI
@TheClassofAI Жыл бұрын
Yes, it is possible.
@poraspatle7980
@poraspatle7980 Жыл бұрын
@@TheClassofAI can you give a outline for this ?
@TheClassofAI
@TheClassofAI Жыл бұрын
@@poraspatle7980 I think this blog can help you medium.com/analytics-vidhya/how-to-build-a-multi-class-image-classification-model-without-cnns-in-python-660f0f411764
@chintanparmar7533
@chintanparmar7533 3 жыл бұрын
In general how to improve accuracy?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
You can use different transfer learning methods for domain adaptation.
@anujanaphade4549
@anujanaphade4549 3 жыл бұрын
How to split dataset in train and test set?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
Anuja: As I did in cell 9 of the jupyter notebook for train and validation. You can use the same to create a test set.
@anilkumarchannamsettti
@anilkumarchannamsettti 2 жыл бұрын
Very informative video Thank you so much sir
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Thank you, Anil :-) Keep Watching
@anilkumarchannamsettti
@anilkumarchannamsettti 2 жыл бұрын
Based on your code I have an error due to split data there is no such file directory
@anilkumarchannamsettti
@anilkumarchannamsettti 2 жыл бұрын
[Errno 2] No such file or directory: '/content/dataset/cloudycloudy47.jpg'
@anilkumarchannamsettti
@anilkumarchannamsettti 2 жыл бұрын
I got it my directory name changes
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Thank you for raising the query. Glad to know that you have sorted it.
@chintanparmar7533
@chintanparmar7533 3 жыл бұрын
Is this code on github?
@TheClassofAI
@TheClassofAI 3 жыл бұрын
@Chintan: Kindly see the link to GitHub: github.com/theclassofai/Multiclass_Image_Classification
@anilkumarchannamsettti
@anilkumarchannamsettti 2 жыл бұрын
weather dataset is free
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Yes it is free. You only need Kaggle account to download the data
@umerzamankhan4536
@umerzamankhan4536 2 жыл бұрын
Sir , i am getting error in CCN model section, My epochs is not running and giving the erroe as : InvalidArgumentError: logits and labels must be broadcastable: logits_size=[16,5] labels_size=[16,22] [[node categorical_crossentropy/softmax_cross_entropy_with_logits (defined at /usr/local/lib/python3.7/dist-packages/keras/backend.py:5010) ]] [Op:__inference_train_function_3283 please help! sir
@TheClassofAI
@TheClassofAI 2 жыл бұрын
Can you please send me the screenshots or share the notebook with me theclassofai@gmail.com ? Thank you!
@nasroayed3065
@nasroayed3065 2 жыл бұрын
@@TheClassofAI i have the same error
@nasroayed3065
@nasroayed3065 2 жыл бұрын
did u found a solution ?? @Umer Zaman Khan
@umerzamankhan4536
@umerzamankhan4536 2 жыл бұрын
@@nasroayed3065 yes bro
@nasroayed3065
@nasroayed3065 2 жыл бұрын
@@umerzamankhan4536 can u help me plz ? how did u fix the probleme ?
142 - Multilabel classification using Keras
19:23
DigitalSreeni
Рет қаралды 46 М.
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 28 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 63 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 41 МЛН
144 - Binary classification using Keras
14:38
DigitalSreeni
Рет қаралды 24 М.
Image Classification using CNN Keras | Full implementation
17:56
Learn With Jay
Рет қаралды 186 М.
143 - Multiclass classification using Keras
11:35
DigitalSreeni
Рет қаралды 35 М.
Ai Samsung vs Ai Apple
1:00
Romancev768
Рет қаралды 317 М.
Проверил, как вам?
0:53
Коннор
Рет қаралды 408 М.
Xiaomi or Samsung #colormixing #satisfying #sharkzhan
0:23
Shark Zhan
Рет қаралды 2,7 МЛН
Durability test of Galaxy Note 8 vs S24 Ultra 😁 #galaxynote8 #s24ultra #iphonexr
0:28
Samsung® telefonlara dair herşey
Рет қаралды 24 МЛН
Лучший iPhone 16 это iPhone 15 Pro! Или нет?
12:43