Tracking & Count using Yolov5 DeepSort

preview_player
Показать описание
#TrackandCount , #detectionObj,#Yolov5, #DeepSort
For newbie
Рекомендации по теме
Комментарии
Автор

Great. Glad to find this video. It really works.Thank you very much.

hieusnake
Автор

em chào anh, khi em chạy code thì khung hiển thị video của em bị to quá màn hình và chỉ hiển thị được 1 phần của video và phần còn lại bị khuất, cho em hỏi là chỉnh kích thước khung hình video hiển thị thì như thế nào ạ

tuanbaothan
Автор

AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
I have this error while trying this code, anyone fixed this error?

sonhoang
Автор

anh làm yolov7 với deep sort được không ạ?

TrungNguyen-tmfd
Автор

I'm getting this error when I'm trying to run track.py. Can Anyone help me to find out what the problem is?

$ python track.py
Traceback (most recent call last):
File "H:\vc\yolov5\Yolov5_DeepSort_Pytorch\track.py", line 2, in <module>
from yolov5.utils.general import (LOGGER, check_img_size, non_max_suppression, scale_coords,
File "H:\vc\yolov5\Yolov5_DeepSort_Pytorch\yolov5\utils\general.py", line 35, in <module>
from utils.downloads import gsutil_getsize
ModuleNotFoundError: No module named 'utils.downloads'

PialEbnyHabib
Автор

I have custom trained model, I am bit confused with adding deepsort to custom trained yolov5. Can you please help me understand how is it to be done? and i want to run this deepsort on google colab since my laptop is of low configuration.

vishwaskshirsagar
Автор

hello sir, I wrote some code in plots
when I run track
the result is not I want
I use pytorch env
please help me

davidlin
Автор

Hello sir great video and thank you so much. Can you help me how can I add in the database the name of the object every detection? Hope you reply and thanks in advance.

jeffreysiaton
Автор

Can you advise what is the version of yolov5 you used for this video?

yeongnamtan
Автор

Hi, great tutorial. I`m trying to set up in my own dataset but my system is returning the follow error:

Traceback (most recent call last):
File "/blue/nsboyd/re.herrigfurlane/Teste/Yolov5_DeepSort_Pytorch/track.py", line 283, in <module>
detect(opt)
File "/blue/nsboyd/re.herrigfurlane/Teste/Yolov5_DeepSort_Pytorch/track.py", line 74, in detect
model = DetectMultiBackend(yolo_model, device=device, dnn=opt.dnn)
File "/blue/nsboyd/re.herrigfurlane/Teste/Yolov5_DeepSort_Pytorch/yolov5/models/common.py", line 309, in __init__
model = attempt_load(weights if isinstance(weights, list) else w, map_location=device)
File "./yolov5/models/experimental.py", line 96, in attempt_load
ckpt = torch.load(attempt_download(w), map_location=map_location) # load
File "/home/re.herrigfurlane/.local/lib/python3.9/site-packages/torch/serialization.py", line 789, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/re.herrigfurlane/.local/lib/python3.9/site-packages/torch/serialization.py", line 1131, in _load
result = unpickler.load()
File "/home/re.herrigfurlane/.local/lib/python3.9/site-packages/torch/serialization.py", line 1124, in find_class
return super().find_class(mod_name, name)
AttributeError: Can't get attribute 'DetectionModel' on <module 'models.yolo' from './yolov5/models/yolo.py'>

Could you help me?
Thanks

renatoherrig
Автор

Ty man. I have a question, if you can replly im glad. Do you know how i can counting diferent classes like this?

bernardcollin
Автор

Excuse me, how can I set display size about .mp4 file testing data?

frongtube
Автор

Hi @AIforLife! I trained custom object. The program counts the objects passing virtual line. But detection is not accurate due to sunlight. For this reason I am going to draw ROI. But I dont know how to count objects passsing the area. Another problem is when 2 objects crossing the line parallelly it detecting it as 1 object. How can I fix these problems? Help me please

zy.r.
Автор

Hi, I appreciate your work. I did same way in colab. But I couldn't get same result. There was no line and count number. How can I solve this problem? Thanks.

eunk
Автор

Anh ơi cho em hỏi làm thế nào để vẽ trajection of object hay là lưu lại vị trí cũng từng centroid của từng đối tượng vào 1 file csv với ạ. Em cảm ơn anh.

ngochuynh
Автор

i need to track.py the picture by my picture it error please help me

ชลกิตติ์ไชยธนชล
Автор

Hi sir. Thanks for the video, it has been really helpful. I have a question: is it possible to train the yolo network on a custom dataset? Thanks in advance

maurizioloschiavo
Автор

AI4LIFE, excuse me, I also wanted to specify how should I modify the code to get the coordinates of bbox on video ? Thanks in advance!

Черныйрусский-ьб
Автор

I'm getting this error when i'm trying to run track.py . Can you help me to find what is the problem?


D:\Vehicle UserWarning: Cython evaluation (very fast so highly recommended) is unavailable, now use python evaluation.
warnings.warn(
Successfully loaded imagenet pretrained weights from
Selected model type: osnet_x0_25
YOLOv5 2022-9-1 torch 1.12.1+cpu CPU

YOLOv5 2022-9-1 torch 1.12.1+cpu CPU

Fusing layers...
Model Summary: 213 layers, 1867405 parameters, 0 gradients
Traceback (most recent call last):
File "d:\Vehicle count\yolov5\Yolov5_DeepSort_Pytorch\track.py", line 278, in <module>
detect(opt)
File "d:\Vehicle count\yolov5\Yolov5_DeepSort_Pytorch\track.py", line 122, in detect
pred = model(img, augment=opt.augment, visualize=visualize)
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "d:\Vehicle count\yolov5\Yolov5_DeepSort_Pytorch\yolov5\models\common.py", line 384, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Vehicle count\yolov5\Yolov5_DeepSort_Pytorch\./yolov5\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "D:\Vehicle count\yolov5\Yolov5_DeepSort_Pytorch\./yolov5\models\yolo.py", line 149, in _forward_once
x = m(x) # run
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\upsampling.py", line 154, in forward

File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1207, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
PS D:\Vehicle

PialEbnyHabib
Автор

anh ơi cho e hỏi chút là mình muốn track 2 đối tượng khác nhau thì sửa ở đâu ạ. Ví dụ vừa track ô tô vừa xe máy ạ

daotran