YOLOv9 Training on Custom Dataset in Google Colab with Roboflow

Поділитися
Вставка
  • Опубліковано 26 січ 2025

КОМЕНТАРІ • 86

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

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

  • @balveersingh3051
    @balveersingh3051 11 місяців тому +4

    it's amazing to see how fast technology is evolving

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

      Yeah that’s for sure!

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

      yeahh, when we think yolo can't improve we get a new version.

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

    Hey!! I really love your video. May I know what did you do at 6:42 ? I got the same error you got and I am trying to resolve it. May I know where did you paste the image ? Thank you.

  • @clayworld-zn8oz
    @clayworld-zn8oz 9 місяців тому +1

    Hello!! It is an excellent video. I have a doubt. I have created a custom dataset and followed your instructions. It has worked excellent for an image but not for a video. Can you please let me know how it can be done to detect the objects from a video??? Please.. Thank you sir.

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

    Very good videos man, there are a ton of tutorials that do only the basics, but it's almost impossible find one that goes deep, so THANK YOU for posting your videos

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

      Thanks a ton for the nice words man! Really appreciate the support and exactly why I’m doing it

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

    What is --close mosaic?

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

    @NicolaiNielsen thanks for the tutorial.
    When using roboflow and the yolov9-c or yolov9-e model I get an AttributeError: 'list' object has no attribute 'view' in the train.py file line 168:
    File "/content/yolov9/utils/loss_tal.py", line 168, in
    pred_distri, pred_scores = torch.cat([xi.view(feats[0].shape[0], self.no, -1) for xi in feats], 2).split(
    can somebody help me solving this issue?

  • @ronaldo-ir2iz
    @ronaldo-ir2iz 9 місяців тому +1

    can i know what to custom on data.yaml cuz in my data doesnt have valid data?
    train, 80%, test 20%

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

    Thank you so much for this video. Is it feasible to train YOLOv9 on a custom dataset for different types of waste (paper, plastic, glass, etc.)? I will be the one capturing the images and annotating them.

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

      Yeah for sure! You can do that

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

    As far a I recall, Roboflow doesn;t allow to download the weights file, right? What are my options if my applications require off line work on a local computer?

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

      Build the model on your local computer

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

      @@InfernalPasquale Can I do the training with Roboflow on my local machine?

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

      @@YigalBZ if you mean train using your roboflow dataset then yes.

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

      You can follow my videos for custom training of yolo v8 and v9. You can directly export dataset and use that for training. Then u can export the model to your local machine

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

    thank youuu nicolai, amazing video

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

      Thanks you! Definitely check out the new v10 as well. Much better video

  • @ronaldo-ir2iz
    @ronaldo-ir2iz 9 місяців тому

    at train custom model, how to specify the batch, and image? we have to refer from where?

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

    Thank you soooooooooo much brother for your alot of effort in making this helpful video for us only you are the one which give us alot of info in this video and i understand your method again thank you soo much and keep it up.....love u

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

      It's my pleasure! Thank you so much for the kind words

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

    Awesome video as always man! I have a technical question since I'm new to this. How can I create a bounding box in a specific area and check if it contains anything? For instance, how do I draw a box over a parking spot on an image or video and ask the model to count cars within that box? I'm thinking of something similar to the line-crossing counting method, but applied to a whole box. My goal is to determine if something, not just what is recognized, is within a predefined area.

    • @SquatsOfAwesome
      @SquatsOfAwesome 11 місяців тому +3

      Supervision has a PolygonZone and PolygonZoneAnnotator class, which lets you mask out an area and filter for all detections within that area

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

      Thanks a lot for watching man! Appreciate it. Yeah you can use the zones from supervision. They have it all integrated in but you could also specify your own polygon zones in opencv and check if points are inside those

  • @ReadyMedia-no
    @ReadyMedia-no 11 місяців тому +1

    Thank you! Are there currently any AI Edge cameras able to run this model? We are looking for a solution to count people in large auditoriums with 500 seats and 30M distance between Camera and furthest person.

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

      Thanks for watching! Don’t think any camera is out there for this model yet. I’m not too familiar with the available options out there for edge cameras running models out of the box

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

      You can look at a camera working with an Edge Computing Node like NVIDIA Jetson

  • @EgorPristavka-hn1to
    @EgorPristavka-hn1to 11 місяців тому +1

    Does this model support OBB? If I'm not mistaken, 8.1 did, but what's about 9th version?

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

      Nope they are different. OBB is a feature only ultralytics have implemented on top of their yolo model

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

    Can anyone give link for Yolov9 Segmentation colab notebook

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

    Sir i to use this on object defection where it will detect that this bottle is defected and give the areas where the defecction is say the label and vice versa too. Do you have video on that or how to implement that?

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

    while training yolo9 on custom dataset, i am getting an error " AttributeError: 'list' object has no attribute 'view' " in line no 168 in loss_tal.py. can you please look into it and give me any solution?

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

      Looks like they have some bugs in the GitHub repo. Can u try clone the newest version? GELAN model should work

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

      I am also experiencing the same error using yolov9-c

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

      Same error for me with v9. Gelan worked extremely well for me.

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

      @@Fellixify yeah they have to fix the bugs first

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

    Does anyone know how to resolve this error
    File "/content/yolov9/utils/augmentations.py", line 248, in copy_paste
    l, box, s = labels[j], boxes[j], segments[j]
    IndexError: list index out of range

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

      i am also facing this error if you have solved it plz provide me the solution

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

    Question: what type of stream does it need for a proper analisys?

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

      What do u mean by stream?

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

      @@NicolaiAI I mean rstp protocol with H265+ encoding or something

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

    I followed the instructions but it shows an error saying IndexError: list index out of range.

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

      Where?

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

      @@NicolaiAI Traceback (most recent call last):
      File "/content/yolov9/train.py", line 634, in
      main(opt)
      File "/content/yolov9/train.py", line 528, in main
      train(opt.hyp, opt, device, callbacks)
      File "/content/yolov9/train.py", line 277, in train
      for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
      File "/usr/local/lib/python3.10/dist-packages/tqdm/std.py", line 1181, in __iter__
      for obj in iterable:
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 630, in __next__
      data = self._next_data()
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
      return self._process_data(data)
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
      data.reraise()
      File "/usr/local/lib/python3.10/dist-packages/torch/_utils.py", line 694, in reraise
      raise exception
      IndexError: Caught IndexError in DataLoader worker process 0.
      Original Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
      data = fetcher.fetch(index)
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
      data = [self.dataset[idx] for idx in possibly_batched_index]
      File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
      data = [self.dataset[idx] for idx in possibly_batched_index]
      File "/content/yolov9/utils/dataloaders.py", line 656, in __getitem__
      img, labels = self.load_mosaic(index)
      File "/content/yolov9/utils/dataloaders.py", line 791, in load_mosaic
      img4, labels4, segments4 = copy_paste(img4, labels4, segments4, p=self.hyp['copy_paste'])
      File "/content/yolov9/utils/augmentations.py", line 248, in copy_paste
      l, box, s = labels[j], boxes[j], segments[j]
      IndexError: list index out of range

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

      @@akapholsaikong8062 Same error

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

      i have the same problem and it is during training , i edited the yaml file the same way as you did @@NicolaiAI

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

      In yolov9/data/hyps/hyp.scratch-high.yaml change copy_paste: 0.3 to copy_paste: 0.0

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

    Which version is better detection for you, 8 or 9?

  • @ronaldo-ir2iz
    @ronaldo-ir2iz 9 місяців тому

    "RuntimeError: DataLoader worker (pid 6246) is killed by signal: Killed."?. What does it means?

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

    I can't train my dataset using gelan-e, yolov9-c, and yolov9-e. Anyone can help?

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

    Is there a way that one can get an annotation .txt file with the predicted image

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

    Is there a way to train in windows with intel gpu?

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

      Nope every framework is using PyTorch pretty much and only supports cuda. Also amd and mps but have never seen anyone use those. No reason not to go for nvidia gpu or mac if you prefer just doing cool stuff locally.
      I know you probably have an intel one already and that’s why. But they can be used to deploy models with openvino and get pretty good performance

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

      thanks @@NicolaiAI

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

    why no comparison to YOLO NAS?

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

    i am getting this error
    File "/content/drive/MyDrive/yolov9/train.py", line 196, in train
    assert mlc < nc, f'Label class {mlc} exceeds nc={nc} in {data}. Possible class labels are 0-{nc - 1}'
    AssertionError: Label class 1 exceeds nc=1 in /content/drive/MyDrive/yolov9/dataset/data.yaml. Possible class labels are 0-0
    any idea how to solve this error ?please

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

    cool video,
    I was thinking, it would amazing if you could do a video on yolov9's face recognition capabilities. I am working on a door access project and was thinking of using yolov9 for face recognition

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

      I have some videos on my channel with face recognition as well. You would normally use a bit different method and model for recognition compared to object detection

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

      yes. that's what I was thinking@@NicolaiAI, but can object detection be combined with face detection in one model?

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

    When I try to run the yolov9-c. i get this error AttributeError: 'list' object has no attribute 'view'

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

      Same bro, I can't train my dataset using gelan-e, yolov9-c, and yolov9-e too

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

    can you make a video about visual odometry for UAV? 🙏

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

      Don’t really have any footage for that but have a bunch of videos for visual odometry in general

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

    I hate how dificult object detection is compared to image recognition.

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

      Depends on the task I’d say but segmentation is even more painful haha

  • @tenns-tu1yz
    @tenns-tu1yz 9 місяців тому

    nvidia-smi: command not found

  • @АлексейЧурилов-т4м
    @АлексейЧурилов-т4м 9 місяців тому

    Николай, спасибо!

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

    You are speaking so fast as if you need to go somewhere urgently and someone is staring at you waiting till you are done. Give people some time to comprehend some steps man

    • @FernandaZ-u7c
      @FernandaZ-u7c 11 місяців тому

      I feel the same when I see this video series for the first time🥺, cuz English is not my first language. But when I go through all the YOLOv8 episodes, I can follow his words now. So, listen more maybe the only solution. 🤣

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

      It’s a trick to make you watch more videos.
      Jokes aside, you can slow down the video. I only get this comment 1 time/month so will not make sense to change the pace or flow of the videos

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

      ​​@@NicolaiAI yes please don't slow down your pace, its perfect rn for most of us

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

      @balarog7418 thanks a lot man! Appreciate it

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

    YOLO NAS VS YOLOV9

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

      For sure! But can probably already say yolov8

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

    Jaante ho I met you because daddy did black magic on me. We met because of our problems. If daddy did not do black magic on me then I would be could not meet you. If I did not meet you then how you would be? Ask god know

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

    hi, i want to add tensorbord to this code how can i do it please can you help
    # Affichage des résultats à partir des journaux de TensorBoard
    %load_ext tensorboard
    %tensorboard --logdir {logdir}

  • @freecode.ai-
    @freecode.ai- 11 місяців тому +3

    THIS IS SHOCKING!

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

      Shockingly good or? 😂

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

      Every AI/Vision video shocks the industry.

    • @freecode.ai-
      @freecode.ai- 11 місяців тому

      Your video is great but it was just a meme statement. I have been meaning to ask, do you own ultralytics? It's like you are the face of the company when I visit the website.