214 - Improving semantic segmentation (U-Net) performance via ensemble of multiple trained networks

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 69

  • @DigitalSreeni
    @DigitalSreeni  3 роки тому +2

    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

  • @vulnerablegrowth3774
    @vulnerablegrowth3774 3 роки тому +2

    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.

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому +2

      Thanks. I tend to forget basics if I haven't used something for a while. A refresher always helps.

  • @Mach89
    @Mach89 2 роки тому +2

    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.

  • @AIinAgriculture
    @AIinAgriculture 3 роки тому +1

    Thanks!

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому +1

      Thank you very much for your kind contribution Konga. Please keep watching.

  • @canlaoyunoynuyorum
    @canlaoyunoynuyorum 3 роки тому

    Thank you, i really learn a lot about U-Net from your videos.

  • @chiptadwiramadian3057
    @chiptadwiramadian3057 Рік тому +1

    Why am I always getting a blank image for the ensemble prediction, and getting a good result for the single model?

  • @joaosacadura6097
    @joaosacadura6097 3 роки тому +4

    Great Video!
    Have you tried to implement the weight map of U-Net described in the original paper?

  • @litebruno4859
    @litebruno4859 2 роки тому

    This is brilliant! Thank you so much Sreenivas!

  • @kavithashagadevan7698
    @kavithashagadevan7698 3 роки тому +1

    Thank you very much for this very informative video. It is very useful.

  • @soumyadrip
    @soumyadrip 3 роки тому

    Thanks for teaching this,i was waiting for this video.

  • @ayzalyohan
    @ayzalyohan Рік тому

    I have question,, are we doing weighted ensemble or weighted average ensemble ,,also what are difference between them??🤔im little confused

  • @ChloeLilyRose
    @ChloeLilyRose Рік тому

    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!

  • @mrmakbr5432
    @mrmakbr5432 3 роки тому

    you are the best, thanks a lot for sharing your knowledge

  • @nagamanigonthina9306
    @nagamanigonthina9306 Рік тому

    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?

  • @sandeepram9199
    @sandeepram9199 3 роки тому +1

    In your experience, which library is better to implement research papers, tensorflow with keras or pytorch?

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому +4

      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.

  • @sangavisivanandham2737
    @sangavisivanandham2737 2 роки тому

    Is it possible to modify the backbone models architecture imported as library? like adding or removing any layers?

  • @md.abusayed2362
    @md.abusayed2362 Рік тому

    Hello sir, Is there weights value fixed? or How can I change weights value for my dataset of 4 class?

  • @majidheydari1003
    @majidheydari1003 Рік тому

    Hello. The training is very good. If I want to create such a database, what tool can I use and it is open-source?

  • @minabarghamadi6636
    @minabarghamadi6636 2 роки тому

    in addition, my mask is png that include black for background and withe for target
    num_class = 2?

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому

      This is how most binary masks are, pixel value 0 for the background and 255 (or 1) for the class of interest.

  • @jacobusstrydom7017
    @jacobusstrydom7017 3 роки тому +1

    Excellent video, damn I love this channel.

  • @akashdebnath3631
    @akashdebnath3631 3 роки тому +1

    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.

  • @minabarghamadi6636
    @minabarghamadi6636 2 роки тому

    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

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому

      Please watch my videos on binary segmentation. But to answer your question, yes you can change n=2 for binary.

  • @sumsumsp
    @sumsumsp 3 роки тому

    in dice loss why we are giving class weights [0.25,0.25, 0.25, 0.25]

  • @blank8026
    @blank8026 3 роки тому

    Can we have a video about Active Learning for automatic annotation..

  • @amirsohail9605
    @amirsohail9605 2 роки тому

    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?

  • @abderrahimhaddadi4023
    @abderrahimhaddadi4023 3 роки тому

    You still haven't updated the github repo with the code from this video right?

  • @edmald1978
    @edmald1978 2 роки тому

    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?

    • @DigitalSreeni
      @DigitalSreeni  2 роки тому +1

      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.

    • @edmald1978
      @edmald1978 2 роки тому

      @@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)?

  • @zakirshah7895
    @zakirshah7895 3 роки тому

    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

    • @XX-vu5jo
      @XX-vu5jo 3 роки тому

      The loading of the weights are the only change in that matter because you are loading more than one to perform inference.

  • @TiwaTemiUsman
    @TiwaTemiUsman Рік тому

    Cant find the codes for this video

  • @ismail_..
    @ismail_.. 2 роки тому

    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?

  • @qiaoyuzheng8595
    @qiaoyuzheng8595 3 роки тому

    Hi sir, thank you for your great videos!

  • @arsytama5534
    @arsytama5534 Рік тому

    how input grayscale

  • @mattiaarsendi5421
    @mattiaarsendi5421 3 роки тому

    Amazing content! Thank you Sir!!

  • @Xiaoxiaoxiaomao
    @Xiaoxiaoxiaomao 3 роки тому

    Dear Sreeni Sir, Please make some videos Playlist on V-NET Segmentation model. Thanks 🙏

  • @Myfairytaleee
    @Myfairytaleee 2 роки тому

    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 .

  • @anishnayak2300
    @anishnayak2300 Рік тому

    can we use patchify with the ensemble code?

    • @DigitalSreeni
      @DigitalSreeni  Рік тому

      Patchify just breaks your images into patches and reassembles it. You can use it for any task.

  • @XX-vu5jo
    @XX-vu5jo 3 роки тому +1

    Finally! Thank you!

  • @digitalzoul57
    @digitalzoul57 3 роки тому

    Where I can find the data that you are using ?

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому

      Please read the video description, you will find the link.

  • @rameshwarsingh5859
    @rameshwarsingh5859 3 роки тому

    Thank You Sreeni.

  • @Shaleh_Toha
    @Shaleh_Toha 7 місяців тому

    can anyone give me this code ? I can't find it in Github

  • @sub123-z4k
    @sub123-z4k 3 роки тому

    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?

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому

      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.

    • @sub123-z4k
      @sub123-z4k 3 роки тому

      @@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..

  • @VarunKumar-pz5si
    @VarunKumar-pz5si 3 роки тому +1

    Hey Sreenivas,Do you know Telugu?

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому +2

      అవును. అనుమానం ఎందుకు వచ్చింది?

    • @VarunKumar-pz5si
      @VarunKumar-pz5si 3 роки тому

      @@DigitalSreeni 😉😉😉 Meedhi ey ooru sir..?

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому

      ua-cam.com/video/iOjjuqLiC4I/v-deo.html

    • @VarunKumar-pz5si
      @VarunKumar-pz5si 3 роки тому

      @@DigitalSreeni Thanks...!!!!!!

  • @sabaal-jalal3710
    @sabaal-jalal3710 3 роки тому

    Thanks, this is really useful

  • @krishj8011
    @krishj8011 3 роки тому

    Nice tutorial...👍

  • @rajanmahawar442
    @rajanmahawar442 3 роки тому

    Amazing content

  • @sudhavaiyapuri5901
    @sudhavaiyapuri5901 3 роки тому

    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

    • @DigitalSreeni
      @DigitalSreeni  3 роки тому

      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.

    • @jinshanyang8858
      @jinshanyang8858 2 роки тому

      Have you solved it, I have the same problem

  • @teddy911
    @teddy911 3 роки тому

    May I ask why using these pre-trained models as the encoder of U-net help with the performance of image segmentation?