From 38f421acf0f742137ab9459b21b2072952ef3af6 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Wed, 13 Sep 2023 08:19:17 -0700 Subject: [PATCH] This will fix multiple typos in the tasks internal files. PiperOrigin-RevId: 565055843 --- .../python/test/vision/face_aligner_test.py | 24 +++++++++---------- .../vision/pose_landmarker/pose_landmarker.ts | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mediapipe/tasks/python/test/vision/face_aligner_test.py b/mediapipe/tasks/python/test/vision/face_aligner_test.py index 324bd0359..36af81813 100644 --- a/mediapipe/tasks/python/test/vision/face_aligner_test.py +++ b/mediapipe/tasks/python/test/vision/face_aligner_test.py @@ -113,8 +113,8 @@ class FaceAlignerTest(parameterized.TestCase): aligner = _FaceAligner.create_from_options(options) # Performs face alignment on the input. - alignd_image = aligner.align(self.test_image) - self.assertIsInstance(alignd_image, _Image) + aligned_image = aligner.align(self.test_image) + self.assertIsInstance(aligned_image, _Image) # Closes the aligner explicitly when the aligner is not used in # a context. aligner.close() @@ -144,10 +144,10 @@ class FaceAlignerTest(parameterized.TestCase): options = _FaceAlignerOptions(base_options=base_options) with _FaceAligner.create_from_options(options) as aligner: # Performs face alignment on the input. - alignd_image = aligner.align(self.test_image) - self.assertIsInstance(alignd_image, _Image) - self.assertEqual(alignd_image.width, _MODEL_IMAGE_SIZE) - self.assertEqual(alignd_image.height, _MODEL_IMAGE_SIZE) + aligned_image = aligner.align(self.test_image) + self.assertIsInstance(aligned_image, _Image) + self.assertEqual(aligned_image.width, _MODEL_IMAGE_SIZE) + self.assertEqual(aligned_image.height, _MODEL_IMAGE_SIZE) def test_align_succeeds_with_region_of_interest(self): base_options = _BaseOptions(model_asset_path=self.model_path) @@ -163,10 +163,10 @@ class FaceAlignerTest(parameterized.TestCase): roi = _Rect(left=0.32, top=0.02, right=0.67, bottom=0.32) image_processing_options = _ImageProcessingOptions(roi) # Performs face alignment on the input. - alignd_image = aligner.align(test_image, image_processing_options) - self.assertIsInstance(alignd_image, _Image) - self.assertEqual(alignd_image.width, _MODEL_IMAGE_SIZE) - self.assertEqual(alignd_image.height, _MODEL_IMAGE_SIZE) + aligned_image = aligner.align(test_image, image_processing_options) + self.assertIsInstance(aligned_image, _Image) + self.assertEqual(aligned_image.width, _MODEL_IMAGE_SIZE) + self.assertEqual(aligned_image.height, _MODEL_IMAGE_SIZE) def test_align_succeeds_with_no_face_detected(self): base_options = _BaseOptions(model_asset_path=self.model_path) @@ -182,8 +182,8 @@ class FaceAlignerTest(parameterized.TestCase): roi = _Rect(left=0.1, top=0.1, right=0.2, bottom=0.2) image_processing_options = _ImageProcessingOptions(roi) # Performs face alignment on the input. - alignd_image = aligner.align(test_image, image_processing_options) - self.assertIsNone(alignd_image) + aligned_image = aligner.align(test_image, image_processing_options) + self.assertIsNone(aligned_image) if __name__ == '__main__': diff --git a/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts b/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts index 677d0bcb3..d38ccbf15 100644 --- a/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts +++ b/mediapipe/tasks/web/vision/pose_landmarker/pose_landmarker.ts @@ -51,7 +51,7 @@ const POSE_LANDMARKER_GRAPH = const DEFAULT_NUM_POSES = 1; const DEFAULT_SCORE_THRESHOLD = 0.5; -const DEFAULT_OUTPUT_SEGMANTATION_MASKS = false; +const DEFAULT_OUTPUT_SEGMENTATION_MASKS = false; /** * A callback that receives the result from the pose detector. The returned @@ -201,7 +201,7 @@ export class PoseLandmarker extends VisionTaskRunner { if ('outputSegmentationMasks' in options) { this.outputSegmentationMasks = - options.outputSegmentationMasks ?? DEFAULT_OUTPUT_SEGMANTATION_MASKS; + options.outputSegmentationMasks ?? DEFAULT_OUTPUT_SEGMENTATION_MASKS; } return this.applyOptions(options);