mikel-brostrom / yolo_tracking Goto Github PK
View Code? Open in Web Editor NEWBoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
License: GNU Affero General Public License v3.0
BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
License: GNU Affero General Public License v3.0
I ran into some error on pytorch 1.7 for CUDA 11 on windows, will it be supported?
Hi, author. Thanks a lot for your great work.
But I think the environment is too new to apply to local user. Could you please low down the environment setting, i.e. torch=1.3 or 1.4, NVIDIA Driver>=410, etc.
Thanks again for your help.
Hi @mikel-brostrom , I've checked your repo, its output is really cool. Currently i have done tensorrt implementation of yolov5 following https://github.com/wang-xinyu/tensorrtx for detecting mobilephones in hand . I would like to implement tracking also for real-time tracking, Is it possible with tensorrt? If yes, do i need to train deepsort model?
hi, I would like to know what the fps is of the model. Can it tun in realtime? Thanks
when using google colab
I am very confused. Pytorch=1.9 cuda=10.1
Thank u very much !
The algorithm needs to be improved.
Sorry did not find the corresponding docker image address or dockfile
请问。该项目改成yolov5后,提供可以进行测评的程序嘛?
hello where can i change the class for car not only person
Hello Mike, thanks for the repository and implementation. I have trained my model on yolov5 for my custom object. And ran your track.py code works fine. But there is one thing I want to ask. How big is the affect of trained model to the performance of the tracker? How can I improve the performance and accuracy of the tracker?
I am using Anaconda environment with python 3.8 and I'm getting this error.
if there have been some detections then there is a period of time where there are no object detections, the tracker doesn't get updated.
Which means the age of the last tracks stays the same...which would seem to be wrong - as the age should increase even if there has been no detections...
in track.py
age : int
Total number of frames since first occurance.
But the code
outputs = deepsort.update(xywhs, confss, im0)
only gets called if there has been a successful object detection. (from what i can tell)
This can be ok if you have a constant detections, but not if you have periods where your objects are more sparely occurring.
thanks for your repository, I'll check it out tomorrow! :-)
One question, i've trained succesfully my own custom dataset with AlexeyAB's darknet implemenation of YoloV4.
I've got 90 classes, my weight file (After 200.000k training itterations) and my corresponding yolov4_custom.cfg file where classes=90 and the filters=285 set accordingly on each [convetional] layer before the 3x [yolo] layers.
Can i just pass my custom weights, cfg and the classes to your deep sort python implemenation (which parameters do i have to provide when i run your python script for that task?) or is it strict only for the coco dataset with the weight, cfg etc. you provide in this repo?
Thanks for your time! :-)
Cheers
Hi, thanks for this great work!
nn_budget configuration is overwritten in deep_sort.py here. I simply removed that line, but I wonder if there is a reason.
hello @mikel-brostrom can we just initialize the tracker with optional bounding boxes?
I only find reid dataset of person and cars, can you give me some tips on how to make custom reid dataset and method to train this reid model?
can you help me, when i open two or more cameras, the tracking is failed and object detection result is also disappeared.
该项目中又又yolov3又出现了yolov5,请问,以那个为准,它们有些错乱。
RuntimeError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. 'torchvision::nms' is only available for these backends: [CPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, Tracer, Autocast, Batched, VmapMode].
Actually, I didn't get this error and couldn't search anything about this on google.
Is there anybody who knows the way to handle this?
Info:
I installed the CUDA v11.1 from https://developer.nvidia.com/cuda-downloads
torch version: 1.7.0
torchvision version: 0.8.0
First,
$ git clone https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch
$ cd Yolov5_DeepSort_Pytorch
I commanded $ python3 track.py --source 0 --weights best.pt
(best.pt is the weights file that I pretrained in yolov5) -> classes : 2
Then,this error popped up :
FileNotFoundError: [Errno 2] No such file or directory: 'deep_sort/deep_sort/deep/checkpoint/ckpt.t7'
How to solve this Problem...?
Did you delete ckpt.t7 file?
Hi, i print out identities in track.py
after this line of code, i found the log shows:
video 1/1 (2/341) /media/weidawang/DATA/FFOutput/Walking_Office_People.mp4: One prediction round
video 1/1 (3/341) /media/weidawang/DATA/FFOutput/Walking_Office_People.mp4: One prediction round
identities:[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30]
video 1/1 (4/341) /media/weidawang/DATA/FFOutput/Walking_Office_People.mp4: One prediction round
identities:[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 36]
video 1/1 (5/341) /media/weidawang/DATA/FFOutput/Walking_Office_People.mp4: One prediction round
identities:[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 36 38]
video 1/1 (6/341) /media/weidawang/DATA/FFOutput/Walking_Office_People.mp4: One prediction round
identities:[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 36 38 40]
...
Observe those ids at the end of the identities list, they jump from 30 directly to 36, how to finetune some parameters to make the id number changes more continuous, thanks !
I use yolov5m.pt and this video.
Hello, my configuration is GTX660ti, 6G, but the speed I detected is about 0.3 seconds per frame, may I ask if there is a problem with my settings that causes the speed to slow down.
Hi! Can you share yolov5 .pt file. I could not find it in google drive.
Hey a clarification!
while running detection over a video, I see that my entire CPU memory is being used. I'm not able to run it on multiple threads as it leads to slowness.
Did anyone face this issue ?
Any help would be appreciated
I tried using a yolov5s model instead of the suggested yolov5x and for some reason there seem to be no detections.
I trained a custom dataset using yolov5s, renamed the 'best.pt' obtained at the end to 'yolov5s.pt' and pasted it in the yolov5_DeepSort_Pytorch/yolov5/weights and executed the command "python3 track.py --source vid.mp4 --weights yolov5/weights/yolov5s.pt
I can only see the video play at a high frame rate than usual with no detections being made and the same video gets saved in output. This doesn't happen while using yolov5x.pt
I have a RTX2070 max-q and am unable to train the model using the custom dataset( CUDA allocation error) and the provided yolov5x.pt is not so accurate.
I'd really appreciate it if you can help me run this using v5s instead.
1.reid of one people was not ok sametimes.
2.Human overlapping tracking is not accurate.
hope the author can improve.
When I run 'python3 track.py', whether pic or video
Jetson nano
How to track other object such as car?
hello, i want to ask why i run the track.py ,the code shows that the running result is calling the CPU to run the video. I tried to repair the device and called the GPU. It has not been successful. Can you tell you how to modify it?
Hi Mike,
First of all thank you for code implementation!
I have a question regarding the possibility of merging two detected classes together. for example I have a custom class (not included in coco dataset) trained on Yolov5 and I want to use the deepsort tracker for pedestrian to track and yolo to detect!
my use case is head gear detection in construction site. and i want to use the deepsort pedestrian tracking to count and track the number of persons wearing head gear.
I already trained a Yolov5 model to detect head gear but I wish to merge the yolov5 bounding box with the pedestrian bounding box from deepsort!
I hope my issue is clear.
thank you for your time.
Hey I am getting an error when trying to run this code, that says:
RuntimeError: shape '[1, 3, 85, 64, 80]' is invalid for input of size 655360
What did I do wrong :/ ?
Yolov5_DeepSort_Pytorch\yolov5\utils\general.py", line 630, in non_max_suppression
x = torch.cat((box[i], x[i, j + 5, None], j[:, None].float()), 1)
RuntimeError: Expected object of scalar type struct c10::Half but got scalar type float for sequence element 2.
In track.py, you update the deepsort module per object, as the variable 'det' has size (num of obj, 6). However, in the code of YOLOv3+ DeepSORT, they just update once per image.
Is there anything I miss here?
So ultralytics just released new yolov5, but Milkel's repository links for 3.0 version. If anyone has any troubles with getting it to work, rm old yolov5 and clone Yolov5 by yourself, or just do not clone this rep recursively
git clone https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch.git
cd Yolov5_DeepSort_Pytorch
git clone https://github.com/ultralytics/yolov5.git
also ultralytics added seaborn plots so install seaborn if you have any troubles with module import
you are the first person I found that is using Yolov5 for deep sort. Thank you!
I used your code on a video, but it showed this error:
2020-10-09 19:01:42.440 python[34438:785101] mMovieWriter.status: 3. Error: Cannot Save
请问,该项目提供多类别多目标跟踪吗?
Hello, I would like to ask if your YOLOv5 code can be trained with your own dataset, thank you for your answer
The related track.py file begins at line 169
if len(outputs) > 0:
bbox_xyxy = outputs[:, :4]
identities = outputs[:, -1]
draw_boxes(im0, bbox_xyxy, identities)
# Write MOT compliant results to file
if save_txt and len(outputs) != 0:
for j, output in enumerate(outputs):
bbox_left = output[0]
bbox_top = output[1]
bbox_w = output[2]
bbox_h = output[3]
identity = output[-1]
with open(txt_path, 'a') as f:
f.write(('%g ' * 10 + '\n') % (frame_idx, identity, bbox_left,
bbox_top, bbox_w, bbox_h, -1, -1, -1, -1)) `
In the above if judgment, the output coordinate form is XYxy, and why the variable name is defined as xyWH when the result is saved to TXT file later
Hi,
Thanks for your repo!
When the video is very long, it is very time-consuming to extract and detect each frame.
Is it possible to detect at intervals of several frames?
Hello. When i ran track.py i am getting this error:
python3 track.py --source testvideo.mp4 --device 0 --save-txt
Namespace(agnostic_nms=False, augment=False, classes=[0], conf_thres=0.4, config_deepsort='deep_sort/configs/deep_sort.yaml', device='0', fourcc='mp4v', img_size=640, iou_thres=0.5, output='inference/output', save_txt=True, source='testvideo.mp4', view_img=False, weights='yolov5/weights/yolov5x.pt')
/data/home/testVM/data/testing/Yolov5_DeepSort_Pytorch/deep_sort/utils/parser.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.update(yaml.load(fo.read()))
video 1/1 (1/292) /data/home/testVM/data/testing/Yolov5_DeepSort_Pytorch/testvideo.mp4: Traceback (most recent call last):
File "track.py", line 236, in
detect(args)
File "track.py", line 126, in detect
pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=opt.agnostic_nms)
File "/data/home/testVM/data/testing/Yolov5_DeepSort_Pytorch/yolov5/utils/general.py", line 630, in non_max_suppression
x = torch.cat((box[i], x[i, j + 5, None], j[:, None].float()), 1)
RuntimeError: Expected object of scalar type c10::Half but got scalar type float for sequence element 2.
Hi,
Great job for your repo.
However, the detections cannot save to txt, such as frame_index, car_identities or bbox_xyxy.
Hi! Thanks for creating this repository!
I'm running everything in Google Colab (with its 12GB of GPU). However, it's taking way too more than YOLOV3+Deepsort. Any idea why? How do I know I'm actually using the GPU? Thanks again!
Hi, thank you for your great work.
However, the yolov5 weight appears to be remove from the google drive link provided.
Would you mind upload the weight again please?
using deepsort could appear many diffirent id to the same person.
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.