diff --git a/bob/ip/tensorflow_extractor/FaceNet.py b/bob/ip/tensorflow_extractor/FaceNet.py index 28828df2d5eb1580f137b3e26a39a88e902a7ba0..06f66eb58821823d22f44528ced75cb36b1cd65b 100644 --- a/bob/ip/tensorflow_extractor/FaceNet.py +++ b/bob/ip/tensorflow_extractor/FaceNet.py @@ -44,7 +44,15 @@ def get_model_filenames(model_dir): class FaceNet(object): """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, model_path=None, @@ -143,7 +151,7 @@ class FaceNet(object): "{} ...".format(url)) download_file(url, zip_file) break - except Exception as e: + except Exception: logger.warning( "Could not download from the %s url", url, exc_info=True) else: # else is for the for loop