Тёмный

EfficientNet on Custom Dataset | Image Classification Using EfficientNet 

Code With Aarohi
Подписаться 37 тыс.
Просмотров 31 тыс.
50% 1

EfficientNet Practical Implementation On Custom Dataset
What are EfficientNets : • EfficientNet Explained...
How to use of Pretrained EfficientNet Model : • EfficientNet Implement...
Github: github.com/Aar...
For queries: aarohisingla1987@gmail.com
EfficientNet is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a compound coefficient.
The researchers used the compound scaling method to scale the dimensions of the network. The applied grid search strategy to find the relationship between the different scaling dimensions of the baseline network under a fixed resource constraint. Using this strategy, the could find the appropriate scaling coefficients for each of the dimensions to be scaled-up. Using these coefficients, the baseline network was scaled by the desired size.
What does scaling mean in the context of CNNs?
There are three scaling dimensions of a CNN: depth, width, and resolution.
Depth simply means how deep the networks is which is equivalent to the number of layers in it.
Width simply means how wide the network is. One measure of width, for example, is the number of channels in a Conv layer
Resolution is simply the image resolution that is being passed to a CNN.
Compound scaling:
Compound scaling method uses a compound co-efficient ø to scale width, depth, and resolution together.
#ai #computervision #artificialintelligence #artificialintelligence #deeplearning #python

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 123   
@sudheer8760
@sudheer8760 Год назад
How to plot Confusion matrix in the same code
@mikhaelteofilus6312
@mikhaelteofilus6312 Год назад
Thank you Mam, great video, but anyone see the link of next video about 'Transfer Learing with EfficientB0' ?
@tryhardcsnoob9764
@tryhardcsnoob9764 2 года назад
Thank you so much! I have been struggling really hard with university assignments and this video really helped me a lot!
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Glad to hear that!
@sasuriii
@sasuriii 2 года назад
@Code With Aarohi Can you please explain why I am getting this error? OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src esize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
@CodeWithAarohi
@CodeWithAarohi 2 года назад
I am not sure why you are getting this error because various different issues can cause this error.
@rob26r
@rob26r 2 года назад
Thanks for the video. Getting this error: TypeError: Failed to convert elements of SparseTensor got this error at last stage hist = model.fit(train_x, train_y, epochs=30, verbose=2) at this line Any thoughts?
@AhmadMahmoud-v7q
@AhmadMahmoud-v7q 9 месяцев назад
It gives me the same error
@RohiniRainadcs
@RohiniRainadcs 8 месяцев назад
@@AhmadMahmoud-v7q same here
@shekharkumar1902
@shekharkumar1902 3 года назад
Very informative video series on efficient net.Arohi Mam, can we use efficient net on realtime videos to detect a single object and how?
@CodeWithAarohi
@CodeWithAarohi 3 года назад
Thankyou...EfficientDet is the object detection version of EfficientNet. You can use that
@shekharkumar1902
@shekharkumar1902 3 года назад
@@CodeWithAarohi Aarohi Mam , thanks for replying . Is there any plans to have tutorial on Efficient Det in future?
@CodeWithAarohi
@CodeWithAarohi 3 года назад
@@shekharkumar1902 Yes, Soon
@szymonpek3
@szymonpek3 2 года назад
Did anyone got the following error? TypeError: Failed to convert elements of SparseTensor (indices=Tensor("DeserializeSparse:0", shape=(None, 2), dtype=int64), values=Tensor("DeserializeSparse:1", shape=(None,), dtype=float32), dense_shape=Tensor("stack:0", shape=(2,), dtype=int64)) to Tensor I am kinda new to CNN and a littel bit lost now
@CodeWithAarohi
@CodeWithAarohi 2 года назад
This is due to the tensorflow and keras version. Try this Tensorflow version 2.1.0 and Keras version 2.3.1.
@enzodia
@enzodia 2 года назад
@@CodeWithAarohi I got a error ( ImportError: cannot import name 'EfficientNetB0' from 'tensorflow.keras.applications' ) with Tensorflow version 2.1.0
@shantilatanayak49
@shantilatanayak49 12 дней назад
Why you didn't upload the transfer learning video for EfficientNet as you mentioned in the video??? Please upload!!!
@CodeWithAarohi
@CodeWithAarohi 12 дней назад
I will try to upload after finishing my pipelined videos.
@vinaykumar-cq1ln
@vinaykumar-cq1ln 3 месяца назад
good explanation but i have one doubt when input images are in different sizes can i make the directly required image size as 224x224 for efficientnetB0 and the remaining model requires a different image size. it may lead to loss of information from original images
@CodeWithAarohi
@CodeWithAarohi 3 месяца назад
When working with deep learning models, especially those pre-trained on specific image sizes (like EfficientNetB0 with 224x224), it is important to resize images appropriately. However, resizing images can indeed lead to loss of information or distortions if not handled properly. Take care while resizing- Resize the image while maintaining the aspect ratio, and then pad the image to the desired size. This approach minimizes distortion and loss
@LuffyMonkey0327
@LuffyMonkey0327 Год назад
please do a tutorial of this with google collab. trying to do this in google collab. am having trouble
@CodeWithAarohi
@CodeWithAarohi Год назад
Sure
@itb426_vardhanikajagtap5
@itb426_vardhanikajagtap5 Год назад
I only have two classes so should I change my num classes ==2 also I did some research and I also have toused binary crossentropy in this code line like this "model.compile(optimizer="adam", loss="binary_crossentropy", metrics=["accuracy","binary_accuracy"] )" is this correct? someone please help \.
@CodeWithAarohi
@CodeWithAarohi Год назад
Yes, change the classes=2 and correct
@thestoryteller3015
@thestoryteller3015 2 года назад
Thank you for such a productive content. I got an error while running EfficientNetB4, Colab session ends as the RAM exceeds. I don't know how to resolve this issue.
@CodeWithAarohi
@CodeWithAarohi 2 года назад
reduce the batch size
@thestoryteller3015
@thestoryteller3015 2 года назад
@@CodeWithAarohi I don't know how to do that, can you please specify, which cell has to be edited in the code which you have implemented in the video.
@iftikharahmad6982
@iftikharahmad6982 3 года назад
Great explanation Aarohi Madam, Can you please explain YoloR With a custom dataset, please?
@CodeWithAarohi
@CodeWithAarohi 3 года назад
Will do after finishing my pipelined videos.
@enzodia
@enzodia Год назад
When I do CPU training, the model runs correctly, but when trying to do GPU training, the prediction results are always the same. [[1. 0. 0. 0. 0. 0. 0. 0. 0.]]
@mayuratapkire3744
@mayuratapkire3744 2 месяца назад
Thanks. In depth explanation. Cleared all my doubts.
@pallabbiswas2752
@pallabbiswas2752 2 месяца назад
hai madam please make a video on EfficientNet for transfer learning
@CodeWithAarohi
@CodeWithAarohi 2 месяца назад
Noted!
@AhmadMahmoud-v7q
@AhmadMahmoud-v7q 9 месяцев назад
Can you help me to fix the error in my code Error type Failed to convert elements of SparseTensor
@shubhankargadad
@shubhankargadad Год назад
I have 3000 images for each class, is it sufficient enough ?
@CodeWithAarohi
@CodeWithAarohi Год назад
3000 images per class is a reasonably large dataset, and it may be sufficient to train a good performing EfficientNet model. However, the adequacy of the dataset for training the EfficientNet model depends on various factors such as the complexity of the classification task, the diversity of images in the dataset, the quality of annotations, and the variability within the images.
@saraejaz8466
@saraejaz8466 Год назад
Hi, thanks a lot for the video. Can you tell how this model implement on more then three classes because when i am using three classes this model work accurately but when I use this model for more then three i give me an error.. i have changed variable value NUM_CLASSES = 4
@ADPathos
@ADPathos Год назад
Thanks for the code but I've run into annoying hangups with your definitions of dataset and dataset_path. What you're calling "dataset_path" is not a path but the list of classes, and what you're calling "data_set" is the root path to the dataset. Then a few lines later you create a variable called "path" (a variable that does not need to exist) and re-define dataset_path again as the same thing it was defined as at the top of the code. Very confusing! I can copy/paste the code and probably get it to work but following it line by line is very confusing due to variable naming and unnecessary variable instantiation.
@siddharthrana512
@siddharthrana512 2 года назад
Hi , i have used this code my dataset and i got this error failed to convert elements of SparseTensor
@rusgabriela741
@rusgabriela741 Год назад
I have this error ValueError: Found input variables with inconsistent numbers of samples: [0, 101000] on this function rain_x,test_x,train_y, test_y =train_test_split(images,Y,test_size=0.05,random_state=415)
@CodeWithAarohi
@CodeWithAarohi Год назад
The error message you are seeing (ValueError: Found input variables with inconsistent numbers of samples: [0, 101000]) indicates that there is a problem with the input data you are using to call the train_test_split function. Specifically, the error message is telling you that the function received one input variable with 0 samples and another input variable with 101000 samples, which is inconsistent and cannot be split into training and testing sets. To solve this error, you should check the input data and make sure that both the images and Y variables have the same number of samples. You can do this by printing out the length of each variable before calling train_test_split: print(len(images)) print(len(Y))
@Kishi1969
@Kishi1969 2 года назад
Very educative and mind blowing lesson..But if someone do not have GPU , How can he test that of GPU ma ?
@ahmed-nm2bl
@ahmed-nm2bl Год назад
please can you explain the scratch code as you did in the other structures
@MarcusVinicius-lq3fe
@MarcusVinicius-lq3fe Год назад
Hi, nice video! Congratulations, you are a prodigy. Where is the transfer learning video? Did not find #16 ? I have a task to classify faces (of 5 different famous actors) using Transfer Learn. I am trying to use an efficient net with Data Augmentation but the accuracy is too low. I need to use CNN for this task. Do you have some tutorials for face classification using CNN?
@CodeWithAarohi
@CodeWithAarohi Год назад
You can get transfer learning code here github.com/AarohiSingla/Image-Classification-Using-EfficientNets/blob/main/3-EfficientNetB0_for_transfer_learning.ipynb but I hadn't made video on it.
@AbdullahSallam
@AbdullahSallam 11 месяцев назад
Thank you for this super simple and clear tutorial. If I scale resolution during data augmentation, is it also correct. I mean If I set target_size in image data generator to the resolution I want, is this equivalent to the resizing you made by suing cv2?
@CodeWithAarohi
@CodeWithAarohi 11 месяцев назад
Changing the resolution during data augmentation using ImageDataGenerator doesn't replicate resizing with cv2. EfficientNet's model architecture relies on a specific input resolution, so using cv2 to resize images before feeding them to the model maintains consistency with its design.
@siddharthrana512
@siddharthrana512 2 года назад
This error is coming when i am trying to fit the model
@asmadjaidri1219
@asmadjaidri1219 Год назад
thank you so much for this great vidéo . where can I found the next vidéo you mentioned at the end?
@CodeWithAarohi
@CodeWithAarohi Год назад
You are welcome. Next video is not on youtube yet!
@ahmedbahpullo8544
@ahmedbahpullo8544 2 года назад
with transerfer learning how we can do it ? thank you for the help
@praveennaik6804
@praveennaik6804 2 года назад
Mam, can we have efficientnet for YoloV5 as backbone ... if so please show how to do it....
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Yes I think, we can do that. I have noted your request and will try to do a video
@shivamsingh-fn8vz
@shivamsingh-fn8vz 2 года назад
well great video , but i have a doubt i have read in many research papers that one how encoding is not a great option to use when working with mullti class classification . So if i use tensorflows to_categorical feature how is it different from one Hot encoder
@CodingMaverick
@CodingMaverick Год назад
Mam thanks for your explanation . As you said , i augmented the data and increased my test accuracy to 94% , but the problem is , by giving any unseen data , it is not predicting good , may i have some suggestions or solutions regarding my issues?
@CodeWithAarohi
@CodeWithAarohi Год назад
It's great that you've been able to increase your test accuracy to 94% through data augmentation, but the discrepancy between your test accuracy and performance on unseen data suggests potential overfitting. Overfitting occurs when a machine learning model performs well on the training data but fails to generalize effectively to new, unseen data. Try these: 1- Ensure that you have a separate validation set in addition to your training and test sets. Use the validation set to tune hyperparameters and monitor your model's performance during training.2- Apply dropout layers during training. 3- Monitor your model's performance on the validation set during training. If the performance starts degrading, stop training early to prevent overfitting.
@CodingMaverick
@CodingMaverick Год назад
@@CodeWithAarohiThanks ma'am for your consideration to see this comment😊. Thanks a lot , it helped me to train and test the model 🤗
@VankayalapatiRadhikaPHD
@VankayalapatiRadhikaPHD 2 года назад
thank you very much for the explanation, can you please share the transfer learning example on the EfficientNet custom dataset
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Will upload soon
@0300jansom
@0300jansom 2 года назад
i have changed catagories to 5 and i got error at outputs = EfficientNetB0(include_top=True, weights=None, classes=NUM_CLASSES)(inputs) . Can you please tell me why?
@CodeWithAarohi
@CodeWithAarohi 2 года назад
what is the error?
@0300jansom
@0300jansom 2 года назад
@@CodeWithAarohi I am implementing efficientnet on mura dataset where data set labels and path are arranged in csv file. got an error on the hot encoding section.
@user-ot6yk6ie2f
@user-ot6yk6ie2f Год назад
dont we need validation accuracy too?
@seraphritt1733
@seraphritt1733 2 года назад
Thank you so much for the explanation! +1 Subscriber keep up the good work!
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Glad my video is helpful and thanks for subscribing 😊
@cemrealdogan7163
@cemrealdogan7163 Год назад
Hi, thanks a lot for the video. I have downloaded the dataset folder from the github link you provided but each folder has only two images inside. May I have the full folder (with 103 images)? Greetings.
@CodeWithAarohi
@CodeWithAarohi Год назад
Yes you are correct. Please download more such images from Internet.
@cemrealdogan7163
@cemrealdogan7163 Год назад
@@CodeWithAarohi Thanks. I will.
@rama_bhuyan
@rama_bhuyan 2 года назад
Hello in general how many images should be taken per class for a decent model ? Thank you for such videos, hoping for more such contents
@CodeWithAarohi
@CodeWithAarohi 2 года назад
There is no specific limit. but at least go for 500 images per class
@ccsushant
@ccsushant 2 года назад
Awesome explanation. Simple and Clearly explained. Thankyou so much Mam..Looking forward for more videos..
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Most welcome 😊
@tirthadatta7368
@tirthadatta7368 2 года назад
Mam, the video explanation is so good, but I want to know can I change Batch size in this code and how I can change this??
@enzodia
@enzodia 2 года назад
I would like to know too.
@sudarshanp4777
@sudarshanp4777 2 года назад
TypeError: Failed to convert elements of SparseTensor got this error at last stage hist = model.fit(train_x, train_y, epochs=30, verbose=2) at this line
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Try using todense() with xtrain and xtest
@sudarshanp4777
@sudarshanp4777 2 года назад
@@CodeWithAarohi Functional object has no attribute 'todense' If I use xtrain and xtest Make sure all arrays contain the same number of samples.
@sudarshanp4777
@sudarshanp4777 2 года назад
Mam suggest me use simple algorithm of deep learning (cpu) of custom object (5classes) except YoLo in your playlist .
@hippasus630
@hippasus630 Год назад
Thanks soo much, was struggling to understand using of such models since so long, really do appreciate your work, again thanks a lot
@CodeWithAarohi
@CodeWithAarohi Год назад
Glad my video was helpful!
@issam5438
@issam5438 3 года назад
Great explanation ,but i am looking forward to the rasa videos . Hope it will be back soon
@CodeWithAarohi
@CodeWithAarohi 3 года назад
Yes it will
@ayushkurlekar3302
@ayushkurlekar3302 2 года назад
Nice video, kindly add video on fine tuning in this case where the data is small.
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Noted
@hosseintamanaeifar6267
@hosseintamanaeifar6267 2 года назад
it would be better if you use google colab in your videos!
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Noted! Will try to do from next video :)
@Readwithaami
@Readwithaami 2 года назад
when i use image resolution 224 colab session gets crashed ,, is there any solution for this?
@CodeWithAarohi
@CodeWithAarohi 2 года назад
you can reduce the batch size
@Readwithaami
@Readwithaami 2 года назад
@@CodeWithAarohi yes .ma'am.. I tried that yesterday .. Thank u ma'am ..can you please do video on efficient det on custom dataset ?
@_ifly
@_ifly 6 месяцев назад
amazing as alway keep this way of teaching ❤
@CodeWithAarohi
@CodeWithAarohi 6 месяцев назад
Thank you, I will
@wasifali5998
@wasifali5998 Год назад
I am geeting errror while running the code on my own dataset
@wasifali5998
@wasifali5998 Год назад
@Code With Aarohi
@CodeWithAarohi
@CodeWithAarohi Год назад
what is the error?
@madhurimasarkar5913
@madhurimasarkar5913 3 года назад
Thanks for uploading this. I am looking for this.
@CodeWithAarohi
@CodeWithAarohi 3 года назад
You're welcome
@djdjendjwjdbjswndbxjrjejsjebd
@djdjendjwjdbjswndbxjrjejsjebd 2 года назад
Hello, Aarohi. I have a question. When learning from this video, batch size was not defined. How is the batch size processed as a default value?
@CodeWithAarohi
@CodeWithAarohi 2 года назад
the default batch size is 32
@djdjendjwjdbjswndbxjrjejsjebd
@djdjendjwjdbjswndbxjrjejsjebd 2 года назад
@@CodeWithAarohi Thank you for your kindness.
@modernfusions1981
@modernfusions1981 2 года назад
Superb. Very elaborative.
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Glad you liked it
@vinothsomasundaram9519
@vinothsomasundaram9519 3 года назад
Aarohi, can please explain resnet with prediction?, I am doing research with thermal image with classes can help me with that?
@vinothsomasundaram9519
@vinothsomasundaram9519 3 года назад
Actually face recognition, with thermal image and various classes
@CodeWithAarohi
@CodeWithAarohi 3 года назад
Video on Resnet is already present in my Playlist
@vinothsomasundaram9519
@vinothsomasundaram9519 3 года назад
@@CodeWithAarohi yes but I am doing project with thermal image with different class and number of image, I can explain you
@vinothsomasundaram9519
@vinothsomasundaram9519 3 года назад
@@CodeWithAarohi I have to verify my results with other research
@CodeWithAarohi
@CodeWithAarohi 3 года назад
@@vinothsomasundaram9519 you can mail me aarohisingla1987@gmail.com
@minalgandhi8718
@minalgandhi8718 2 года назад
Man can you give me codw
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Github: github.com/AarohiSingla/Image-Classification-Using-EfficientNets
@sudarshanp4777
@sudarshanp4777 2 года назад
is this required gpu?
@CodeWithAarohi
@CodeWithAarohi 2 года назад
you can run on CPU and GPU both
@yughendermeda6231
@yughendermeda6231 Год назад
you got a subscriber🙏
@CodeWithAarohi
@CodeWithAarohi Год назад
Thank you!
@yughendermeda6231
@yughendermeda6231 Год назад
@@CodeWithAarohi thanks not needed mam..infact i have to tell thanks to you..what we need is more topics related to ai😊 🥰
@CodeWithAarohi
@CodeWithAarohi Год назад
@@yughendermeda6231 working on it 😊
@shubhamchoudhary5461
@shubhamchoudhary5461 3 года назад
lucid explanation
@CodeWithAarohi
@CodeWithAarohi 3 года назад
Thankyou
@murtaza1323
@murtaza1323 2 года назад
Very nice
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Thanks
@djdjendjwjdbjswndbxjrjejsjebd
@djdjendjwjdbjswndbxjrjejsjebd 2 года назад
you r so cute.
@CodeWithAarohi
@CodeWithAarohi 2 года назад
Thankyou
Далее
Вопрос Ребром - Серго
43:16
Просмотров 1,5 млн
Image Classification CNN in PyTorch
30:29
Просмотров 6 тыс.
Mask R-CNN Practical Implementation
29:15
Просмотров 57 тыс.
Build a Deep CNN Image Classifier with ANY Images
1:25:05