bilylee / siamfc-tensorflow Goto Github PK
View Code? Open in Web Editor NEWA TensorFlow implementation of the SiamFC tracker
License: MIT License
A TensorFlow implementation of the SiamFC tracker
License: MIT License
你好,当我执行训练时报错了,错误如下:
Traceback (most recent call last):
File "/home/cc/桌面/SiamFC-TensorFlow/experiments/SiamFC-3s-color-scratch.py", line 29, in
'--enforce_clean': False,
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/experiment.py", line 199, in run
run()
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/run.py", line 229, in call
self.result = self.main_function(*args)
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/config/captured_function.py", line 48, in captured_function
result = wrapped(*args, **kwargs)
File "/home/cc/桌面/SiamFC-TensorFlow/train_siamese_model.py", line 162, in main
_, loss, batch_loss = sess.run([train_op, model.total_loss, model.batch_loss])
File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Need minval < maxval, got 0 >= 0
[[Node: random_uniform_4 = RandomUniformInt[T=DT_INT32, Tout=DT_INT32, seed=0, seed2=0](random_uniform_4/shape, random_uniform_4/min, sub_14)]]
[[Node: train/IteratorGetNext = IteratorGetNextoutput_shapes=[[?,127,127,3], [?,255,255,3]], output_types=[DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Process finished with exit code 130 (interrupted by signal 2: SIGINT)
目前我没有搞清楚这个错误是什么原因,也未在网上找到类似的问题?
Hi,
First of all, thanks a lot for porting this to TensorFlow. I was wondering if you could please provide more instructions on how to run the benchmark tests. What do I do after downloading your code here?
Thanks!
大神又来打扰了,我按照siamesefc的matlab版本出现问题,我用的是matlab2015a,matconvnet23,在运行只跟踪的时候他出现这个错误,可是我的路径没错感觉,
function p = env_paths_tracking(p)
p.net_base_path = '/home/yangkang/yk/siamese-fc/';
p.seq_base_path = '/home/yangkang/yk/siamese-fc/demo-sequences/vot15_bag/';
csvread总是错,
Error using csvread (line 34)
File not found.
Error in load_video_info (line 21)
ground_truth = csvread([base_path '/' video '/' 'groundtruth.txt']);
Error in tracker (line 55)
[imgFiles, targetPosition, targetSize] = load_video_info(p.seq_base_path, p.video);
Error in run_tracker (line 11)
tracker(params);
hi @bilylee
我用tensorflow训练类自己的模型来着,也是直接运行run_tracking就可以进行跟踪吗?
Hi @bilylee , I'm impressed by your code. Could you please share some experience of coding? I'm not very good at coding and have difficult to write code from scratch, and i really wanna know how to produce such good code. Could you please give me some advice? Could you leave your email address?
I wanna ask as title describe..
as title described ,i wanna track hand, if i train it with my own hand dataset, it will be better? and how do i make the train dataset?
看了论文中没搞清楚是怎么调整框大小,想请教下,谢谢
请问一下tracker_benchmark/trackers/SiamFC这个文件里面存放的是什么呢,
我在运行这步时:echo "tb100" | python tracker_benchmark/run_trackers.py -t SiamFC -s tb100 -e OPE
所有视频都已经做完,并且在tracker_benchmark\results\OPE\SiamFC里也生成了每个视频对应的json文件,然后run_trackers.py里面会读取tracker_benchmark/trackers/SiamFC里面的内容,但是这里面是空,导致程序运行不下去了。请问有什么解决的办法么
在执行preprocess_VID_data.py时,执行到最后报错xml.etree.ElementTree.ParseError: no element found: line 1, column 0.此时我看ILSVRC2015_curation文件夹已经生成,但是如果继续执行build_VID2015_IMBD.py后训练的话,训练时会报错"有空的图片".请问这是什么原因呢,是我下载的数据集有损坏的吗
hi! @bilylee 我想知道 get_subwindow_avg 中的pos是什么左上角的坐标还是中心点坐标,还有那几个pad是什么,目的是要将图像填充至图像patch大小吗?谢谢~
Hi Bily,
can I ask how did you obtain the constant 'num_examples_per_epoch' in your config file?
I looked into the training dataset by the following code snippet,
dataset = VID('data/train_imdb.pickle', 100)
print(dataset.epoch_size) # output is 8418
The epoch size is 8418 so the number of examples per epoch (num_examples_per_epoch) should be
8418 * 8 = 67,344?
Can you tell me if I mistook anything?
Best regards,
Yiming
I tried to run a batch of data with "get_image_embedding", but I found different batch sizes will cause different outputs.
For example,
I run self.get_image_embedding(tf.zeros((1,127,127,3)))[0]
and self.get_image_embedding(tf.zeros((30,127,127,3)))[0]
in inference_wrapper.py, the results will be slightly different.
I guess batch_norm layers cause this problem, but I don't know how to fix it.
I wonder whether it have any solutions? Thanks!
Hello! I tested SiamFC-3s-color-pretrained model on OTB2013 with your python-ported eval code. However, the OPE AUC is about 0.5868, lower than reported 0.608 in SiamFC paper, And the tracker MEEM reachs 0.5561 while reported 0.566 in corresponding papers. Codes for eval your tf-SiamFC: python run_trackers.py -t "SiamFC" -s cvpr13, and plot : python draw_graph.py. Is anything inconsistent with your settings? Thanks very much.
Hi I notice that your training for the two model SiamFC-3s-color and SiamFC-3s-gray taked about 5 hours. But when I try to tarin a SiamFC-3s-color model, it takes 10 hours with a NVIDIA K80 GPU for 50 epochs. Do you have any idea of this speed droop? Thank you.
Excuse me, when I am executing the script Siamese-3s-color-scratch.py, it came up this problem:
`INFO - SiamFC-3s-color-scratch - Running command 'main'
INFO - SiamFC-3s-color-scratch - Started run with ID "22"
INFO - root - Using largest free memory GPU 1 with free memory 11101.375MB
INFO - root - preproces -- siamese_fc_color
INFO - root - embedding init method -- kaiming_normal
INFO - root - preproces -- None
2018-07-16 09:44:40.331186: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2018-07-16 09:44:41.609915: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
name: Tesla K40c major: 3 minor: 5 memoryClockRate(GHz): 0.745
pciBusID: 0000:84:00.0
totalMemory: 11.17GiB freeMemory: 10.77GiB
2018-07-16 09:44:41.609956: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:84:00.0, compute capability: 3.5)
INFO - root - Train for 1250 steps
2018-07-16 09:44:44.885479: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:44.896464: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
INFO - root - 2018-07-16 09:44:46.990354: step 0, total loss = 3.11, batch loss = 2.54 (3.3 examples/sec; 2.413 sec/batch; 0h:50m:16s remains)
2018-07-16 09:44:47.238187: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.248992: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.251950: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.253937: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.255833: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.257882: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.259775: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.262073: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.264808: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.267238: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.269300: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.271260: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.273237: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.275208: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.277163: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.279094: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.281016: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.283020: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.285041: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.287280: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.289991: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.292109: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.294060: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.296047: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.298024: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.299885: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.301802: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.304281: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.306734: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.308728: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.310470: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.312440: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.314521: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.316580: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.318557: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.320619: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.322688: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.324736: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.326882: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.328834: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.330843: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.332869: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.334772: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.336784: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.338743: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.340699: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.342661: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.344552: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.346522: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.348528: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.350599: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.352681: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.354781: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.357392: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.359764: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.361748: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.363640: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.365568: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.367669: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.369718: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.372234: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.374938: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.377226: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.379163: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.381073: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.382975: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.384849: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.386896: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.388950: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.390904: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.392747: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.394711: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.396606: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.398464: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.400504: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.402437: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.404321: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.406220: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.408037: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.409904: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.411681: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.413505: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.415371: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.417238: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.419104: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.421027: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.422872: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.424850: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.426852: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.428696: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.430666: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.432671: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.434638: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.436560: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.438525: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.440986: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.443297: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.445647: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.448020: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.449949: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
2018-07-16 09:44:47.452290: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: exceptions.StopIteration: Iteration finished.
ERROR - SiamFC-3s-color-scratch - Failed after 0:00:16!
Traceback (most recent call last):
File "experiments/SiamFC-3s-color-scratch.py", line 29, in
'--enforce_clean': False,
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/experiment.py", line 209, in run
run()
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/run.py", line 221, in call
self.result = self.main_function(*args)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/config/captured_function.py", line 46, in captured_function
result = wrapped(*args, **kwargs)
File "experiments/../train_siamese_model.py", line 180, in main
summary_str = sess.run(summary_op)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: End of sequence
[[Node: validation/IteratorGetNext = IteratorGetNextoutput_shapes=[[?,127,127,3], [?,255,255,3]], output_types=[DT_UINT8, DT_UINT8], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
[[Node: validation/Loss/CD-err/auc/assert_less_equal/Assert/AssertGuard/Assert/_86 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_965_validation/Loss/CD-err/auc/assert_less_equal/Assert/AssertGuard/Assert", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
Caused by op u'validation/IteratorGetNext', defined at:
File "experiments/SiamFC-3s-color-scratch.py", line 29, in
'--enforce_clean': False,
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/experiment.py", line 209, in run
run()
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/run.py", line 221, in call
self.result = self.main_function(*args)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/sacred/config/captured_function.py", line 46, in captured_function
result = wrapped(*args, **kwargs)
File "experiments/../train_siamese_model.py", line 106, in main
model_va.build(reuse=True)
File "experiments/../siamese_model.py", line 210, in build
self.build_inputs()
File "experiments/../siamese_model.py", line 62, in build_inputs
exemplars, instances = self.dataloader.get_one_batch()
File "experiments/../datasets/dataloader.py", line 103, in get_one_batch
return self.iterator.get_next()
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 259, in get_next
name=name))
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/ops/gen_dataset_ops.py", line 706, in iterator_get_next
output_shapes=output_shapes, name=name)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/home/jiangshan/.conda/envs/py2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1470, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
OutOfRangeError (see above for traceback): End of sequence
[[Node: validation/IteratorGetNext = IteratorGetNextoutput_shapes=[[?,127,127,3], [?,255,255,3]], output_types=[DT_UINT8, DT_UINT8], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
[[Node: validation/Loss/CD-err/auc/assert_less_equal/Assert/AssertGuard/Assert/_86 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_965_validation/Loss/CD-err/auc/assert_less_equal/Assert/AssertGuard/Assert", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]`
您好,感谢您的贡献!
我想请问一下convolutional_alexnet.py中关于conv2 conv4 conv5实现,为什么要spilt,然后创建两个conv层进行处理?
谢谢!
尊敬的师兄:
您好。我是武汉大学国家多媒体中心研一的学生,目前也在做跟踪方向,不知您是否方便加下我的QQ:852370792(师兄的QQ肯定不愿对外公布啦,期盼师兄看到消息可以加下我)。今后有问题想请教您。
SiameseFC tracker benchmark fails while running
echo "tb50" | python tracker_benchmark/run_trackers.py -t SiamFC -s tb50 -e OPE
Have followed instructions as per the git readme file.
With the following message
Input Test name : Starting benchmark for 1 trackers, evalTypes : ['OPE']
1_SiamFC, 1_Basketball:1/1 - OPE
failed to execute SiamFC : (<type 'exceptions.IOError'>, IOError(2, 'No such file or directory'), <traceback object at 0x7f5812427248>)
Traceback (most recent call last):
File "tracker_benchmark/run_trackers.py", line 148, in
main(sys.argv[1:])
File "tracker_benchmark/run_trackers.py", line 52, in main
trackers, seqs, evalType, shiftTypeSet)
File "tracker_benchmark/run_trackers.py", line 140, in run_trackers
butil.save_seq_result(seqResults)
File "/export/livia/home/vision/mkiran/work/Siamese2/tracker_benchmark/scripts/butil/load_results.py", line 9, in save_seq_result
tracker = result[0].tracker
你好~看了你tensorflow实现的非常的优美高效。请问一下,有考虑过在pytorch上实现吗?感觉会更简洁呢,为什么不在pytorch上做呢?是这么做过遇到了什么问题吗?
Hello, I would like to ask about the issue on the VOT evaluation, why do I always suggest that there is no TraX support when testing it!
Hello
I have encountered a problem in the code which lies in line .
def get_mean(values):
with tf.name_scope('mean'):
mean, update_op = tf.metrics.mean(values) # values = [1, 2, 3, 4, 5]
with tf.control_dependencies([update_op]):
mean = tf.identity(mean)
return mean
g = tf.Graph()
g.as_default()
values = tf.convert_to_tensor([1, 2, 3, 4, 5], dtype=tf.float32)
mean= get_mean(values)
init_global_variables = tf.global_variables_initializer()
init_local_variables = tf.local_variables_initializer()
g.finalize()
sess = tf.InteractiveSession(graph=tf.get_default_graph())
sess.run(init_global_variables)
sess.run(init_local_variables)
print sess.run(values)
for i in range(5):
print 'mean:', sess.run(mean)
# out:
# [1. 2. 3. 4. 5.]
# mean: 0.0
# mean: 6.0
# mean: 4.5
# mean: 4.0
# mean: 3.75
# not corresponding to my expectation
# expected values are:
# [1. 2. 3. 4. 5.]
# mean: 3.0
# mean: 3.0
# mean: 3.0
# mean: 3.0
# mean: 3.0
# reasons as following:
# iter: 1
# total = 1+2+3+4+5 = 15
# count = 1+1+1+1+1 = 5
# mean = 15 / 5 = 3
# iter: 2
# total = 15 + 15 = 30
# count = 5 + 5 = 10
# mean = 30 / 10 = 3
...
您好,我特地研究了一下construct_gt_score_maps这个函数。制作gt标签的。这个函数接收response的大小即response_size,1717。然后制作的标签结果全部为Bach_size1717的gt map,用来与响应图做交叉熵。不过所有的gt标签,即Bach_size17*17tensor里面的元素值都为1.0,即全1矩阵。这一点不太理解,为何训练时所有的gt标签都是全1 的tensor???
作者好,我想问这两个脚本函数有什么区别?我如果用这两个脚本分别训练得到2个网络,在otb100上测试得到两个不同的OPE结果,那应该选择哪个与原文的58.2进行比较呀,我一直拿的color的进行比较,感觉好像有点困惑,原文的话好像用的gray得到58.2。而我拿color进行比较。谢谢解答
Really a great work and clear structure! Impressed and grateful!
However, I don,t quite understand why you added augmentation to X and Z, during training and validation. If I understand correctly, the ground truth heatmap would always be Centered Gaussian. In this way, it is not reasonable to do things like random crop, right?
And during training, I do identify some inputs that does not make so much sense.
Am I missing part of your codes, or this is something we should discuss?
Thank you very much! And I mean it that this is a great work!
在数据的预处理过程中,使用的图像读写函数为CV2.imread,这样图像数组的存入顺序应该是BGR,而在infer_utils中,你所处理的顺序还是RGB,这样会不会有什么问题呢?
我发现在从零开始训练时,在train_siamese_model.py文件中既定义了train的model,又定义了validation的model_va,在后续代码中,仅执行了训练过程的代码,并没有执行验证过程,也就是说验证模型是建立了但是没有用到。这一点您注意到了吗?
我想问问一个关于学习率的参数,lr_decay_factor是怎么得到呢?
Thank you for your work, however, VID dataset (http://bvisionweb1.cs.unc.edu/ilsvrc2015/ILSVRC2015_VID.tar.gz )is hard for me to download, can you provide an alternative link to download?
Note that the original link for Luca's imdb_video.mat is also unavailable.
Moreover, We observe that the tracking performance of saved models in different epochs varies considerably, therefore, you may want to evaluate a few more models instead of just picking the model in the last epoch.
I tested the code, trained and evaluated the tracker and the performance on OTB 100 using the last checkpoint only reached 0.527 for overlap AUC. Could u pls tell which checkpoint did you used for the reported 0.58+ performance? Thx in advance @bilylee
I try this code on my MacBook and a server and it works fine. But when I migrate to TX2 it fails with lots of NAN or INF network response.
Does anyone have ideas about this problem?
Is there any precision problem I need to consider while using this code on TX2?
Help wanted.
loss = tf.nn.sigmoid_cross_entropy_with_logits(logits=response,
labels=gt)
这个函数在全卷积中的形式是什么样呀,一维的看的明白,这是在【8,15,15】还有【8,17,17】的维度上直接用的,如果把人脸中的center loss加进来的话,这样的函数维度应该怎么匹配啊?最近没看明白,centerl loss函数该怎么加啊。谢谢作者,没人讨论,就自己在看
博主,请问你有看过CVPR2018的一篇SiameseRPN的文章吗?这个跟踪器在VOT上效果非常好,是否有兴趣复现一下呢?
Hi Bily大神,
I have a question about your configuration setup. In MODEL_CONFIG
, there is an item called adjust_response_config
, and you added a comment in siamese_model.py
:
Adjust score, this is required to make training possible
Can you please provide some more explanation on the principle / reason behind that? Whether and when is it necessary to adjust the train_bias
and scale
parameters?
您好,感谢您的代码分享。
这段时间我尝试把每一帧时候inference_wrapper 中的 search_images 保留下来为image_reserve,并用于之后的图片帧的warp。不知道是不是tensorflow 框架设计上理解不够透彻。我尝试了以下两种办法都失败了:
Hello,Thanks for your share very much.
I meet a question:when I experiment with your work on GTX1080, it gave 40fps, but you gave 120fps, can you tell me why? I have changed nothing...
你好,近些天,研读您的code,关于数据输入一直没有看懂,可否加您微信询问,感谢。我的微信是18810813525
你好,请问这个算法可以在VOT上评测么?就是vot的结果怎么复现呀?在作者你的算法的框架下如何评测。谢谢
在dataloader.py中,在对图像处理中 self.x_transform最终的图像为什么不是255,而是255-2*8呢?
if preprocess_name == 'siamese_fc_color':
self.v_transform = None
# TODO: use a single operation (tf.image.crop_and_resize) to achieve all transformations ?
self.z_transform = Compose([RandomStretch(),
CenterCrop((255 - 8, 255 - 8)),
RandomCrop(255 - 2 * 8),
CenterCrop((127, 127))])
self.x_transform = Compose([RandomStretch(),
CenterCrop((255 - 8, 255 - 8)),
RandomCrop(255 - 2 * 8), ])
出错提示如下:
Traceback (most recent call last):
File "/home/cc/桌面/SiamFC-TensorFlow-master/experiments/SiamFC-3s-color-pretrained.py", line 32, in
'--enforce_clean': False,
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/experiment.py", line 199, in run
run()
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/run.py", line 229, in call
self.result = self.main_function(*args)
File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/config/captured_function.py", line 48, in captured_function
result = wrapped(*args, **kwargs)
File "/home/cc/桌面/SiamFC-TensorFlow-master/scripts/convert_pretrained_model.py", line 64, in main
model.build()
File "/home/cc/桌面/SiamFC-TensorFlow-master/siamese_model.py", line 209, in build
self.setup_embedding_initializer()
File "/home/cc/桌面/SiamFC-TensorFlow-master/siamese_model.py", line 193, in setup_embedding_initializer
'convolutional_alexnet/', 'detection/')
File "/home/cc/桌面/SiamFC-TensorFlow-master/utils/train_utils.py", line 163, in load_mat_model
params = get_params_from_mat(matpath)
File "/home/cc/桌面/SiamFC-TensorFlow-master/utils/train_utils.py", line 70, in get_params_from_mat
netparams = sio.loadmat(matpath)["net"]["params"][0][0]
File "/home/cc/anaconda3/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 141, in loadmat
MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs)
File "/home/cc/anaconda3/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 64, in mat_reader_factory
byte_stream, file_opened = _open_file(file_name, appendmat)
TypeError: 'NoneType' object is not iterable
很明显是sio.loadmat()在执行时,产生某种意外错误。或许是跟 '--enforce_clean': False,这个参数有关。但当我新建一个脚本单独运行:
import scipy.io as sio
matpath="assets/2016-08-17.net.mat"
netparams = sio.loadmat(matpath)["net"]["params"][0][0]
print(type(netparams))
结果正常,并未报错。
所以想问下您这是什么情况?感觉非常奇怪?
您好!想确认一下在测试过程中BN层的mean和var用的是训练过后得到的全局的还是测试样本自身的呢?
2018-03-03 19:58:51.291709: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Expected image (JPEG, PNG, or GIF), got unknown format starting with 'f\362g\0028\367KJ8\2332\311G9\321' [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=3, dct_method="INTEGER_ACCURATE", fancy_upscaling=true, ratio=1, try_recover_truncated=false](ReadFile_1)]] ERROR - SiamFC-3s-color-scratch - Failed after 0:00:57! Traceback (most recent calls WITHOUT Sacred internals): File "train_siamese_model.py", line 168, in main _, loss, batch_loss = sess.run([train_op, model.total_loss, model.batch_loss]) File "/home/yang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run run_metadata_ptr) File "/home/yang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1120, in _run feed_dict_tensor, options, run_metadata) File "/home/yang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run options, run_metadata) File "/home/yang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call raise type(e)(node_def, op, message) InvalidArgumentError: Expected image (JPEG, PNG, or GIF), got unknown format starting with 'f\362g\0028\367KJ8\2332
\311G9\321'
[[Node: DecodeJpeg_1 = DecodeJpegacceptable_fraction=1, channels=3, dct_method="INTEGER_ACCURATE", fancy_upscaling=true, ratio=1, try_recover_truncated=false]]
[[Node: train/IteratorGetNext = IteratorGetNextoutput_shapes=[[?,127,127,3], [?,239,239,3]], output_types=[DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
我在笔记本上先用cpu测试的,然后通的话在服务器上跑,这和这有关系么?如过作者看到请联系qq:779760348,非常感谢,这个问题找了好几天,实在没办法了,谢谢大神
I have been trying to fine tune the model based on a pre-trained checkpoint and a different dataset. Is the embedding config meant for this? Can I please get some pointers to setup the config for finetuning?
Dear @bilylee,
Thank you for your fantastic work.
I want to change the Base CNN model of your code via another one (e.g., ResNet50). Do you have any idea that how can I do that?
yangkang@node1:~$ echo "tb50" | python tracker_benchmark/run_trackers.py -t SiamFC -s tb50 -e OPE Traceback (most recent call last):
File "tracker_benchmark/run_trackers.py", line 6, in
from scripts import *
File "/home/yangkang/tracker_benchmark/scripts/init.py", line 2, in
from bscripts import *
File "/home/yangkang/tracker_benchmark/scripts/bscripts/init.py", line 24, in
from run_SiamFC import *
File "/home/yangkang/tracker_benchmark/scripts/bscripts/run_SiamFC.py", line 19, in
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: /usr/local/MATLAB/MATLAB_Production_Server/R2015a/extern/engines/python/dist/matlab/engine/glnxa64/../../../../../../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
我按照这个方法解决可是没有成功,还是失败,ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/MATLAB/MATLAB_Production_Server/R2015a/extern/engines/python/dist/matlab/engine/glnxa64/../../../../../../../sys/os/glnxa64/libstdc++.so.6
谢谢。单纯运行benchmark的话运行到第一个视频自动结束就报错了,outlist好像
你好,我现在正在复现siamfc网络,但在你的框架下始终无法复现结果。
我先自己训练了一个用pytorch写的siamfc,替换了原作者放出的tensorflow版本的siamfc中的网络,可以复现结果。代码可见:https://github.com/huanglianghua/siamfc-pytorch
主要网络部分如下:
def __init__(self):
super(SiameseNet, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(3, 96, 11, 2),
nn.BatchNorm2d(96),
nn.ReLU(inplace=True),
nn.MaxPool2d(3, 2)
)
self.conv2 = nn.Sequential(
nn.Conv2d(96, 256, 5, 1, groups=2),
nn.BatchNorm2d(256),
nn.ReLU(inplace=True),
nn.MaxPool2d(3, 2)
)
self.conv3 = nn.Sequential(
nn.Conv2d(256, 384, 3, 1),
nn.BatchNorm2d(384),
nn.ReLU(inplace=True)
)
self.conv4 = nn.Sequential(
nn.Conv2d(384, 384, 3, 1, groups=2),
nn.BatchNorm2d(384),
nn.ReLU(inplace=True)
)
self.conv5 = nn.Sequential(
nn.Conv2d(384, 32, 3, 1, groups=2)
)
self.branch = nn.Sequential(
self.conv1,
self.conv2,
self.conv3,
self.conv4,
self.conv5
)
self.bn_adjust = nn.BatchNorm2d(1)
def forward(self, z, x):
z = self.branch(z)
x = self.branch(x)
out = self.xcorr(z, x)
out = self.bn_adjust(out)
return out
然后我修改了你的框架,替换了inference.tracker中的网络。具体方法如下:
修改了inference_wrapper.inference_step(self, sess, input_feed)
函数,使其返回self.search_images
和self.exemplar_images
(我查看过返回的图像,没有问题)
在inference_wrapper.tracker
中利用代码:
outputs, metadata = self.siamese_model.inference_step(sess, input_feed)
从outputs中拿到search_images
和exemplar_images
,利用我自己的网络得到response,再用tf.image.resize_images
放大8倍得到最后的输出response,替换原来的response
训练用的是datasets
部分生成的数据,label的标签是0, 1分类,使用binary_cross_entropy_with_logits得到最后的loss
然而运行run_tracking.py后得到的效果很差,几乎追踪不到目标,我在想是不是因为response的范围不同造成的?希望能指点一下,谢谢!
how to transform the graph of inference to frozen_graph
Could you give me the introduction about how to evaluate it on VOT2016 by python? (方便的话,中文交流)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.