Giter Club home page Giter Club logo

yolo_tracking's Issues

environment

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.

the fps for the webcam

hi, I would like to know what the fps is of the model. Can it tun in realtime? Thanks

如何测评

请问。该项目改成yolov5后,提供可以进行测评的程序嘛?

Performance questions

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?

problem when no detections

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.

Useable with own trained dataset?

Hi @mikel-brostrom

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

nn_budget value is overwritten

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.

How to solve this error? RuntimeError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend

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

FileNotFoundError: [Errno 2] No such file or directory: 'deep_sort/deep_sort/deep/checkpoint/ckpt.t7'

My enviornment : (Ubuntu18.04.5 LTS, GPU: RTX 2080super)

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?

deepsort_error

Question : Why the track id suddenly jump from 30 to 36 ?

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.

About tracking speed?

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.

Deepsort tracking almost uses the entire CPU memory

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

Unable to use this with yolov5s

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.

Track.py

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?

Merging bounding boxes

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.

Invalid shape for input

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 4.0 released

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

Thank you!

you are the first person I found that is using Yolov5 for deep sort. Thank you!

result cannot save

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

A quick tip on the code to save the output

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

extract each frame?

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?

RuntimeError: Expected object of scalar type c10::Half but got scalar type float for sequence element 2.

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.

cannot save the txt?

Hi,
Great job for your repo.
However, the detections cannot save to txt, such as frame_index, car_identities or bbox_xyxy.

Taking too long

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.