def __init__(self, weights_file='./Models/sppe/fast_res50_256x192.pth'):
        super().__init__()

        self.pyranet = FastPose('resnet50', 17).cuda()
        print('Loading pose model from {}'.format(weights_file))
        self.pyranet.load_state_dict(torch.load(weights_file))
        self.pyranet.eval()
Beispiel #2
0
    def __init__(self, weights_file='./Models/sppe/fast_res101_320x256.pth'):
        super().__init__()

        self.pyranet = FastPose('resnet101').cuda()
        print('Loading pose model from {}'.format(weights_file))
        self.pyranet.load_state_dict(
            torch.load(weights_file, map_location=torch.device('cpu')))
        self.pyranet.eval()
Beispiel #3
0
    def __init__(self, dataset, weights_file='./Models/sppe/fast_res101_320x256.pth'):
        super().__init__()

        self.pyranet = FastPose('resnet101').cuda()
        print('Loading pose model from {}'.format(weights_file))
        sys.stdout.flush()
        self.pyranet.load_state_dict(torch.load(weights_file))
        self.pyranet.eval()
        self.pyranet = model

        self.dataset = dataset