Spaces:
Sleeping
Sleeping
# -------------------------------------------------------- | |
# Python Single Object Tracking Evaluation | |
# Licensed under The MIT License [see LICENSE for details] | |
# Written by Fangyi Zhang | |
# @author [email protected] | |
# @project https://github.com/StrangerZhang/pysot-toolkit.git | |
# Revised for SiamMask by foolwood | |
# -------------------------------------------------------- | |
from .vot import VOTDataset | |
class DatasetFactory(object): | |
def create_dataset(**kwargs): | |
""" | |
Args: | |
name: dataset name 'VOT2018', 'VOT2016' | |
dataset_root: dataset root | |
Return: | |
dataset | |
""" | |
assert 'name' in kwargs, "should provide dataset name" | |
name = kwargs['name'] | |
if 'VOT2018' == name or 'VOT2016' == name: | |
dataset = VOTDataset(**kwargs) | |
else: | |
raise Exception("unknow dataset {}".format(kwargs['name'])) | |
return dataset | |