Sai-Venky / Trackjectory

Tracking and Trajectory Prediction
MIT License
35 stars 9 forks source link
convolutional-neural-network convolutional-neural-networks deep-learning deep-learning-algorithms graph graphneuralnetwork object-detection object-recognition object-tracking tracking tracking-algorithm trajectory-generation trajectory-prediction

TrackJectory

Tracking and Trajectory Prediction

Components Implemented :-

  1. Siamese Tracker for single object (online) visual tracking. Provided the template image, SiamRPN++ identify's and track's the template across video frames.
  2. FairMOT for one shot multi-object detection and tracking. (FairMOT: Multi-Object Tracking)
  3. Social GCN for trajectory forecasting. FairMOT is used to predict and track multiple objects across frames. After extracting the tracked objects, those outputs are furnished to Social GCN to forecast the trajectories.

Installation and Running

Installation

  1. Run following to clone into local system https://github.com/Sai-Venky/Trackjectory.git.
  2. Create conda environment conda create --name track python=3.6 and activate it conda activate track.
  3. Run pip install -r requirements.txt.
  4. Run pip install lap cython-bbox
  5. Setup DCNv2 by going into cd DCNV2 and running sh ./make.sh.

Running - Training and Testing

All configurable values with details on their significance are in utils/config.py. For testing, pre-trained models can be downloaded from
Siam RPN++
FairMOT DLA-34

Single Object Tracking :-
Training - python src/siam_train.py
Testing - python src/siam_track.py

Multi Object Tracking :-
Training - python src/mot_train.py
Testing - python src/mot_track.py

Trajectory Forcasting :-
Training - python src/trajectory_train.py
Testing - python src/trajectory_test.py

Dataset

The dataset is created from Kabaddi player videos curated from multiple online platforms. (https://youtu.be/HOfY9g05Sv4) This was selected since this sport depicts a lot of movements (feints) and is challenging for forcasting trajectory correctly.

In order to train with a custom dataset, change the config value of multi_images_dataset, single_track_dataset, trajectory_dataset in utils/config.py. The samples of how data should be constructed is provided in the data folder.

Directory Layout

The directory structure is as follows :-

Trajectory Forcasting Output

Trajectory Forcasting Output

Single Object Tracking Output and Template

Single Object Tracking Output   Single Object Tracking Template

Acknowledgement

Thanks a lot for the wonderful work. The above pre-trained models are taken from the respective links.

https://github.com/ifzhang/FairMOT
https://github.com/zllrunning/SiameseX.PyTorch
https://github.com/abduallahmohamed/Social-STGCNN

Contributing

You can contribute in serveral ways such as creating new features, improving documentation etc.

Licence

MIT Licence