facenet-pytorch icon indicating copy to clipboard operation
facenet-pytorch copied to clipboard

Load models offline, from model

Open apiszcz opened this issue 3 years ago • 1 comments

How does one load the models from a folder?

Reviewing https://github.com/timesler/facenet-pytorch/blob/master/models/mtcnn.py does not indicate a user set for the file path of the model.

Any pointers appreciated, thank you.

apiszcz avatar Mar 06 '21 21:03 apiszcz

I read the source code of InceptionResnetV1 and I figured out how to do that for InceptionResnetV1:

        self.net = InceptionResnetV1(classify=True, num_classes=8631)
        self.net.load_state_dict(torch.load(r'./media/checkpoints/20180402-114759-vggface2.pt'))

CassiniHuy avatar Mar 29 '21 01:03 CassiniHuy