Expose MediaPipe Tasks in MediaPipe PyPI packages.

PiperOrigin-RevId: 485690163
This commit is contained in:
Jiuqiang Tang
2022-11-02 14:07:47 -07:00
committed by Copybara-Service
parent 0bf5110a7e
commit 01d87f0867
3 changed files with 33 additions and 2 deletions
+11
View File
@@ -11,3 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""MediaPipe Tasks API."""
from . import components
from . import core
from . import vision
BaseOptions = core.base_options.BaseOptions
# Remove unnecessary modules to avoid duplication in API docs.
del core
+18
View File
@@ -11,3 +11,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""MediaPipe Tasks Vision API."""
import mediapipe.tasks.python.vision.core
import mediapipe.tasks.python.vision.image_classifier
import mediapipe.tasks.python.vision.object_detector
ImageClassifier = image_classifier.ImageClassifier
ImageClassifierOptions = image_classifier.ImageClassifierOptions
ObjectDetector = object_detector.ObjectDetector
ObjectDetectorOptions = object_detector.ObjectDetectorOptions
RunningMode = core.vision_task_running_mode.VisionTaskRunningMode
# Remove unnecessary modules to avoid duplication in API docs.
del core
del image_classifier
del object_detector
del mediapipe