Code cleanup
This commit is contained in:
parent
b04af0cafa
commit
cba2a6035c
|
@ -16,7 +16,7 @@
|
|||
import dataclasses
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from mediapipe.tasks.cc.components import classifier_options_pb2
|
||||
from mediapipe.tasks.cc.components.proto import classifier_options_pb2
|
||||
from mediapipe.tasks.python.core.optional_dependencies import doc_controls
|
||||
|
||||
_ClassifierOptionsProto = classifier_options_pb2.ClassifierOptions
|
||||
|
|
|
@ -38,19 +38,20 @@ py_test(
|
|||
)
|
||||
|
||||
py_test(
|
||||
name = "image_classification_test",
|
||||
srcs = ["image_classification_test.py"],
|
||||
name = "image_classifier_test",
|
||||
srcs = ["image_classifier_test.py"],
|
||||
data = [
|
||||
"//mediapipe/tasks/testdata/vision:test_images",
|
||||
"//mediapipe/tasks/testdata/vision:test_models",
|
||||
],
|
||||
deps = [
|
||||
"//mediapipe/python:_framework_bindings",
|
||||
"//mediapipe/tasks/python/components/proto:classifier_options",
|
||||
"//mediapipe/tasks/python/components/containers:category",
|
||||
"//mediapipe/tasks/python/components/containers:classifications",
|
||||
"//mediapipe/tasks/python/core:base_options",
|
||||
"//mediapipe/tasks/python/test:test_util",
|
||||
"//mediapipe/tasks/python/vision:image_classification",
|
||||
"//mediapipe/tasks/python/vision:image_classifier",
|
||||
"//mediapipe/tasks/python/vision/core:vision_task_running_mode",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -19,12 +19,12 @@ from absl.testing import absltest
|
|||
from absl.testing import parameterized
|
||||
|
||||
from mediapipe.python._framework_bindings import image as image_module
|
||||
from mediapipe.tasks.python.components import classifier_options
|
||||
from mediapipe.tasks.python.components.proto import classifier_options
|
||||
from mediapipe.tasks.python.components.containers import category as category_module
|
||||
from mediapipe.tasks.python.components.containers import classifications as classifications_module
|
||||
from mediapipe.tasks.python.core import base_options as base_options_module
|
||||
from mediapipe.tasks.python.test import test_util
|
||||
from mediapipe.tasks.python.vision import image_classification
|
||||
from mediapipe.tasks.python.vision import image_classifier
|
||||
from mediapipe.tasks.python.vision.core import vision_task_running_mode as running_mode_module
|
||||
|
||||
_BaseOptions = base_options_module.BaseOptions
|
||||
|
@ -34,8 +34,8 @@ _ClassificationEntry = classifications_module.ClassificationEntry
|
|||
_Classifications = classifications_module.Classifications
|
||||
_ClassificationResult = classifications_module.ClassificationResult
|
||||
_Image = image_module.Image
|
||||
_ImageClassifier = image_classification.ImageClassifier
|
||||
_ImageClassifierOptions = image_classification.ImageClassifierOptions
|
||||
_ImageClassifier = image_classifier.ImageClassifier
|
||||
_ImageClassifierOptions = image_classifier.ImageClassifierOptions
|
||||
_RUNNING_MODE = running_mode_module.VisionTaskRunningMode
|
||||
|
||||
_MODEL_FILE = 'mobilenet_v2_1.0_224.tflite'
|
|
@ -38,9 +38,9 @@ py_library(
|
|||
)
|
||||
|
||||
py_library(
|
||||
name = "image_classification",
|
||||
name = "image_classifier",
|
||||
srcs = [
|
||||
"image_classification.py",
|
||||
"image_classifier.py",
|
||||
],
|
||||
deps = [
|
||||
"//mediapipe/python:_framework_bindings",
|
||||
|
|
Loading…
Reference in New Issue
Block a user