Sports Camera Calibration via Synthetic Data
The original implemenation uses Matlab. This is a re-implementation.
The two-GAN code: https://github.com/lood339/pytorch-two-GAN
Link: https://arxiv.org/abs/1810.10658
Install required package via conda:
conda install -c anaconda numpy
conda install -c anaconda scipy
conda install -c conda-forge pyflann
conda install -c conda-forge opencv
If no GPU:
conda install pytorch-cpu torchvision-cpu -c pytorch
Pre-processing:
cd python/hog
python generate_test_feature_hog.py
python generate_database_hog.py
Put two generated .mat files to ./data/features
cd python/deep
python generate_train_data.py
bash network_train.sh
bash network_test.sh
A demo script in testing phase:
python/demo.py
python/demo_uot.py # contributed by jiangwei221
Example 1: use deep feature
python demo.py --feature-type 'deep' --query-index 0
It uses pre-trained-deep-features.
Example 2: use HoG feature
python demo.py --feature-type 'HoG' --query-index 0
Example 3: run all testing example of UoT dataset
python demo_uot.py --feature-type 'deep'
You wil get the result:
mean IoU for refined homogrpahy 0.948
median IoU for refined homogrpahy 0.964
Slightly better than the result in the paper.
To do: