Skip to content

liygzting/MOT_ByteTrack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Object Tracker with YOLOX and ByteTrack

The source code in the folder "tracker" is copied from ByteTrack repository The folder "tracker" contains only the code required to run BYTETracker class and nothing else.

For the original implementation please visit https://github.com/ifzhang/ByteTrack.

Using this repository you can use YOLOX cloned from YOLOX repository

Installation
  1. Download source code from MOT_ByteTrack repository. Open it as root folder in your IDE
  2. Install python requirements
pip3 install -r tracker/requirements.txt
  1. Download and install CUDA on your PC
  2. Install pytorch: follow this manual
# This is an example of a command line, generated with https://pytorch.org/get-started/locally/
# This command will install pytorch v1.10 with coda 11.3
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
  1. Install pycocotools
  • For Ubuntu:
pip3 install cython; pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
  • For Windows:
pip3 install cython
pip3 install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
  1. Install cython_box
  • Ubuntu
pip3 install cython_bbox
  • Windows
pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox

Install YOLOX

git clone https://github.com/Megvii-BaseDetection/YOLOX.git
cd YOLOX
python setup.py develop
cd ..

download YOLOX weights to weights folder from YOLOX repository

Standard Models (source: YOLOX repository).

Model size mAPval
0.5:0.95
mAPtest
0.5:0.95
Speed V100
(ms)
Params
(M)
FLOPs
(G)
weights
YOLOX-s 640 40.5 40.5 9.8 9.0 26.8 github
YOLOX-m 640 46.9 47.2 12.3 25.3 73.8 github
YOLOX-l 640 49.7 50.1 14.5 54.2 155.6 github
YOLOX-x 640 51.1 51.5 17.3 99.1 281.9 github
YOLOX-Darknet53 640 47.7 48.0 11.1 63.7 185.3 github

Light Models (source: YOLOX repository).

Model size mAPval
0.5:0.95
Params
(M)
FLOPs
(G)
weights
YOLOX-Nano 416 25.8 0.91 1.08 github
YOLOX-Tiny 416 32.8 5.06 6.45 github

Prepare videos for input

You can download this 4K traffic camera video from youtube (or download resized 720p version from google drive)

pip3 install youtube-dl
youtube-dl -f 313 MNn9qKG2UFI
# rename file 'MNn9qKG2UFI.webm' and put it into 'assets' folder
Run
python .\main.py  --name yolox-m --ckpt weights/yolox_m.pth --video_input assets/KarolMajek720.avi --video_output output_yolox_m.avi
python .\main_detector.py --name yolox-m --ckpt weights/yolox_m.pth --video_input assets/KarolMajek720.avi --video_output output_yolox-m-det.avi

About

YOLOX detector and ByteTrack MOT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%