init commit of samurai

This commit is contained in:
Cheng-Yen Yang
2024-11-19 22:12:54 -08:00
parent f65f4ba181
commit c17e4cecc0
679 changed files with 123982 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from lib.test.utils import TrackerParams
import os
from lib.test.evaluation.environment import env_settings
from lib.config.artrack.config import cfg, update_config_from_file
def parameters(yaml_name: str):
params = TrackerParams()
prj_dir = env_settings().prj_dir
save_dir = env_settings().save_dir
# update default config from yaml file
yaml_file = os.path.join(prj_dir, 'experiments/artrack/%s.yaml' % yaml_name)
update_config_from_file(yaml_file)
params.cfg = cfg
print("test config: ", cfg)
# template and search region
params.template_factor = cfg.TEST.TEMPLATE_FACTOR
params.template_size = cfg.TEST.TEMPLATE_SIZE
params.search_factor = cfg.TEST.SEARCH_FACTOR
params.search_size = cfg.TEST.SEARCH_SIZE
# Network checkpoint path
params.checkpoint = os.path.join(save_dir, "checkpoints/train/artrack/%s/ARTrack_ep%04d.pth.tar" %
(yaml_name, cfg.TEST.EPOCH))
# whether to save boxes from all queries
params.save_all_boxes = False
return params