YOLOv8 Instance Segmentation on Custom Dataset | Windows & Linux

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

КОМЕНТАРІ • 81

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

    Heres a note for everyone, When training a model don't put any training data used for training the model to the validation data, because it can make your model overfit, means that your model will memorize the data instead of finding patterns and learning that. This results that model will accurately predict all the things in the training data but will suffer with new data!

    • @GamingCoderzX
      @GamingCoderzX 7 місяців тому +1

      :), thanks for the heart

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

      @@GamingCoderzX
      Very useful advice.
      Watching the videos 🎥 of this channel and reading the comments help me much

  • @beikdw5762
    @beikdw5762 Рік тому +7

    Amazing tutorial! If anyone is having issues using a mobile GPU (Nvidia Quadro series etc) and finding that your losses are 0 in the output, use the amp=False flag on the yolo command.

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

      Thank you very much.
      Glad I read your comment

  • @waltergrimm7161
    @waltergrimm7161 4 місяці тому

    Very well done, just went through the main topics fast and precise, without mentioning first class crap

  • @UZMAALFATMI
    @UZMAALFATMI 11 місяців тому +2

    Thank you for explaining from start to end so seamlessly. So valuable content, surely will be using it for my vision project!

    • @TheCodingBug
      @TheCodingBug  11 місяців тому +1

      Glad it was helpful!

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

      @@TheCodingBug
      This channel rocks 💥.
      How can I install *ultralytics* in the Python 🐍 console of the program Paraview.
      Best regards.

  • @karlm9584
    @karlm9584 8 місяців тому +1

    This is great and thank you for providing it. I have used the SAM auto annotate segmentation function of YOLOv8 to annotate my image dataset of over 30,000 images with segmentation annotations, including train and val. (I already have a detection model trained on this dataset) It is still running but as soon as it is done I will test to see whether I can train the segmentation model from that data using this guide. Thanks again.

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

      Update: the auto segmentation was good, but not great. I still have to go through and tighten up the boundaries. However on many images it has done a surprisingly good job. I have been through around 2000 images so far and I would say it's about 50/50 for images that don't need any rework. It wouldn't be possible to train an accurate segmentation model based on the raw output in my opinion.

    • @kaiserbala7419
      @kaiserbala7419 4 місяці тому

      @@karlm9584 How's the result now?

    • @karlm9584
      @karlm9584 4 місяці тому

      @kaiserbala7419 have been working on another project since then, but i only got through fixing maybe 1/3 of the images. Hope to get back onto it in a few months or perhaps next year. The free segmentation apps are not all that good. I'll probably switch to using Matlab image annotator for the rest.

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

    I love when you show it in the text editor

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

    Отличная работа! Спасибо за подробное видео!

  • @74Gee
    @74Gee Рік тому +1

    Great job! Thanks for the detailed video!

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

    Thanks, man! It worked.

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

    thanks so much, it is so clear and helpful

  • @mardeenosman8979
    @mardeenosman8979 11 місяців тому

    Thanks for the great video

  • @ovis
    @ovis 3 місяці тому

    concise

  • @user-ww7vc6om4s
    @user-ww7vc6om4s 6 місяців тому

    Great Job

  • @rajmeetsingh1625
    @rajmeetsingh1625 9 місяців тому +1

    Thanks Alot. I have one question. Which format is used to install model on jetson ?

  • @huzaifa.arshad
    @huzaifa.arshad 6 місяців тому

    Best. Easy to understand. Do you have YOLOv8 video on Image classification? Or can you make one? For example if i have a fake and real mobile, how do i make classification model on it? Please guide. Thanks.

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

    On conda prompt there is error occurred "yolo is not recognised as an internal or external command"
    Why?

  • @meeselizabeth
    @meeselizabeth 11 місяців тому +1

    I get a KeyError 'shapes' when doing labelme2yolo, anyone knows how to solve this? My json files include coordinates of bounding boxes and polygons, so that is why the key ['shapes'] is included in there.

    • @landeringhelram2459
      @landeringhelram2459 10 місяців тому +1

      that is because your json file is not in the LabelMe json format.

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

    Thanks for the tutorial really clear. Is it possible to labelise multiple butterfly in one image during the labelisation process?

  • @chen-kangchiu6802
    @chen-kangchiu6802 Рік тому +1

    Your videos are very helpful to me. Thank you very much.
    But I have a question for you, is there a way to check the fps? ?
    How to do it? ? Can you teach me?

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

      Yes. I'll upload a video this week.

    • @flowbender
      @flowbender 9 місяців тому

      @@TheCodingBug still waiting

  • @ibourkabdelatif5741
    @ibourkabdelatif5741 Рік тому +2

    hi thanks for the vedio it was full of information, my question is how can do this trianing using Google Colab , since i don't have a laptop with GPU

    • @flowbender
      @flowbender 9 місяців тому +1

      the same question I was about asking

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

      @@flowbender
      You don’t need the a computer with GPU. You can do it with the normal CPU, it will be slower but it will work.

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

    What If I have to count the object in this particular ?

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

    where is the second label?

  • @ameh503
    @ameh503 Рік тому +2

    Hi, thanks for the tutorial!
    Although JSON annotation coordinates are within the original image size, running it through labelme2yolo converted some of the points to more than 1. As far as I know YOLO annotation coordinates should be located between 0 and 1( normalized). Because of this model training ignores 10% of dataset images. Have you ever had this issue? BTW I'm using another custom dataset. Seems like labelme2yolo is not working properly.

    • @TheCodingBug
      @TheCodingBug  Рік тому +2

      No. I never had such an issue!

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

      yeah im facing the trouble says: ignoring corrupt image/label: Label class 2 exceeds dataset class count 1. Possible class labels are 0-0

    • @GamingCoderzX
      @GamingCoderzX 7 місяців тому +1

      Seems like your problem where you didn't label the data properly

    • @ajarivas72
      @ajarivas72 7 місяців тому +1

      @@GamingCoderzX
      I use *labelImg* to annotate my images en yolo (txt) format.
      How can I use the program *labelMe* to annotate images. I would like to use circular and polygonal sections to annotate.
      Yolov8 and labelIma only permit rectangular sections.

  • @tungdinh3664
    @tungdinh3664 10 місяців тому

    Does anyone know why my confidence score is very low (like 0.2) even though the segmentation is pretty accurate? I had to set conf=0.2 otherwise there would be no detection.

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

    I want to convert to tflite i got error
    (YoloV8) C:\Users\USER\anaconda3\envs\YoloV8\Gambar>yolo export model= yolov8m-seg.pt format=tflite
    Ultralytics YOLOv8.0.81 Python-3.10.10 torch-2.0.0+cu118 CPU
    YOLOv8m-seg summary (fused): 245 layers, 27268704 parameters, 0 gradients, 110.2 GFLOPs
    PyTorch: starting from yolov8m-seg.pt with input shape (1, 3, 640, 640) BCHW and output shape(s) ((1, 116, 8400), (1, 32, 160, 160)) (52.4 MB)
    TensorFlow SavedModel: starting export with tensorflow 2.12.0...
    ONNX: starting export with onnx 1.13.1 opset 17...
    ============= Diagnostic Run torch.onnx.export version 2.0.0+cu118 =============
    verbose: False, log level: Level.ERROR
    ======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================
    ONNX: simplifying with onnxsim 0.4.20...
    ONNX: simplifier failure: [ShapeInferenceError] (op_type:Gather, node name: /model.2/Gather): [TypeInferenceError] Inferred elem type differs from existing elem type: (FLOAT) vs (INT64)
    ONNX: export success 3.5s, saved as yolov8m-seg.onnx (104.3 MB)
    TensorFlow SavedModel: running 'onnx2tf -i yolov8m-seg.onnx -o yolov8m-seg_saved_model -nuo --non_verbose'
    ERROR: The trace log is below.
    Traceback (most recent call last):
    File "C:\Users\USER\anaconda3\envs\YoloV8\lib\site-packages\onnx2tf\utils\common_functions.py", line 281, in print_wrapper_func
    result = func(*args, **kwargs)
    File "C:\Users\USER\anaconda3\envs\YoloV8\lib\site-packages\onnx2tf\utils\common_functions.py", line 359, in inverted_operation_enable_disable_wrapper_func
    result = func(*args, **kwargs)
    File "C:\Users\USER\anaconda3\envs\YoloV8\lib\site-packages\onnx2tf\utils\common_functions.py", line 50, in get_replacement_parameter_wrapper_func
    func(*args, **kwargs)
    File "C:\Users\USER\anaconda3\envs\YoloV8\lib\site-packages\onnx2tf\ops\MaxPool.py", line 106, in make_node
    tf_pads = calc_tf_pooling_pads(
    File "C:\Users\USER\anaconda3\envs\YoloV8\lib\site-packages\onnx2tf\utils\common_functions.py", line 4011, in calc_tf_pooling_pads
    same_output_shape = math.floor((i - 1) / s) + 1
    TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
    ERROR: input_onnx_file_path: yolov8m-seg.onnx
    ERROR: onnx_op_name: /model.9/m/MaxPool
    ERROR: Read this and deal with it. github.com/PINTO0309/onnx2tf#parameter-replacement
    ERROR: Alternatively, if the input OP has a dynamic dimension, use the -b or -ois option to rewrite it to a static shape and try again.
    ERROR: If the input OP of ONNX before conversion is NHWC or an irregular channel arrangement other than NCHW, use the -kt or -kat option.
    ERROR: Also, for models that include NonMaxSuppression in the post-processing, try the -onwdt option.
    TensorFlow SavedModel: export failure 9.6s: SavedModel file does not exist at: yolov8m-seg_saved_model\{saved_model.pbtxt|saved_model.pb}
    TensorFlow Lite: starting export with tensorflow 2.12.0...
    TensorFlow Lite: export success 0.0s, saved as yolov8m-seg_saved_model\yolov8m-seg_float32.tflite (0.0 MB)
    Export complete (11.3s)
    Results saved to C:\Users\USER\anaconda3\envs\YoloV8\Gambar
    Predict: yolo predict task=segment model=yolov8m-seg_saved_model\yolov8m-seg_float32.tflite imgsz=640
    Validate: yolo val task=segment model=yolov8m-seg_saved_model\yolov8m-seg_float32.tflite imgsz=640 data=coco.yaml
    Visualize: netron.app

  • @kiko-qs9lk
    @kiko-qs9lk Рік тому

    Thanks for your video!
    but it just converted about 20 pics (my dataset has about 800 pics and json annotation) when I running labelme2yolo. How to solve this problem?

  • @wojciechmachnicki9476
    @wojciechmachnicki9476 10 місяців тому

    When I run yours code after few second the sctipt ends with error code -11. Did you known what mean error "Process ended with exit code -11"? On source I was pi-camera and also checked with .jpg picture

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

    Hay,
    Your video is very informative. I have an issue with converting a single .json file to multiple json file according to the name of an image. Could please suggest me a way to do that

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

      You can give single json file as input to the command that converts annotations to yolo format.

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

    What if my .json files after convertion to yolo .txt have random filename? Like "8a7309fbbd71edb9d8d5d45fea23a04f.txt". How to prevent this?

  • @vivekmondal4001
    @vivekmondal4001 8 місяців тому

    Can You please make a tutorial that how can we make our own model for polygon points training?

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

    How can I detect the object in code and act on it? For example if a butterfly is detected print something to the console. Thanks!

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

    hello my friend
    thank you so much
    but i have a question
    if i want to get the size (how many pixels) of the segmented object how can i do that ?

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

    The manual work for labelme is very long. Is there an automatic or semi-auto way of doing that?

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

    im facing trouble when train the data (all my images is 100% corrupt they say?), is that problem is about labeling?
    train: Scanning /content/drive/MyDrive/Magang/TestYolo/Image/Train.cache... 82 images, 0 backgrounds, 82 corrupt: 100% 82/82 [00:00

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

      Yes, your problem is with the labelling tasks

  • @xyz-l8d
    @xyz-l8d 25 днів тому

    i want the format and structure of your dataset. i dont need your nature data. just the format and structure of data that you are training your data with. can you help me??

  • @imadahmad104
    @imadahmad104 10 місяців тому

    If all the json is in one file. How to convert to text for each image. Please refer to some tutorial or code. Will be very thankful.
    Best Regards

  • @inckaje
    @inckaje 3 місяці тому

    How I can use my 8gb GPU if I have AMD radeon rx580 on Windows 10? Please answer asap i will very appreciate it

  • @StepUpAcademy_Xiva
    @StepUpAcademy_Xiva 3 місяці тому

    Hello. When start yolo task=segment mode=train epochs=15 data=dataset.yaml model=yolov8m-seg.pt imgsz=640 batch=1 part, I have this problem
    Closing dataloader mosaic
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\multiprocessing\spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch\__init__.py", line 1537, in
    from .functional import * # noqa: F403
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch\functional.py", line 9, in
    import torch.nn.functional as F
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch
    n\__init__.py", line 1, in
    from .modules import * # noqa: F403
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch
    n\modules\__init__.py", line 2, in
    from .linear import Identity, Linear, Bilinear, LazyLinear
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch
    n\modules\linear.py", line 7, in
    from .. import functional as F
    File "C:\Users\Rajaboff\anaconda3\envs\yolov8_segmentation\lib\site-packages\torch
    n\functional.py", line 16, in
    from torch._torch_docs import reproducibility_notes, tf32_notes, sparse_support_notes
    File "", line 1027, in _find_and_load
    File "", line 1006, in _find_and_load_unlocked
    File "", line 688, in _load_unlocked
    File "", line 879, in exec_module
    File "", line 1012, in get_code
    File "", line 672, in _compile_bytecode
    MemoryError

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

    Why would you do segmentation over object detection?

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

    nice work!!, can this been set up for soccer game stats?

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

    Hey, this is not instance segmentation it is semantic segmentation. Here all your butterfly classes have same id.

  • @markjustinemonterde8175
    @markjustinemonterde8175 9 місяців тому

    Hello I have some query. I've followed your instructions on the vid I tried training multiple custom data of mine and I keep getting an error: WARNING no labels found in segment set, can not compute metrics without labels
    this is how I made my dataset DIR
    Train->images->class1,class2,class3
    Labels->class1-> class1label.txt ,class2 - > class1label.txt ,class3 -> class1label.txt
    How do I tackle this problem?
    It would really help me If you answered my query thank you!

  • @warrior_1309
    @warrior_1309 3 місяці тому

    Sir , i need to extract the instance mask can you pls suggest something, it would be a great help?

  • @deepakkarmaDK
    @deepakkarmaDK 2 місяці тому

    is this will work for face recognition instead identification?

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

    how do you extract the confidence values shown above bounding box

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

    can I do field boundary delineation?

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

    How can I use this model in my code? I want to save points coordinates to list.

  • @Stellar_six
    @Stellar_six 11 місяців тому

    Pls help me to sort out this issue

  • @deepakkarmaDK
    @deepakkarmaDK 2 місяці тому

    Without GPU can i do the whole thing with 10-20 images?

  • @nithinkumar2473-c4s
    @nithinkumar2473-c4s Рік тому

    How to export it to android app

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

    Class Images Instances Box(P R mAP50 mAP50-95) Mask(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:11

    • @TheCodingBug
      @TheCodingBug  Рік тому +3

      Dataset is too small... Or use any other model (other than tiny, maybe use medium version)

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

    おばあさんも前見えてないんちゃうん?

  • @adrianrs79
    @adrianrs79 11 місяців тому +1

    The thing is ML is becoming a blackbox for everyone using it!!! and that is not good need to say