LiYunfengLYF / LightFC

MIT License
29 stars 1 forks source link

LightFC

The official implementation of LightFC

News

Option1: Use the Anaconda

conda create -n lightfc python=3.9
conda activate lightfc
bash install.sh

Data Preparation

Follow stark and ostrack frameworks to set your datasets

File directory

Project file directory should be like

   ${YOUR_PROJECT_ROOT}
        -- experiments
            |-- lightfc
        -- external
            |-- vot20st
        -- lib
            |--models
            ...
        -- outputs (download and unzip the output.zip to obtain our checkpoints and row results)
            |--checkpoints
                |--...
            |--test
                |--...
        -- pretrained_models (if you want to train lightfc, put pretrained model here)
            |--mobilenetv2.pth (from torchvision model)
            ...    
        -- tracking
            ...

Download lightfc checkpoint and raw results at Google Drive

Download lightfc-vit checkpoint and raw results at Google Drive

Then go to these two files, and modify the paths

lib/train/admin/local.py  # paths about training
lib/test/evaluation/local.py  # paths about testing

Train LightFC

Training with multiple GPUs using DDP

python tracking/train.py --script LightFC --config mobilnetv2_p_pwcorr_se_scf_sc_iab_sc_adj_concat_repn33_se_conv33_center_wiou --save_dir . --mode multiple --nproc_per_node 2 

If you want to train lightfc, please download https://download.pytorch.org/models/mobilenet_v2-b0353104.pth rather than https://download.pytorch.org/models/mobilenet_v2-7ebf99e0.pth

if you want to train lightfc-vit, please download https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_5m_22k_distill.pth

Test and evaluate LightFC on benchmarks

Go to tracking/test.py and modify the parameters

python tracking/test.py

Then go to tracking/analysis_results.py and modify the parameters

python tracking/analysis_results.py

Test FLOPs, Params, and Speed

# Params and FLOPs
python tracking/profile_model.py
# Speed
python tracking/speed.py

Acknowledgments