# Path: automl_video_ondevice/object_tracking/base_object_detection.py
# class BaseObjectDetectionInference:
#   """Interface that must be implemented for support of different model types."""
# 
#   def __init__(self, frozen_graph_path, label_map_path, config):
#     raise NotImplementedError()
# 
#   def input_size(self):
#     return Size(256, 256)
# 
#   def run(self, timestamp, frame, annotations):
#     raise NotImplementedError()
# 
# Path: automl_video_ondevice/types.py
# class NormalizedBoundingBox:
#   left: float
#   top: float
#   right: float
#   bottom: float
# 
# Path: automl_video_ondevice/types.py
# class ObjectTrackingAnnotation:
#   timestamp: float
#   track_id: int
#   class_id: int
#   class_name: str
#   confidence_score: float
#   bbox: NormalizedBoundingBox


import numpy as np
  import platform
from automl_video_ondevice.object_tracking.base_object_detection import BaseObjectDetectionInference
from automl_video_ondevice.types import NormalizedBoundingBox
from automl_video_ondevice.types import ObjectTrackingAnnotation
    from automl_video_ondevice.object_tracking.mediapipe_tracker.aarch64 import mediapipe_tracker  # pylint: disable=line-too-long

# Assigns an unique id for each new detection.
node {
  calculator: "DetectionUniqueIdCalculator"
  input_stream: "DETECTIONS:input_detections"
  output_stream: "DETECTIONS:detections_with_id"
}

# Converts detections to TimedBox protos which are used as initial location
# for tracking.
node {
  calculator: "DetectionsToTimedBoxListCalculator"
  input_stream: "DETECTIONS:detections_with_id"
  output_stream: "BOXES:start_pos"
}


node: {
  calculator: "ImageTransformationCalculator"
  input_stream: "IMAGE:input_frame"
  output_stream: "IMAGE:downscaled_input_video"
  node_options: {
    [type.googleapis.com/mediapipe.ImageTransformationCalculatorOptions] {
      output_width: 640
      output_height: 360
    }
  }
}

# Performs motion analysis on an incoming video stream.

# Path: automl_video_ondevice/object_tracking/base_object_detection.py
# class BaseObjectDetectionInference:
#   """Interface that must be implemented for support of different model types."""
# 
#   def __init__(self, frozen_graph_path, label_map_path, config):
#     raise NotImplementedError()
# 
#   def input_size(self):
#     return Size(256, 256)
# 
#   def run(self, timestamp, frame, annotations):
#     raise NotImplementedError()
# 
# Path: automl_video_ondevice/types.py
# class NormalizedBoundingBox:
#   left: float
#   top: float
#   right: float
#   bottom: float
# 
# Path: automl_video_ondevice/types.py
# class ObjectTrackingAnnotation:
#   timestamp: float
#   track_id: int
#   class_id: int
#   class_name: str
#   confidence_score: float
#   bbox: NormalizedBoundingBox


# Path: automl_video_ondevice/object_tracking/mediapipe_object_tracker.py
import numpy as np
  import platform
from automl_video_ondevice.object_tracking.base_object_detection import BaseObjectDetectionInference
from automl_video_ondevice.types import NormalizedBoundingBox
from automl_video_ondevice.types import ObjectTrackingAnnotation
    from automl_video_ondevice.object_tracking.mediapipe_tracker.aarch64 import mediapipe_tracker  # pylint: disable=line-too-long


# Assigns an unique id for each new detection.
node {
  calculator: "DetectionUniqueIdCalculator"
  input_stream: "DETECTIONS:input_detections"
  output_stream: "DETECTIONS:detections_with_id"
}

# Converts detections to TimedBox protos which are used as initial location
# for tracking.
node {
  calculator: "DetectionsToTimedBoxListCalculator"
  input_stream: "DETECTIONS:detections_with_id"
  output_stream: "BOXES:start_pos"
}


node: {
  calculator: "ImageTransformationCalculator"
  input_stream: "IMAGE:input_frame"
  output_stream: "IMAGE:downscaled_input_video"
  node_options: {
    [type.googleapis.com/mediapipe.ImageTransformationCalculatorOptions] {
      output_width: 640
      output_height: 360
    }
  }
}

# Performs motion analysis on an incoming video stream.

node: {