-
导入环境:
# 导入docker镜像 vot_toolkit.tar 路径在/nas_dataset/docker_images/vot_toolkit.tar docker load --input vot_toolkit.tar # 根据docker镜像建立容器 sudo docker run --gpus all --shm-size=60g -it -v /你的本地项目路径:/test -w /test vot_toolkit
-
生成配置文件
在该目录下生成三个文件-
trackers.ini:
[TRACKALL] # <tracker-name> label = TRACKALL protocol = traxpython command = tracker_vot # Specify a path to trax python wrapper if it is not visible (separate by ; if using multiple paths) paths = /test # Additional environment paths env_PATH = <additional-env-paths>;${ PATH}
tracker-name(中括号那个),label,根据自己跟踪器情况而定。
paths:运行文件所在目录
command:运行跟踪器的启动文件(需要在上面的paths下有command.py这个文件。在上面这个例子就是需要在 文件目录 下面有tracker_vot.py这个文件。
然后参照官方调试用跟踪器的示例文件,修改自己的跟踪器的启动文件,添加trax等通信代码。
-
tracker_vot.py:
模仿官方的tracker的输入输出去写即可class NCCTracker(object): def __init__(self, image, region): """ image: np.array->[h,w,3] region: bbox """ # 帧的初始化在init中完成 self.window = max(region.width, region.height) * 2 left = max(region.x, 0) top = max(region.y, 0) right = min(region.x + region.width, image.shape[1] - 1) bottom = min(region.y + region.height, image.shape[0] - 1) self.template = image[int(top):int(bottom), int(left):int(right)] self.position = (region.x + region.width / 2, region.y + region.height / 2) self.size = (region.width, region.height) def track(self, image): left = max(round(self.position[0] - float
-
VOT测试自己的数据集
最新推荐文章于 2022-08-12 14:29:29 发布