Exploring a Multi Label Classification Dataset using Python

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • In this video, we will be a Multi Label Classification Dataset using Python.
    -----------------------------------------------------------------------------
    00:00 What was said and what is going to be said!
    00:26 Starting with the Jupyter Notebook
    00:37 Importing packages: Numpy, Pandas, Matplotlib.pyplot, tqdm, os, PIL.image
    01:37 Reading the dataset using pandas: pd.read_csv()
    03:57: Renaming the dataframe column names: pd.rename()
    06:09 Extract the multi label ground-truth labels from the data frame
    09:56 Reading the images in the multi label dataset: Image.open()
    15:21 Visualizing the images in the multi label dataset: plt.imshow()
    16:42 Generate some statistics regarding the class labels using a pie chart: plt.pie()
    20:28 Outro
    -----------------------------------------------------------------------------
    🌎 Website: www.mldawn.com/
    🕊 Twitter: / mldawn2018
    🔗 Instagram: MLDawn2018
    🔗 Linked In: / mehran-ba. .

Комментарии • 16

  • @Cl-ce6is
    @Cl-ce6is 6 месяцев назад +2

    Dude, this is awesome. You deserve way more views, this is gold!! Thank you!

    • @MLDawn
      @MLDawn  6 месяцев назад

      I really appreciate it.

  • @kisubachkhoa8789
    @kisubachkhoa8789 10 месяцев назад

    Thank you for your video! Hope your next video coming soon!

    • @MLDawn
      @MLDawn  10 месяцев назад +1

      The next video will come in 2 weeks.

  • @iselas773
    @iselas773 6 месяцев назад

    GOSH THE WAY you explain is such bright you are really inspiring me as a ml teacher simple explanation but very efficient

    • @MLDawn
      @MLDawn  6 месяцев назад

      I really appreciate it 🙂

  • @FatemehMajidi-rn2st
    @FatemehMajidi-rn2st 9 месяцев назад

    Thanks for your video. I have df that instead of 0's and 1's I have [ ] and [coordinates] . For this type of df how can I count ones-count-per-column?

    • @MLDawn
      @MLDawn  9 месяцев назад

      Unfortunately It is nearly impossible to answer your question with the limited information provided.

    • @FatemehMajidi-rn2st
      @FatemehMajidi-rn2st 9 месяцев назад

      @@MLDawn in BreCaHAD dataset there is an image folder and a ground truth folder containing json files for each image.these json files have 7 labels of mitosis, tumer, ... . If under the label there was [ ] then that image doesn't have that label, but if there was coordinates [x: ..., y: ... ] under that label the image has that label. I have read the json files and cocatenate them in a dataframe. Now in df each row contains the information's of an image and the columns are the labels, I have problem with mapping these labels to images. Because the images are without labels in the image folder and the labels are in the corresponding json files. Your help and advice will be appreciated. 🙏

  • @user-bi2zf1yi9s
    @user-bi2zf1yi9s 6 месяцев назад

    I have a question on 9:24 why is it that you select on the print from 5 to 15 in labels; and yet it corresponds to rows strating from 0 on the df? Thank you, great serie by the way

    • @MLDawn
      @MLDawn  6 месяцев назад +1

      You are so observant, well done. You are correct! The result of the print statement corresponds to the row index 5 to (15-1) and I said it incorrectly in the video. It just so happens that, by sheer luck, in labels, index 0 and index 5 vectors are identical!

    • @user-bi2zf1yi9s
      @user-bi2zf1yi9s 6 месяцев назад

      @@MLDawn I see, that is reassuring. Thanks a lot for your very quick response. And keep up the great work !!

  • @FatemehMajidi-rn2st
    @FatemehMajidi-rn2st 9 месяцев назад

    in BreCaHAD dataset there is an image folder and a ground truth folder containing json files for each image.these json files have 7 labels of mitosis, tumer, ... . If under the label there was [ ] then that image doesn't have that label, but if there was coordinates [x: ..., y: ... ] under that label the image has that label. I have read the json files and cocatenate them in a dataframe. Now in df each row contains the information's of an image and the columns are the labels, I have problem with mapping these labels to images. Because the images are without labels in the image folder and the labels are in the corresponding json files. Your help and advice will be appreciated. 🙏

    • @MLDawn
      @MLDawn  9 месяцев назад

      I just checked the BreCaHAD dataset. Each image in the image folder has a name. The same name is used in the ground truth folder for the corresponding json file for that particular image. That is why you have 162 images and exactly 162 json files. This is actually quite simple to handle, if I understand your question right. You just need to iterate over the images, for each image grab its name, and then in a nested loop, go over all the json files and if the name of any json file matched the name of the image file, then you read in that json file. You can use a dictionary structure to load these data in. For example, the (key, value) pair in this dictionary will be (image numpy array, the read json file). So, when you finish your iteration, you should have the entire dataset, stored in a dictionary. I hope this make sense.

    • @FatemehMajidi-rn2st
      @FatemehMajidi-rn2st 9 месяцев назад

      Thanks

    • @FatemehMajidi-rn2st
      @FatemehMajidi-rn2st 9 месяцев назад +1

      @@MLDawn
      If you dont mind please teach them in a video.🙏