Coder Social home page Coder Social logo

alei089 / dcfnet_pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from foolwood/dcfnet_pytorch

0.0 2.0 0.0 523 KB

DCFNet: Discriminant Correlation Filters Network for Visual Tracking

Home Page: https://arxiv.org/pdf/1704.04057.pdf

License: MIT License

Python 100.00%

dcfnet_pytorch's Introduction

DCFNet_pytorch(arXiv)

This repository contains a Python reimplementation of the DCFNet.

Why implementation in python (PyTorch)?

  • Magical Autograd mechanism via PyTorch. Do not need to know the complicated BP.
  • Fast Fourier Transforms (FFT) supported by PyTorch 0.4.0.
  • Engineering demand.
  • Fast test speed (120 FPS on GTX 1060) and Multi-GPUs training.

Contents

  1. Requirements
  2. Test
  3. Train
  4. Citing DCFNet

Requirements

git clone --depth=1 https://github.com/foolwood/DCFNet_pytorch

Requirements for PyTorch 0.4.0 and opencv-python

conda install pytorch torchvision -c pytorch
conda install -c menpo opencv

Training data (VID) and Test dataset (OTB).

Test

cd DCFNet_pytorch/track 
ln -s /path/to/your/OTB2015 ./dataset/OTB2015
ln -s ./dataset/OTB2015 ./dataset/OTB2013
cd dataset & python gen_otb2013.py
python DCFNet.py

Train

  1. Download training data. (ILSVRC2015 VID)

    ./ILSVRC2015
    ├── Annotations
    │   └── VID├── a -> ./ILSVRC2015_VID_train_0000
    │          ├── b -> ./ILSVRC2015_VID_train_0001
    │          ├── c -> ./ILSVRC2015_VID_train_0002
    │          ├── d -> ./ILSVRC2015_VID_train_0003
    │          ├── e -> ./val
    │          ├── ILSVRC2015_VID_train_0000
    │          ├── ILSVRC2015_VID_train_0001
    │          ├── ILSVRC2015_VID_train_0002
    │          ├── ILSVRC2015_VID_train_0003
    │          └── val
    ├── Data
    │   └── VID...........same as Annotations
    └── ImageSets
        └── VID
    
  2. Prepare training data for dataloader.

    cd DCFNet_pytorch/train/dataset
    python parse_vid.py <VID_path>  # save all vid info in a single json
    python gen_snippet.py  # generate snippets
    python crop_image.py  # crop and generate a json for dataloader
  3. Training. (on multiple GPUs ⚡ ⚡ ⚡ ⚡)

    cd DCFNet_pytorch/train/
    CUDA_VISIBLE_DEVICES=0,1,2,3 python train_DCFNet.py
    

Fine-tune hyper-parameter

  1. After training, you can simple test the model with default parameter.

    cd DCFNet_pytorch/track/
    python DCFNet --model ../train/work/crop_125_2.0/checkpoint.pth.tar
  2. Search a better hyper-parameter.

    CUDA_VISIBLE_DEVICES=0 python tune_otb.py  # run on parallel to speed up searching
    python eval_otb.py OTB2013 * 0 10000

Citing DCFNet

If you find DCFNet useful in your research, please consider citing:

@article{wang2017dcfnet,
  title={DCFNet: Discriminant Correlation Filters Network for Visual Tracking},
  author={Wang, Qiang and Gao, Jin and Xing, Junliang and Zhang, Mengdan and Hu, Weiming},
  journal={arXiv preprint arXiv:1704.04057},
  year={2017}
}

dcfnet_pytorch's People

Contributors

foolwood avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.