Track & Count Objects using YOLOv8 ByteTrack & Supervision

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

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

  • @omoyeyeemmanuel4238
    @omoyeyeemmanuel4238 10 месяцев назад +12

    your code comes with the error of numpy between float, int and double

    • @Roboflow
      @Roboflow  10 месяцев назад +8

      I recommend using updated version of the notebook: colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-track-and-count-vehicles-with-yolov8-and-supervison.ipynb

    • @surplusTv1
      @surplusTv1 10 месяцев назад

      thanks
      @@Roboflow

    • @mariacaleropereira2967
      @mariacaleropereira2967 9 месяцев назад +1

      @@Roboflow Does that notebook solve the error? Thank you!

    • @sportsyard
      @sportsyard 8 месяцев назад +3

      Is there any other updated notebook because this one is also throwing some error

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

      ​@@mariacaleropereira2967 The notebook works perfectly :)

  • @ditya3548
    @ditya3548 Год назад +8

    26 minutes for this is not long at all. Thank you for what you do and please don't hesitate to make longer videos, however you see fit.

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

      My pleasure!

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

      It goes to show how streamlined this stuff has become. Try doing a PhD in this ten years ago and having to write your own code for everything AND the novel parts you're working on. Takes months and hours to explain. Now anyone can git clone and run complex models. What a world :)

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

      @@katanshin Truly!

  • @AsadAli-b9u
    @AsadAli-b9u Год назад +10

    The best and complete tutorial for implementing YOLOV8 based object detection, tracking and counting system. Love it brother

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

      That’s what I strived for! Great to hear you liked it so much 🔥

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

      How can I count the bounding boxes for a set of images ( not a video) in this case ( using a pre trained yolov8 model with only 1 class)

    • @AsadAli-b9u
      @AsadAli-b9u 8 месяцев назад

      ​@@ashishreddy2634 Are you trying to detect specific class?

  • @akhileshsharma5067
    @akhileshsharma5067 11 месяцев назад +5

    Hello Piotr @roboflow, thank you for the video. I have trained my model on 3 different classes.Would it be possible to have the line zone annotator display the count of each class separately rather than the sum of detections of all classes? Can you please help with this?

  • @MrCantyousea
    @MrCantyousea 2 года назад +12

    Always best contexts with very clear explanations... You are perfect bro !

    • @SkalskiP
      @SkalskiP 2 года назад

      haha! cv bro!

  • @cristianespana4253
    @cristianespana4253 10 месяцев назад +5

    Hola tengo el error en la parte del código : tracks = byte_tracker.update( output_results=detections2boxes(detections=detections), img_info=frame.shape, img_size=frame.shape ) ;sale este error: AttributeError: module 'numpy' has no attribute 'float' ;pueden ayudar porfavor

    • @manuelnavarrete4509
      @manuelnavarrete4509 10 месяцев назад

      Tengo el mismo error, pudiste solucionarlo?

    • @cristianespana4253
      @cristianespana4253 10 месяцев назад

      @@manuelnavarrete4509 si ..antes de ejecutar el código agrega esta línea : !pip install -U numpy==1.23.5 ;después te pedirá reiniciar la sesión ,vuelves a ejecutar el código ya sin volver a instalar el numpy y listo

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

      np.float has been deprecated. One way to fix is to modify it to np.float64. Make changes in the files yolox/tracker/matching.py and bytetracker.py in the same directory.

  • @kozaTG
    @kozaTG 10 месяцев назад +1

    nice and simple explanation. i am a beginner and i am trying to start with something simpler like object detection and counting i a picture how would i go about this?

    • @Roboflow
      @Roboflow  10 месяцев назад

      I think this video will be much more useful for you: ruclips.net/video/l_kf9CfZ_8M/видео.html

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

    You deserve more subscribers and likes ! Cool guy and straightforward 💛

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

      I hope we will get 50k subs this year! 🤞🏻

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

      @@Roboflow Guys show your love for this dedicated Gentleman by subscribing and liking his content.

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

    Thank you so much.. I have Zero experience on this matter but following each of your instruction and I did finish my project with my own video.. Super!

    • @charles.3896
      @charles.3896 11 месяцев назад

      Did you do it locally?

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

    thank you for the video,
    however i ran into error when running the code for bytetrack regarding 'loguro' and no matter what i cant solve it

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

      Did you used latest version of our notebook? colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-track-and-count-vehicles-with-yolov8-and-supervison.ipynb

  • @Jordufi
    @Jordufi Год назад +3

    I really need help for one thing.
    How can you show the specific number of cars and trucks that have gone in and out.
    For example:
    3 cars and 1 truck in and
    5 cars and 1 truck out

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

      We don't have a dedicated feature yet, but you can build a workaround solution. Create two separate line counters. Filter detections by class, to get car and truck detections and trigger one line counter with car detections and the other with truck detections.

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

      @@Roboflow I will try that, thank you very much!!!

  • @neeraj.kumar.1
    @neeraj.kumar.1 2 года назад +3

    Bro I'm getting problem whenever I'm installation supervision in g-drive
    Please let me know how to solve this problem

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

    from 7:49, the notebook from the link in the description doesn't have those lines, so where can I copy them to paste? Thank you!

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

      I just checked. The line definition is there.

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

      @@Roboflow I'm sorry but I don't understand! Could you please reply me with the link?

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

    Is there any easy way to count objects on pre predicted images? And print results in termina. I have a problem with find solution in internet.

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

    Bro you deserve OSKAR .

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

    Fantastic tutorial, playing around with plenty of the options here, thanks for the upload.

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

      Hi it is Peter from the video 👋Thanks a lot! Let us know what other feature could be useful ;)

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

    Thank you for the amazing video! Is it possible to invoke yolo8 on every 4th frame (for example), instead of every single frame? And have some kind of other system follow the object in the other 3 frames (to save on resources).

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

      Not to my knowledge. You skip the frame completely or not. All of those trackers depend on boxes being generated by the model. That being said you can try to pass detections to tracker every 4th frame. It all depends on input video but could still work.

  • @Factopia4-7
    @Factopia4-7 2 месяца назад +1

    24:23 Attribute Error :Str object has no attribute model😢

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

      Did you used latest version of our notebook? colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-track-and-count-vehicles-with-yolov8-and-supervison.ipynb

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

    hi. can i make a box instead of line, referencing on 17:40? so i want to count an object if that object staying in that box for milliseconds

  • @leonyap27
    @leonyap27 5 месяцев назад +1

    @Roboflow may I know why I can't download or play the video? manage to full the code without error sv version 0.18.0

    • @Roboflow
      @Roboflow  5 месяцев назад

      Hi you mean you can’t download video form Colab? Could you be a bit more specific?

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

    thank you, nicley done, I was wondering if we use the segmentation model, how can we annotate the segments with supervision ?

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

      Great question. We have support for segmentation on our road map, but it will take us a bit more time to put it on production.

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

    TY for your great work on supervision library. I have modified your line counting algorithm. During counting people from indoor cctv camera, lines stay short to meet counting conditions. Firstly, I tried center dot instead of corners of bb, but it become unstable, especially when a person pass from door, because center of rectangle become unstable while object slowly disappear. Finally, I draw a square at center of object. It fits my case and generate stable countings.

  • @ibal6875
    @ibal6875 2 года назад +3

    How about showing an example of how we can measure dimensions of objects ? Probably needs to use a reference object of known dimensions ?

    • @SkalskiP
      @SkalskiP 2 года назад

      Hi! This is Piotr from the video. This is something that is on my mind for a long time. And yes, having some reference object at least to calibrate measurements would be mandatory.

  • @a1mae
    @a1mae 3 месяца назад

    our project is to detect and count the object on the captured photo. can we follow this tutorial? or is there other more applicable tutorial we can follow

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

    Hey there, thanks for the amazing YOLO 8 videos, I run the code for object detection and it was work fine. then I tried to run for instance segmentation. all steps are fine but in the final step when I run the code for Inference with Custom Model, code run without any issue but this message did not appear: Results saved to runs/segment/predict2. do you know what is the problem?

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

      Could you create issue here: github.com/roboflow/notebooks/issues ?

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

      @@Roboflow Hi I found the error , in the code should write : save=true but you forgot it I guess . Thanks

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

      @@lofihavensongs thanks a lot! Let me try to update that

  • @OmarHisham1
    @OmarHisham1 2 года назад +19

    Fun Fact: Tqdm is an arabic word pronounced "Ta-qa-dom", which means progress

    • @SkalskiP
      @SkalskiP 2 года назад +1

      Hi it's Peter from the video! Wow! I didn't know that. Now you made me look and here is what I found: tqdm derives from the Arabic word taqaddum (تقدّم) which can mean “progress,” and is an abbreviation for “I love you so much” in Spanish (te quiero demasiado).

    • @OmarHisham1
      @OmarHisham1 2 года назад

      @@SkalskiP didn't know about the Spanish abbreviation,
      Nice informative tutorial btw

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

      This is, in fact, fun. Thank you.

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

      Difficult to install though no module ultralytics🙄

  • @leenaltwayan4004
    @leenaltwayan4004 Год назад +5

    Great video! However I tried implementing it with more than one counter (one for each lane) but it seems that LineCounter is a global variable shared across all other lanes. is there a way to overcome this?
    Thank you!

  • @HarishVishnuK
    @HarishVishnuK 9 месяцев назад

    In 16:44 sec U have pasted a code where i will get it ?

  • @matteocarlone6503
    @matteocarlone6503 2 года назад +4

    Could you please do a tutorial about using yolo v8 real time on a webcam, even the pc webcam

    • @Roboflow
      @Roboflow  2 года назад

      Hi! Could you please add that idea here: github.com/roboflow/notebooks/discussions/categories/video-ideas?

    • @neeraj.kumar.1
      @neeraj.kumar.1 2 года назад +3

      YOLOv8 detection + tracking + counting on webcam?

    • @SkalskiP
      @SkalskiP 2 года назад

      @@neeraj.kumar.1 hi I'll think about it. Next video comming soon :)

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

    How do we count for each class

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

    Thank you so much for the video. what's the difference between this notebook and using "yolo track model=path/to/best.pt tracker="bytetrack.yaml"" ?

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

      Hi! That video was actually recorded before YOLOv8 team added tracking capability. But in short, you can use ByteTrack with any object detection model, and if you will use Ultralytics implementation then you are bound to use only YOLOv8.

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

    Is there any other updated notebook because this one is also throwing some error ?

  • @AdarshSingh-rm6er
    @AdarshSingh-rm6er 8 месяцев назад

    I want to use supervision for face detection and tracking with Detectron2 model

  • @rafael.gildin
    @rafael.gildin Год назад +1

    Does the same code works for crowd videos ? I’ve been failing to do it.
    Thanks.

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

      It should. But I’d need to see specific result to understand what’s failing.

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

    Thankyou so much. The explanation was in-depth.

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

      My pleasure!

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

      @@Roboflow by adjusting some resolution and having perfect line counter position,your code is doing great in real-time. 👍

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

    What if i want to count objects of a specific class only? how can this be implemented? Let's say that we want to count only "car" class and not "truck" also? Can this be done?

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

      sure! you just need to filter detections before passing them through the line counter. You would need to add this line before triggering:
      detections = detections[detections.class_id == YOUR_CLASS]

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

      @@Roboflow well i get error: TypeError: 'Detections' object is not subscriptable
      Maybe if i use this filtering before the line counter??
      #class to filter
      mask = np.array([class_id in CLASS_ID for class_id in detections.class_id], dtype=bool)
      detections.filter(mask=mask, inplace=True)
      Let's say instead of CLASS_ID to use [1] so i can keep only class 1

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

    Just wow!
    Thank you for this great content.

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

    show_frame_in_notebook is not working in google colab so i am unable to see the frame

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

      Could you create issue here: github.com/roboflow/notebooks ? I will try to fix that as soon as possible.

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

    i have this problem ''AttributeError: type object 'Detections' has no attribute 'from_ultralytics'''

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

    How to write down the results of each counting on Excel?

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

    Thank you brothers, for your work!

  • @hossainalmahdi1248
    @hossainalmahdi1248 10 месяцев назад

    what to do if i want to show the vehicle counts based on their class. like car in: 1, bus in: 2, car out : 5, bus out: 6

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

    Thank you very much, really appreciate! I applied to my custom video, it does not count correctly. I saw in your video it also does not count correctly, how we can improve it?

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

    How do I get the specific time stamp for which the object was early detected in the video

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

      We don’t have time analysis support yet in supervision :/

  • @vcarvewood4545
    @vcarvewood4545 2 года назад +1

    Piotr jest super-duper ultra yolo guru :D

    • @SkalskiP
      @SkalskiP 2 года назад

      It's Peter from video. I'm not sure if I'm YOLO guru, but thanks a lot for this kind comment. I went through a bit of internet hate lately, so it is great to here some positive feedback.

  • @justin_richie
    @justin_richie 2 года назад +1

    Is there a way to get rid or the OUT or IN so its just on label on the video?

    • @Roboflow
      @Roboflow  2 года назад

      So only show counters?

    • @justin_richie
      @justin_richie 2 года назад +1

      @@Roboflow only to so "Out" or just counters

    • @Roboflow
      @Roboflow  2 года назад

      @@justin_richie it is not possible now but feel free to create feature request in supervision repo: github.com/roboflow/supervision/issues/new?assignees=&labels=enhancement&template=feature-request.yml

  • @danushkabandara
    @danushkabandara 2 года назад +2

    thanks for the video. I noticed that even with a clear view of all the vehicles, you still lose track of the truck and it gets a new id. Is there a way to limit the number of ids that the objects get so that this doesnt happen? for example you only have 4 possible labels during the video and the algorithm has to select the most likely label when tracking.

    • @SkalskiP
      @SkalskiP 2 года назад +1

      Is is possible to solve those issues. Or to at least make them less frequent. But potential solutions are usually strictly tied to use-case that you are trying to solve. In our case you can notice that those id changes are happening only when cars are still far away or when they are partially ocluded by this large metal object hanging over the left lane. Thats why I would propose to discard objects that are in top half of image and only take into account those that are in bottom half - closer.

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

    Thank you for the good video. How can I get detection to come out in Korean.

  • @Bhai-zf1xi
    @Bhai-zf1xi 9 месяцев назад

    Hiw can i get the count of in and out vehicles in one var only . I just want the whole count . Is it possible??

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

    What do I do if I only want to detect and track the trucks in the video

    • @Roboflow
      @Roboflow  Год назад +3

      Hi! 👋You would need to filter out detections by class_id. First, you need to check what is the class_id that represents the truck. I checked that and looks like it is 7. Now you can do something like that: detections = detections[detections.class_id == 7]. :)

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

    Thank you ,Could you please explain how to count objects detected in images?

  • @m.shokarim9617
    @m.shokarim9617 Год назад +2

    Thanks for the video, it has been quite useful! I want to export the Tracking data as a CSV file. Specifically, I want to run the MOT evaluation toolset in order to evaluate my own dataset. Thus, I was wondering how I could correctly export each objects detection, its bounding boxes, confidence and so on for each frame. Any help would be greatly appreciated :))

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

      We will actually release a new video this week. It will be about detections time analysts. But in this video we will show you how to save detections as csv. Stay tuned.

    • @m.shokarim9617
      @m.shokarim9617 Год назад

      Thank you very much) You guys are really being helpful with your videos.@@Roboflow

    • @m.shokarim9617
      @m.shokarim9617 Год назад

      Any news on the new video so far? I am really struggling to make sense of analyzing the ByteTrack on the MOT toolset. The codebase that ByteTrack provides is just so faulty and has zero guidance@@Roboflow

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

    how can i edit the in and out line (name/label), i want ti only detect in
    and how i adjust the script to immedietely ipdate the count when the object enter the scanning line and so it wonr't recount the object that already ?

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

    Thanks. Can you tell me which tracking algorithm works better - ByteTrack or DeepSort

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

      Hi it's Peter from the video. I like ByteTrack a lot more.

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

    Hi I have question in this case you don't use deepsort technique for tracking the cars do I?

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

      I use BytetTack. DeepSort is just another tracker that you can use.

  • @UltimatedKevin
    @UltimatedKevin 6 месяцев назад

    Hello!
    I have a question, how does the model interpret the "out" variable in the candy example? Can it make the difference between if the object is moving to the right or left? Because of how the bounding box is approaching the line?
    And thank you so much for creating this content!

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

    Brother, I watched your Object detection for a custom dataset video, it's awesome. I trained with my own dataset and it works like magic. Now, if I want to calculate the time , an object appears in a video, how can I do that? Then, is it possible to do the same for different objects and plot them as graph with Time in y-axis and the type of object in x-axis?

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

      Hi. Thanks a lot. We are actually thinking about making video like that. I hope we will be able to record it soon.

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

      @@Roboflow 😍 Thanks brother! Waiting for that video... ⏳

  • @RayVargas-be8tf
    @RayVargas-be8tf 10 месяцев назад

    Tengo problemas con numpy en la parte del tqdm, y ya cambie los np.float por float y aun asi el problema persiste

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

    What camera did you use to see the chocolates going?

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

      This is stock footage I downloaded from internet :)

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

    Is it possible do this on instance segmentation model?

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

    How can I count cars with two diagonal lines not horizontal lines?? please teach my how to do this

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

      You just need to create two lines and change coordinates of start and end :)

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

    How to check its performance because we always need accuracy, precision and other metrices to find the performance of the model ?, Do I need to annotate first then calculate the accuracy?

  • @chihebnouri5541
    @chihebnouri5541 10 месяцев назад

    i want to only count the vehicule entering not exiting.is it possible?i

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

    Help me please! I has a error in the next code.
    the problem is here:
    tracks = byte_tracker.update(
    output_results=detections2boxes(detections=detections),
    img_info=frame.shape,
    img_size=frame.shape
    )
    I dont know how i can fix it

  • @atomix_2402
    @atomix_2402 11 месяцев назад +1

    Hello Piotr @roboflow , I'm so very thankful for this insightful video i just wanted to know how do you consider the coordinates for the custom dataset like is there a method or just intiution

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

      Not really sure what you mean. Could you elaborate on your question?

    • @atomix_2402
      @atomix_2402 10 месяцев назад

      @@Roboflow What I meant is you draw out polygons for the polygon zone or line zone. How do you do that like the exact numbers in the numpy array.. You also showed a project for candy counting and tracking on conveyor belt. I couldnt find your video so i found similar in youtube made a dataset trained it but after that i couldn't make coordinates for the "line" based on which if the candy crosses the line its in and count increases.. So basically to sum it up How do one calculate the numpy array for the polygon zone?

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

    Suuperb... What if I want to detect and track the faulty chocolates in that video and mark the chocolate faulty until it leaves out the frame? Any thoughts on this?

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

      Do you have a model to detect those faults?

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

      ​@@Roboflow No, currently I have a model to detect potatoes on a conveyer belt. For detecting defects I'm thinking of using OpenCV to detect color deviations.
      My problem is since potatoes keep rotating on the conveyer belt, I want to track the defective potato even if it keeps rolling.

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

      Hey Peter!
      Any thoughts on this? And also, Just now saw your video on Grounding DINO it looks interesting. What are your thoughts on using it to detect rotten/spoiled potatoes as explained in earlier comments.

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

      @@snehitvaddi sorry I missed your comment. If you have images of rotten potatoes you can try if DINO detect it. Sounds like something that should work. Color range is doable as well, just pretty hard to get right color ranges I think :/

  • @ELAKKIYAE-o6w
    @ELAKKIYAE-o6w Год назад

    even i upload the zip file it shows no directory .what can i do?

  • @gunduvenkatasai3706
    @gunduvenkatasai3706 10 месяцев назад

    Can i draw multiple lines to count objects at multiple locations ?

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

    Great video! How do I customize the counter? For example, position it in the corner of the screen, count cars, trucks, and motorcycles with their own counters? Thank you!

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

    appreciate the elaborate explanation. Can we tag each of those objects with unique id? like car1, car2 ...etc

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

    Nice job ! love from china❤

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

      Hi, it is Peter from the video! Thanks a looot! Love from Poland.

  • @guillermovc
    @guillermovc 2 года назад +2

    Very Nice explanation bro, is there any possibility to colaborate in supervision development?

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

    I have one question: Since we are trying to count the objects and since the Object's id given by the tracker are unique, why can't we just count the last Id or count the different number of ids?

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

      How do you know how many of them traveled up and how many down?

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

    hello, can i use the supervision to count object on yolov5? i have an existing onnx model

  • @anadianBaconator
    @anadianBaconator 2 года назад +2

    fantastic!! Would really like to know if this will work for live rtsp url (multiple different camera's) in real-time

    • @Roboflow
      @Roboflow  2 года назад +1

      We would need to try out, but I think it will :)

    • @anadianBaconator
      @anadianBaconator 2 года назад +1

      @@Roboflow let us know if you guys try it out. Enjoying the videos

    • @Roboflow
      @Roboflow  2 года назад +1

      @@anadianBaconator maybe we will manage to include it in one of our upcoming videos

    • @anadianBaconator
      @anadianBaconator 2 года назад

      @@Roboflow really appreciate it

  • @shukkkursabzaliev1730
    @shukkkursabzaliev1730 2 года назад +2

    @SkalskiP As always amazing job! One problem I am facing inside *match_detections_with_tracks* function, when the object is not in frame and model return _emtpy list_ this line gives error *iou = box_iou_batch(tracks_boxes, detection_boxes)*
    How can I solve it?

    • @SkalskiP
      @SkalskiP 2 года назад +1

      Hi it's Peter from the video. I just fixed that problem. Could you try the tutorial once again?

  • @SkiLLFace360
    @SkiLLFace360 2 года назад +2

    I really enjoyed the last episodes, very well and comprehensibly explained! Thanks!
    Would it be possible to make a video about rotated object detection in YOLOv8? Would be very useful.

    • @SkalskiP
      @SkalskiP 2 года назад

      Hi, it is Peter from video! Thanks from kind words. It means a lot to me. Is YOLOv8 capable of rotated object detection?

    • @SkiLLFace360
      @SkiLLFace360 2 года назад

      @@SkalskiP Hm you are probably right, rotated detection doesn't exist yet.
      Thought I just overlooked it..
      Thanks for the answer!

    • @SkalskiP
      @SkalskiP 2 года назад +1

      @@SkiLLFace360 no worries it is kind of my job to know it ;)

  • @jordanlee2839
    @jordanlee2839 11 месяцев назад +1

    very helpful video, but my code kept on having error due to the line [ tracks = byte_tracker.update( ] saying "AttributeError: module 'numpy' has no attribute 'float'. " plus when I use the google colab link in the description, i ran the byetrack and it encounters the same error, eventhough i didnt change any code i left it be and it kept on having the same error, so is it an update issue? can you please try and run your code in google colab in the description you gave? Because its seriously not working when i didnt even change any code

    • @Roboflow
      @Roboflow  11 месяцев назад +1

      I recommend using this updated version of the notebook: colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-track-and-count-vehicles-with-yolov8-and-supervison.ipynb

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

      @Roboflow thx a lot, I'll be sure to try this tomorrow

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

      @@Roboflow is there a lot of difference in two methods ?

  • @777sukumar
    @777sukumar Год назад +1

    Thank you for the video. It's really helpful. Is there any way to detect time stamp in the video to capture at what time Vehicle crosses the count line. It will be a great help.

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

      Thanks a lot. Is that static file or stream?

    • @777sukumar
      @777sukumar Год назад

      @@Roboflow Thank you for your reply. Stream. Recorded footage of traffic with timestamp in it when it is recorded. It's similar to the Video used in your explanation.

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

    Hello how would I be able to print the values from the counter to a txt. file. I tried the following code but I am unable to obtain the count from the line_counter: with open("output.txt", "w") as file:
    # Print the variable into the file
    print(line_counter, file=file)

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

    For classification into car, bus, truck and motorcycle which one is used ByteTrack or Supervision?
    Additionally, is Bytetrack also used for counting along with tracking? Because supervision is used for annotations.

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

    How do I access the model to Roboflow??

  • @muhammadsaqib453
    @muhammadsaqib453 7 дней назад

    Very impressive and recommend video.

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

    Is the code just related to one or two test cases/videos? Is it possible to do it for any video in general?

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

      Oh! It should work for any video you want. I already seen so many projects build on top of that code demo. Let me know if that works for your case too!

  • @johnton96
    @johnton96 4 месяца назад

    super nice video, but probably an update would be amazing since a lot has changed in the repository, right?

  • @MaríaRobertaDevesa
    @MaríaRobertaDevesa Год назад

    hi! thanks ! its v useful. Can it be applied on cellphones ? like an android or IOS app?

  • @신호진-o5l
    @신호진-o5l 9 месяцев назад

    i tried to use other video with your code but the for loop stops at 6% of the frame. it doesnt return error and it even runs next code properly. So what can be the problem?

    • @신호진-o5l
      @신호진-o5l 9 месяцев назад

      SOURCE_VIDEO_PATH = "/content/highway.mp4"
      video_info = VideoInfo.from_video_path(SOURCE_VIDEO_PATH)
      byte_tracker = BYTETracker(BYTETrackerArgs())
      TARGET_VIDEO_PATH = f"{HOME}/result.mp4"
      generator = get_video_frames_generator(SOURCE_VIDEO_PATH, end=video_info.total_frames)
      box_annotator = BoundingBoxAnnotator(thickness=4)
      counts = []
      ids = []
      i = 0
      print(video_info)
      with VideoSink(TARGET_VIDEO_PATH, video_info) as sink:
      for frame in tqdm(generator, total=video_info.total_frames):
      print(frame)
      i += 1
      results = model(frame)[0]
      detections = Detections(
      xyxy=results.boxes.xyxy.cpu().numpy(),
      confidence=results.boxes.conf.cpu().numpy(),
      class_id=results.boxes.cls.cpu().numpy().astype(int)
      )
      tracks = byte_tracker.update(
      output_results=detections2boxes(detections=detections),
      img_info=frame.shape,
      img_size=frame.shape
      )
      tracker_id = match_detections_with_tracks(detections=detections, tracks=tracks)
      detections.tracker_id = np.array(tracker_id)
      labels = [
      f"#{tracker_id}"
      for x
      in detections
      ]
      frame = box_annotator.annotate(scene=frame, detections=detections)
      for x in tracker_id:
      if not x in ids:
      ids.append(x)
      counts.append(len(ids))
      sink.write_frame(frame)
      print(i)

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

    Hi I have a question what happen if in this case I would like to put a line in vertical way in the middel of the image how can I solve this problem because in your video you don't show how to obtain these values that you put for trace the line for counting

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

      You just need to know your frame dimensions and experiment a bit to find the right fit.

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

      thanks a lot this comment help me a lot @@Roboflow

  • @yemibidemi-o5t
    @yemibidemi-o5t Год назад +1

    Thank you for this video, it's very explanatory. However, the supervision library has been updated, so these codes don't work anymore. I tried to get all those supervision utils from the documentation with little success after a couple of hours. Could you please , make a video dedicated to supervision library alone and where to find those functions and classes and what each one is used for. That will be very helpful. Thank you once again.

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

      Take a look here: github.com/roboflow/notebooks/pull/190 it is a PR that updates our vehicle counting notebook to supervision 0.13.0.

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

    I have been working with ByteTrack for a bit now, but I have struggled on evaluating its tracking performance do you know if it is possible to check tracking performance of the individual objects using something live MOT metrics?

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

      Yes, it is possible but you would need to have annotated data.

  • @RamuCharpota-l4c
    @RamuCharpota-l4c Год назад

    Thank you. This is nice. I have a requirement to create vehicle detection model with good accuracy. Is it possible to create for me and work for this

  • @Rishi-raj.-
    @Rishi-raj.- Год назад

    bro can i do it with my realtime webcam? if yes, help me

  • @gunduvenkatasai3706
    @gunduvenkatasai3706 10 месяцев назад

    How can i draw multiple lines to count ?

  • @g.s.3389
    @g.s.3389 2 года назад +2

    which version of Python3 did you use?

    • @Roboflow
      @Roboflow  2 года назад

      Google Colab is currently at Python 3.8.10

  • @Enrique-u4l
    @Enrique-u4l Год назад

    Could you help with what each of the ByteTrackerArgs are for? I mean track_thresh, track_buffer and so on

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

    Is there any change that I can make to detect the speed of the vehicles. I used two lines, and took a random value for the distance between those two lines. Now the problem is I am not able to understand how to use 'time' library to extract the time for the vehicles going up the lane and down the lane between the two lines. Can please anyone help me with that?

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

    I don't understand how you added numbers to the labels before class name.
    now i see:
    tracker_id = match_detections_with_tracks(detections=detections, tracks=tracks)
    labels = [
    f"#{tracker_id} {CLASS_NAMES_DICT[class_id]} {confidence:0.2f}"
    for _, confidence, class_id, tracker_id
    in detections
    ]

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

      Hi! 👋Could you elaborate on the question? Which part is not clear?

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

    I am interested in running this algorithm in pycharm and with the YOLO model that I built and trained myself and not run the algorithm from a notebook.
    Is it possible to get a customized py file?

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

    Hi, does the tracking work if the object changes class as time goes? For example for the football field dataset if my labels were "player static" and "player running" would the tracking be able to follow the same player as it changes states? Thank you!

  • @xxvimmi8793
    @xxvimmi8793 6 месяцев назад

    Can i deploy it to Jenso Nano?