Yolov8 object tracking 100% native | Object detection with Python | Computer vision tutorial

Поділитися
Вставка
  • Опубліковано 20 сер 2023
  • Code: github.com/computervisioneng/...
    🌍 Community 👥
    Join our Discord server: / discord
    Support me on Patreon: / computervisionengineer
    #python #computervision #yolov8 #objectdetection #objecttracking

КОМЕНТАРІ • 127

  • @ComputerVisionEngineer
    @ComputerVisionEngineer  9 місяців тому +2

    Dive into a world of exclusive computer vision content on my Patreon: www.patreon.com/ComputerVisionEngineer

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

      Is there a better library with lots of objects like in the thousands or tens of thousands, and it will also recursively tell you the features within objects. I want to use this to build an immersion environment for learning Chinese, I want to use it on live streams of people playing video games, and movies.

  • @sluggy6074
    @sluggy6074 9 місяців тому +11

    Ive never heard someone narrarate like this but it actually makes it way easier for to retain information. The exaggerations on the important things help it stick. Some tutorials people are monotone and talk so much about unrelated things that its hard to know whats critical and whats not cause its just peppered inbetween a bunch of droning. I can listen to this guy at work and know whats key by his tone of voice and dont have to dedicate myself to following a video down to the T cause i dont know what tiny detail will cause the whole thing to not work.

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

      Agreed. Exaggerations are a very useful teaching resource. Glad you enjoyed it! 😃🙌

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

      Borat style

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

      Nobody f$&@S with the Jesus

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

    Your tutorials are go great. I was able to complete my first computer vision project because of you. Thank you!

  • @davidvc4560
    @davidvc4560 8 місяців тому +6

    Just want to say that your tutorial and the files provided are very helpful and convenient. Big thanks to you!

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

    This is exactly what I needed!!! First test that perfectly worked with my own custom model and dataset. Thank you for the brilliant work!

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

    This long project in such less duration and that too so easy to follow and engaging at the same time. Hats off! 💯

  • @KirillFrolov77
    @KirillFrolov77 Місяць тому

    Very useful, I was able to repeat the steps and it worked just fine!

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

    Please help!
    I have multiple classes of object detection model, but I don't know how to use the detection results to control an arduino board. I've stuck with it for a week.

  • @CodeX-hv1sf
    @CodeX-hv1sf 5 місяців тому

    Ahhh after mindless searching finally this is the code been looking for ❤

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

    Simple and Excellent tutorial. Thanks.

  • @SedaSch
    @SedaSch Місяць тому

    Thank you for the amazing video!

  • @lanreuzamere4994
    @lanreuzamere4994 9 місяців тому +2

    I see you have now started showing how you created the project in PyCharm as I asked for; You are really a Blessing and Heaven-sent!!! GOD Bless you richly!

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

    Hi, I collected data with video to use in my project. Can I use this video to train my model or do I need to train the model using only photos? If I can use it, how should I label the data in this video? I would appreciate it very much if you could help me on this issue.

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

    how do I export a file that contain information of detected polygon coordinates and the frame index at which they are detected?

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

    You are insane!!! 💯 Amazing explanation 👉👈

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

    Hi. After giving persist=True, till how many frames or how long does it persist

  • @atheeral3
    @atheeral3 22 дні тому

    How can I find a ready-made template so I can count the number of people for my project?

  • @Chalce-dony
    @Chalce-dony 5 місяців тому

    Is it possible to detect a single particular object on the screen by selecting that particular bounding box (or creating a bounding box around the object using mouse)? And then it can track only that particular selected object. I am trying to create a model for single object tracking using drone. Please let me know if anyone has any idea?

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

    Great work as always, mate! Saving this to watch later!
    Quick question-can you track the coordinates of the bounding boxes?

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

      yes. You can then use the center of the rectangle to draw a line between frames to show trajectory.

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

      Thank you! 😃Tracking the coordinates do you mean drawing a trajectory as @AlainPilon said?

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

      @@ComputerVisionEngineer That was exactly my question :) Thank you both!

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

    Im a beginner. your explanation is superb😍

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

    Hi! How we can use it to track the keypoints of objects? Is it possible?

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

    Some time track I'd is changed for same object. Any solution?

  • @WangYichuan-wb9he
    @WangYichuan-wb9he 2 місяці тому

    Well done and easy to learn

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

    does it work with occlusion for long range tracking ?

  • @Zafarkhan-jg3lr
    @Zafarkhan-jg3lr 9 місяців тому

    Really like your style and explanation. Kindly upload full detailed videos. Thank you

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

      Thank you! Glad you enjoyed it! 😃 I will make full detailed videos! 💪

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

    your video is good, i ran it working fine for first frame, but for next frame it exits and kernel dies out. Can someone pls help me

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

    Hi!! i love your videos they are very very helpful!!!! - quick question: this method outperform traditional tracking (SORT -DEEPSORT)? Thank you! greetings from Chile!

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

      Thank you for your support! No, I don't think it outperforms other object tracking methods.

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

    thanks alot, my job is going somewhere now.

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

    Thank you for your video, its better if you show which properties in "result" variable covers tracking parameters like ID, Class, Box.

  • @abireltouaiti3771
    @abireltouaiti3771 Місяць тому

    Hi! Your videos are really helpful, so thank you so much
    i have a quesion how can i detect, track and count at the same time

  • @-Gangsterr-bl3bs
    @-Gangsterr-bl3bs 2 місяці тому

    please i need the repo of deep sort that is compatible with the last version of python

  • @1hpxalphaop741
    @1hpxalphaop741 2 місяці тому

    hey felipe, i wanted to ask whether python 3.12 is required for yolov8 ? because i am getting error by using python 3.8

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

    This is like getting a programming lesson from Frenchy from The Boys. I love it.
    Also.. super helpful... and fml, had python 3.12 and couldn't get yolo to install because pytorch won't run on anything higher than 3.11 at time of me writing this.

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

      Frenchy from The Boys 😂😂
      Cool, thank you for your contribution regarding the Python version! 🙌

  • @ri.n8807
    @ri.n8807 7 місяців тому

    Thanks for the Brilliant video! Do you know of any ways that the plotting time could be sped up so as it calculates the video at near to real time?

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

      🤔 Using a gpu would speed up the inference. About speeding up the drawing, perhaps using c++ instead of Python. You could also do the object detection + tracking on 1 every 5 frames, and interpolate the bounding boxes for the other frames. 🙌

    • @ri.n8807
      @ri.n8807 7 місяців тому

      @@ComputerVisionEngineer Thanks so much. Your really the best AI coding channel on UA-cam.

  • @user-xi3ly9bz6s
    @user-xi3ly9bz6s 9 місяців тому

    Thank you so much for your guides!
    Would be nice if you show how after this steps get exact objects, fe only persons or only dogs, also take coords of objects :)

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

      You are welcome! Sure! I will keep it in mind in future videos! 😃🙌

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

    hey, great work as always, Quick question: I am using this method to track skin lesions on my face, I wonder if I am able to get the exact coordinates of these tracked points? :D

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

      Hey, do you mean the exact coordinates of the bounding box you are tracking through the video?

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

      @@ComputerVisionEngineer yess, exactly ;D

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

    Beautiful, excellent, intelligent, extraordinary ❤❤❤

  • @d4663r
    @d4663r Місяць тому

    great video

  • @charlotepencier818
    @charlotepencier818 Місяць тому

    If I want to track only the person class, then what is the default variable name for predictions? like class_id or pred?

    • @hennessy8796
      @hennessy8796 Місяць тому

      results = model.track(frame, persist=True, classes=0)

  • @mnm__studios
    @mnm__studios 5 місяців тому +1

    How can I create the model to just detect the humans and not other things?

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

      Take a look at the ultralytics documentation, you can specify what are the classes you want to detect.

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

    Thank you for this amazing guide. I'd to ask, please how do you set ultralytics on Vscode? I usually run into an error when I use pip install ultralytics

    • @ComputerVisionEngineer
      @ComputerVisionEngineer  5 місяців тому +1

      You are welcome! Not sure if I would be able to guide you on how to install it in vscode, I use pycharm. 🙌

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

      @@ComputerVisionEngineer I used pycharm and it ran, but I'm getting no output

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

    Thank you for share knowledge. It's very useful. It simple but powerful code.

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

    thank you for the tutorial🙏 i have a question, is it faster to use yolov8 native object tracking or deepsort?

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

    Thanks for tutorial. it is great, but I keep getting "source is missing" error

  • @Diego-lz5ki
    @Diego-lz5ki 7 місяців тому

    Hola buenas, ya que supongo que hablas en español te hablo en español jaja, una consulta, si en ves de un video tengo todos los frames de ese video, que debería cambiar en relación al código del video? Saludos desde Chile.

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

      Hola, si tienes todos los frames guardados en un directorio por ejemplo?
      for image_path in os.listdir(frames_dir):
      frame = cv2.imread(os.path.join(frames_dir, image_path))
      ....

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

    hi sir , in parking space detection video , how can i numbering the parking spots like that 1 2 3 next to each parking spot.
    thank you for works

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

      Hey, you can write the numbers with cv2.putText, and should be able to get the id for each parking spot from the 'connected_components' object. Take a look at the line 31 from util.py file. 🙌

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

    Hi, how is this version different from the video which you used deep sort?

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

      Hi, in this video we are using yolov8 only to do both detection and tracking. In my previous video on object detection + tracking using deep sort we used an external library (deep sort). 🙌

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

    AttributeError: 'YOLO' object has no attribute 'track'. Did you mean: 'task'?

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

    How can I contact you for private consultation?

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

    did you detect and track in only One sentence, That's amazing, i don't know how did you do that.

  • @Noname-tm6sy
    @Noname-tm6sy 7 місяців тому

    Cool👍👍👍👍👍👍

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

    this is cool

  • @ditya.aditya16
    @ditya.aditya16 9 місяців тому

    Nice video sir ❤

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

    I might have missed: where can I download the video? I would like to follow your exact foot steps

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

      I have added a link to the video in the readme file of this tutorial's github repository. 🙌

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

    Is there any tutorial to track and show bounding box of a object with specific ID?

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

      Person Identification and re-identification is still a research area. there are many research papers regarding, but no much resourceful implementation

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

      If you have any resource, lemme know too

  • @user-ox6ie8pi4x
    @user-ox6ie8pi4x 9 місяців тому

    You are a World referent in IA, thanks

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

    i wanna dedect car make model car how i can do

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

    Just wanted to know If I want to detect only a person from this video, how can we this?

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

      Do you mean if you only want to detect the class 'person'? You can specify what are the categories you want to detect when making inferences. 🙌

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

    in ultralytics package i can already use my cuda gpu? not cpu?

    • @ComputerVisionEngineer
      @ComputerVisionEngineer  2 місяці тому +1

      yes, you can use your gpu

    • @Cam022
      @Cam022 2 місяці тому +1

      you may have to uninstall the preinstalled torch version and update it using a torch update compatible with your system + CUDA version

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

    Thank you very much , i try to test object tracking but error , i found ans from your vedio

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

    Why don't you use "SORT" algortithm for tracking as in other videos?

    • @ComputerVisionEngineer
      @ComputerVisionEngineer  6 місяців тому +1

      No reason. It is always healthy to get familiar with different technologies in order to solve a problem. Yolov8 built in object tracking is very easy to use and a very interesting tool in order to do object tracking. 🙌

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

    100000000000000000 likes excellent explanation

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

      Thank you so much for your support!! 😊 So glad you enjoyed it! 💪

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

    i want to make a software of face attendance for my company with professionell GUI can u do project like this

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

    how to save the data that you display to one whole video ?

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

      Do you mean how to save a video to disk with the bounding boxes on top instead of showing the frames one at the time? Tale a look at this script github.com/computervisioneng/train-yolov8-custom-dataset-step-by-step-guide/blob/master/local_env/predict_video.py 🙌

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

    Do it with counting how many objects cross a line in the frame

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

    Great tutorial. For some reason its not compiling for me. I think im making a mistake with the path. New to python and not a great programmer lol

    • @ComputerVisionEngineer
      @ComputerVisionEngineer  6 місяців тому +1

      Thank you! Maybe someone in our community can help you. Try asking in our discord.

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

      @@ComputerVisionEngineer i figured it out on my own now lol

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

    i like ur accent hhhh understandable more then native one

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

      Thank you! Every new video I try to sound a little more understandable, I also upload subtitles just in case. 😃🙌

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

    I want to build a system of robots by connecting wheels to my phone/tablets, and they will then take pictures of everything in the house and tell me where things are... I wish the robot can charge itself haha.

  • @blackycode5555
    @blackycode5555 Місяць тому

    chilean?

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

    short video, less explanation, lot of abstractions (what is this what is that?). Not recommended for beginners. Go find another youtube tutorial.

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

    Muh se Supari nikal kr baat kr ray baba ....

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

    Hey Felipe when I tried to run your code, I got an error at results = model.track(persists=True). The issue was lap >= 0.4 not found and the update was skipped. Do you have any idea how to fix this error?

  • @vasilisvasileiou8406
    @vasilisvasileiou8406 16 днів тому

    Good Morning, I try to use the same code but instead of 10 frames I use the whole video,
    The code runs ok for multiple of video frames and after some time I get this particular error:
    Traceback (most recent call last):
    File "c:\Users\user\Desktop\detect1\main.py", line 38, in
    track_ids = cont_tracker.update(np.asarray(detections_)) # contains boudning boxes and tracking related information
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\user\Desktop\detect1\sort\sort.py", line 232, in update
    matched, unmatched_dets, unmatched_trks = associate_detections_to_trackers(dets,trks, self.iou_threshold)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\user\Desktop\detect1\sort\sort.py", line 163, in associate_detections_to_trackers
    iou_matrix = iou_batch(detections, trackers)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\user\Desktop\detect1\sort\sort.py", line 55, in iou_batch
    yy1 = np.maximum(bb_test[..., 1], bb_gt[..., 1])
    ~~~~~~~^^^^^^^^
    IndexError: index 1 is out of bounds for axis 1 with size 1
    I would be grateful if you could help me resolve this