64 - Image Segmentation using traditional machine learning - Part2 Training RF

Поділитися
Вставка
  • Опубліковано 6 вер 2024

КОМЕНТАРІ • 43

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

    I can understand both theory and application easily from your videos. Great, thanks.

  • @inhibited44
    @inhibited44 6 місяців тому

    I suppose as a beginner if someone had a similar project, they could just highlight one item like the white sections and have everything else be background blue. Then run the filters to find just the white sections. That would save time setting the problem up and testing it.

  • @inhibited44
    @inhibited44 6 місяців тому

    those masked images you made of the original must be one of the most important steps in the process. It must be best to know that one should set up multiple colors each of which are meant to highlight the crucial details of the structure that you are looking at. Probably best to have colors that aren't similar distinguishing items near each other too.

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

    Hitch-hiker's Guide to the Galaxy reference made my day!

  • @user-hu7pk6tx7p
    @user-hu7pk6tx7p Рік тому +1

    would be better if you printed some prediction images. I learned to not trust accuracy the hard way. But other than that great tutorial.

  • @joeyg4008
    @joeyg4008 4 роки тому

    I was able to use the histogram segmentation from previous videos to make my own test image data. so far so good! 42!!

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

      You can try the annotation tool from here in case histogram segmentation is not possible. www.apeer.com/annotate

    • @joeyg4008
      @joeyg4008 4 роки тому

      I made an account, but I haven't had a chance to look yet. I'm hoping to finish the series before I use other programs. Keep up the good work!

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

    Thanks

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

    I've been following your tutorial with great interest. To avoid typos I generally use your source code. The RandomForestClassifier took a very long time to fit.
    Since the youtube was fast I wondered why? It turns out that in line 147 the code has n_estimators=100, while you used 10.
    I see that the default was changed from 10 to 100 in the documentation, which explains the difference in the code to what you demonstrated.
    For 10 it took about 12 seconds, and for 100 it took 2 min (10*12sec). The precision was a bit better, but it was already great at 10.
    I'm wondering if you should change your code to fit what you demoed, instead of the documentation default.

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

    Thank you so much for the time and effort to make these videos. They are indeed a rare find in UA-cam and they have taught me a lot.
    I'm working a set of multidimensional data right now and have heard you mention in the video that you can use the same method on multiple images to train. However, I'm not sure how we can perform feature extraction when the input array is an array of arrays where each row is an array containing all the pixels of 1 image?

  • @PrerakAgarwal
    @PrerakAgarwal 4 роки тому +2

    Hi, thank you so much for this series of tutorials! They're really detailed and very well explained! I've been through so many other videos and articles, and this series seems to be the most clear in terms of explanation of concepts and actual application in code! Thank you so much!
    I'm currently working on an image classification project. I specifically want to do a comparison between the performances of models built using a traditional ML approach vs. deep learning (CNNs). As such, I do have 2 questions that I would like to ask you:
    1. The features dataframe that you built for the classifier in this video is basically individual pixel values of various filtered forms from one single image. So, the entire dataframe is from one single image, and each row corresponds to one single pixel from that image. Is there any way I can apply this approach to a bunch of images (image classification instead of image segmentation)? Specifically, I would want to create a features dataframe from a bunch of images, where each row corresponds to one single image (instead of just one pixel), and the columns are still the various filtered forms of those images. I understand that in this case, each individual value in my feature dataframe will end up being an array of pixel values (instead of single pixel values like in your case), and a ML algorithm would not accept that as an input. Is there any way I could convert these arrays of values into a single value which can then be input into a classifier like SVM or RandomForest? Or is my approach totally wrong here?
    2. I'm working in Google Colab so as to utilize the GPUs for my deep learning models. Does Tensorflow work with GPUs by default? Or is there a specific configuration/command that I need to run first before Tensorflow can switch over to using GPUs. (Sorry if you've answered this question in one of your other videos. I only discovered your channel 2 days ago, and haven't been able to go through all the videos yet!)
    Apologies in advance for the verbosity of my questions! :D

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

      1. Yes you can (and should) extract features from multiple images. For that, you just need to read one images after other and then add features to the dataframe. In other words, just concatenate values from multiple images into a single table / dataframe.
      2. You can turn on GPU capability on Google Colab. Once you do that then it automatically uses GPU when you use tensorflow (or keras). Please search for this topic on UA-cam, there are numerous videos on how to enable GPU on Colab.

  • @Kiran-or9fc
    @Kiran-or9fc 3 роки тому

    Great tutorial thanks Srini

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

    Thanks for the useful information. Are you using only one image Sandstone_Versa000.tif to generate features using Gabor filter? What if we have a bunch of pictures?

  • @janasstory4974
    @janasstory4974 4 роки тому +2

    this is done for single image...? my question is how to do for many images

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

      You just need to read multiple images & masks instead of one. Then perform the same operations (extracting features) on all images and concatenate the data. In other words, repeat the process on multiple images and add those pixels as new rows to your Pandas DataFrame. The best way would be define a function to perform the feature extraction process and apply the function to multiple files and keep concatenating the data. I showed some of that work in part 5 video titled - '67 - Image Segmentation using traditional machine learning - Part5 Segmenting Images'.

    • @janasstory4974
      @janasstory4974 4 роки тому

      Python for Microscopists for single image I should get 1*32 features ..but I'm getting n* 32 features for one image...by this operation..

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

      @@janasstory4974 Not sure if I understand exact issue but if everything goes well you should see 32 Gabor features plus a few other features corresponding to Sobel, Prewitt, etc. for each labeled image. In the example I used you will have a total of 41 features (columns) and 1019904 pixels (rows) as my input image had dimensions of 1024 x 996. If you have 2 labeled images for training then you will have 2 * 1019904 rows but the number of columns should be the same as you are extracting same number of features for every image. If this is not the case then you may have to debug for logic errors - not fun exercise to do but can be a good learning experience.

  • @AmeezSKhan
    @AmeezSKhan 4 роки тому +1

    In the dataset there is train_mask , How do you create a masked image of the original image?

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

      Masked images are ground truth images that you need to generate yourself. There are companies here in the bay area that offer these services. They hire cheap labor from other countries to paint pixels in order to annotate them. I always wondered how these external non-technical people understand the application in order to annotate images. In any case, if you want to annotate your own images you can do it for free here: www.apeer.com/annotate

    • @jubieralonsojimenezcamargo5732
      @jubieralonsojimenezcamargo5732 4 роки тому

      @@DigitalSreeni When exporting the labeled image from APEER Anotation, it exports a gray color image instead of a colored labeled image. Am I doing something wrong? Thanks in advance professor!

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

    very thank you good job! sir

  • @015_anshikajain3
    @015_anshikajain3 5 місяців тому

    can you give the masked image for this that is the labeled image

  • @yaaseenbasit3255
    @yaaseenbasit3255 4 роки тому

    Thanks for sharing the tutorial.Can you please provide dataset link and python file.

  • @najlaaalsaadi2311
    @najlaaalsaadi2311 4 роки тому

    when I apply this gabor filters for face recognition, the label shouldnt be for each pixel, how can i add labels?

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

      For face recognition you probably do not want to segment every pixel but rather classify the entire face. So you need to encode entire image with the face extracted to a value that you need to train and predict. In summary, you are looking for image classification rather tan segmentation. Also, search for VGG Face, you will find pre-trained models on celebrity faces.

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

    I wish you wouldn't test on (pixels from) the train image itself

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

    Humor level: 42 ;-)

  • @Rohankumar-dd2ss
    @Rohankumar-dd2ss 3 роки тому

    can i use 2 or more photo of same data and put their data in 1 csv file in row, will it increase the model performance ?

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

      Not sure what you are exactly looking for. If you are inquiring about using multiple images for training then I did a video on that, check out video 67b.
      ua-cam.com/video/sD2xL36Xdu0/v-deo.html

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

    Valeu!

  • @DonPanchoVilla
    @DonPanchoVilla 4 роки тому

    my pc consumes all its ram memory when I execute the line: model.fit (X_train, y_train),
    What can be caused this?

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

      Obviously you are performing machine learning where the system is trying to fit a model based on the input data. You need to have high powered systems for any machine learning tasks.

    • @DonPanchoVilla
      @DonPanchoVilla 4 роки тому

      @@DigitalSreeni Sure, but I also tried this code in collaboratory with 25gb of ram and it also consumed all the memory, maybe I need to change some parameter of the random forest function?

    • @felip6180
      @felip6180 4 роки тому

      you could try another IDE, such as google colaboratory, it may help

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

    Hi sir, Which is the best book to be referred to on this topic?

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

      Not sure about a good book on this topic. Please look for machine learning books focused on computer vision. Hopefully you will find a good book that covers the topics of traditional machine learning (e.g., Random Forest, SVM, etc.)

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

      @@DigitalSreeni any reference for pixel wise feature extraction?

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

    @DigitalSreeni Sir my model is taking a lot of time to get trained .