diff --git a/mediapipe/tasks/python/test/vision/BUILD b/mediapipe/tasks/python/test/vision/BUILD index bec75923d..6baca8850 100644 --- a/mediapipe/tasks/python/test/vision/BUILD +++ b/mediapipe/tasks/python/test/vision/BUILD @@ -26,7 +26,7 @@ py_test( "//mediapipe/tasks/testdata/vision:test_models", ], deps = [ - # build rule placeholder: numpy dep, + "//mediapipe/python:_framework_bindings", "//mediapipe/tasks/python/components/containers:bounding_box", "//mediapipe/tasks/python/components/containers:category", "//mediapipe/tasks/python/components/containers:detections", @@ -34,7 +34,6 @@ py_test( "//mediapipe/tasks/python/test:test_util", "//mediapipe/tasks/python/vision:object_detector", "//mediapipe/tasks/python/vision/core:vision_task_running_mode", - "@absl_py//absl/testing:parameterized", ], ) @@ -46,8 +45,7 @@ py_test( "//mediapipe/tasks/testdata/vision:test_models", ], deps = [ - # build rule placeholder: numpy dep, - # build rule placeholder: cv2 dep, + "//mediapipe/python:_framework_bindings", "//mediapipe/tasks/python/core:base_options", "//mediapipe/tasks/python/test:test_util", "//mediapipe/tasks/python/components:segmenter_options", diff --git a/mediapipe/tasks/python/test/vision/image_segmenter_test.py b/mediapipe/tasks/python/test/vision/image_segmenter_test.py index c3763577d..72be676d7 100644 --- a/mediapipe/tasks/python/test/vision/image_segmenter_test.py +++ b/mediapipe/tasks/python/test/vision/image_segmenter_test.py @@ -45,13 +45,6 @@ _MASK_MAGNIFICATION_FACTOR = 10 _MATCH_PIXELS_THRESHOLD = 0.01 -def _iou(ground_truth, prediction): - intersection = np.logical_and(ground_truth, prediction) - union = np.logical_or(ground_truth, prediction) - iou = np.sum(intersection) / np.sum(union) - return iou - - class ModelFileType(enum.Enum): FILE_CONTENT = 1 FILE_NAME = 2