Updated BUILD and tests

This commit is contained in:
kinaryml 2022-09-29 02:03:07 -07:00
parent d25626ff63
commit 63e0c04253
2 changed files with 2 additions and 11 deletions

View File

@ -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",

View File

@ -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