Пример #1
0
    def __init__(self, cfg, proj_path=dirname(abspath(__file__))):
        super(SiamMask_Tracker, self).__init__()
        self.cfg = cfg
        self.mask = True

        # setting up the model
        model = SiamMaskCustom(anchors=cfg['anchors'])
        model = load_pretrain(model, join(proj_path, 'trackers/SiamMask/model.pth'))
        self.model = model.eval().to(self.device)

        # set up template memory
        self.temp_mem = THOR_SiamMask(cfg=cfg['THOR'], net=self.model)
Пример #2
0
    def __init__(self, cfg, model_path):
        super(SiamMask_Tracker, self).__init__()
        self.cfg = cfg
        self.mask = True

        # setting up the model
        # model_path = dirname(abspath(__file__)) + '/SiamMask/model.pth'
        model = SiamMaskCustom(anchors=cfg["anchors"])
        model = load_pretrain(model, model_path)
        self.model = model.eval().to(self.device)

        # set up template memory
        self.temp_mem = THOR_SiamMask(cfg=cfg["THOR"], net=self.model)