From 030eeec7211fdfd96765c7a277d82459b4b77354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Mal=C3=A9zieux?= Date: Wed, 14 Aug 2024 09:44:50 +0200 Subject: [PATCH 1/2] FIX: change model type name for landmark detection to be coherent with what's inside detectors --- giskard_vision/landmark_detection/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giskard_vision/landmark_detection/models/base.py b/giskard_vision/landmark_detection/models/base.py index 738427e3..95047c20 100644 --- a/giskard_vision/landmark_detection/models/base.py +++ b/giskard_vision/landmark_detection/models/base.py @@ -13,7 +13,7 @@ class FaceLandmarksModelBase(ModelBase): """Abstract class that serves as a template for all landmark model predictions""" - model_type = "landmark_detection" + model_type = "landmark" prediction_result_cls = Types.prediction_result def __init__(self, n_landmarks: int, n_dimensions: int, name: Optional[str] = None) -> None: From 95ebfeacc806bbf932c8db3d033c7baba6dbc1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Mal=C3=A9zieux?= Date: Wed, 14 Aug 2024 09:59:01 +0200 Subject: [PATCH 2/2] FIX: changing model type so that the test doesn't file for landmark detection --- .../landmark_detection/detectors/cropping_detector.py | 2 +- .../landmark_detection/detectors/metadata_detector.py | 2 +- .../detectors/transformation_resize_detector.py | 2 +- giskard_vision/landmark_detection/models/base.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/giskard_vision/landmark_detection/detectors/cropping_detector.py b/giskard_vision/landmark_detection/detectors/cropping_detector.py index 8689374f..8d51ef3e 100644 --- a/giskard_vision/landmark_detection/detectors/cropping_detector.py +++ b/giskard_vision/landmark_detection/detectors/cropping_detector.py @@ -6,7 +6,7 @@ from .base import LandmarkDetectionBaseDetector -@maybe_detector("cropping_landmark", tags=["vision", "face", "landmark", "transformed", "cropped"]) +@maybe_detector("cropping_landmark", tags=["vision", "face", "landmark_detection", "transformed", "cropped"]) class CroppingDetectorLandmark(LandmarkDetectionBaseDetector): """ Detector that evaluates models performance relative to a facial part diff --git a/giskard_vision/landmark_detection/detectors/metadata_detector.py b/giskard_vision/landmark_detection/detectors/metadata_detector.py index 6e182239..47ff13fa 100644 --- a/giskard_vision/landmark_detection/detectors/metadata_detector.py +++ b/giskard_vision/landmark_detection/detectors/metadata_detector.py @@ -8,6 +8,6 @@ from .specs import DetectorSpecs -@maybe_detector("metadata_landmark", tags=["vision", "face", "landmark", "metadata"]) +@maybe_detector("metadata_landmark", tags=["vision", "face", "landmark_detection", "metadata"]) class MetaDataScanDetectorLandmark(DetectorSpecs, MetaDataScanDetector): surrogates = [SurrogateVolumeConvexHull, SurrogateNME] diff --git a/giskard_vision/landmark_detection/detectors/transformation_resize_detector.py b/giskard_vision/landmark_detection/detectors/transformation_resize_detector.py index f017df22..0123cfb7 100644 --- a/giskard_vision/landmark_detection/detectors/transformation_resize_detector.py +++ b/giskard_vision/landmark_detection/detectors/transformation_resize_detector.py @@ -5,7 +5,7 @@ from .base import LandmarkDetectionBaseDetector -@maybe_detector("resize_landmark", tags=["vision", "face", "landmark", "transformed", "resized"]) +@maybe_detector("resize_landmark", tags=["vision", "face", "landmark_detection", "transformed", "resized"]) class TransformationResizeDetectorLandmark(LandmarkDetectionBaseDetector): """ Detector that evaluates models performance on resized images diff --git a/giskard_vision/landmark_detection/models/base.py b/giskard_vision/landmark_detection/models/base.py index 95047c20..738427e3 100644 --- a/giskard_vision/landmark_detection/models/base.py +++ b/giskard_vision/landmark_detection/models/base.py @@ -13,7 +13,7 @@ class FaceLandmarksModelBase(ModelBase): """Abstract class that serves as a template for all landmark model predictions""" - model_type = "landmark" + model_type = "landmark_detection" prediction_result_cls = Types.prediction_result def __init__(self, n_landmarks: int, n_dimensions: int, name: Optional[str] = None) -> None: