Tracking algorithm

Environment Setup on Ubuntu 18.04

  1. Install cuda v11 toolkit
  2. Install Anaconda link

Python Environment Setup

  1. Activate Intel Distribution for Python (idp): conda activate idp
  2. Install Python dependencies pip3 install -r requirements.txt to install required dependencies
  3. Add export PYTHONPATH=$PYTHONPATH:/project_root to ~/.bashrc

NOTE: Make sure you install an opencv-python version that was compiled with ffmpeg flag to be able to read .mpg video files.

Using the algorithm

  1. Download Sample video, calibration files and re-trained model
  2. The project must have the following folder structure:
tracking_3d
│   README.md
|   requirements.txt
│   tracking.py
|   ...
|   retrained_net.pth
│
└───data
│   │   video
│   │   calibration_2d

  1. Change the folder path in main function within tracking.py file to point to the data folder of the project
  2. The tracking algorithm can be used to either extract or replay trajectories from the video. To extract tracking data, set flag replay=False within the test_tracker() method. To replay tracking data, set flag replay=True within the test_tracker method.
  3. Choose the format of the data extracted by selecting npy or csv within the test_tracker method
  4. Run python3 tracking.py

References

If you find this algorithm useful for your work, please cite it as follows:

Duo Lu, Varun C Jammula, Steven Como, Jeffrey Wishart, Yan Chen, & Yezhou Yang. (2021). CAROM – Vehicle Localization and Traffic Scene Reconstruction from Monocular Cameras on Road Infrastructures.