Vehicle tracking / Traffic monitoring yolov5+deepsort

Поделиться
HTML-код
  • Опубликовано: 20 янв 2022
  • Full 34 minutes of Tracking traffic using yolov5 + deepsort
    Video: • Road traffic video for...
    My repo: github.com/duongcongnha/Vehic...
  • НаукаНаука

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

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

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

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

    Great Job and Educatative

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

    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?

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

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

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

    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  2 года назад

      I set up these lines manually

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

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

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

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

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

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

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

      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 2 года назад

    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  2 года назад

      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 2 года назад

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

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

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

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

      @@congnhaduong9047 okay

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

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

    • @congnhaduong9047
      @congnhaduong9047  2 года назад +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.

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

    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  Год назад

      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

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

    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

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

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

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

      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

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

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

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

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

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

      @@congnhaduong9047 Thank you!

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

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

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

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

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

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

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

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

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

      Thanks you!

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

    Pro quá idol ơi

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

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

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

      just clone my repo on github and follow the instructions

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

      @@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  Год назад +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 Год назад

      @@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  Год назад +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.

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

    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  2 года назад

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

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

      @@congnhaduong9047 thank you very much bro

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

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

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

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

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

    how to train my own dataset classes ?

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

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

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

      @@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  2 года назад

      @@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

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

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

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

    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  2 года назад +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 2 года назад

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

  • @MinhQuang-gf5fi
    @MinhQuang-gf5fi 2 года назад

    đỉnh quá anh ơi iu anh

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

      Nhận xét từ GS (Quang) giấu tên đầu ngành

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

    hay zaaaaaaaaaaaaaa

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

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

    idol cho e xin chữ ký đi

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

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