The file "s3fd.pth" will never load automatically
We check if path_to_detector is None, but `path_to_detector` will never be None because he is hardcoded in method params. Hence, the file will never be automatically downloaded. I suggest checking if such a file exists and if not, then load it via the "load_url" method.
This commit is contained in:
parent
7ea7ef8961
commit
ba6289a866
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue