Commit 65e20589 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

mention how to use this class as a bob.bio.base.extractor

parent cf2a49da
Pipeline #14125 passed with stages
in 13 minutes and 34 seconds
...@@ -44,7 +44,15 @@ def get_model_filenames(model_dir): ...@@ -44,7 +44,15 @@ def get_model_filenames(model_dir):
class FaceNet(object): class FaceNet(object):
"""Wrapper for the free FaceNet variant: """Wrapper for the free FaceNet variant:
https://github.com/davidsandberg/facenet""" https://github.com/davidsandberg/facenet
To use this class as a bob.bio.base extractor::
from bob.bio.base.extractor import Extractor
class FaceNetExtractor(FaceNet, Extractor):
pass
extractor = FaceNetExtractor()
"""
def __init__(self, def __init__(self,
model_path=None, model_path=None,
...@@ -143,7 +151,7 @@ class FaceNet(object): ...@@ -143,7 +151,7 @@ class FaceNet(object):
"{} ...".format(url)) "{} ...".format(url))
download_file(url, zip_file) download_file(url, zip_file)
break break
except Exception as e: except Exception:
logger.warning( logger.warning(
"Could not download from the %s url", url, exc_info=True) "Could not download from the %s url", url, exc_info=True)
else: # else is for the for loop else: # else is for the for loop
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment