Commit 3b73890d authored by Anjith GEORGE's avatar Anjith GEORGE
Browse files

Added more models

parent b3229215
Pipeline #52783 failed with stage
in 48 minutes and 41 seconds
from bob.bio.face.embeddings.pytorch import GhostNet
from bob.bio.face.utils import lookup_config_from_database
annotation_type, fixed_positions, memory_demanding = lookup_config_from_database(
locals().get("database")
)
def load(annotation_type, fixed_positions=None, memory_demanding=False):
return GhostNet(annotation_type, fixed_positions, memory_demanding)
pipeline = load(annotation_type, fixed_positions, memory_demanding)
from bob.bio.face.embeddings.pytorch import HRNet
from bob.bio.face.utils import lookup_config_from_database
annotation_type, fixed_positions, memory_demanding = lookup_config_from_database(
locals().get("database")
)
def load(annotation_type, fixed_positions=None, memory_demanding=False):
return HRNet(annotation_type, fixed_positions, memory_demanding)
pipeline = load(annotation_type, fixed_positions, memory_demanding)
from bob.bio.face.embeddings.pytorch import ReXNet
from bob.bio.face.utils import lookup_config_from_database
annotation_type, fixed_positions, memory_demanding = lookup_config_from_database(
locals().get("database")
)
def load(annotation_type, fixed_positions=None, memory_demanding=False):
return ReXNet(annotation_type, fixed_positions, memory_demanding)
pipeline = load(annotation_type, fixed_positions, memory_demanding)
from bob.bio.face.embeddings.pytorch import TF_NAS
from bob.bio.face.utils import lookup_config_from_database
annotation_type, fixed_positions, memory_demanding = lookup_config_from_database(
locals().get("database")
)
def load(annotation_type, fixed_positions=None, memory_demanding=False):
return TF_NAS(annotation_type, fixed_positions, memory_demanding)
pipeline = load(annotation_type, fixed_positions, memory_demanding)
......@@ -497,6 +497,105 @@ def EfficientNet(annotation_type, fixed_positions=None, memory_demanding=False):
)
def TF_NAS(annotation_type, fixed_positions=None, memory_demanding=False):
"""
Get the TF_NAS pipeline which will crop the face :math:`112 \times 112` and
use the :py:class:`TF-NAS` to extract the features
Parameters
----------
annotation_type: str
Type of the annotations (e.g. `eyes-center')
fixed_positions: dict
Set it if in your face images are registered to a fixed position in the image
memory_demanding: bool
"""
return iresnet_template(
embedding=FaceXZooModel(arch='TF-NAS', memory_demanding=memory_demanding),
annotation_type=annotation_type,
fixed_positions=fixed_positions,
)
def HRNet(annotation_type, fixed_positions=None, memory_demanding=False):
"""
Get the HRNet pipeline which will crop the face :math:`112 \times 112` and
use the :py:class:`HRNet` to extract the features
Parameters
----------
annotation_type: str
Type of the annotations (e.g. `eyes-center')
fixed_positions: dict
Set it if in your face images are registered to a fixed position in the image
memory_demanding: bool
"""
return iresnet_template(
embedding=FaceXZooModel(arch='HRNet', memory_demanding=memory_demanding),
annotation_type=annotation_type,
fixed_positions=fixed_positions,
)
def ReXNet(annotation_type, fixed_positions=None, memory_demanding=False):
"""
Get the ReXNet pipeline which will crop the face :math:`112 \times 112` and
use the :py:class:`ReXNet` to extract the features
Parameters
----------
annotation_type: str
Type of the annotations (e.g. `eyes-center')
fixed_positions: dict
Set it if in your face images are registered to a fixed position in the image
memory_demanding: bool
"""
return iresnet_template(
embedding=FaceXZooModel(arch='ReXNet', memory_demanding=memory_demanding),
annotation_type=annotation_type,
fixed_positions=fixed_positions,
)
def GhostNet(annotation_type, fixed_positions=None, memory_demanding=False):
"""
Get the GhostNet pipeline which will crop the face :math:`112 \times 112` and
use the :py:class:`GhostNet` to extract the features
Parameters
----------
annotation_type: str
Type of the annotations (e.g. `eyes-center')
fixed_positions: dict
Set it if in your face images are registered to a fixed position in the image
memory_demanding: bool
"""
return iresnet_template(
embedding=FaceXZooModel(arch='GhostNet', memory_demanding=memory_demanding),
annotation_type=annotation_type,
fixed_positions=fixed_positions,
)
def iresnet34(annotation_type, fixed_positions=None, memory_demanding=False):
"""
Get the Resnet34 pipeline which will crop the face :math:`112 \times 112` and
......
......@@ -148,6 +148,10 @@ setup(
"mobilefacenet = bob.bio.face.config.baseline.MobileFaceNet:pipeline",
"resnet = bob.bio.face.config.baseline.ResNet:pipeline",
"efficientnet = bob.bio.face.config.baseline.EfficientNet:pipeline",
"tfnas = bob.bio.face.config.baseline.TF_NAS:pipeline",
"hrnet = bob.bio.face.config.baseline.HRNet:pipeline",
"rexnet = bob.bio.face.config.baseline.ReXNet:pipeline",
"ghostnet = bob.bio.face.config.baseline.GhostNet:pipeline",
],
"bob.bio.config": [
# pipelines
......@@ -176,6 +180,10 @@ setup(
"mobilefacenet = bob.bio.face.config.baseline.MobileFaceNet",
"resnet = bob.bio.face.config.baseline.ResNet",
"efficientnet = bob.bio.face.config.baseline.EfficientNet",
"tfnas = bob.bio.face.config.baseline.TF_NAS",
"hrnet = bob.bio.face.config.baseline.HRNet",
"rexnet = bob.bio.face.config.baseline.ReXNet",
"ghostnet = bob.bio.face.config.baseline.GhostNet",
# databases
"arface = bob.bio.face.config.database.arface",
"atnt = bob.bio.face.config.database.atnt",
......
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