Closed yangkang779 closed 6 years ago
你好,
在 VOT 上评测需要做一些修改,具体请参考:http://www.votchallenge.net/howto/integration.html
另外,本份代码并不能得到作者在论文里贴出的 VOT 的结果。事实上,用作者的代码和模型同样不能得到论文中的结果。原因还未知。
好的,可能作者调了参数,两个数据集评价还是有很有区别得,我想问下,你用本份代码得到得结果大概低多少呀?有评测得脚本么?谢谢,可以的话能发我一份么?非常感谢,779760348@qq.com
你好,可是我没有弄好接口。请问你有可以测试vot的python 脚本么?
我的一直卡在trax过不去,已经卡好久了
你好,我在vot上跑通了这个代码,可是得到vot15的EAO比原文低很多,我得到的结果是0.23,而siamfc3s报的是0.29左右,这个差的有点多啊,确实不知道哪出了问题,谢谢。
你好,可是我没有弄好接口。请问你有可以测试vot的python 脚本么?
您好,请问你实现了VOT测试了吗?可以给您的VOT的python实现脚本我吗?可以发我一份吗?本人邮箱是hjh381@qq.com,感谢感谢 或者您有遇到过图片中的问题吗? 参数我是如下图设置的
@yangkang779 @JoeHoo Sorry for disturbing you! I am working on using vot-toolkit on the tracker, but I maybe need a little help for the vot scripts of this tracker. Have you solved the problem? I wish you can give me some help ( a template or some tips). Thank you very much! Hope for your reply! Best Wishes!
The scripts run_siamfc_vot.py as follows: # import logging import os import sys import os.path as osp import time import vot from os import path import cv2 import logging import os import sys import time from vot import Rectangle import numpy as np import tensorflow as tf CODE_ROOT = SiamFC-TensorFlow/' CHECKPOINT = 'SiamFC-TensorFlow/Logs/SiamFC/track_model_checkpoints/SiamFC-3s-color-scratch' sys.path.insert(0, CODE_ROOT) from utils.misc_utils import auto_select_gpu, load_cfgs from inference import inference_wrapper from inference.tracker import Tracker from utils.infer_utils import Rectangle as rectan
os.environ['CUDA_VISIBLE_DEVICES'] = auto_select_gpu() tf.logging.set_verbosity(tf.logging.DEBUG)
class SiameseTracker: def init(self, debug=0, checkpoint='/home/yangkang/tracking/SiamFC-TensorFlow/Logs/SiamFC/track_model_checkpoints/SiamFC-3s-color-scratch'): os.environ['CUDA_VISIBLE_DEVICES'] = auto_select_gpu()
model_config, _, track_config = load_cfgs(checkpoint)
track_config['log_level'] = debug
g = tf.Graph()
with g.as_default():
model = inference_wrapper.InferenceWrapper()
restore_fn = model.build_graph_from_config(model_config, track_config, checkpoint)
g.finalize()
gpu_options = tf.GPUOptions(allow_growth=True)
sess_config = tf.ConfigProto(gpu_options=gpu_options)
sess = tf.Session(graph=g, config=sess_config)
# sess.run(tf.global_variables_initializer())
restore_fn(sess)
tracker = Tracker(model, model_config=model_config, track_config=track_config)
self.tracker = tracker
self.sess = sess
self.graph = g
def set_first_frame(self, frame, r):
init_bb = Rectangle(r[0] , r[1] , r[2], r[3])
self.tracker.initialize(self.sess, init_bb, frame)
def track(self, frame):
reported_bbox = self.tracker.track(self.sess, frame)
return reported_bbox
handle = vot.VOT("rectangle") selection = handle.region() imagefile = handle.frame() if not imagefile: sys.exit(0) image = cv2.imread(imagefile) tracker = SiameseTracker(debug=0) tracker.set_first_frame(image, selection)
while True: imagefile = handle.frame() if not imagefile: break image = cv2.imread(imagefile)
region=tracker.track(image)
region=Rectangle(region[0],region[1],region[2],region[3])
handle.report(region)
The inference/tracker.py should add initialize() function, as follows: class Tracker(object): """Tracker based on the siamese model."""
def __init__(self, siamese_model, model_config, track_config):
self.siamese_model = siamese_model
self.model_config = model_config
self.track_config = track_config
self.num_scales = track_config['num_scales']
logging.info('track num scales -- {}'.format(self.num_scales))
scales = np.arange(self.num_scales) - get_center(self.num_scales)
self.search_factors = [self.track_config['scale_step'] ** x for x in scales]
self.x_image_size = track_config['x_image_size'] # Search image size
self.window = None # Cosine window
self.log_level = track_config['log_level']
self.frame2crop_scale = None
self.original_target_height = None
self.original_target_width = None
self.search_center = None
self.current_target_state = None
self.logdir = None
self.frame_cnt = 0
def initialize(self, sess, first_bbox, frame, logdir='/tmp'):
"""Runs tracking on a single image sequence."""
# Get initial target bounding box and convert to center based
bbox = convert_bbox_format(first_bbox, 'center-based')
# Feed in the first frame image to set initial state.
bbox_feed = [bbox.y, bbox.x, bbox.height, bbox.width]
input_feed = [frame, bbox_feed]
self.frame2crop_scale = self.siamese_model.initialize(sess, input_feed)
# Storing target state
self.original_target_height = bbox.height
self.original_target_width = bbox.width
self.search_center = np.array([get_center(self.x_image_size),
get_center(self.x_image_size)])
self.current_target_state = TargetState(bbox=bbox,
search_pos=self.search_center,
scale_idx=int(get_center(self.num_scales)))
self.logdir = logdir
self.frame_cnt = 0
@yangkang779 Thank you!
@yangkang779 I solved the last error. It occurs when the input is an image, not a image path! So I changed the run_siamfc_vot.py : "region=tracker.track(imagefile)". But when I run the codes again, there is a new error for me. The details are as followed: CLIENT: Creating process /home/geng/anaconda3/envs/tensorflow/bin/python -c "import sys; sys.path.append('/home/geng/project/SiamFC-TensorFlow-master'); import run_siamfc_vot" CLIENT: Working directory is /tmp/tpc5107131_5b2f_4b6e_b1cf_95c00596a436 CLIENT: Starting process CLIENT: Setting up TraX with standard streams connection @@TRAX:hello "trax.name=" "trax.family=" "trax.image=path;" "trax.region=rectangle;" "trax.description=" "trax.version=2" "trax.channels=color;" CLIENT: Tracker process ID: 31463 CLIENT: Connection with tracker established. @@TRAX:initialize "file:///home/geng/project/vot-toolkit-master/sa/sequences/bag/color/00000001.jpg" "292.2300,128.3600,145.9600,132.4700" @@TRAX:state "292.2300,128.3600,145.9600,132.4700" Error || 和 && 运算符的操作数必须能够转换为逻辑标量值。 2019-05-17 10:45:30.610356: 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 2019-05-17 10:45:30.665817: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-05-17 10:45:30.666048: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 1070 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.683 pciBusID: 0000:01:00.0 totalMemory: 7.93GiB freeMemory: 5.68GiB 2019-05-17 10:45:30.666059: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) INFO:tensorflow:Restoring parameters from /home/geng/project/SiamFC-TensorFlow-master/Logs/SiamFC/track_model_checkpoints/SiamFC-3s-color-scratch/model.ckpt-192850 INFO:tensorflow:Restoring parameters from /home/geng/project/SiamFC-TensorFlow-master/Logs/SiamFC/track_model_checkpoints/SiamFC-3s-color-scratch/model.ckpt-192850 @@TRAX:frame "file:///home/geng/project/vot-toolkit-master/sa/sequences/bag/color/00000002.jpg" @@TRAX:quit Traceback (most recent call last): CLIENT: Cleaning up. CLIENT: Stopping logger thread CLIENT: Trying to stop process using protocol. CLIENT: Flushing streams CLIENT: Process should be terminated. CLIENT: Stopping logger. CLIENT: Tracker exited (exit code 1) Tracker execution interrupted: Did not receive response. As you can see, the main problem is that there is no response to report. So I changed the codes in tracker.py to try to make the return to be the correct bbox format. But I failed. I wonder whether the vot-toolkit is evaluating a tracker on a single image in a sequence one by one, the output is only a bbox for an image rather than a list or a tuple(for all image tracking results)? Looking for your reply! Best Wishes.
这个是anaconda的问题,应该不要用anaconda的tensorflow环境,用你自己的python环境配置tensorflow应该没问题.
@yangkang779 好的,谢谢大佬,我去试试!大佬方便给个联系方式吗?我的qq是695185348,邮箱是695185348@qq.com, 您这边能提供个邮箱或用qq联系吗?希望能请教一些细节上的问题,万分感谢!
Email 20172212247@nuist.edu.cn
@yangkang779 谢谢大佬的代码,我这里终于调通了!我发现暂时不是环境的问题,是我在改tracker.py中的track函数时出的问题,本来是要对单帧做预测的,我没有改好current_target_state,所以一直有问题!谢谢大佬的帮助!
好的,不用客气,调通就行
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: GengMingjin2 notifications@github.com 发送时间: 2019年5月17日 17:31 收件人: bilylee/SiamFC-TensorFlow SiamFC-TensorFlow@noreply.github.com 抄送: yangkang779 779760348@qq.com, Mention mention@noreply.github.com 主题: 回复:[bilylee/SiamFC-TensorFlow] vot的python评测接口 (#38)
@yangkang779 谢谢大佬的代码,我这里终于调通了!我发现问题暂时不是环境的问题,是我在改tracker.py中的track函数时出的问题,本来是要对单帧做预测的,我没有改好current_target_state,所以一直有问题!谢谢大佬的帮助!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
你好,请问这个算法可以在VOT上评测么?就是vot的结果怎么复现呀?在作者你的算法的框架下如何评测。谢谢