Yolov8 object detection + deep sort object tracking | Computer vision tutorial

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Code: github.com/com...
    Yolov8: github.com/ult...
    Deep sort: github.com/nwo...
    #computervision #computervisiontutorial #computervisionengineer #yolov8 #deepsort #objectdetection #objecttracking

КОМЕНТАРІ • 229

  • @ComputerVisionEngineer
    @ComputerVisionEngineer  Рік тому +4

    Did you enjoy this video? Try my premium courses! 😃🙌😊
    ● Hands-On Computer Vision in the Cloud: Building an AWS-based Real Time Number Plate Recognition System bit.ly/3RXrE1Y
    ● End-To-End Computer Vision: Build and Deploy a Video Summarization API bit.ly/3tyQX0M
    ● Computer Vision on Edge: Real Time Number Plate Recognition on an Edge Device bit.ly/4dYodA7
    ● Machine Learning Entrepreneur: How to start your entrepreneurial journey as a freelancer and content creator bit.ly/4bFLeaC
    Learn to create AI-based prototypes in the Computer Vision School! www.computervision.school 😃🚀🎓

    • @Empower-d4m
      @Empower-d4m Рік тому

      I WANT TO IMPLEMENT POSE ESTIMATION AND OCSORT

    • @user-rl5vc2cd1l
      @user-rl5vc2cd1l 8 місяців тому

      hello sir pls reply me my questions

    • @user-fj9uq2wk2e
      @user-fj9uq2wk2e 5 місяців тому

      Can't we predict the person intent recognition, using Yolov+DeepSORT

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

    This channel became my best source thank you!!

  • @Hod_ranadeep
    @Hod_ranadeep Рік тому +5

    After :- tracker.update(frame,detections)
    TypeError: tuple indices must be integers or slices, not tuple
    this error always show up, how can correct it.

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

      Anyone resolve this?

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

    Thank you so much for the tutorial. I want to use pytorch as my engine instead of tensorflow. How do i make these changes? i would really appreciate your guidance please!

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

    i can't install requirements.txt
    my python version is 3.10, what should i do next;((

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

    Followed all the steps exactly and still got errors. I also cant seem to install some of the versions of the dependencies on python 3.7. The system says that the version you stated in this video is not compatible with python 3.7

  • @PunyisaLeelaniramol
    @PunyisaLeelaniramol 29 днів тому

    I got an error: "AttributeError: module 'tensorflow' has no attribute 'Session' " when I ran "tracker = Tracker()". How can I resolve this? Thankyou.

  • @mehdicharife2335
    @mehdicharife2335 Рік тому +4

    Does this only work for tracking people?

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

    Well done sir, it was a really great video!

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

    Excellent tutorial. One question, is it possible to embed this code in the YOLOv8 architecture with a .yaml archive?

  • @mz203
    @mz203 10 місяців тому +3

    Great video, thanks! But when installing dependencies, I ran into the following issue: ModuleNotFoundError: No module named 'sklearn.utils.linear_assignment_'. During the skikit-learn installation I got the following error: ERROR: Could not find a version that satisfies the requirement scikit-learn==0.21.0. Any idea?

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

      I am getting the same error. Did you solve it?

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

      these errors are typically a problem of python version. try downgrading you version to something like 3.10 or maybe 3.11 and that should work.

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

    Hey there, I appreciate the high-quality content you create-it's been a tremendous help. I know your usual topics vary, but I'd love a deep dive into YOLOV8 and its customization for specific purposes. Specifically, I'm curious about training YOLOV8 on an image and a label, rather than the standard bounding box output. I understand the common practice is to feed YOLOV8's output into another model, but what I'm really after is direct control over the output layer-maybe having YOLOV8 generate coordinates or values instead of the usual bounding box.
    In my case, having an accurate bounding box matters, but my images aren't razor-sharp. I already have the images and correct answers, but I want YOLO or the model to learn which reference points are crucial for minimizing loss. Any suggestions? While I can stick with using YOLO as an intermediate step and employ linear regression or a neural network for final training, I'm curious if there's a more direct or efficient method. Would love to hear your thoughts.

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

      Hey, not sure if I understand, what do you mean with 'training yolov8 on an image and a label'? Do you mean image classification?

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

      @ComputerVisionEngineer I want to run linear regression based on an image input. For example, if I have a person pointing at some location on a map, I want the model to produce the x and y locations of what he is pointing at. If I use pose detection, I can get the point from Yolo and then run linear regression. What I want to do is just feed in an image and tell it that the correct answer is some x and y coordination. For now, I am manually going through the photos and labeling the key points.
      On a side note, if I made a key point in CVAT that WASN'T visible so it would be (1 x, y), would I then be able to make yolo do the linear regression for the images I provided? This might not work based on how Yolo handles non visible points, but with enough training, it might produce proper results.

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

      @@stevegreen5638 oh you want to detect the point the person is pointing at, I think pose detection + regression is a good strategy. Why are you annotating the landmarks? You can detect hand landmarks using mediapipe.

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

      @ComputerVisionEngineer Thanks, you saved me a bunch of time annotating! I am new to this space, so this is the first time I've heard of mediapipe.

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

      @@ComputerVisionEngineer why you dont give id to each person i need to give id to person in my project whole video complete but no id assgin i am stuck help!!!!!!!!!!!!!!!!!!!!!

  • @HectorTaylor-l1p
    @HectorTaylor-l1p Рік тому

    Hey Felipe, just wanted to say that I've been following your work for some time now and your content has been very valuable for me and my colleagues. I hope you know how appreciated you are by your community.

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

      😃 Hey Hector, it makes me so happy to know that my content has helped you and your colleagues. 😊🙌 Thank you for your kind words! 💪

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

    If i wanted to add a counter to sum up all unique objects identified , where and how do i do that

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

    Hi Sir,
    I am I have used different Object detection (Yolo v3 to v8) and different tracking algorithm (Deepsort, ByteTrack, NorFair, StrongSort and MOTPY). But nothing is working well on CCTV footage for Superstore due to occlusion and change in side of object (front face human and back face human). Can you please advise anything?

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

      Hey, dealing with occlusions is always challenging. You may want to search for papers with custom techniques for your use case in something like Google Scholar. 🙌

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

    thanks for your sharing, but where can i download model_data

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

    Sorry - I don't understand one thing: Why clone the deep_sort rep? Why not pip install?

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

      We are cloning a fork from deep sort, I made a small edit to make it compatible with the tensorflow version I am using in the tutorial.

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

    How can I disable the print on my console of model(frame) ? I don't want to see the results:
    "Speed:xx preprocess, xxxx etc..."
    Is there an argument to disable that?
    Thank you!

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

    the best tutorial. thanks

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

      Hey! Do you not have this error:
      TypeError: tuple indices must be integers or slices, not tuple

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

    Great video. Can I tag people with unique ids as well?

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

    Amazing ........I was able to follow the video and execute the code...It took me weeks to learn this......didn't think deep sort will be able to run on CPU....Great work....!!! Planning to make a use case out of this....

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

      😃 Cool!!! Let me know how it goes! 🙌💪

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

      hey can you help me on this i got problem where it says No module named 'sklearn.utils.linear_assignment_'

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

      @@sharmaattri did you ever figure out how to fix it and if so can you tell me how?

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

      @@talhaosmancelik8911 yes

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

    I got an encoding error when trying to use the tracker:
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 73: invalid start byte
    is there any way i can fix it?

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

    thanks a lot. the idea of the video is great, however the code needs to be updated. especially when you use scikit-learn==0.21.0 since the latest version of this library is 1.4.0. I have tried to make the code compatible, but the tuple error and some consequent error happend. so the idea of code update would be great.

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

      Thank you for the heads up! I will try to update the code soon. 🙌

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

    What hardware and software do I need to start? Please, I am new to this, so detailed answer would be appreciated

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

      Hey, do you mean what hardware and software do you need to start in computer vision? You can start with only a laptop as hardware; and Python, OpenCV and Pycharm as software. 😃💪

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

      @@ComputerVisionEngineer got thanks, what about to execute an entry from the keyboard?

  • @vikashkumar-cr7ee
    @vikashkumar-cr7ee Рік тому +1

    Dear Tutor,
    Greetings! I am facing compatibility issues with the Python version while instating the requirements.txt file. Can you confirm the Python version again for this tutorial ?

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

    Hi, amazing tutorial. I just want to check if it's possible to use Yolo detection once and then the tracker for the rest of the frames rather than continuously detecting objects inside while loop, because using detecting objects for every frame would add to more processing time and would make it slower for real-time applications. Thank you again.

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

      Hi, in order to track objects you need to detect them first, the input to the object tracking are the detections. 🙌

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

      yes but not many new objects appear in every next frame, maybe every second is enough for detecting ? how would we relate the detections to the trackers in this way >?@@ComputerVisionEngineer

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

    Hi Felipe can you pls mention the chance that you made in the original deepsort repo to make it comparable with tensorflow 2 ? Thank you

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

      Sure. This is the change github.com/computervisioneng/deep_sort/commit/4af564af6c33d6539ae628f5e5e819d21235a9ea 🙌

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

    hello thank you for the tutorial I had a problem that I call track I have this self._read_buf = _pywrap_file_io.BufferedInputStream(
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 84: invalid start byte
    thanks for the help

  • @user-rl5vc2cd1l
    @user-rl5vc2cd1l 8 місяців тому

    hello sir , watched your video its really fantastic i just want to know how to operate a relay upon any particular detection.......

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

    Great project!, How to change the tracking window period?

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

    Brother i am using python 3.9 and i cant go below numpy 1.24.1
    Is there any way to avoid numpy module dint have atribute int problem(this error ocurs when i call the tracker.update(frame,detections)

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

    Great tutorial, Felipe, thanks
    when showing the frames, the fps is too slow, approximately 2-3 fps. can you explain why is that and what we can do to improve the fps? i tiried using the GPU but this help just a little bit (5-6 fps)

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

      Hey, deep sort + yolo is taking you around 2-3 fps? are you detecting too many objects per frame?

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

      @@ComputerVisionEngineer I suspect the problem related to deep sort because if I comment the tracking part, the detection works in real time. I am using your video for the detection and tracking, so I am detecting/tracking all the people in the frame.

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

      @@yacinerouizi844 oh I see, that is probably it! There were many people on that video!

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

      @@ComputerVisionEngineer ah ok I see, thank you for your help :)

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

      @@yacinerouizi844 you are also plotting the rectangles for all the detections, try to turn the drawing off to see what happens. Also, try with a video with only one object, to test if the number of objects is the reason of a low execution time.

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

    Can II track some other objects say pomegranate using same method?

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

    Can I do it with a video live? like recorded in real time by my camera

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

    Hi, I installed all the installations from the requirements file, however, I get this error: AttributeError: module 'tensorflow' has no attribute 'Session'. How do I fix this? Thank you

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

      Hey, make sure you are cloning my fork of deep sort, as it says in the Readme of this project repository. 🙌

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

      @@ComputerVisionEngineer Thank you so much, I have another issue. I am running the code on a virtual environment (conda)(windows 11) I installed all the requirements, I am using pycharm. However, I get this error: KeyError: "The name 'images:0' refers to a Tensor which does not exist. How to solve this issue?

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

      ​@@mqondisifortunemavuso3980
      I got the same issue... did you get a fix for that? It is a huge help for me😅

  • @AhmedSayed-ib7by
    @AhmedSayed-ib7by 5 місяців тому

    why track id didn't work and you skip it ?

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

    How can I fix this error, ModuleNotFoundError: No module named 'sklearn.utils.linear_assignment_' I install all requirements.

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

    I am trying to find the speed of these people, how do I get the x1,y1,x2,y2 for the selected object's previous bounding box? If I get the list of trackid and bbox before updating tracks then those will be the tracks from previous frame right?

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

      You would have to use an auxiliary variable to save the detections of a frame and then use it while processing the next frame. I would use a dictionary, something like previous_detections = {0: [x1, y1, x2, y2], 1: [x1, y1, x2, y2]... } with 0, 1, etc. your track ids. Then you update this dictionary at the end of every iteration with the detections of that given frame. 🙌

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

    Hi there, is this work for YOLOv7?

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

    Hi, Is it possible to perform detection only for every nth frame rather than every frame? your help would be appreciated, I can't find any example where this is done

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

      You can use simple counter variable to keep count of every frame and run the detection code only if the counter variable is divisible by 'n' value.

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

    Hey please help me what I was supposed to do was recognise human and then track only him no other person should be tracked around the video even if his face is hidden he should be tracked can u give me the code

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

    good video for tutorials

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

    Great tutorial Felipe. However I have a question, when I try to print the track_id of each detected person it skips number so for example the first person detected has a track_id of 1 but the second is 16 and the third is 33, can you help me with this problem?

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

      Hey Angela, Is the tracking working well? I mean, the person detected as 1 (for example) through the video is always the same person?

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

      @@ComputerVisionEngineer yes and once the person is assigned an id it does not change but it's all about this gap in the numbers

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

      @@ComputerVisionEngineer but different persons are assigned different ids

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

      I am not sure what could be causing the gap in the numbers, but you can solve it easily by keeping track of all the numbers that are detected and mapping those values to other values you choose.

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

      @@ComputerVisionEngineer can you tell me how can i map the values to the values i want?

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

    Is it possible to calculate the distance between the boundary(person) ?

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

      Computing the distance between the different people may be a challenging task in this video, given the perspective of the camera.

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

    thanks a lot for your great video. I wanted to run it by myself, but I could not find "model_data" to download. you told that it would be in description, however it is not there! how can we find that?

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

    Can u tell how to get video from drone feed rather thn a saved video in pc

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

    hello.. I managed to run everything almost to the end.. problem that when doing the detectionhave a problem with linear_assignment...
    where do I put the network and detection folders that you made available on the drive? Can you help me?
    thank you for sharing your knowledge with us!

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

      Did u figure it out? I also got the same

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

    Thanks for your interesting tutorial. I would be glad if you give me a clue about confidence score. When confidence score is printed as output for all specific frames, it is identical for all detected objects in the video. Is it computed for all the detected objects? I expected to have difference values per each detected objects.

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

      Hey, when using an object detector you will have a different value of confidence score for every detected object. 🙌

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

      Yes but it is not the case for the written code. I extracted the scores from tracker. It is the same value for all the detected object in each frame. I may have missed a point!@@ComputerVisionEngineer

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

      If printing the confidence score from line 33 main.py you also get the same value?

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

      That is correctly working. The question is about the tracker. I would like to show confidence score and the associated estimated class for the detected object. I would be thankful if you let me know how to do that. I am trying to reach it by means of defining a dictionary for each object but I am not sure deepsort encoder supports it or not.@@ComputerVisionEngineer

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

    how do you use tensorflow and pytorch in one environment???
    yolo is impelmented with torch and deep sort implemented with tensorflow

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

      Hi, you can install both packages in the same environment, no problem. There may be an issue with gpu usage if both packages tensorflow and pytorch use the same gpu, though. 🙌

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

    very helpful tutorials! Do you have any tutorial on Yolov8-pose model for fall detection ?

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

      Hey, thank you! I have a tutorial on yolov8 pose detection, but it is not about detecting falls. 🙌

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

    Realy great tutorials Felipe! Will you be able to make tutorial on how to train Paddel OCR? the online data for that is realy animatic and confusing. Thank!!!

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

      Thank you! I will try to make a tutorial on how to train Paddel ocr. 🙌💪

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

    Hi felipe! Is it possible to display the class id along with the track id in the frame?

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

      yes, you just need to add cv2.putText() function.

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

    Good tutorial Felipe, I was able to follow it using python 3.9

  • @user-no4ff6mq1r
    @user-no4ff6mq1r Рік тому

    thank you for you video! do ou know how to use GPU with YOLOV8? and TensorRT? Thank you in advance

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

    how long did it take to infer?

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

      Hey, I would need to run it again to give you a super accurate answer, I may have time to do it in the following weeks. But if I don't, from what I remember the process wasn't real time but the execution time was ~ok. I hope it helps!

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

    Why in tensorflow and not in pytorch? I truly hate tensorflow.

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

    If I want to track vehicle, what should I do to train the DeepSORT feature extraction model

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

    can i train the model to detect only persons? and can i implement pose estimation models like mediapipe pose with this? i want to do real time fall detection

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

      Yes bro you can also detect only the person. You can use both yolov8 model and mediapipe Library for pose estimation

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

    if i want to detect vechile plate in this code so how would I use custom weights to modify this pretrained weight to also detect number plate?

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

      When loading the yolov8 model, you would need to specify the location of your custom model. 🙌

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

    is it possible to draw the lines of the people's path?

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

      Sure, it is possible! Try to do it by plotting a small circle on the center of the bounding boxes. 💪🙌

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

      @@ComputerVisionEngineer do you know how to do that? I honestly have no clue sry

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

    Hi, I tried to implement the code but I faced the problem: ModuleNotFoundError: No module named 'sklearn.utils.linear_assignment_'
    How can I solve it?
    Thank you for ur tutorial!

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

    hello sir i hope ur good can u upload the hole project with file so i can test it cuz im facing issues and I don't any idea about it

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

    thank you verry helpful, do you have any video that talk about deep sort details?

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

      Hey, thank you! I don't have any video that goes into the details of deep sort. It may be a good idea for a future video! 🙌

  • @romain.h
    @romain.h Рік тому

    Hello sir! Thank for the tutorial it was very clear and helpful. However when I try to play a video with no custom object at the beginnig of the video, there is an error in the code. In the fonction "update" from "Tracker" I have this message: "bboxes[:, 2:] = bboxes[:, 2:] - bboxes[:, 0:2], IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed". But I don't understand since there is nothing to detect.
    Do you know where is the problem? Thank you in advance

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

      Hey, if no objects were detected bboxes may be empty. Maybe you could try with an if around that instruction so it is executed only if bboxes has the proper shape. Let me know how it goes! 💪💪

    • @romain.h
      @romain.h Рік тому

      @@ComputerVisionEngineer Thank you very much for your quick answer ! I tried with an if around that instruction and yes it seems to work😁Thank you again !
      I am sorry but I have an other question. If I well understand "mars-small128.pb" is a model which better work to track people right? So do you know how can we train a model like that but with custom objects?

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

    Really grateful for your video🎉. I am running into some small package error can you mentioned want python version your using pls ?

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

    hello sire, when i installed the requirements it said the sklearn version 0.21.0 is unavailable. which version should i use instead?

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

    Hello. Awesome tutorial. Where can I download the mars-small128.pb file you meantioned?

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

      Hey, thank you! There is a link in the github repository. 🙌

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

      @@ComputerVisionEngineer Hello, I tried to replay a couple of time but seem my reply keeps getting deleted. Could you tell me which github repository. it seems I have o generate the mars-small128.pb from deepsort github

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

    Hey I'm not able to install the specific version of scikit-learn can you please help me out ??

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

    Hey can I get back the className after the tracker. update() so that I recognize which id belongs to which object if anyone help I will be grateful

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

    thank you for greate and interesting explanation sir! in the video you mentioned that you are going to put the model_data folders link in the description but i couldnt find it could you please share it?

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

      Take a look at the readme file of this project's github repository, everything is there! 🙌

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

    Hey, Thank you for tutorial. Is it possible based on this code to add detected class names to output? Like - "id1:Car".

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

      Hey, yes it is definitely possible to draw the detected class name next to the bounding box. 💪💪

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

      @@ComputerVisionEngineer I am looking for it since 2 week, here to modify to get the result. A reply will be very helpful

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

    how to add class into this ?

  • @4107sino
    @4107sino Рік тому

    Thank you sir!This is the best yolov8 vedio i had ever see!Just clearly to show us how to build yolov8 byu our onw! well, i meet a problem wich is confuse me many days, it's about the "main" file, It says"in line 68, in tracker.update(frame, detections)" AND "line 25, in update bboxes[:, 2:] = bboxes[:, 2:] - bboxes[:, 0:2] ValueError: operands could not be broadcast together with shapes (37,3) (37,2)" . I really don't know what's going on,i had check my code many times, even i copy your code and try to run it , i had follow the video to setup setting step by step, So i really hope you can give me some advice, thank you so much!(by the way my python is 3.10.11)

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

      Hey, you are getting this error at executing the code exactly as it is in the github repository? The line numbers you provide don't match with the code in the repo.

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

      even I got same error
      @@ComputerVisionEngineer

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

    What is Env and coco_classes file

  • @romain.h
    @romain.h Рік тому

    Hello sir! Thank you again for the video, it was very helpful but I have a question. For now I can track all the object but I would like to track only the moving object. I don't really know how I can do that, do you have any suggestion? Do you think if I creat a list and update it at the end of every iteration with the detection and use if [x(t), y(t)] != [x(t-1), y(t-1)] then no bounding boxes, could work? Thank you in advance

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

      Yeah something like that would work, you would need to define exactly what is a 'moving object' and then remove all the detections that don't match that criteria. 🙌

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

    How to label individual objects with the corresponding class labels ? i want to also labels the individual tracked objects with the corresponding class names , is that possible ?

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

      Hey, not sure if I understand, in what way you wish to label the individual objects?

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

      @@ComputerVisionEngineer i mean the actual id' the tracking id's you identified unique to those bounding boxes being tracked by the deepsort , but what about the class_labels that were detected in the yolov8 , the correct class "person, bicycle" and get that class correctly, i tried myself and was unsuccessfull, i'm sure now i might have made myself clearn , or else please don't hesitate to ask furher explanation

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

      @@ComputerVisionEngineer I want to know the bounding box class_label correctly apart from the track_id, that you predicted in your tutorial, i am trying to print it using opencv putText upon every bounding box . But i am failing

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

    Nice tutorial, i am making prj fldetection wildlife dangerous.Do you have any database for this😢?

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

      Thank you! I am glad you enjoyed it! I don't have any database for that. 🙌

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

    Thank you

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

    Thank you for this great video sir, God bless you. I am having issues in running the code as it is taking too long to run to run on my PyCharm. What can i do?

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

      Hey, try with a video with fewer objects, the one we use in the tutorial there are many people who are tracked through the frames and that makes the process slower. Also, you could try to execute it in a GPU, for example using a Google Colab. 🙌

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

      @@ComputerVisionEngineer thank you so much sir

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

    I have cloned the repository of deep_sort but it always shows the message 'ModuleNotFoundError: No module named 'deep_sort''

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

    Can we estimated speed of objects movement based on tracking?

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

      It depends, if you have a stable detection with no occlusions and the object is moving through a 2D plane, then yes. In any other case, I guess the estimation would not be very reliable.

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

    hi,can you do a video on object tracking using spiking neural network

  • @user-zs4qd6hm4i
    @user-zs4qd6hm4i 10 місяців тому

    Thanks for great video. Can i extract the ID of each people from Deep Sort

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

    I can't install python=3.7, and with other versions of python this code won't run

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

      Hey, this code would run in different version of Python, sure. it is hard to say why you are having challenges to install Python 3.7.

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

    I Want to count the number of detections on my custom trained model can I do that

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

    Thank you sir very much for amazing vedio❣️

  • @Jack-bn5cl
    @Jack-bn5cl Рік тому

    i want to learn more from you im college studentand my dream is computer vision engineer and interested in xr i want to be like you how can study frist i want to follow what you studied and how you studied

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

      😃 Computer vision is such an amazing field! I invite you to take a look at other of my videos about a computer vision roadmap: ua-cam.com/video/DfPAvepK5Ws/v-deo.html 💪🙌

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

    can you please do similar video for deepfake detection...please

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

    please help
    I am getting this error:
    __init__() missing 1 required positional argument: 'metric'

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

      My tracker.update (frame, detection) only takes two input. And frames isn’t part of it. I cloned the same git repo you added in the video description.

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

      model_data/mars-small128.pb where can i get this.

  • @vishwamgupta-n6k
    @vishwamgupta-n6k 11 місяців тому

    How long does it on CPU to get train.

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

      This video is about object detection and tracking, we are not training a model.

    • @vishwamgupta-n6k
      @vishwamgupta-n6k 11 місяців тому

      @@ComputerVisionEngineer yes I mean deepsort is taking time to be displayed as final output.

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

    Hello Sir, I really like the project. but can you please make the same video with how to make the same thing without using the "Grapper file " so we can understand what is actually happening and apply the things we learn to other projects we make also. as at the end of the day its about what we learn from the project so that we can apply in our own projects. if not its exact like copying.

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

      Hey, yeah sure I will consider it for future tutorials. The idea of using a wrapper for deep sort was just to make all the tracking process more straightforward and the main script much cleaner, but we can just do everything from scratch in future tutorials! 😃🙌

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

      @@ComputerVisionEngineer Thankyou. This way will we learn how to clean it ourself and will help us a lot more in future

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

    Hey! Great tutorial! Experiencing this error:
    tracker = Tracker()
    TypeError: __init__() missing 1 required positional argument: 'metric'
    Do you have any advice on how to fix this? Thanks!

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

      Hey, take a look at the imports, it seems it is taking deep_sort.deep_sort.tracker.Tracker instead of tracker.Tracker (the custom class we defined in tracker.py). Are you executing the same code as in the github repository? Are you using Pycharm (or some IDE) or just executing the script from your command line?

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

      @@ComputerVisionEngineer i got the same error

  • @neeraj.kumar.1
    @neeraj.kumar.1 Рік тому

    Sir pls share your linkedin profile so that we can get connect there.

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

      Sure, I will update the information in the about section shortly and I will add a few social networks, LinkedIn may be one of them! 😃🙌

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

    This seems like a cool project to make 🙂

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

      It is! I really enjoyed it! 😃💪

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

      @@ComputerVisionEngineer quick question , it has to be the same version of scikit-learn that are specified in the requirements.txt for it to work?

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

      It may work with a different version of scikit-learn. May I ask why would you use a different version?

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

      @@ComputerVisionEngineer I was trying to install the version of the requirements.txt but it trow me an error so I installed another one , seems to be working just fine 🙂 , btw keep the good videos coming 🤝🏽

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

      😄🙌

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

    if col not in indices(:,1):
    error in deepsort/linear_assignment.py file

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

      What Python version are you using? Are you working on a virtual environment? Do you have more information About the error?

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

      @@ComputerVisionEngineer using conda environment. First of all I get error in deepsort/linear_assignment.py that uses depreciated version from sklesrn.utils…. import linear_assignment which i could fix by importing from scipy.optimize import linear_assignment.
      Then when I run the main.py I got the following error in the line if col not in indices(:,1):
      The error is tuple indices must be integer or slices not tuple. I managed to fix this line but I get same error in the following lines of code
      The python version that I am using is 3.10.9

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

      Did you install the requirements from requirements.txt?

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

      @@ComputerVisionEngineer i tried to install from requirement.txt but was unable to install tensorflow and sklearn
      Maybe that was the problem? I will try downgrading python version and try to install requirement.txt package.

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

      @@nabinsharma7377 try with Python 3.7

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

    Hello

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

    Bad!

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

    Hello, I've tried following along with the tutorial, up until I ran the code and got this error. Any idea what the error is? I also followed the directories same in the video, but still got this error. A quick reply would be awesome! Thanks, have a great day :)
    tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: model_data/mars-small128.pb : The system cannot find the path specified.
    ; No such process

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

      So I edit the code from Tracker.py and specified the detailed path. This time I got this error. Is there any solution to this? I also used the same video sample that used in the tutorial.
      bboxes[:, 2:] = bboxes[:, 2:] - bboxes[:, 0:2]
      ~~~~~~^^^^^^^
      ValueError: could not broadcast input array from shape (37,2) into shape (37,1)

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

      Hi, if you are using the same video and same code as I am using I am not sure what could be going on. Have you tried with other videos?

  • @carloseduardohernandezinzu357

    Does anyone get the error: from deep_sort.deep_sort.tracker import Tracker as DeepSortTracker
    ModuleNotFoundError: No module named 'deep_sort.deep_sort'?

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

      Hello, I'm glad to have just solved the problem. You might want to double-check where your data is exactly located. Here are the modifications I made for your reference:
      from deep_sort.tracker import Tracker as DeepSortTracker
      from tools import generate_detections as gdet
      from deep_sort import nn_matching
      from deep_sort.detection import Detection

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

    Hi Bro, We are Industrial Vision Solutions Provider from Indonesia. We deliver many projects of Vision System to our customers. So, I am looking for a Computer Vision Engineer right now. I wish I can get your contact & discuss it. Need your Feedback ASAP!

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

      NB : A computer vision engineer as a freelancer

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

      Hey Kaspul, thank you so much for reaching out to me! 😀 Unfortunately, I am currently super busy with this UA-cam channel and other freelance clients, I won't be able to help you in your projects. I am grateful for your interest and hope to keep in touch in the future! 💪🙌