Just want to let you guys know that I love Kite's AI-powered coding assistant. Works great in giving smart completions and documentation as we type. Check it out if you are looking for smart completion tools while coding. www.kite.com/get-kite/?downloadstart=false
Even as someone who has been build models for a few years, I appreciate that you take the time to go over the more basic parts. Sometimes it’s a good refresher, sometimes it helps us understand how everything comes together instead of singular concepts, and sometimes it’s a nice breather in between the “harder” parts.
I have background in ML but I'm new to image processing. I've been watching your chanel extensively for the last 2 weeks and learned a lot when applying the concepts on my own images. The chanel is amazing! I really appreciate your effort for making this content! At the same time I would have one comment with regard to search for optimal weights. At least for the real-world projects I would suggest to split the data into 3 portions: train, validation and test. In this approach you train on the first set, optimize hyperparameters/weights using the other one and finally validate quality of the model on the last set of data. If you use the same data set for both weights optimization and final validation of the model, you might end up with "overfitting on the test set" - your model might end up with amazing accuracy/IOU but it is just because the weights are perfect for the dataset you've optimized them on. To check actual quality of the model you should use 3rd set of data, the model and weghts have never seen before.
Hi, thank you for the great video! I have one question, why do you pick the weights you obtained using grid search of 0.1, 0.1 and 0.3? If you sum the weights, it comes to a total of 0.5. Why can't it be (why don't we search) 0.4, 0.4, 0.2 for example? Thank you!
Hi. The video is amazing covering all the basic points. I have applied the same code in this to semantic segmentation of aerial images dataset of your video number : 228. I am getting the max IoU at weights 0.0,0.0,0.0. I did this without reshaping my dataset. but if I follow the complete code, there is an error at "y_train_cat = train_masks_cat.reshape((y_train.shape[0], y_train.shape[1], y_train.shape[2], n_classes))" stating cannot reshape to the given size. can you please help me to resolve this?
Keras will be easier as it provides plug and play API for most tasks. It works great especially for relatively smaller datasets or when using data generators. Pytorch is a bit faster as it is a low level API and may be preferable for very large datasets. The choice when it comes to implementing research papers may come down to what framework the original paper used. If they published their code in pytorch you may want to use the same framework so you don’t re-invent the code in Keras. But if you want to do good to others by converting pytorch code to Keras then more power to you. I personally prefer Keras unless there is a great library available for pytorch only.
Hello sir, your teaching style really great. Can you please make a video on predicting image from low to high resolution using U-NET. It would be helpful for us.
hello sir your videos are amazing and so are your teaching skills. i have question. how can we find other metrics of this ensemble model like f1 score precision and recall other than iou?
You do not need to have all classes in every image. If there is no ground truth for a specific class then it does not use that image to train that specific class.
@@DigitalSreeni so if have 2 volumen. One with 3 classes and the other with 4 classes, labels means the same in tne 2 volumen . Then we define a model with 4 outputs that represent the maximum number of classes. Theoretically we can feed the Model with the patches of these 2 volumns right(train)?
Hello, First of all thank you for your informative videos. I have a question about U-Net model ensemble. Can we apply the ensemble process that in this video to single class segmentation?
Hello Sir, Firstly thankyou so much for such informative video on U-Net. Actually I am a PH.D student and I am working on the prediction of forged images whose masks are given. I applied the same U-Net model and Accuracy and testing Accuracy all is coming fine. But the IOU score value is coming Zero and due to this whole prediction is coming wrong. Can you please help me with this. It really help me with my work .
Thanks for your video!! I'm a student of Korean college, KMOU. At your video you used model with multi classes. If I want to use model with single class, how can I do?
Just change this to a binary problem where your model has 1 output instead of n outputs in the final layer. Also make sure you change the activation of final layer to sigmoid instead of softmax.
@@DigitalSreeni Thanks to reply! Actually, I tried to use your code, Multiclass U-Net using VGG, ResNet, and Inception as backbones. But I think I need to change train_mask_cat, y_train_cat... to use it as a single class, right? I'm sorry I seem to be bothering you. Thanks..
Traceback (most recent call last): File "C:\Users\CR1008TX\Downloads\python_for_microscopists-master\python_for_microscopists-master\ens.py", line 57, in n, h, w = train_masks.shape ValueError: not enough values to unpack (expected 3, got 1) how to clear this error
Just want to let you guys know that I love Kite's AI-powered coding assistant. Works great in giving smart completions and documentation as we type. Check it out if you are looking for smart completion tools while coding.
www.kite.com/get-kite/?downloadstart=false
Even as someone who has been build models for a few years, I appreciate that you take the time to go over the more basic parts. Sometimes it’s a good refresher, sometimes it helps us understand how everything comes together instead of singular concepts, and sometimes it’s a nice breather in between the “harder” parts.
Thanks. I tend to forget basics if I haven't used something for a while. A refresher always helps.
I have background in ML but I'm new to image processing. I've been watching your chanel extensively for the last 2 weeks and learned a lot when applying the concepts on my own images. The chanel is amazing! I really appreciate your effort for making this content!
At the same time I would have one comment with regard to search for optimal weights. At least for the real-world projects I would suggest to split the data into 3 portions: train, validation and test. In this approach you train on the first set, optimize hyperparameters/weights using the other one and finally validate quality of the model on the last set of data.
If you use the same data set for both weights optimization and final validation of the model, you might end up with "overfitting on the test set" - your model might end up with amazing accuracy/IOU but it is just because the weights are perfect for the dataset you've optimized them on. To check actual quality of the model you should use 3rd set of data, the model and weghts have never seen before.
Thanks!
Thank you very much for your kind contribution Konga. Please keep watching.
Thank you, i really learn a lot about U-Net from your videos.
Why am I always getting a blank image for the ensemble prediction, and getting a good result for the single model?
Great Video!
Have you tried to implement the weight map of U-Net described in the original paper?
This is brilliant! Thank you so much Sreenivas!
My pleasure.
Thank you very much for this very informative video. It is very useful.
Thanks for teaching this,i was waiting for this video.
I have question,, are we doing weighted ensemble or weighted average ensemble ,,also what are difference between them??🤔im little confused
Hi, thank you for the great video! I have one question, why do you pick the weights you obtained using grid search of 0.1, 0.1 and 0.3? If you sum the weights, it comes to a total of 0.5. Why can't it be (why don't we search) 0.4, 0.4, 0.2 for example? Thank you!
you are the best, thanks a lot for sharing your knowledge
Hi. The video is amazing covering all the basic points. I have applied the same code in this to semantic segmentation of aerial images dataset of your video number : 228. I am getting the max IoU at weights 0.0,0.0,0.0. I did this without reshaping my dataset. but if I follow the complete code, there is an error at "y_train_cat = train_masks_cat.reshape((y_train.shape[0], y_train.shape[1], y_train.shape[2], n_classes))" stating cannot reshape to the given size. can you please help me to resolve this?
In your experience, which library is better to implement research papers, tensorflow with keras or pytorch?
Keras will be easier as it provides plug and play API for most tasks. It works great especially for relatively smaller datasets or when using data generators. Pytorch is a bit faster as it is a low level API and may be preferable for very large datasets. The choice when it comes to implementing research papers may come down to what framework the original paper used. If they published their code in pytorch you may want to use the same framework so you don’t re-invent the code in Keras. But if you want to do good to others by converting pytorch code to Keras then more power to you. I personally prefer Keras unless there is a great library available for pytorch only.
Is it possible to modify the backbone models architecture imported as library? like adding or removing any layers?
Hello sir, Is there weights value fixed? or How can I change weights value for my dataset of 4 class?
Hello. The training is very good. If I want to create such a database, what tool can I use and it is open-source?
in addition, my mask is png that include black for background and withe for target
num_class = 2?
This is how most binary masks are, pixel value 0 for the background and 255 (or 1) for the class of interest.
Excellent video, damn I love this channel.
Hello sir, your teaching style really great. Can you please make a video on predicting image from low to high resolution using U-NET. It would be helpful for us.
hello,thanks for your video, excuse me can i use this for binary mask? and then i must to set num_class = 2? please answer me
Please watch my videos on binary segmentation. But to answer your question, yes you can change n=2 for binary.
in dice loss why we are giving class weights [0.25,0.25, 0.25, 0.25]
Can we have a video about Active Learning for automatic annotation..
hello sir your videos are amazing and so are your teaching skills. i have question. how can we find other metrics of this ensemble model like f1 score precision and recall other than iou?
You still haven't updated the github repo with the code from this video right?
What happen if one pacth do not have all the classes, if we extend this to 3D volumes this is probably happen. How the model handle this?
You do not need to have all classes in every image. If there is no ground truth for a specific class then it does not use that image to train that specific class.
@@DigitalSreeni so if have 2 volumen. One with 3 classes and the other with 4 classes, labels means the same in tne 2 volumen . Then we define a model with 4 outputs that represent the maximum number of classes. Theoretically we can feed the Model with the patches of these 2 volumns right(train)?
thank you so much for the video I have a question despite we are getting a very good result but how about the efficiency and running time
The loading of the weights are the only change in that matter because you are loading more than one to perform inference.
Cant find the codes for this video
Hello, First of all thank you for your informative videos. I have a question about U-Net model ensemble. Can we apply the ensemble process that in this video to single class segmentation?
Yes, of course.
Hi sir, thank you for your great videos!
Glad you like them!
how input grayscale
Amazing content! Thank you Sir!!
Dear Sreeni Sir, Please make some videos Playlist on V-NET Segmentation model. Thanks 🙏
Hello Sir, Firstly thankyou so much for such informative video on U-Net. Actually I am a PH.D student and I am working on the prediction of forged images whose masks are given. I applied the same U-Net model and Accuracy and testing Accuracy all is coming fine. But the IOU score value is coming Zero and due to this whole prediction is coming wrong. Can you please help me with this. It really help me with my work .
can we use patchify with the ensemble code?
Patchify just breaks your images into patches and reassembles it. You can use it for any task.
Finally! Thank you!
Where I can find the data that you are using ?
Please read the video description, you will find the link.
Thank You Sreeni.
can anyone give me this code ? I can't find it in Github
Please ..
Thanks for your video!!
I'm a student of Korean college, KMOU.
At your video you used model with multi classes.
If I want to use model with single class, how can I do?
Just change this to a binary problem where your model has 1 output instead of n outputs in the final layer. Also make sure you change the activation of final layer to sigmoid instead of softmax.
@@DigitalSreeni Thanks to reply!
Actually, I tried to use your code, Multiclass U-Net using VGG, ResNet, and Inception as backbones.
But I think I need to change train_mask_cat, y_train_cat... to use it as a single class, right?
I'm sorry I seem to be bothering you.
Thanks..
Hey Sreenivas,Do you know Telugu?
అవును. అనుమానం ఎందుకు వచ్చింది?
@@DigitalSreeni 😉😉😉 Meedhi ey ooru sir..?
ua-cam.com/video/iOjjuqLiC4I/v-deo.html
@@DigitalSreeni Thanks...!!!!!!
Thanks, this is really useful
Nice tutorial...👍
Amazing content
Traceback (most recent call last):
File "C:\Users\CR1008TX\Downloads\python_for_microscopists-master\python_for_microscopists-master\ens.py", line 57, in
n, h, w = train_masks.shape
ValueError: not enough values to unpack (expected 3, got 1)
how to clear this error
Please check the shape of your train_masks, looks like you only have it as a single vector so when you unpack it you get a single value instead of 3.
Have you solved it, I have the same problem
May I ask why using these pre-trained models as the encoder of U-net help with the performance of image segmentation?