Coder Social home page Coder Social logo

mihirp1998 / depth-adaptive-visual-tracking-tf Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 1.08 MB

This is an unofficial implementation of the Paper "Depth-Adaptive Computational Policies for Efficient Visual Tracking" By Chris Ying, Katerina Fragkiadaki

Python 100.00%

depth-adaptive-visual-tracking-tf's Introduction

Depth Adaptive Visual Tracking

First ever open source Implementation of Computation Adaptive Siamese network for Visual Tracking

Introduction

The following is an Unofficial implementation of Depth-Adaptive Computational Policies for Efficient Visual Tracking by Chris Ying and Katerina Fragkiadaki.

The folllowing topics are covered by my project:

  • Data-Preprocessing. Key and Search frame extraction from Imagenet 2017 VID dataset
  • Intermediate Supervision VGG Model. Built using Intermediate Supervision as mentioned in Paper.
  • Budgeted Gating Loss. Implemented the g* function mentioned in Paper with Shallow Feature Extractor.
  • Hard Gating for Evaluation. Hard gating which stops the computation when confidence score exceeds threshold.
  • Readability. The code is very clear,well documented and consistent.
Search Frame                                                     Cross Correlation Frame
                               

Model Keys

Model Structure

  • Build Key & Search Inputs
  • Build Vgg Nets for each
  • Build 5 Blocks of Cross-Corr & Flops for each
  • Build Non-Diff Shallow Feature Extractor from Cross-Corr
  • Build Confidence Score ~ Gfunction
  • Build Intermediate Supervision Block Loss
  • Build Budgeted Gates & Gate Loss
  • Build Hard Gates for Evaluation

Block Loss is implemented in model/compAdaptiveSiam/block_loss().This loss also results in exploding Gradients for which to prevent there is L2 Regularization and Gradient Clipping Implemented

BLockLoss

Budgeted Gates implemented in model/compAdaptiveSiam/gStarFunc()

BudgetedGate

Gate Loss implemented in model/compAdaptiveSiam/gateLoss

GateLoss

Cropped Section of TensorBoard Graph

Prerequisite

The main requirements can be installed by:

pip install -r requirements.txt

Data Collection and Preprocessing

One can download the ImageNet Vid dataset from the link

The data can be preprocessed to Key frame & Search frame using the following code

Change the location of the dataset from main function in the file

python scripts/preprocess_VID_data.py

Finally data can be split into train and validation and pickled by the following code

python scripts/build_VID2015_imdb.py

The credit for the scripts to preprocess the Visual Tracking DataSet goes to Huazhong University of Science and Technology

Training

It will iteratively train the Vgg Weights using Intermediate Supervison and then use the weights to train the Gated Weights. This process will happen iteratively

python main.py train

Evaluation

Hard Gating will stop the computation when the confidence score exceeds the threshold It will return the Cross Correlation Map,Flops Computed and the index of the block where computation stopped

python main.py eval

Pretrained Model

If you are training from beginning then use the vgg pretrained model provided here link

The pretrained model for VggNet and Gates trained by me is here

depth-adaptive-visual-tracking-tf's People

Contributors

macau1231 avatar mihirp1998 avatar

Watchers

 avatar

Forkers

whjzsy

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.