Discussion post on Kaggle with brief summary of what I did in the video: www.kaggle.com/c/diabetic-retinopathy-detection/discussion/242755 Timestamps: 0:00 - Introduction 2:45 - Overview of DR and how to detect 9:11 - A look at the data 12:15 - Creating a baseline solution 24:22 - Result from baseline 26:25 - Idea #1: Preprocessing 34:07 - Result #1 35:19 - Idea #2: Loss Function 39:03 - Result #2 39:59 - Idea #3: Balanced Loader (skipped) 41:30 - Idea #4: Augmentation 42:52 - Result #4 43:44 - Idea #5: Using left and right information 51:03 - Result #5 51:50 - Idea #6: Increase image resolution 55:00 - Result #6 from various resolutions 55:10 - Final Result and Ending
Thank you for the great ideas you gave us, I have an extra idea here. Can you show us how we can use Ben Graham(Competition winner) pre-processing method (specially color version) and train the model from different transfer learning models? I think this way the result will be improved more.
Outstanding video Aladdin! Love the code explanations. Did you record the voice/code at the same time? I enjoyed the multiple lines of code reveal at a time.
I really appreciate you saying that, means a lot coming from you! Yeah maybe it looked fancy but I just removed the lines and pressed "u" for undo a bunch of times and tried to do some code commentary:)
Hi Aladdin, great video. Just had a doubt. Do you have videos where in you take us step by step through the code of these config, util, train, dataset files as in explaining how we could write such codes? If yes please do let me know that would be great. Thanks!
Hey Aladdin, great video ! It's a subject that's quite dear to my heart since my grandpa is slowly becoming blind from diabetes. Anyways, love your content :)
12:15 Baseline easy solution to implement: a 2d convolutional layer in sequential mode with like 5 successive layers and kernels of size between 3x3 and 10x10 to account for the small size of the target. End the convolutional layer with flatten and dense with 5 units for 5 categories. How to do better... Well I'm not really sure
@Aladdin Persson Thank you for the great ideas you gave us, I have an extra idea here. Can you show us how we can use Ben Graham(Competition winner) pre-processing method (specially color version) and train the model from different transfer learning models? I think this way the result will be improved more.
interesting. I am working with a data set that I resized to (32, 32) from (150, 150) because I saw someone do that in another video. I get a fit of .44 for very few images. I might try increasing resolution too and see what happens for the fit
This is golden! Looking at Aladdins solution: > He used Albumentations for transforms > Single dataset class for botht training and validation > used argmax as loss function > Using efficientnet > batch size 64, num epochs 100 > makes a baseline with 120 by 120 images, notes all validation values > tried preprocessing the image to trim the images > created modification to loss function > Getting a balnced dataloader > didnt work for him > heavy data augmentation > left and right image augmentation by blending - didnt understand. > image resolution increase Thing he didnt try: > training validation data > larger model > larger image resolution > Ensemble of CNN models > Tweaking loss values
Awesome summary. Regarding the usage of left and eye information, so each patient has left eye and right eye image, if we send information of both maybe the model can utilize this extra information. So I pretrained efficientnet using only single eye, then extract features from left and right conatenate those features and train a separate fc network on top of those.
Can you please do a similar video but for object detection with multiple objects in a single image (custom dataset), I can't seem to find any tutorial on custom object detection in pytorch
I think you could have had better results if you fusionned the images of left and right directly to train the model on. The result image would be showing the two eyes next to one another.
If I understand it corrently, the input sizes for the efficientnet variants are fixed, like 224x224 for B0. So, I am confused about how can you increase the resolution for the imgs? Thx
I have a quick question; After preprocessing the images and the size of each images changed, so why did you not compute the mean and std for the train transforms? @
No particular reason really, it's performed well from my understanding on many benchmarks (imagenet) and I've coded it from scratch a while ago which makes me feel like I have a decent understanding of what's going on in the architecture
Hi Aladdin, We also tried similar approach for DR classification. However, instead of directly resizing the images to 650x650, we identified and cropped the smallest square that encircle the circular DR image and resized to same size. Thereby, we were able to retain the aspect ratio. What do you suggest, do retaining aspect ratio have some advantage over regular resizing?
Amazing video! Though I have a problem when I tried running the dataset code on jupyter notebook, which is that it doesn't recognize the config.val_transforms attribute. Any solution to this?
Great video. Btw, how did you make the video to show line numbers as you developed (while also speeding up for some lines and pausing or running at 1x speed at times when necessary)? Am curious! These videos take an incredible amount of time to plan and make. Thank you, very much for the great presentation and the work you put behind these videos. 👏👏⭐️
Discussion post on Kaggle with brief summary of what I did in the video: www.kaggle.com/c/diabetic-retinopathy-detection/discussion/242755
Timestamps:
0:00 - Introduction
2:45 - Overview of DR and how to detect
9:11 - A look at the data
12:15 - Creating a baseline solution
24:22 - Result from baseline
26:25 - Idea #1: Preprocessing
34:07 - Result #1
35:19 - Idea #2: Loss Function
39:03 - Result #2
39:59 - Idea #3: Balanced Loader (skipped)
41:30 - Idea #4: Augmentation
42:52 - Result #4
43:44 - Idea #5: Using left and right information
51:03 - Result #5
51:50 - Idea #6: Increase image resolution
55:00 - Result #6 from various resolutions
55:10 - Final Result and Ending
Thank you for the great ideas you gave us, I have an extra idea here. Can you show us how we can use Ben Graham(Competition winner) pre-processing method (specially color version) and train the model from different transfer learning models? I think this way the result will be improved more.
I legit learn more things from a single video of yours than any other source, Please keep making content like this bro.
More videos like this, please!
Outstanding video Aladdin! Love the code explanations. Did you record the voice/code at the same time? I enjoyed the multiple lines of code reveal at a time.
I really appreciate you saying that, means a lot coming from you! Yeah maybe it looked fancy but I just removed the lines and pressed "u" for undo a bunch of times and tried to do some code commentary:)
LOL you type the same code thousands of times.
Hi Aladdin, great video. Just had a doubt. Do you have videos where in you take us step by step through the code of these config, util, train, dataset files as in explaining how we could write such codes? If yes please do let me know that would be great. Thanks!
Hey Aladdin, i liked the approach in this video... Take a problem and dissecting it...Good job!
Would be great to make more content in this format...
Excellent video hope this inspire many amateurs in this field .Thanks. Do post more videos.
Absolute brilliant series...more of this please!
Hey Aladdin, great video ! It's a subject that's quite dear to my heart since my grandpa is slowly becoming blind from diabetes. Anyways, love your content :)
hello, dealing with such large datasets, do i have to download this whole data? i mean did you downloaded > 80 GB of data to build your model ?
Thanks for sharing 😀👍 greetings from Colombia.
Can you also make a video on how to ensemble deep learning models??
Please continue this series, it is soo good
hey, instead of import sys and sys.extit(), you can type : "exit(0)" for short
12:15
Baseline easy solution to implement: a 2d convolutional layer in sequential mode with like 5 successive layers and kernels of size between 3x3 and 10x10 to account for the small size of the target. End the convolutional layer with flatten and dense with 5 units for 5 categories.
How to do better... Well I'm not really sure
@Aladdin Persson Thank you for the great ideas you gave us, I have an extra idea here. Can you show us how we can use Ben Graham(Competition winner) pre-processing method (specially color version) and train the model from different transfer learning models? I think this way the result will be improved more.
Great video sir ,Can you tell me where can i download the dataset of the images from ?
@13:32 How are you doing this command showing line by line? Is this a special feature? Because I think it is good for presentations.
Showing subclassing model class you should implement call method in unet how and were to implement call function in unet
Amazing video! Thanks
interesting. I am working with a data set that I resized to (32, 32) from (150, 150) because I saw someone do that in another video. I get a fit of .44 for very few images. I might try increasing resolution too and see what happens for the fit
nice explanation... how can prepare this data for few shot learning? Any idea? would be very helpful.
Really instructive thank you !
This is golden!
Looking at Aladdins solution:
> He used Albumentations for transforms
> Single dataset class for botht training and validation
> used argmax as loss function
> Using efficientnet
> batch size 64, num epochs 100
> makes a baseline with 120 by 120 images, notes all validation values
> tried preprocessing the image to trim the images
> created modification to loss function
> Getting a balnced dataloader > didnt work for him
> heavy data augmentation
> left and right image augmentation by blending - didnt understand.
> image resolution increase
Thing he didnt try:
> training validation data
> larger model
> larger image resolution
> Ensemble of CNN models
> Tweaking loss values
Awesome summary. Regarding the usage of left and eye information, so each patient has left eye and right eye image, if we send information of both maybe the model can utilize this extra information. So I pretrained efficientnet using only single eye, then extract features from left and right conatenate those features and train a separate fc network on top of those.
How many epochs did you run the train_blend? My score tends to be significantly lower than without combining left and right blending.
Great subject choice!
#Suggestion When you talk about something that you have described in another video, can you put a link to it in the description? Thanks!
Thank you and wait your other Kaggle Video.
Nice video
Please mention to me where are you found the dataset that you used
Which deep learning framework do you feel is better for medical imaging applications like this? TF or PyTorch?
Can you please do a similar video but for object detection with multiple objects in a single image (custom dataset), I can't seem to find any tutorial on custom object detection in pytorch
Could you do a tutorial on multiple instance learning too please?
Another idea: create synthesized ("fake") data created by a GAN-Unet architecture (similar to pix2pix) so as to increase the amount of training data
Good idea
I think you could have had better results if you fusionned the images of left and right directly to train the model on. The result image would be showing the two eyes next to one another.
For augmentation, i think you should've skipped blur
any reason as to why you haven't used transfer learning, like resent and then just changed the classifier???
Thumb up your tutorials.
If I understand it corrently, the input sizes for the efficientnet variants are fixed, like 224x224 for B0. So, I am confused about how can you increase the resolution for the imgs? Thx
With my admiration!
I have a quick question; After preprocessing the images and the size of each images changed, so why did you not compute the mean and std for the train transforms? @
you solved that like a boss
Lots of Love ❤️ Your videos are saviour ❤️❤️😍
How/why did you choose to use Efficientnet as opposed to other architectures?
No particular reason really, it's performed well from my understanding on many benchmarks (imagenet) and I've coded it from scratch a while ago which makes me feel like I have a decent understanding of what's going on in the architecture
Thanks!
How long did the whole process took from you? beside the recording.
Also worth to mention that I'm enjoying your videos and find them very helpful ♥️🌹
A few days?
HI is it possible o do with TENSOR FLOW ??
you used full 88.29 GB data for trainning ???
Hi Aladdin,
We also tried similar approach for DR classification.
However, instead of directly resizing the images to 650x650, we identified and cropped the smallest square that encircle the circular DR image and resized to same size.
Thereby, we were able to retain the aspect ratio.
What do you suggest, do retaining aspect ratio have some advantage over regular resizing?
Keep it up!!!
Amazing video! Though I have a problem when I tried running the dataset code on jupyter notebook, which is that it doesn't recognize the config.val_transforms attribute. Any solution to this?
Excellent
where can I get the test_label.csv
in a similar situation, I trie to use JointsMSE Loss, I change MSE to RMSE and the model converged better and faster.
Nice content 👍 Can you please elaborate how can we use Kaggle GPU for deploying Deep learning models?
can anyone please tell me how to get the validation data i.e. valLabels
You can make your own😅
Idol! What's up?
It's all about the quality of data the images look terrible
and they just mix the left eye and right eye together
May I ask how old you are sir?
yea I'm 23
Great video. Btw, how did you make the video to show line numbers as you developed (while also speeding up for some lines and pausing or running at 1x speed at times when necessary)?
Am curious!
These videos take an incredible amount of time to plan and make. Thank you, very much for the great presentation and the work you put behind these videos. 👏👏⭐️
Lets goooo
👍👍
please stop don't waste others time, a humble request
How did you feel I wasted ur time?