Merge pull request #115 from mowshon/patch-1

Face detection checkpoint will be downloaded automatically.
This commit is contained in:
Prajwal 2020-10-22 19:50:51 +05:30 committed by GitHub
commit d41b9b1020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ class SFDDetector(FaceDetector):
super(SFDDetector, self).__init__(device, verbose)
# Initialise the face detector
if path_to_detector is None:
if not os.path.isfile(path_to_detector):
model_weights = load_url(models_urls['s3fd'])
else:
model_weights = torch.load(path_to_detector)