mediapipe-rs/mediapipe/graphs/tracking/object_detection_tracking_mobile_gpu.pbtxt

47 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-03-01 13:04:01 +01:00
# MediaPipe graph that performs object detection and tracking with TensorFlow
# Lite on GPU.
# Used in the examples in
# mediapipie/examples/android/src/java/com/mediapipe/apps/objecttrackinggpu
# Images on GPU coming into and out of the graph.
input_stream: "input_video"
output_stream: "output_video"
# Resamples the images by specific frame rate. This calculator is used to
# control the frequecy of subsequent calculators/subgraphs, e.g. less power
# consumption for expensive process.
node {
calculator: "PacketResamplerCalculator"
input_stream: "DATA:input_video"
output_stream: "DATA:throttled_input_video"
node_options: {
[type.googleapis.com/mediapipe.PacketResamplerCalculatorOptions] {
frame_rate: 0.5
}
}
}
# Subgraph that detections objects (see object_detection_gpu.pbtxt).
node {
calculator: "ObjectDetectionSubgraphGpu"
input_stream: "IMAGE:throttled_input_video"
output_stream: "DETECTIONS:output_detections"
}
# Subgraph that tracks objects (see object_tracking_gpu.pbtxt).
node {
calculator: "ObjectTrackingSubgraphGpu"
input_stream: "VIDEO:input_video"
input_stream: "DETECTIONS:output_detections"
output_stream: "DETECTIONS:tracked_detections"
}
# Subgraph that renders annotations and overlays them on top of the input
# images (see renderer_gpu.pbtxt).
node {
calculator: "RendererSubgraphGpu"
input_stream: "IMAGE:input_video"
input_stream: "DETECTIONS:tracked_detections"
output_stream: "IMAGE:output_video"
}