- Activate Intel Distribution for Python (idp):
conda activate idp
- Install Python dependencies
pip3 install -r requirements.txt
to install required dependencies - 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.
- Download Sample video, calibration files and re-trained model
- The project must have the following folder structure:
tracking_3d
│ README.md
| requirements.txt
│ tracking.py
| ...
| retrained_net.pth
│
└───data
│ │ video
│ │ calibration_2d
- Change the folder path in
main
function withintracking.py
file to point to the data folder of the project - The tracking algorithm can be used to either extract or replay trajectories from the video. To extract tracking data, set flag
replay=False
within thetest_tracker()
method. To replay tracking data, set flagreplay=True
within thetest_tracker
method. - Choose the format of the data extracted by selecting
npy
orcsv
within thetest_tracker
method - Run
python3 tracking.py
If you find this algorithm useful for your work, please cite it as follows: