This repository contains the code and experiments used to evaluate the robustness of an AFLink-based tracking model under synthetic occlusions.
The objective is to study how temporal, spatial, and motion constraints affect tracking performance when trajectories are partially occluded.
The complete project report is available as a PDF in this repository.
All experiments should be run from the pds_final/ directory.
cd pds_final # if not already in it
conda env create -f environment.yml
conda activate pds
pip install -e project- To run experiment and codes, reader must dowload train.json and test.json from https://drive.google.com/drive/u/0/folders/1ygWcuOZ7kEwS-rC35gWv6f6qeNx0BHyg and put them into data > raw
- To visualize videos, one must dowload frames from the UIT-ADrone dataset and put them under data > raw > split > frames and then follow notebook 1 , where split stands for test or train
Main scripts are written in bacasable > project > scripts. The flow of the scripts and their use is detail by notebooks. These notebooks cover the full pipeline: dataset construction, model training, evaluation under occlusions, and result visualization. They are designed so that the reader can understand and go throught all the scripts easily
Purpose: dataset and trajectory generation
This notebook:
- Builds initial trajectories from raw detections
- Creates training and validation files for AFLink hyperparameter optimization
- Generates occluded trajectories used to evaluate the model on the target task
This is the entry point of the project.
Purpose: model training and hyperparameter optimization
This notebook:
- Re-trains the AFLink model
- Performs grid search to optimize hyperparameters
- Compares different trained models
- Produces precision vs recall curves for multiple configurations
Purpose: robustness evaluation under occlusions
This notebook:
- Evaluates trained models and baselines
- Tests performance under different occlusion durations
- Compute metrics when adding different constraint configurations (temporal, spatial, motion-based)
Purpose: results analysis and visualization
This notebook:
- Reproduces the figures from the Results section of the report
- Allows plotting results for other models or configurations
- Facilitates further analysis and extensions
- Models are provided in the models folder but can be recomputed, same goes for results saved in results > AFLink downloaded & results > model_e20_bs16_lr0.001_warm0_decay1e-05_workers0_valbs32_minL15_inL30.