Real-time Instance Segmentation with YOLOv8: Create Custom Object Detection Models with Webcam

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

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

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

    Join My AI Career Program
    www.nicolai-nielsen.com/aicareer
    Enroll in My School and Technical Courses
    www.nicos-school.com

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

      how do we want to make detection prediction classs 12:07

  • @dserenini
    @dserenini ปีที่แล้ว +5

    Stuck on this line of code: "!yolo task=segment mode=train model=yolov8l-seg.pt data={dataset.location}/data.yaml epochs=30 imgsz=640"
    The output error says: "FileNotFoundError:
    Dataset '/content/Cup-Detection-v2-3/data.yaml' not found ⚠, missing paths ['/content/datasets/Cup-Detection-v2-3/valid/images'] "
    but there is a data.yaml on Cup-Detection-v2-3 folder.
    tried to show the path for data='/content/datasets/Cup-Detection-v2-3/valid/images'
    but unsuccessful.
    Does anyone have a hint?

    • @dserenini
      @dserenini ปีที่แล้ว +2

      solved by changing on data.yaml file
      from:
      test: ../test/images
      train: Cup-Detection-v2-3/train/images
      val: Cup-Detection-v2-3/valid/images
      to:
      test: ../test/images
      train: /content/Cup-Detection-v2-3/train/images
      val: /content/Cup-Detection-v2-3/valid/images

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

      @@dserenini Dude u r awesome !

  • @tobyprice5996
    @tobyprice5996 7 หลายเดือนก่อน +2

    Hi Nicolai, I have received the following error when trying to perform the live inference using my custom model: "Import "ultralytics.yolo.v8.detect.predict" could not be resolved". I have correctly installed ultralytics as I have been able to import YOLO successfully for this case and others. How can I overcome this issue?

  • @quando7162
    @quando7162 ปีที่แล้ว +3

    Hi, what is your GPU? My GPU is kind of weak so I am not sure whether it can get thing done in real-time.

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

      Im using a rtx 4090. It Can run real time on most gpus. U Can always try out the smaller versions of yolo

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

      @@NicolaiAI Thank you, I just check the benchmark comparison and my GPU is terrible compared to yours (Geforce mx330).

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

    Did you notice that during live inference, the masks in the video frames are flickering a lot even though the camera is not moving much? How do we tackle this issue?

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

    I tried to get prediction on Yolo v8 using the same command in your python code but got no output

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

      Did u specify all the paths correctly? And maybe try with a single image to start with

  • @PRAKADEESHKSCS
    @PRAKADEESHKSCS 11 หลายเดือนก่อน +1

    For nvdia-smi
    I am getting "command not found" error .can anyone please help.thanks in advance

    • @NicolaiAI
      @NicolaiAI  11 หลายเดือนก่อน +1

      If u are using Google colab it should work out of the box. Did you change the runtime to gpu?

    • @PRAKADEESHKSCS
      @PRAKADEESHKSCS 11 หลายเดือนก่อน +1

      @@NicolaiAI it works , thanks a lot

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

    This is awsome work! Thank you very very muchh!!I have a question....do you think i can stream data from a link instead of my webcamera in colab and do the real time segmentation?

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

      thanks a lot. U will prob not be able to run it real-time in colab. But u can download a video from a link and then pass that through the model in colab

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

      @@NicolaiAI Good! Generally does this algorithm supports real time from a stream-link? The source flag will be the link?

  • @sungjaepark7751
    @sungjaepark7751 11 หลายเดือนก่อน

    Hi, I'm using laptop for real time instance segmentation. I already has custom data set pt file.
    when I run python file with my best pt files it shows but the fps it's very low.
    On your video it only takes 1~2 ms to detect but mine takes about 800ms to detect object. I'm only using CPU and RAM. Does GPU helps less time to detect and increase fps?

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

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

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

    Hey I am using an external camera which is basically a stereo camera. Do you think I can put the camera as a source in the model inference? Note that the stereo camera gives RGBD values instead of RGB. So I have to get the RGB frame for each RGBD frame and then send those frames to the model. I tried it once but due to CUDA issues there was segmentation fault and I could not run it? Any idea how to bypass that?

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

    hello when i try to segmentation for dog.jpeg it didnt put square to objects. It showed the same picture without segmentation but wrote the correct output. How can i fix this ?

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

      Do u set show to true?

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

      @@NicolaiAI yes it works well just doesn't show the output image. When i add parameter save = True it saves to different path ("/runs/segment/predict") then i could see the output image. But i dont know why i cant see the output image when i write like yours.

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

      @@EgeSener I’m not sure since im using a webcam as the source in this example. Haven’t tried it with a single image

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

    Hi i'm getting this error ,
    ImportError: cannot import name 'DetectionPredictedClass' from 'ultralytics.yolo.v8.detect.predict' (/usr/local/lib/python3.10/dist-packages/ultralytics/yolo/v8/detect/predict.py)

  • @oussamajmaa9205
    @oussamajmaa9205 7 หลายเดือนก่อน

    appreciate your efforts and content ! can you please provide info about the gpu you're using for inference ?

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

    Can't find this .ipynb and all other codes...

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

      It’s on my GitHub under neural networks

    • @vaibhavkurrey5433
      @vaibhavkurrey5433 5 หลายเดือนก่อน

      @@NicolaiAI Not found

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

    How to crop the segment area from the images?

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

      u can't crop a segmentation mask but you can crop the bounding box in the image around it

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

    Can Yolov8 instance segmentation for product SKU?

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

    Hello sir how can you deploy the counting text inside the video/image?

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

      Hi! What do u mean with counting text?

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

      @@NicolaiAI what i mean sir is that i want to dispay the counted object above the frame of the image or video generated by detection. We can see at the result that every frame it shows the counted object and i want to display it together with the generates images or video frame. Thank you sir.

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

      @@BlazenseiTV if u take a look at my tracking video with Yolov8 u can see how to modify the visualisation

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

      @@NicolaiAI I think this link might be it th-cam.com/video/UYLp0-iOvFc/w-d-xo.html

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

    appreciate your content, very inspiring!

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

      Thank you so much!

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

    Amazing video and nice wallpaper. Where could I find the wallpaper?

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

      Thanks a lot! What wallpaper are u talking about?

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

      @@NicolaiAI The wallpaper at the beginning of the video ~10 secs in to the video you have all 3 monitors up and the wallpapers you have are nice

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

      @@keshawnsmith320 haha i actually think it’s just some standard ones in windows 11

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

      @@NicolaiAI Gotcha makes sense! Also, if you do have a personal laptop is it mac or windows that you use?

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

      @@keshawnsmith320 I’m using Linux on my laptop so kinda have to go for windows laptops. But for anything else and if what I do can run on Mac I’ll go for Mac anyday

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

    I need help. Is it possible to use yolov8 and tensorflow at the same time on my nvidia gpu? Seems like I need cuda 11.2 for tensorflow, but cuda 11.8 for yolov8. I don't know how to get both working together.

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

    please stop repeating :"we got some really nice results", open your eyes and see all the FALSE positives that the model is showing when you switched on the webcam, i am sure you would see a lot more if you moved the webcam to view different objects

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

      Have u heard about conf, nms, iou?

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

      @@NicolaiAI tried all of them, won't improve results much.
      Yolo is defective in its core, did u try it on production? Or only playing with it as a toy?

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

      Of course it improves results if u have a confidence score of 0.4 or 0.8? U can also do tracking on top of it etc. u can also do way more in the training itself or in ur dataset

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

      U mentioned deploying in production? U would never use the standard code and preprocessing from yolo for that and a specific application. And u would also have mentioned tracking then. My advice would be not to use DL in ur case

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

      @@NicolaiAI u think i didnt try all of that? increasing conf value will reduce false positives but will increase FALSE NEGATIVES (your recall and F1 scores will drop), tracking cant do u anything if the actual prediction is wrong (lots and lots of false positives), i trained on more than 18k images for 100s of epochs, the model still can NOT generalize well when seeing new data

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

    when I try the code I get this error: im0 = self.annotator.result()
    AttributeError: 'NoneType' object has no attribute 'result'
    What to do with that? :/

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

    After I ran the training code "!yolo task=segment mode=train model=yolov8l-seg.pt data=/content/RV_seg-1/data.yaml epochs=15 imgsz=640".
    I had the following error message.
    Epoch GPU_mem box_loss seg_loss cls_loss dfl_loss Instances Size
    0% 0/82 [00:04

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

      hey did you find the solution