Updated BUILD and tests
This commit is contained in:
parent
d25626ff63
commit
63e0c04253
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user