YOLOv8 | Image Segmentation On Custom Dataset using YOLOv8

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • Learn how to perform Image Segmentation on Custom dataset using YOLOv8. It is a step by Step tutorial.
    Github: github.com/AarohiSingla/YOLOv...
    YOLOv8 was developed by Ultralytics, who also created the influential and industry-defining YOLOv5 model.
    In the last two years, various models branched off of the YOLOv5 PyTorch repository, including Scaled-YOLOv4, YOLOR, and YOLOv7. Other models emerged around the world out of their own PyTorch based implementations, such as YOLOX and YOLOv6. Along the way, each YOLO model has brought new SOTA techniques that continue to push the model's accuracy and efficiency.
    Over the last six months, Ultralytics worked on researching the newest SOTA version of YOLO, YOLOv8. YOLOv8 was launched on January 10th, 2023.
  • НаукаНаука

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

  • @shivamjd2787
    @shivamjd2787 Год назад +1

    Thanks for making this video

  • @TUSHARGOPALKA-nj7jx
    @TUSHARGOPALKA-nj7jx 22 дня назад

    Great video. If we want to train it on ade20k dataset where the annotations is in json format, how to get that into this format?

  • @engammar1794
    @engammar1794 8 месяцев назад

    Many thanks... Very clear and working model. Thanks again!

  • @a.b.c4812
    @a.b.c4812 Месяц назад

    how did you normalise the plygons ans is it xontinous x and y cordinate

  • @boazmwubahimana4702
    @boazmwubahimana4702 Год назад

    Thumbs up, the heart of giving a teacher,:: Another time, you may prepare for us, satellite image segm,cls

  • @Sunil-ez1hx
    @Sunil-ez1hx 3 месяца назад

    Thanks for sharing this good working model

  • @deepakts8941
    @deepakts8941 Год назад

    Thanks for the work which you are doing mam. and which polygonal tool you have used for labelling.

  • @vivekpaswan7946
    @vivekpaswan7946 Год назад

    Can you please let us know using which tool you have done the annotations for this YOLOv8 instance segmentation task?

  • @PIYUSHSINGH-mu2pk
    @PIYUSHSINGH-mu2pk Год назад

    hi mam how can i get this dataset so that i can test it on my own system??

  • @rutwikmhatre7596
    @rutwikmhatre7596 Год назад

    Your YOLO videos are very informative! Btw I was thinking is it possible to do facial Landmark detection using YOLOv7 or can it only be used for object detection? Would appreciate if you could make a video on it I'm learning about Computer vision and would love to try that out .

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Yes, You can do that. Yolov7-Pose pretrained model is trained on person's keypoints (17 keypoints). You can get the keypoints of face from there.

  • @teenajoseph2121
    @teenajoseph2121 11 месяцев назад

    Hi Mam ,Wr are currently using a yolo model that can detect the shape,color and the text written on the targets present in the images.Since we have 3 attributes how can we annotate many images for these attribute?.We have annotated the entire dataset of more than 1000 images for the attribute "shapes of the targets( we have 13 shapes like circle,square etc) .Now how to annotate the same images for the attribute "color of the targets" in the image?

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      Have you tried the new feature of YOLOv8 which auto annotate the images. Check this video ruclips.net/video/K_WYmsYhBEw/видео.html

  • @user-wi2pv7ue9s
    @user-wi2pv7ue9s Год назад

    Thanks Aarohi for a very valuable video. May I know for segmentation of vessels in satellite images, which is preferable for better performance: YOLOv8 or Mask-RCNNN?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Mask-RCNN can provide accurate pixel-level segmentation masks for vessels.
      It is slower than YOLOv8 but offers more detailed segmentation information but YOLOv8 is a popular object detection algorithm that can also be used for segmenting objects, including vessels.
      It is known for its real-time processing speed and can detect multiple objects simultaneously.
      Ultimately, the choice between YOLOv8 and Mask-RCNN depends on the trade-offs you are willing to make in terms of accuracy and speed.
      MAsk R-CNN will give you more accuracy but slow speed and YOLOv8 will have high speed and low accuracy in comparison of Mask R-CNN.

  • @DeepakKumar-ub4mw
    @DeepakKumar-ub4mw 7 месяцев назад

    mam can you provide us dataset that you have used in i.e., custom_dataset folder

  • @zy.r.4323
    @zy.r.4323 Год назад

    Thank u a lot for the helpful tutorial! I tried to train the same v8x.yaml but got run time error. RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 298 but got size 0 for tensor number 1 in the list. what is ur processor ? mine also the same with yours 3090 on asus. it often resetting and showing blue screen althouh i configured gpu driver cudnn

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Without more information about your code, it's difficult to determine exactly what is causing this error. The error message you received suggests that there is a size mismatch between the expected and actual sizes of one of the tensors in your model. Specifically, the error message indicates that for tensor number 1 in the list, the expected size is 298, but the actual size is 0.

  • @haricharan5521
    @haricharan5521 Месяц назад

    Mam i am doing a project on detecting the article number and size on a footwear i have trained the object detection model and i have got the results but what if a new article comes in how to detect that new article should i have to follow the total process again

    • @CodeWithAarohi
      @CodeWithAarohi  Месяц назад

      You need to train your model on the dataset related to that new article ( you have to follow the whole process again)

  • @fobaogunkeye3551
    @fobaogunkeye3551 Год назад +1

    Very informative video! However, you didn't show how you used the polygon tool to annotate the custom data into .txt files. is there a video you can point me to for that or can you make a video showing it?

  • @user-xo7jh1wg1x
    @user-xo7jh1wg1x Год назад

    Easy to understand, thank you!
    But why I got the error below for only one class training.
    RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 14 but got size 0 for tensor number 1 in the list.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      you are trying to perform an operation on two tensors with incompatible shapes. The operation requires that the tensors have the same size in all dimensions except for the first, but the size of the second tensor (number 1 in the list) is 0, while the expected size is 14. To resolve this error, make sure that both tensors have the same shape before performing the operation.

    • @pkmnjourney
      @pkmnjourney Год назад

      @@CodeWithAarohi I've got the same error. I'm not sure how to solve it because on normal object detection the dataset works but when i switch to segmentation I get the error.

    • @PabloGuillen1984
      @PabloGuillen1984 Год назад

      I've got the same error too.

  • @angelospapadopoulos7679
    @angelospapadopoulos7679 Год назад

    great video, but how to transform our coco data to this annotation format. I think yolo accepts 640x640 or 1280x1280. So if i have a an annotated image at 2000x1600 resolution, how can i bring it the coco mask to the yolo format? (i am talking about only the mask, i know how to transform the bbox)
    *ps i know i can throw my dataset to Roboflow and take the apprpriate output, but i want to do it without roboflow
    thnks😎

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Hi, Never tried that. I can answer this only after trying :)

  • @bhavishanthsuresh3298
    @bhavishanthsuresh3298 Месяц назад

    Hi Aarohi, where to adjust the confidence threshold in this project?

  • @edwinisac4745
    @edwinisac4745 Год назад

    what if we had overlapping regions? say like one of our classes is inside another? will this still work? For eg: if the mouse is on top of the keyboard in the image

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      In general, instance segmentation models like Mask R-CNN are designed to handle overlapping regions, including cases where one object is fully or partially inside another object. In fact, handling such cases is one of the key challenges of instance segmentation.
      When you train an instance segmentation model like Mask R-CNN, you typically label each object in the image with a separate instance mask, which indicates the pixel-level boundary of the object. If two objects overlap, their instance masks will overlap as well.
      In the specific example you mentioned, where a mouse is on top of a keyboard in the image, an instance segmentation model like Mask R-CNN should be able to detect and segment both the mouse and the keyboard as separate objects, even though they overlap in the image. The accuracy of the model will depend on factors such as the size and shape of the objects, the degree of overlap, and the quality of the training data.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      The above comment also justifies yolov8 segmentation model

    • @edwinisac4745
      @edwinisac4745 Год назад

      @@CodeWithAarohi thank you so much for the response.💕💕

  • @muhammadsabrimas2016
    @muhammadsabrimas2016 Год назад +1

    Can you please make a video on how to properly install pytorch, cuda and cudnn to activate the RTX 30 series and above without environmental errors???

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      For windows or Linux or Jetson Nano?

    • @muhammadsabrimas2016
      @muhammadsabrimas2016 Год назад

      @@CodeWithAarohi for windows, so far i haven't been able to run yolov5 with gpu (rtx 3080) and i don't understand why windows still shows cpu working in task manager even though yolov5 has read gpu.

  • @CoolHarshyaa
    @CoolHarshyaa Год назад

    Hello ma'am, this yolov8 gives object detection along with segmentation

  • @tahmidtowsifahmed6324
    @tahmidtowsifahmed6324 Год назад

    7:55 "we didn't perform to work on background", I am sorry i did not understand what you meant by that. Could you please clarify this? Thanks in advance.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      That means that I didn’t trained my model to recognise the background which affects the model’s performance.

    • @tahmidtowsifahmed6324
      @tahmidtowsifahmed6324 Год назад

      @@CodeWithAarohi Thanks. I have been training a custom object detection model on YOLOv7 with 4 classes. For that the confusion matrix gives background false negatives of 0.94. I was hoping any way to reduce that. If you could tell me how you configure the model to reduce the background FN and FP.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      @@tahmidtowsifahmed6324 Train your model on background images also.

  • @haricharan5521
    @haricharan5521 Месяц назад

    Why are you doing segmentation after performing detection what is the use of it?

    • @CodeWithAarohi
      @CodeWithAarohi  Месяц назад

      It depends upon the use case you are working upon. If you need only detection then you can leave the steps which I have used to perform segmentation after detection.

  • @manoschristakis
    @manoschristakis Год назад

    Why do you train the model from scratch instead of doing fine tuning?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      I am just showing how to train from scratch but its always good to use the pretrained models and fine tune them.

  • @alphagenerativeai
    @alphagenerativeai Месяц назад

    How can I labeled 2 classes and configured training. We hope to receive feedback from you! Thank you, from Viet Nam!

    • @CodeWithAarohi
      @CodeWithAarohi  Месяц назад

      The process is same. Just put all the images of both classes in same folder and annotate them.

    • @alphagenerativeai
      @alphagenerativeai Месяц назад

      @@CodeWithAarohi I mean, I currently have masks of objects, object 1 has RGB color (27,152,42), object 2 is (168,151,117), background: 0.0.0. How can I convert from this mask into Labels format with Yolo Format?

    • @alphagenerativeai
      @alphagenerativeai Месяц назад

      @@CodeWithAarohi Could you tell me how the file labels.txt is structured?
      Is it formatted like this: ...?
      Could you explain what the pairs of values and represent?

  • @bhavishanthsuresh3298
    @bhavishanthsuresh3298 Месяц назад

    For some reason, the prediction file is not getting saved. Can someone let me know what my problem is?

    • @CodeWithAarohi
      @CodeWithAarohi  Месяц назад

      Use save=True

    • @bhavishanthsuresh3298
      @bhavishanthsuresh3298 Месяц назад

      @@CodeWithAarohi Thanks. Now I have got the file saved, but there is no mask is formed over my predicted image. my code segment is as follows
      Results saved to runs/segment/predict5
      [ultralytics.engine.results.Results object with attributes:

      boxes: ultralytics.engine.results.Boxes object
      keypoints: None
      masks: None
      names: {0: 'wire'}
      obb: None

  • @HarmanSingh-my6tf
    @HarmanSingh-my6tf Год назад

    I am getting this error - Sentry is attempting to send 2 pending error messages
    please give me an answer
    Amazing vedio

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Sentry is a popular error tracking service that is used by many developers to monitor and debug their applications. When Sentry reports that it is attempting to send 2 pending error messages, it means that there are two error messages that have been detected by Sentry, but have not yet been sent to the Sentry server.
      The most common reason for this is that the device or server where the application is running has lost connectivity to the internet or to the Sentry server. When the connection is re-established, Sentry will attempt to send the pending error messages.

  • @MansoorBaig-vj3fb
    @MansoorBaig-vj3fb Год назад

    This is a good video but please consider spending another few minutes and explain how to annotate the data. That would be more helpful.

  • @Ashish771
    @Ashish771 2 месяца назад

    Please use dark background

  • @SaimKhalid-wx2zv
    @SaimKhalid-wx2zv Год назад

    Its a request, that can you do DeepSORT with yolov8

  • @nguyenanhnguyen7658
    @nguyenanhnguyen7658 Год назад

    YoloV8 is still infant and needs lot of touches, especially the conversion to other format likes TFLite or EdgeTPU (which is critical, and YoloV5 doing just fine).

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      We can convert yolov8 model into tflite. I recently did that

    • @nguyenanhnguyen7658
      @nguyenanhnguyen7658 Год назад

      @@CodeWithAarohi it will NOT work in edge. The only file generated works but can not convert to edge on edge memory. All other “so-called tflite” are worthless. YoloV8 vendor confirmed. Even ONNX back ward compatibility is not working. It is very early day. Better stick to YoloV5 for now.

  • @syedali-qg8rn
    @syedali-qg8rn Год назад

    Hi i need an offile image sagmentation fool for yolov8

  • @vishwajeetohal9137
    @vishwajeetohal9137 Год назад

    It was a bad choice to train the model from scratch, even for the demonstration purposes. In most real-world use cases, we would perform fine-tuning on our own data. That way, the model would have achieved much higher accuracy even with the same number of images.

  • @vasanthkumar9359
    @vasanthkumar9359 Год назад +1

    you look cute❤

  • @teenajoseph2121
    @teenajoseph2121 11 месяцев назад

    Hi Mam ,Wr are currently using a yolo model that can detect the shape,color and the text written on the targets present in the images.Since we have 3 attributes how can we annotate many images for these attribute?.We have annotated the entire dataset of more than 1000 images for the attribute "shapes of the targets( we have 13 shapes like circle,square etc) .Now how to annotate the same images for the attribute "color of the targets" in the image?

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      Have you tried the new feature of YOLOv8 which auto annotate the images. Check this video ruclips.net/video/K_WYmsYhBEw/видео.html