Skip to content
Snippets Groups Projects
Commit bcf473ed authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'fix_iresnet' into 'master'

Fixes normalization

See merge request !131
parents 61287ced b9b7d1fc
No related branches found
No related tags found
1 merge request!131Fixes normalization
Pipeline #52282 canceled
......@@ -160,7 +160,7 @@ class IResnet34(PyTorchModel):
ArcFace model (RESNET 34) from Insightface ported to pytorch
"""
def __init__(self, memory_demanding=False):
def __init__(self, preprocessor=lambda x: (x - 127.5) / 128.0, memory_demanding=False):
urls = [
"https://www.idiap.ch/software/bob/data/bob/bob.bio.face/master/pytorch/iresnet-91a5de61.tar.gz",
......@@ -188,7 +188,7 @@ class IResnet50(PyTorchModel):
ArcFace model (RESNET 50) from Insightface ported to pytorch
"""
def __init__(self, memory_demanding=False):
def __init__(self, preprocessor=lambda x: (x - 127.5) / 128.0, memory_demanding=False):
filename = _get_iresnet_file()
......@@ -206,12 +206,12 @@ class IResnet50(PyTorchModel):
self.model = model
class IResnet100(PyTorchModel):
class IResnet100(PyTorchModel):
"""
ArcFace model (RESNET 100) from Insightface ported to pytorch
"""
def __init__(self, memory_demanding=False):
def __init__(self, preprocessor=lambda x: (x - 127.5) / 128.0, memory_demanding=False):
filename = _get_iresnet_file()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment