Vehicle tracking / Traffic monitoring yolov5+deepsort

Sdílet
Vložit
  • čas přidán 20. 01. 2022
  • Full 34 minutes of Tracking traffic using yolov5 + deepsort
    Video: • Road traffic video for...
    My repo: github.com/duongcongnha/Vehic...
  • Věda a technologie

Komentáře • 61

  • @thaitranvenn
    @thaitranvenn Před 2 lety

    Việt Nam cần người như anh ❤️

  • @Kishi1969
    @Kishi1969 Před 2 lety

    Great Job and Educatative

  • @ossamahasni7739
    @ossamahasni7739 Před 2 lety

    Hey brother. great work. I just wanted to ask you how did you seperate the used zone and the unused zone for your detection; and is it possible to specifiy a crop in the middle for example, and that crop is only where the object detection model works.

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      I set up these lines manually

    • @ossamahasni7739
      @ossamahasni7739 Před 2 lety

      @@congnhaduong9047 can you please provide me with the code for that setting. thank you very much

    • @khaledsamir2667
      @khaledsamir2667 Před 2 lety

      هل اشتغل معاك يا اسامه

  • @rakeshkumarrout2629
    @rakeshkumarrout2629 Před 2 lety

    Great work.. I hope you upload the entire production system.. How to implement all of these things.

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety +1

      Its just a POC I do for learning CV. I've done a better version for commercial with my team but I cant share or upload it.

  • @haihuoctv4651
    @haihuoctv4651 Před rokem

    Hi Công , cho mình hỏi kết quả bạn chạỵ trên GPU hay CPU vậy ? đạt FPS là bao nhiêu?

  • @tracesofthesunjingab
    @tracesofthesunjingab Před 2 lety

    Hello, is there a wy to add new type of vehicle for example jeepney, motorcycle, suv and such?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      its depends on your object detection model. In this case i used pretrained model of yolov5 which only has some popular types of vehicles. You can train a new model yourself on a vehicles dataset for more types

  • @bernardcollin340
    @bernardcollin340 Před 2 lety

    Ty man. I have a question, if you can replly im glad. Do you know how i can show (in the video) the numbers of cars in each lane ?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      its not so hard. Just add some lines of code that specify left/right cars at the database part. See how the data looks like after being uploaded to database at my github link in the description.
      Btw, it's my homework excersise so i haven't refractor the code yet, so it''ll be a little bit hard to read and understand the code but basically the main file is the detect.py in yolov5 repo with some modifications

    • @umarmuhammadi429
      @umarmuhammadi429 Před 2 lety

      Hey bro
      Were you able to get the number of cars in a lane?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      @@umarmuhammadi429 its easy man. I've mentioned that in the comment above

    • @umarmuhammadi429
      @umarmuhammadi429 Před 2 lety

      @@congnhaduong9047 okay

  • @Inspiration_video23
    @Inspiration_video23 Před rokem

    i am getting this error: kindly help for the same
    from utils.datasets import exif_transpose, letterbox
    ModuleNotFoundError: No module named 'utils.datasets'

    • @congnhaduong9047
      @congnhaduong9047  Před rokem

      Sorry but its been a long time so i can not remember exactly what i was doing at that time. You can refer to this repo github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet

  • @khaledsamir2667
    @khaledsamir2667 Před 2 lety

    thxn pro for this amazing video ,but i error line 1207 ,in __getattr__ raise attributeError (" ' {} ' object has no attribute ' {} ' ".format(

  • @muhammadmtx7097
    @muhammadmtx7097 Před 2 lety

    HAI
    how do i change source video to webcam or rstp url?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      U can try 0 for webcam or 'rtsp://exp.com/video.mp4' for RTSP, stream.
      Actually I don't remember whether I set it up to work with other sources. I have a better version that I built for work that can works with all video sources but I can't share it with you right now. You can refer to this free repo of
      mikel github.com/mikel-brostrom/Yolov5_DeepSort_OSNet and edit the track.py file to your needs

  • @diegoalbertogodoy4748
    @diegoalbertogodoy4748 Před 2 lety

    Nice Example. Where we can change tha numbers of
    lanes, zones and directión?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      Its a demo so i jus hardcoded params and haven't setup a config file for those things

    • @diegodoy80
      @diegodoy80 Před 2 lety

      @@congnhaduong9047 thanks for you answer. Where you hardcoded? In detect.py?

    • @diegoalbertogodoy4748
      @diegoalbertogodoy4748 Před 2 lety

      @@diegodoy80 I answer to myself /home/movilidad/Vehicle-tracking-main/application/main/infrastructure/helper/zone_drawer_helper.py

    • @diegoalbertogodoy4748
      @diegoalbertogodoy4748 Před 2 lety

      Thanks you!

  • @anghominhhuy1235
    @anghominhhuy1235 Před 2 lety

    Pro quá idol ơi

  • @syedabdulsalam4659
    @syedabdulsalam4659 Před 2 lety

    How many FPS you got for this and on which GPU?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety +1

      I coded on my old laptop so fps was just enough for testing. Running inference on this video on colab.

    • @syedabdulsalam4659
      @syedabdulsalam4659 Před 2 lety

      @@congnhaduong9047 Thank you!

  • @diegodonoso5694
    @diegodonoso5694 Před 2 lety +1

    how to train my own dataset classes ?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      Train your yolov5 model
      github.com/ultralytics/yolov5/wiki/Train-Custom-Data

    • @diegodonoso5694
      @diegodonoso5694 Před 2 lety

      @@congnhaduong9047 thanks bro, i already made my own dataset. I have trained 300 images, 3 classes > Person, Hat, Shirt < but it there are 2 person it counts Person1 Hat2 Shirt3 and Person4 Hat5 Shirt6... How can i start the count of each class from zero n start counting while they appear?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      @@diegodonoso5694 I'm afraid you have to edit a lot. you can get ideas from my handlers/track.py file and do the same thing

  • @twoscholars
    @twoscholars Před rokem

    python track.py --yolo_model yolov5/runs/train/exp2/weights/best.pt --img 2048 --source outStitch345678.avi --save-vid
    I am using the above command to save the tracked video using deepsort but it is not able to save the video . Can you tell me what's missing from the above line

  • @nhatnamnguyen3549
    @nhatnamnguyen3549 Před 2 lety +1

    hay quá anh ơi thật tuyệt vời

  • @umarmuhammadi429
    @umarmuhammadi429 Před 2 lety

    Nice video
    How can I display total number of objects in a frame?
    I have a task which include congestion measurement
    Let's say a system that alert when there's more than 10 people

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      Thats easy bro, just look around the detection part of yolo or the database part in detect.py

    • @umarmuhammadi429
      @umarmuhammadi429 Před 2 lety

      @@congnhaduong9047 thank you very much bro

    • @umarmuhammadi429
      @umarmuhammadi429 Před 2 lety

      @@congnhaduong9047 i have checked but i have no idea what to add

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety

      @@umarmuhammadi429
      len(output) at line 224
      github.com/duongcongnha/Vehicle-tracking/blob/main/application/main/infrastructure/handlers/track.py

  • @readbhagwatgeeta3810
    @readbhagwatgeeta3810 Před rokem

    Hey! Bro can you please help me to make this project? What should be my first step ?

    • @congnhaduong9047
      @congnhaduong9047  Před rokem

      just clone my repo on github and follow the instructions

    • @readbhagwatgeeta3810
      @readbhagwatgeeta3810 Před rokem

      @@congnhaduong9047 Yeah thanks for that but I am doing this for my project, so I have to write a paper on that. So, if I will just clone it and use it then will not add any value for my paper. I have to explain maximum of this things. So, any suggestion for that. And please if possible tell me what are the things I have to learn for that ?

    • @congnhaduong9047
      @congnhaduong9047  Před rokem +1

      @@readbhagwatgeeta3810 yolov5 is based on yolov4 and u can find lots of papers that explains it. DeepSORT is an enhanced version of SORT, StrongSORT is latest. You can google the original paper of DeepSORT, some blogs have explained it as well

    • @readbhagwatgeeta3810
      @readbhagwatgeeta3810 Před rokem

      @@congnhaduong9047 It have started reading papers on that. So it means after understanding all the papers, then what should I do ? Then I can clone hour git hub directly ? Because I need to show my code to the supervisors, so I can't do cloning ? So, in that case how to approach coding problem ?

    • @congnhaduong9047
      @congnhaduong9047  Před rokem +1

      @@readbhagwatgeeta3810 u can clone my repo which has yolov5 and deepsort in it and then combine them by yourself. To start, u can first read and understand the process flow of yolov5 in file detect.py of yolov5 repo. Then u add the part of deepsort to it. You can refer how i did it by looking at file app_track.py. But because this is a mini non- commercial project i did for my class, i haven't refractored the code yet so the code is "messy" a little bit.

  • @MinhQuang-gf5fi
    @MinhQuang-gf5fi Před 2 lety

    đỉnh quá anh ơi iu anh

  • @tranvanthoa7747
    @tranvanthoa7747 Před 2 lety

    Em đang gặp vấn đề tương tự trong video là cùng 1 xe nhưng lúc đối tượng là car lúc đối tượng là truck, không biết có cách nào xử lý vấn đề này không anh?

    • @congnhaduong9047
      @congnhaduong9047  Před 2 lety +1

      a nghĩ là e có thể đếm số frame xuất hiện của car và truck trong lifetime của nó cnao nhiều hơn thì lấy
      E muốn sửa nhiều hơn thì clone cái này về r tự sửa lại file detect.py
      github.com/mikel-brostrom/Yolov5_DeepSort_OSNet
      chứ repo của a làm cho có nộp bài nên chưa refractor j hết đọc hơi rối

    • @tranvanthoa7747
      @tranvanthoa7747 Před 2 lety

      @@congnhaduong9047 dạ em cảm ơn anh, để em thử lại xem sao

  • @phamminhchinh2795
    @phamminhchinh2795 Před 2 lety

    hay zaaaaaaaaaaaaaa

  • @nhatnamnguyen3549
    @nhatnamnguyen3549 Před 2 lety

  • @thanhhuycao7719
    @thanhhuycao7719 Před 2 lety

    anh ơi làm về nhận diện và phát hiên nữ idol JAV đi ạ?

  • @votrunghieu0106
    @votrunghieu0106 Před 2 lety

    idol cho e xin chữ ký đi