Giter Site home page Giter Site logo

mikel-brostrom / yolov3_deepsort_pytorch Goto Github PK

View Code? Open in Web Editor NEW
161.0 4.0 45.0 48.24 MB

Real-time multi-person tracker using YOLO v3 and deep sort

Dockerfile 1.40% Shell 1.38% Python 97.22%
deep-sort yolo-v3 pytorch real-time multple-object-tracking pedestrian-tracking computer-camera yolov3 deep-association-metric pytorch-yolov3

yolov3_deepsort_pytorch's Introduction

Yolov3 + Deep Sort with PyTorch

Introduction

This repository contains a moded version of PyTorch YOLOv3 (https://github.com/ultralytics/yolov3). It filters out every detection that is not a person. The detections of persons are then passed to a Deep Sort algorithm (https://github.com/ZQPei/deep_sort_pytorch) which tracks the persons. The reason behind the fact that it just tracks persons is that the deep association metric is trained on a person ONLY datatset.

Description

The implementation is based on two papers:

Requirements

Python 3.7 or later with all of the pip install -U -r requirements.txt packages including:

  • torch >= 1.3
  • opencv-python
  • Pillow

All dependencies are included in the associated docker images. Docker requirements are:

  • nvidia-docker
  • Nvidia Driver Version >= 440.44

Before you run the tracker

Github block pushes of files larger than 100 MB (https://help.github.com/en/github/managing-large-files/conditions-for-large-files). Hence the yolo weights needs to be stored somewhere else. When you run tracker.py you will get an exceptions telling you that the yolov3 weight are missing and a link to download them from. Place the downlaoded .pt file under yolov3/weights/. The weights for deep sort are already in this repo. They can be found under deep_sort/deep/checkpoint/.

Tracking

track.py runs tracking on any video source:

python3 track.py --source ...
  • Video: --source file.mp4
  • Webcam: --source 0
  • RTSP stream: --source rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa
  • HTTP stream: --source http://wmccpinetop.axiscam.net/mjpg/video.mjpg

Cite

If you find this project useful in your research, please consider cite:

@misc{yolov3-deepsort,
    title={Real-time multi-camera multi-object tracker using YOLOv3 and DeepSORT},
    author={Mikel Broström},
    howpublished = {\url{https://github.com/mikel-brostrom/Yolov3_DeepSort_Pytorch}},
    year={2019}
}

Other information

For more detailed information about the algorithms and their corresponding lisences used in this project access their official github implementations.

yolov3_deepsort_pytorch's People

Contributors

d-j-kendall avatar developer0hye avatar dsuess avatar fatihbaltaci avatar franciscoreveriano avatar gabrielbianconi avatar glenn-jocher avatar guigarfr avatar idow09 avatar ilyaovodov avatar jrmh96 avatar jveitchmichaelis avatar lincoce avatar lukeai avatar mikel-brostrom avatar nirzarrabi avatar ownmarc avatar perry0418 avatar skalskip avatar ttayu avatar wolffychen avatar yang-jin-hai avatar ypw-rich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yolov3_deepsort_pytorch's Issues

No module named 'models'

I am having trouble running the file and hope someone can help me.
When I run the track.py, I get the following:

F:\OOHAN\ZhuXY-Projects\MOT\DeepSort-mikel-brostrom\Yolov3_DeepSort_Pytorch>python track.py --source test.mp4
Loading weights from deep_sort/deep/checkpoint/ckpt.t7... Done!
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "C:\python\anzhuang\envs\OOHANpytorch\lib\site-packages\torch\serialization.py", line 882, in _load
result = unpickler.load()
File "C:\python\anzhuang\envs\OOHANpytorch\lib\site-packages\torch\serialization.py", line 875, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models'

Optimizing tracking script, a small change that can push tracking from lower fps to atleast 30 fps

During inference there's a small mistake you've done or maybe you didn't notice it.
when you check the detected output of yolo that is 'det'. you update the tracker using a list. now the thing you've missed is you push xywh list again and again into the tracker because of the iteration. all you have to do is do this push the entire list once. I've attached an image so you'll understand. just move the indent of deepsort.update and the next if loop which consist of drawing bounding box. this will make updating tracker and drawing bounding box n (number of objects detected in frame) times faster.
Screenshot 2020-09-26 171635

About training datasets

Hi there, really appreciate ur sharing. Could u tell me what datasets u used when training the yolo in this person-only mode?

ide

🐛 Bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:
1.
2.
3.

Expected behavior

A clear and concise description of what you expected to happen.

Environment

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhoneXS]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

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

How to use device GPU

Hello,
I wanted to use the tracker with the GPU that I have on my machine, I dont want to use the docker file. I tried providing the --device argument but it doent work. I have a single GPU machine with Nvidia GTX 1060.

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.