Skip to content
forked from hyseob/PyMDNet

A python implementation of a Multi-Domain Network built for visual object tracking. This project is part of my Masters Thesis

License

Notifications You must be signed in to change notification settings

jbhewitt12/py-MDNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-MDNet

Fork notes

This is a fork of py-MDNet by Hyeonseob Nam and Bohyung Han at POSTECH

In this fork, py-MDNet has been converted from Python 2 to Python 3. This means that py-MDNet can be run on Windows for the first time. A dependency of py-MDNet is PyTorch, which is originally designed for Linux and OSX operating systems only. However, the GitHub user 'peterjc123' has made a Windows compatible version here, but it only runs in Python 3. As a result I converted py-MDNet to Python 3 so that it could be run on Windows.

I ran all .py files through 2to3 and then fixed all remaining errors. A notable error that I fixed was to add dim=1 paramater to the log_softmax() pytorch function found in modules/model.py line 148

I have further modified the code to provide Accuracy, Robustness and Frames Per Second evaluation metrics similar to those used in the VOT Challenge. To include the Robustness metric, I edited the code so that MDNet will now reinitialize when the overlap between the ground truth bounding box and the estimated bounding box drops to 0. Nskip = 5 frames are skipped after failure. I implemented Accuracy and Robustness according to this paper.

Introduction

Python (PyTorch) implementation of MDNet tracker, which is ~2x faster than the original matlab implementation.

If you're using this code for your research, please cite:

@InProceedings{nam2016mdnet,
author = {Nam, Hyeonseob and Han, Bohyung},
title = {Learning Multi-Domain Convolutional Neural Networks for Visual Tracking},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2016}
}

Requirements

  • Python 3
  • PyTorch and its dependencies
  • Conda
  • NumPy
  • Numba
  • pyCUDA

I recommend using Anaconda and the Anaconda Prompt.

to install pyCUDA I used:

pip install pycuda-2017.1.1+cuda9185-cp36-cp36m-win_amd64.whl 

From this site helped.

To check if CUDA is working, type "numba -s" into the command prompt. This tells you if cuda is working under "CUDA Information"

Pretraining

  • Download VGG-M (matconvnet model) and save as "models/imagenet-vgg-m.mat"
  • Download VOT datasets into "dataset/vot201x"
  • Edit /pretrain/vot-training-sequences.txt to include the sequences you wish to train on
 cd pretrain
 python prepro_data.py
 python train_mdnet.py

Tracking

 cd tracking
 python run_tracker.py -s DragonBaby [-d (display fig)] [-f (save fig)]

An example if you have downloaded a VOT dataset into /dataset:

 cd tracking
 python run_tracker.py -s vot2016/matrix -d 

About

A python implementation of a Multi-Domain Network built for visual object tracking. This project is part of my Masters Thesis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%