Giter VIP home page Giter VIP logo

siamese-rpn-pytorch's Introduction

Siamese-RPN-pytorch

Introduction

  • Tensorflow Version has been available by my classmates makalo. If you have any question, please feel free to contact us.
  • This is a re-implementation for High Performance Visual Tracking with Siamese Region Proposal Network with PyTorch, which is accepted at CVPR2018.
  • Code_v1.0 is available for traning, you should change your dataset as VOT format(top-left point and w,h). If there is a break in a sequence, ues "0,0,0,0" to replace the info of this frame.
  • Dataset Tree
-root/class1/img1.jpg
            /...
            /imgN.jpg
            /groundtruth.txt

Citation

Paper: @InProceedings{Li_2018_CVPR,
author = {Li, Bo and Yan, Junjie and Wu, Wei and Zhu, Zheng and Hu, Xiaolin},
title = {High Performance Visual Tracking With Siamese Region Proposal Network},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2018}
}

Getting Started

Performance

Network introduction

Environment

  • python=3.6
  • pytorch=0.4.0
  • cuda=9.0
  • shapely=1.6.4

Download VOT2013 Dataset

wget http://data.votchallenge.net/vot2013/vot2013.zip 

Download YouTube-BB Data

git clone https://github.com/mbuckler/youtube-bb.git
python3 download.py ./dataset 12

Download pretrained model on VID with 690000 image pairs

Pretrained model is available here BaiduYun

Training Phase

git clone https://github.com/songdejia/siamese-RPN
cd code_v1.0
python train_siamrpn.py --dataroot=/PATH/TO/YOUR/DATASET --lr=0.001 --checkpoint_path=/PATH/TO/YOUR/WEIGHT

Visualization for debug

bbox in detection
green -- ground truth which is got by pos anchor shift with reg_target
red -- bbox which is got by pos anchor with reg_pred
black -- bbox with highest score

proposal in original image

Authors

siamese-rpn-pytorch's People

Contributors

songdejia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siamese-rpn-pytorch's Issues

预训练模型解压不了

你好,百度网盘上的预训练模型下载了很多次,都说数据不完整不能解压,请问其他同学有这情况吗?是否有其他地址? @songdejia

多batch训练

这个训练的时候能多个batch来练嘛?每次取一个视频帧对来练,走完一个epoch都要好久。

what's your accuracy

So, can you provide your accuracy on OTB or VOT? I reimplement the paper and use the same network with you, without imagenet pretrain or Youtube-BB dataset and get at most 0.52 auc on OTB2013.

Make debugging and checking optional through arguments

Currently, in both code and code_v1.0, debugging and checking is enabled, which results in a lot and lot of images being written to the disk which are just intermediate steps in the training/testing process of the model

(This is as far as I could understood, please correct me if I am wrong). My understanding is that the outputs 0_check_label 1_padding_img_with_detection_and_target 2_cropped_detection 3_resized_detection 4_pos_neg_anchors 5_all_anchors are all outputs representing intermediate steps and are not required for the actual training/testing)

  1. Need to make this optional. The user might not want the output. For reasonable size datasets, this debug output itself is into order of 100s of GBs... (personal experience using this model for training)

  2. Add in the Readme that this output is in fact a debug output..

Small changes, I can do that..

Unable to save training model

Use the following command to train the model, but model is not produced after the training.
python train_siamrpn.py --dataroot=/home//projects/firefox-downloads/Siamese-RPN-pytorch-master/vot2013 --lr=0.001 --checkpoint_path=/home//projects/firefox-downloads/Siamese-RPN-pytorch-master/pretrainedModel/weights-0690000.pth.tar

关于测试代码

请问该如何测试?看了文件code/test_siamrpn.py ,感觉有些问题,能提供一下具体的测试代码吗?谢谢!

closs ==nan

Thank you for your work, there is a question I would like to ask you. Will closs ==nan appear during training? Can you help me solve it?

VID is not good?

Thank you for your implement version for SiameseRPN, I recently recurrent Siam-RPN with zkisthebest's work, I used VID dataset to train, but the results are so bad, and I just now used your version with pretrained model on VID to test OTB, results also bad, I wonder why training with VID can't get good results even though VID is also a large dataset

The pre-trained model may not match with the code

Thank you for your work on this project !
I found some problems when testing the pre-trained model on OTB. The pre-trained model and the 'net.py' file, I think, dno't match with the test code. For example, the 'net.py' file doesn;t have the "temple" method. And due to the lack of bn layers, the "delta" output is pretty big. I tried to convert the input image to double type, but the tracker still cannot find the target.
Hoping for your reply !

代码问题

data_loader文件的def center_to_corner(self, box):中 81行和82行box_[:,2],box_[:,3]的计算是什么?感觉并没有改变原有的数值啊,我的理解center to corner是(cx,cy,w,h)变为(左上x,左上y,右下x,右下y),但是看代码感觉是转变成(左上x,左上y,w,h)???corner_to_center是(左上x,左上y,右下x,右下y)转变成(cx,cy,w,h),这个我是觉得没有问题的

auc

have you verify your performance on OTB2015/2013 or VOT?

something about code

Sorry to interrupt you.Did you finish your training code and test code?But i didn‘t find your training code.

I have a trouble about np.log

Thank you for you to contribute your code.
I have a question ask for you help.
When use your code_1.0 to train vot2016 dataset. I meet an error.
I print the values of relate code
-0.99 [ 35.960415 44.26483 63.01 ... 63.01 89.51967 109.86125 ] [[-0.14122681 -0.14122681 -0.00901137 -0.02753027]
[-0.14122681 -0.14122681 -0.01105902 -0.02236539]
[-0.14122681 -0.14122681 -0.01571179 -0.01571179]]
/home/xiaoma/Siamese-RPN-pytorch/code_v1.0/data_loader.py:60: RuntimeWarning: invalid value encountered in log
diff[:,3] = np.log((gt[3] + eps)/(anchors[:,3] + eps))

I think the reason is np.log meet negative values. So how to solve the trouble about negative values

请问开始训练的时候学习率会特别大么?

我最近也在实现这个算法,用了torchvision的alexnet,新添加的卷积层Xavier初始化。用sgd优化,按论文中的学习率刚开始训练就梯度爆炸了,不知道你有没有遇到这样的情况

about training and test

Sorry to bother u,but i have some questions about the implementation of SiamRPN.When i use zkisthebest's code,the performance is so bad ,so i tried to add ur code into his,but when i train the code,it alerts the error TypeError: batch must contain tensors, numbers, dicts or lists; found <class 'PIL.Image.Image'>.So i wonder whether u can provide train.py and test.py

I got 0% in volatile GPU

I have met a question that my gpu got 0% when i run this code. could anyone give me some advice ? thanks you very much ~

youtube-bb数据集下载不下了

您好!首先谢谢您的代码,我想请问下,youtube-bb数据下载不了,还有没有其他方式可以下载这个数据集?

预训练模型

预训练模型下载后,显示有损坏,可否重新发个.zip/.war下载链接?

Test code

Which code can i use for test? I can't find one in code_v1.0

code/test_siamrpn.py?

A question about code

In _get_64_anchor(self,gtbox), can you explain why the x of anchor is 14+28a in the 'anchor = [14+28a, 14+28*b, self.anchor_shape[c][0], self.anchor_shape[c][1]]', I can not understand since the whole network stride is 15.

test fps is only about 10

We run test_siamrpn.py on DTB70,uav123 datasets, and the result shows fps is only about 10,but in paper it said 'The Siamese-RPN runs at 160 FPS while achieving leading performance in VOT2015, VOT2016 and VOT2017 real-time challenges.' Is there anything wrong ?

测试代码?

运行code中test_rpn代码跟踪不上呢,帮忙解答,万分感谢

vot2013数据集地址无效

打扰了,就是vot2013数据集无法下载,全网没找不到下载方法,能给个百度盘的下载地址吗

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.