Skip to content

Latest commit

 

History

History
128 lines (93 loc) · 3.09 KB

usage.md

File metadata and controls

128 lines (93 loc) · 3.09 KB

Usage

Configurations

The currently avaliable configs are the following:

Learneable Pooling:

configs/learnablepooling/soccernet_netvlad++_resnetpca512.py

configs/learnablepooling/json_avgpool_resnetpca512.py
configs/learnablepooling/json_maxpool_resnetpca512.py
configs/learnablepooling/json_netrvlad_resnetpca512.py
configs/learnablepooling/json_netvlad_resnetpca512.py
configs/learnablepooling/json_avgpool++_resnetpca512.py
configs/learnablepooling/json_maxpool++_resnetpca512.py
configs/learnablepooling/json_netrvlad++_resnetpca512.py
configs/learnablepooling/json_netvlad++_resnetpca512.py

CALF:

configs/contextawarelossfunction/json_soccernet_calf_resnetpca512.py

configs/contextawarelossfunction/soccernet_resnetpca512.py

PTS:

configs/e2espot/e2espot.py
configs/e2espot/e2espot_ocv.py

Training

python tools/train.py {config}

Train example

python tools/train.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py

Train example with custom config file

python tools/train.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py \
    --cfg-options training.max_epochs=10 \
        dataset.train.data_root=/datasets/SoccerNet \
        dataset.valid.data_root=/datasets/SoccerNet \
        dataset.train.path=/datasets/SoccerNet/ResNET_PCA512/train/annotations.json \
        dataset.valid.path=/datasets/SoccerNet/ResNET_PCA512/valid/annotations.json

Inference

python tools/infer.py {config}

Inference example

python tools/infer.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py

Inference example with custom config file

python tools/infer.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py \
    --cfg-options dataset.test.data_root=/datasets/SoccerNet \
        dataset.test.path=/datasets/SoccerNet/ResNET_PCA512/test/annotations.json

Evaluation

python tools/evaluate.py {config}

Evaluation example

python tools/evaluate.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py

Evaluation example with custom config file

python tools/evaluate.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py \
    --cfg-options dataset.test.path=/datasets/SoccerNet/ResNET_PCA512/test/annotations.json \
    dataset.test.metric=tight

Visualization

python tools/visualize.py {config}

Visualization example

python tools/visualize.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py

Visualization example with custom config file

python tools/visualize.py \
    configs/learnablepooling/json_netvlad++_resnetpca512.py \
    --cfg-options dataset.test.results=/outputs/learnablepooling/json_netvlad++_resnetpca512/results_spotting_test/england_epl/2014-2015/2015-05-17_-_18-00_Manchester_United_1_-_1_Arsenal/1_ResNET_TF2_PCA512/results_spotting.json \
    dataset.test.path=/home/ybenzakour/datasets/SoccerNet/england_epl/2014-2015/2015-05-17_-_18-00_Manchester_United_1_-_1_Arsenal/1_224p.mkv \
    visualizer.threshold=0.2