From b550ecb671912ce109d93ea1f6fe0e60f7813761 Mon Sep 17 00:00:00 2001 From: Xinyi ZHANG <xzhang@vws101.idiap.ch> Date: Sun, 11 Apr 2021 22:02:15 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Dnew=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bob/bio/face/annotator/__init__.py | 1 - bob/bio/face/annotator/bobiptinyface.py | 1 - bob/bio/face/config/annotator/tinyface.py | 2 +- bob/bio/face/config/baseline/mxnet_pipe.py | 1 - bob/bio/face/config/baseline/opencv_pipe.py | 2 +- bob/bio/face/config/baseline/pytorch_pipe_v1.py | 1 - bob/bio/face/config/baseline/pytorch_pipe_v2.py | 1 - bob/bio/face/config/baseline/tf_pipe.py | 1 - bob/bio/face/extractor/__init__.py | 1 + bob/bio/face/extractor/mxnet_resnet.py | 4 ++-- bob/bio/face/extractor/opencv_caffe.py | 4 ++-- bob/bio/face/extractor/pytorch_model.py | 4 ++-- bob/bio/face/extractor/tf_model.py | 4 ++-- requirements.txt | 2 +- setup.py | 2 +- 15 files changed, 13 insertions(+), 18 deletions(-) diff --git a/bob/bio/face/annotator/__init__.py b/bob/bio/face/annotator/__init__.py index b058d897..1434c9b4 100644 --- a/bob/bio/face/annotator/__init__.py +++ b/bob/bio/face/annotator/__init__.py @@ -1,6 +1,5 @@ import bob.ip.facedetect - def bounding_box_to_annotations(bbx): """Converts :any:`bob.ip.facedetect.BoundingBox` to dictionary annotations. diff --git a/bob/bio/face/annotator/bobiptinyface.py b/bob/bio/face/annotator/bobiptinyface.py index a3702d20..d2790c82 100644 --- a/bob/bio/face/annotator/bobiptinyface.py +++ b/bob/bio/face/annotator/bobiptinyface.py @@ -33,4 +33,3 @@ class BobIpTinyface(Base): return {"topleft": (r[0], r[1]), "bottomright": (r[2], r[3])} else: return None - diff --git a/bob/bio/face/config/annotator/tinyface.py b/bob/bio/face/config/annotator/tinyface.py index 2274bfef..bf223ea9 100644 --- a/bob/bio/face/config/annotator/tinyface.py +++ b/bob/bio/face/config/annotator/tinyface.py @@ -1,3 +1,3 @@ from bob.bio.face.annotator import BobIpTinyface -annotator = BobIpTinyface() +annotator = BobIpTinyface() \ No newline at end of file diff --git a/bob/bio/face/config/baseline/mxnet_pipe.py b/bob/bio/face/config/baseline/mxnet_pipe.py index 449d01e3..eeb06200 100644 --- a/bob/bio/face/config/baseline/mxnet_pipe.py +++ b/bob/bio/face/config/baseline/mxnet_pipe.py @@ -61,4 +61,3 @@ transformer = make_pipeline( # Assemble the Vanilla Biometric pipeline and execute pipeline = VanillaBiometricsPipeline(transformer, algorithm) transformer = pipeline.transformer - diff --git a/bob/bio/face/config/baseline/opencv_pipe.py b/bob/bio/face/config/baseline/opencv_pipe.py index aac2d3f1..cff19b26 100644 --- a/bob/bio/face/config/baseline/opencv_pipe.py +++ b/bob/bio/face/config/baseline/opencv_pipe.py @@ -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 diff --git a/bob/bio/face/config/baseline/pytorch_pipe_v1.py b/bob/bio/face/config/baseline/pytorch_pipe_v1.py index 99e5dbad..ec5c4d9d 100644 --- a/bob/bio/face/config/baseline/pytorch_pipe_v1.py +++ b/bob/bio/face/config/baseline/pytorch_pipe_v1.py @@ -61,4 +61,3 @@ transformer = make_pipeline( # Assemble the Vanilla Biometric pipeline and execute pipeline = VanillaBiometricsPipeline(transformer, algorithm) transformer = pipeline.transformer - diff --git a/bob/bio/face/config/baseline/pytorch_pipe_v2.py b/bob/bio/face/config/baseline/pytorch_pipe_v2.py index 212d8bb9..630609e6 100644 --- a/bob/bio/face/config/baseline/pytorch_pipe_v2.py +++ b/bob/bio/face/config/baseline/pytorch_pipe_v2.py @@ -64,4 +64,3 @@ transformer = make_pipeline( # Assemble the Vanilla Biometric pipeline and execute pipeline = VanillaBiometricsPipeline(transformer, algorithm) transformer = pipeline.transformer - diff --git a/bob/bio/face/config/baseline/tf_pipe.py b/bob/bio/face/config/baseline/tf_pipe.py index e6dfe625..22c24d95 100644 --- a/bob/bio/face/config/baseline/tf_pipe.py +++ b/bob/bio/face/config/baseline/tf_pipe.py @@ -64,4 +64,3 @@ transformer = make_pipeline( # Assemble the Vanilla Biometric pipeline and execute pipeline = VanillaBiometricsPipeline(transformer, algorithm) transformer = pipeline.transformer - diff --git a/bob/bio/face/extractor/__init__.py b/bob/bio/face/extractor/__init__.py index 32b97163..21b237ad 100644 --- a/bob/bio/face/extractor/__init__.py +++ b/bob/bio/face/extractor/__init__.py @@ -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. diff --git a/bob/bio/face/extractor/mxnet_resnet.py b/bob/bio/face/extractor/mxnet_resnet.py index aab050bf..fd102ef0 100644 --- a/bob/bio/face/extractor/mxnet_resnet.py +++ b/bob/bio/face/extractor/mxnet_resnet.py @@ -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 diff --git a/bob/bio/face/extractor/opencv_caffe.py b/bob/bio/face/extractor/opencv_caffe.py index 647fc724..d824caf0 100644 --- a/bob/bio/face/extractor/opencv_caffe.py +++ b/bob/bio/face/extractor/opencv_caffe.py @@ -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 diff --git a/bob/bio/face/extractor/pytorch_model.py b/bob/bio/face/extractor/pytorch_model.py index 52c4f172..9bdda0ae 100644 --- a/bob/bio/face/extractor/pytorch_model.py +++ b/bob/bio/face/extractor/pytorch_model.py @@ -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 diff --git a/bob/bio/face/extractor/tf_model.py b/bob/bio/face/extractor/tf_model.py index 9e83ec38..fb6fed55 100644 --- a/bob/bio/face/extractor/tf_model.py +++ b/bob/bio/face/extractor/tf_model.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 02e30ac5..bcd1763c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,4 +22,4 @@ mxnet opencv-python six scikit-image -scikit-learn # for pipelines Tranformers +scikit-learn # for pipelines Tranformers \ No newline at end of file diff --git a/setup.py b/setup.py index 1f278141..1b89313b 100644 --- a/setup.py +++ b/setup.py @@ -214,4 +214,4 @@ setup( "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], -) +) \ No newline at end of file -- GitLab