Skip to content
Snippets Groups Projects
Commit b550ecb6 authored by Xinyi ZHANG's avatar Xinyi ZHANG Committed by Tiago de Freitas Pereira
Browse files

”new”

parent 60c531cb
No related branches found
No related tags found
1 merge request!112Feature extractors
Showing
with 13 additions and 18 deletions
import bob.ip.facedetect
def bounding_box_to_annotations(bbx):
"""Converts :any:`bob.ip.facedetect.BoundingBox` to dictionary annotations.
......
......@@ -33,4 +33,3 @@ class BobIpTinyface(Base):
return {"topleft": (r[0], r[1]), "bottomright": (r[2], r[3])}
else:
return None
from bob.bio.face.annotator import BobIpTinyface
annotator = BobIpTinyface()
annotator = BobIpTinyface()
\ No newline at end of file
......@@ -61,4 +61,3 @@ transformer = make_pipeline(
# Assemble the Vanilla Biometric pipeline and execute
pipeline = VanillaBiometricsPipeline(transformer, algorithm)
transformer = pipeline.transformer
......@@ -68,4 +68,4 @@ transformer = make_pipeline(
# Assemble the Vanilla Biometric pipeline and execute
pipeline = VanillaBiometricsPipeline(transformer, algorithm)
transformer = pipeline.transformer
transformer = pipeline.transformer
\ No newline at end of file
......@@ -61,4 +61,3 @@ transformer = make_pipeline(
# Assemble the Vanilla Biometric pipeline and execute
pipeline = VanillaBiometricsPipeline(transformer, algorithm)
transformer = pipeline.transformer
......@@ -64,4 +64,3 @@ transformer = make_pipeline(
# Assemble the Vanilla Biometric pipeline and execute
pipeline = VanillaBiometricsPipeline(transformer, algorithm)
transformer = pipeline.transformer
......@@ -64,4 +64,3 @@ transformer = make_pipeline(
# Assemble the Vanilla Biometric pipeline and execute
pipeline = VanillaBiometricsPipeline(transformer, algorithm)
transformer = pipeline.transformer
......@@ -7,6 +7,7 @@ from .pytorch_model import pytorch_library_model
from .tf_model import tf_model
from .opencv_caffe import opencv_model
# gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
......
......@@ -78,7 +78,7 @@ class mxnet_model(TransformerMixin, BaseEstimator):
"""
if self.model is None:
self.load_model()
self._load_model()
X = check_array(X, allow_nd=True)
X = mx.nd.array(X)
......@@ -94,4 +94,4 @@ class mxnet_model(TransformerMixin, BaseEstimator):
return d
def _more_tags(self):
return {"stateless": True, "requires_fit": False}
return {"stateless": True, "requires_fit": False}
\ No newline at end of file
......@@ -85,7 +85,7 @@ class opencv_model(TransformerMixin, BaseEstimator):
"""
if self.model is None:
self.load_model()
self._load_model()
img = np.array(X)
......@@ -102,4 +102,4 @@ class opencv_model(TransformerMixin, BaseEstimator):
return d
def _more_tags(self):
return {"stateless": True, "requires_fit": False}
return {"stateless": True, "requires_fit": False}
\ No newline at end of file
......@@ -79,7 +79,7 @@ class pytorch_loaded_model(TransformerMixin, BaseEstimator):
"""
if self.model is None:
self.load_model()
self._load_model()
X = torch.Tensor(X)
......@@ -162,4 +162,4 @@ class pytorch_library_model(TransformerMixin, BaseEstimator):
return d
def _more_tags(self):
return {"stateless": True, "requires_fit": False}
return {"stateless": True, "requires_fit": False}
\ No newline at end of file
......@@ -73,7 +73,7 @@ class tf_model(TransformerMixin, BaseEstimator):
"""
if self.model is None:
self.load_model()
self._load_model()
X = check_array(X, allow_nd=True)
X = tf.convert_to_tensor(X)
......@@ -92,4 +92,4 @@ class tf_model(TransformerMixin, BaseEstimator):
return d
def _more_tags(self):
return {"stateless": True, "requires_fit": False}
return {"stateless": True, "requires_fit": False}
\ No newline at end of file
......@@ -214,4 +214,4 @@ setup(
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
)
)
\ No newline at end of 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