YOLOv8 | Image Segmentation On Custom Dataset using YOLOv8

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 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.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 79

  • @shivamjd2787
    @shivamjd2787 ปีที่แล้ว +1

    Thanks for making this video

  • @engammar1794
    @engammar1794 10 หลายเดือนก่อน

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

  • @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 5 หลายเดือนก่อน

    Thanks for sharing this good working model

  • @TUSHARGOPALKA-nj7jx
    @TUSHARGOPALKA-nj7jx 2 หลายเดือนก่อน

    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?

  • @a.b.c4812
    @a.b.c4812 2 หลายเดือนก่อน

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

  • @PIYUSHSINGH-mu2pk
    @PIYUSHSINGH-mu2pk ปีที่แล้ว

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

  • @vivekpaswan7946
    @vivekpaswan7946 ปีที่แล้ว

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

  • @deepakts8941
    @deepakts8941 ปีที่แล้ว

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

  • @teenajoseph2121
    @teenajoseph2121 ปีที่แล้ว

    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  ปีที่แล้ว

      Have you tried the new feature of YOLOv8 which auto annotate the images. Check this video th-cam.com/video/K_WYmsYhBEw/w-d-xo.html

  • @DeepakKumar-ub4mw
    @DeepakKumar-ub4mw 9 หลายเดือนก่อน

    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.

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

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

  • @user-my5rh3un7y
    @user-my5rh3un7y 22 วันที่ผ่านมา

    Can you provide the dataset used in this video to practice YOLOv8?

  • @haricharan5521
    @haricharan5521 3 หลายเดือนก่อน

    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  3 หลายเดือนก่อน

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

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

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

  • @CoolHarshyaa
    @CoolHarshyaa ปีที่แล้ว

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

  • @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 :)

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

  • @bhavishanthsuresh3298
    @bhavishanthsuresh3298 3 หลายเดือนก่อน

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

    • @CodeWithAarohi
      @CodeWithAarohi  3 หลายเดือนก่อน

      model.predict(‘a.jpg', save=True, conf=0.5)

    • @bhavishanthsuresh3298
      @bhavishanthsuresh3298 3 หลายเดือนก่อน

      @@CodeWithAarohi Thank You

  • @殺氣仔
    @殺氣仔 ปีที่แล้ว

    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.

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

  • @haricharan5521
    @haricharan5521 3 หลายเดือนก่อน

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

    • @CodeWithAarohi
      @CodeWithAarohi  3 หลายเดือนก่อน

      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.

  • @alphagenerativeai
    @alphagenerativeai 3 หลายเดือนก่อน

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

    • @CodeWithAarohi
      @CodeWithAarohi  3 หลายเดือนก่อน

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

    • @alphagenerativeai
      @alphagenerativeai 3 หลายเดือนก่อน

      @@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 3 หลายเดือนก่อน

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

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

  • @bhavishanthsuresh3298
    @bhavishanthsuresh3298 3 หลายเดือนก่อน

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

    • @CodeWithAarohi
      @CodeWithAarohi  3 หลายเดือนก่อน

      Use save=True

    • @bhavishanthsuresh3298
      @bhavishanthsuresh3298 3 หลายเดือนก่อน

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

  • @Ashish771
    @Ashish771 4 หลายเดือนก่อน

    Please use dark background

  • @syedali-qg8rn
    @syedali-qg8rn ปีที่แล้ว

    Hi i need an offile image sagmentation fool for yolov8

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

  • @Northmen7
    @Northmen7 ปีที่แล้ว

    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.

  • @SaimKhalid-wx2zv
    @SaimKhalid-wx2zv ปีที่แล้ว

    Its a request, that can you do DeepSORT with yolov8

  • @vasanthkumar9359
    @vasanthkumar9359 ปีที่แล้ว +1

    you look cute❤

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

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

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Thank you for sharing your thoughts.

  • @teenajoseph2121
    @teenajoseph2121 ปีที่แล้ว

    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  ปีที่แล้ว

      Have you tried the new feature of YOLOv8 which auto annotate the images. Check this video th-cam.com/video/K_WYmsYhBEw/w-d-xo.html