Skip to main content
Google for Developers
/
  • English
  • Deutsch
  • Español
  • Français
  • Indonesia
  • Português – Brasil
  • Русский
  • 中文 – 简体
  • 日本語
  • 한국어
Sign in
  • Google AI Edge
LiteRT
  • Android
  • Desktop
  • Web
LiteRT-LM MediaPipe
  • MediaPipe Solutions
  • MediaPipe Framework
Model Explorer AI Edge Portal Google Tensor SDK
  • AI Edge Gallery
  • AI Edge Eloquent
  • MediaPipe Demos
API Reference
Google for Developers
  • AI Edge
    • LiteRT
      • More
    • LiteRT-LM
    • MediaPipe
      • More
    • Model Explorer
    • AI Edge Portal
    • Google Tensor SDK
    • Apps
      • More
    • API Reference
  • Overview
  • MediaPipe
    • Tasks
      • Python
        • mp
          • Overview
          • CalculatorGraph
          • GraphInputStreamAddMode
          • Image
          • ImageFormat
          • ImageFrame
          • Matrix
          • Packet
          • Timestamp
          • ValidatedGraphConfig
        • mp.calculators
          • Overview
          • core
            • Overview
            • constant_side_packet_calculator_pb2
              • Overview
              • ConstantSidePacketCalculatorOptions
              • ConstantSidePacketCalculatorOptions.ConstantSidePacket
              • mediapipe_dot_framework_dot_calculator__options__pb2
                • Overview
                • CalculatorOptions
              • mediapipe_dot_framework_dot_calculator__pb2
                • Overview
                • CalculatorGraphConfig
                • CalculatorGraphConfig.Node
                • ExecutorConfig
                • InputCollection
                • InputCollectionSet
                • InputStreamInfo
                • ProfilerConfig
                • mediapipe_dot_framework_dot_mediapipe__options__pb2
                  • Overview
                  • MediaPipeOptions
                • mediapipe_dot_framework_dot_packet__factory__pb2
                  • Overview
                  • PacketFactoryConfig
                  • PacketFactoryOptions
                  • PacketManagerConfig
                • mediapipe_dot_framework_dot_packet__generator__pb2
                  • Overview
                  • PacketGeneratorConfig
                  • PacketGeneratorOptions
                • mediapipe_dot_framework_dot_status__handler__pb2
                  • Overview
                  • StatusHandlerConfig
                • mediapipe_dot_framework_dot_stream__handler__pb2
                  • Overview
                  • InputStreamHandlerConfig
                  • OutputStreamHandlerConfig
              • mediapipe_dot_framework_dot_formats_dot_classification__pb2
                • Overview
                • Classification
                • ClassificationList
                • ClassificationListCollection
              • mediapipe_dot_framework_dot_formats_dot_landmark__pb2
                • Overview
                • Landmark
                • LandmarkList
                • LandmarkListCollection
                • NormalizedLandmark
                • NormalizedLandmarkList
                • NormalizedLandmarkListCollection
              • mediapipe_dot_framework_dot_formats_dot_matrix__data__pb2
                • Overview
                • MatrixData
              • mediapipe_dot_framework_dot_formats_dot_time__series__header__pb2
                • Overview
                • MultiStreamTimeSeriesHeader
                • TimeSeriesHeader
            • flow_limiter_calculator_pb2
              • Overview
              • FlowLimiterCalculatorOptions
            • gate_calculator_pb2
              • Overview
              • GateCalculatorOptions
            • split_vector_calculator_pb2
              • Overview
              • Range
              • SplitVectorCalculatorOptions
          • image
            • Overview
            • image_transformation_calculator_pb2
              • Overview
              • ImageTransformationCalculatorOptions
              • ImageTransformationCalculatorOptions.Color
              • mediapipe_dot_gpu_dot_scale__mode__pb2
                • Overview
                • ScaleMode
            • rotation_mode_pb2
              • Overview
              • RotationMode
            • warp_affine_calculator_pb2
              • Overview
              • WarpAffineCalculatorOptions
              • mediapipe_dot_gpu_dot_gpu__origin__pb2
                • Overview
                • GpuOrigin
          • tensor
            • Overview
            • image_to_tensor_calculator_pb2
              • Overview
              • ImageToTensorCalculatorOptions
              • ImageToTensorCalculatorOptions.FloatRange
              • ImageToTensorCalculatorOptions.IntRange
              • ImageToTensorCalculatorOptions.UIntRange
            • inference_calculator_pb2
              • Overview
              • InferenceCalculatorOptions
              • InferenceCalculatorOptions.Delegate
              • InferenceCalculatorOptions.Delegate.Gpu
              • InferenceCalculatorOptions.Delegate.Nnapi
              • InferenceCalculatorOptions.Delegate.TfLite
              • InferenceCalculatorOptions.Delegate.Xnnpack
            • tensors_to_classification_calculator_pb2
              • Overview
              • TensorsToClassificationCalculatorOptions
              • TensorsToClassificationCalculatorOptions.LabelItemsEntry
              • TensorsToClassificationCalculatorOptions.LabelMap
              • TensorsToClassificationCalculatorOptions.LabelMap.Entry
              • mediapipe_dot_util_dot_label__map__pb2
                • Overview
                • LabelMapItem
            • tensors_to_detections_calculator_pb2
              • Overview
              • TensorsToDetectionsCalculatorOptions
              • TensorsToDetectionsCalculatorOptions.BoxBoundariesIndices
              • TensorsToDetectionsCalculatorOptions.TensorMapping
            • tensors_to_floats_calculator_pb2
              • Overview
              • TensorsToFloatsCalculatorOptions
            • tensors_to_landmarks_calculator_pb2
              • Overview
              • TensorsToLandmarksCalculatorOptions
            • tensors_to_segmentation_calculator_pb2
              • Overview
              • TensorsToSegmentationCalculatorOptions
          • tflite
            • Overview
            • ssd_anchors_calculator_pb2
              • Overview
              • SsdAnchorsCalculatorOptions
              • mediapipe_dot_framework_dot_formats_dot_object__detection_dot_anchor__pb2
                • Overview
                • Anchor
          • util
            • Overview
            • association_calculator_pb2
              • Overview
              • AssociationCalculatorOptions
            • collection_has_min_size_calculator_pb2
              • Overview
              • CollectionHasMinSizeCalculatorOptions
            • detection_label_id_to_text_calculator_pb2
              • Overview
              • DetectionLabelIdToTextCalculatorOptions
              • DetectionLabelIdToTextCalculatorOptions.LabelItemsEntry
            • detections_to_rects_calculator_pb2
              • Overview
              • DetectionsToRectsCalculatorOptions
            • landmark_projection_calculator_pb2
              • Overview
              • LandmarkProjectionCalculatorOptions
            • landmarks_refinement_calculator_pb2
              • Overview
              • LandmarksRefinementCalculatorOptions
              • LandmarksRefinementCalculatorOptions.Refinement
              • LandmarksRefinementCalculatorOptions.ZRefinement
              • LandmarksRefinementCalculatorOptions.ZRefinementAssignAverage
              • LandmarksRefinementCalculatorOptions.ZRefinementCopy
              • LandmarksRefinementCalculatorOptions.ZRefinementNone
            • landmarks_smoothing_calculator_pb2
              • Overview
              • LandmarksSmoothingCalculatorOptions
              • LandmarksSmoothingCalculatorOptions.NoFilter
              • LandmarksSmoothingCalculatorOptions.OneEuroFilter
              • LandmarksSmoothingCalculatorOptions.VelocityFilter
            • local_file_contents_calculator_pb2
              • Overview
              • LocalFileContentsCalculatorOptions
            • logic_calculator_pb2
              • Overview
              • LogicCalculatorOptions
            • non_max_suppression_calculator_pb2
              • Overview
              • NonMaxSuppressionCalculatorOptions
            • rect_transformation_calculator_pb2
              • Overview
              • RectTransformationCalculatorOptions
            • thresholding_calculator_pb2
              • Overview
              • ThresholdingCalculatorOptions
            • visibility_smoothing_calculator_pb2
              • Overview
              • VisibilitySmoothingCalculatorOptions
              • VisibilitySmoothingCalculatorOptions.LowPassFilter
              • VisibilitySmoothingCalculatorOptions.NoFilter
        • mp.model_ckpt_util
          • Overview
          • ConvertHfTokenizer
          • GenerateCpuTfLite
          • GenerateGpuTfLite
        • mp.packet_creator
          • Overview
          • create_bool
          • create_bool_vector
          • create_double
          • create_float
          • create_float_array
          • create_float_vector
          • create_image
          • create_image_frame
          • create_image_vector
          • create_int
          • create_int16
          • create_int32
          • create_int64
          • create_int8
          • create_int_array
          • create_int_vector
          • create_matrix
          • create_packet_vector
          • create_proto
          • create_proto_vector
          • create_string
          • create_string_to_packet_map
          • create_string_vector
          • create_uint16
          • create_uint32
          • create_uint64
          • create_uint8
          • image
            • Overview
          • image_frame
            • Overview
          • packet
            • Overview
        • mp.packet_getter
          • Overview
          • get_bool
          • get_bool_list
          • get_bytes
          • get_float
          • get_float_list
          • get_image
          • get_image_frame
          • get_image_list
          • get_int
          • get_int_list
          • get_matrix
          • get_packet_list
          • get_proto
          • get_proto_list
          • get_str
          • get_str_list
          • get_str_to_packet_dict
          • get_uint
        • mp.resource_util
          • Overview
          • set_resource_dir
        • mp.tasks
          • Overview
          • BaseOptions
          • BaseOptions.Delegate
          • audio
            • Overview
            • AudioClassifier
            • AudioClassifierOptions
            • AudioClassifierResult
            • AudioEmbedder
            • AudioEmbedderOptions
            • AudioEmbedderResult
            • RunningMode
          • components
            • Overview
            • containers
              • Overview
              • AudioData
              • AudioDataFormat
              • BoundingBox
              • Category
              • Classifications
              • Detection
              • Embedding
              • Landmark
              • LandmarksDetectionResult
              • NormalizedLandmark
              • NormalizedRect
              • Rect
              • keypoint
                • Overview
                • NormalizedKeypoint
                • location_data_pb2
                  • Overview
                  • LocationData
                  • LocationData.BinaryMask
                  • LocationData.BoundingBox
                  • LocationData.RelativeBoundingBox
                  • LocationData.RelativeKeypoint
                  • mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
                    • Overview
                    • Rasterization
                    • Rasterization.Interval
            • processors
              • Overview
              • ClassifierOptions
            • utils
              • Overview
              • cosine_similarity
                • Overview
                • cosine_similarity
                • embedding_result
                  • Overview
                  • embeddings_pb2
                    • Overview
                    • Embedding
                    • EmbeddingResult
                    • FloatEmbedding
                    • QuantizedEmbedding
          • genai
            • Overview
          • text
            • Overview
            • LanguageDetector
            • LanguageDetectorOptions
            • LanguageDetectorResult
            • LanguageDetectorResult.Detection
            • TextClassifier
            • TextClassifierOptions
            • TextEmbedder
            • TextEmbedderOptions
            • core
              • Overview
              • base_text_task_api
                • Overview
                • task_runner
                  • Overview
                  • TaskRunner
          • vision
            • Overview
            • FaceAligner
            • FaceAlignerOptions
            • FaceDetector
            • FaceDetectorOptions
            • FaceDetectorResult
            • FaceLandmarker
            • FaceLandmarkerOptions
            • FaceLandmarkerResult
            • FaceLandmarksConnections
            • FaceLandmarksConnections.Connection
            • FaceStylizer
            • FaceStylizerOptions
            • GestureRecognizer
            • GestureRecognizerOptions
            • GestureRecognizerResult
            • HandLandmarker
            • HandLandmarkerOptions
            • HandLandmarkerResult
            • HandLandmarksConnections
            • HandLandmarksConnections.Connection
            • HolisticLandmarker
            • HolisticLandmarkerOptions
            • HolisticLandmarkerResult
            • ImageClassifier
            • ImageClassifierOptions
            • ImageEmbedder
            • ImageEmbedderOptions
            • ImageSegmenter
            • ImageSegmenterOptions
            • InteractiveSegmenter
            • InteractiveSegmenterOptions
            • InteractiveSegmenterRegionOfInterest
            • InteractiveSegmenterRegionOfInterest.Format
            • ObjectDetector
            • ObjectDetectorOptions
            • PoseLandmarker
            • PoseLandmarkerOptions
            • PoseLandmarkerResult
            • PoseLandmarksConnections
            • PoseLandmarksConnections.Connection
            • RunningMode
            • holistic_landmarker
              • Overview
              • base_options_module
                • Overview
                • acceleration_pb2
                  • Overview
                  • Acceleration
                • base_options_pb2
                  • Overview
                  • BaseOptions
                • external_file_pb2
                  • Overview
                  • ExternalFile
                  • FileDescriptorMeta
                  • FilePointerMeta
              • base_vision_task_api
                • Overview
                • math
                  • Overview
                  • acos
                  • acosh
                  • asin
                  • asinh
                  • atan
                  • atan2
                  • atanh
                  • ceil
                  • comb
                  • copysign
                  • cos
                  • cosh
                  • degrees
                  • dist
                  • erf
                  • erfc
                  • exp
                  • expm1
                  • fabs
                  • factorial
                  • floor
                  • fmod
                  • frexp
                  • fsum
                  • gamma
                  • gcd
                  • hypot
                  • isclose
                  • isfinite
                  • isinf
                  • isnan
                  • isqrt
                  • lcm
                  • ldexp
                  • lgamma
                  • log
                  • log10
                  • log1p
                  • log2
                  • modf
                  • nextafter
                  • perm
                  • pow
                  • prod
                  • radians
                  • remainder