-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from google/staging
Project import generated by Copybara.
- Loading branch information
Showing
14 changed files
with
480 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# Copyright 2020-2022 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# 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. | ||
# | ||
package: "magritte" | ||
type: "FaceTrackingOverlayLiveGpu" | ||
|
||
# A graph that detects and tracks faces to draw debug information. | ||
# | ||
# It draws in red the raw detection output (detection box, keypoints, score), | ||
# and in blue the tracked detection output (detection box, keypoints, score, | ||
# when present). | ||
# | ||
# This graph is specialized for GPU architectures. It also optimized for live | ||
# streaming environments by throttling the input stream and by applying only | ||
# full-range face detection. | ||
# | ||
# Inputs: | ||
# - input_video: A GpuBuffer stream containing the image on which detection | ||
# models are run. | ||
# | ||
# Outputs: | ||
# - output_video: A GpuBuffer stream containing the image annotated with | ||
# detections data. | ||
|
||
input_stream: "input_video" | ||
output_stream: "output_video" | ||
|
||
node { | ||
calculator: "FlowLimiterCalculator" | ||
input_stream: "input_video" | ||
input_stream: "FINISHED:output_video" | ||
input_stream_info: { | ||
tag_index: "FINISHED" | ||
back_edge: true | ||
} | ||
output_stream: "throttled_input_video" | ||
} | ||
|
||
node { | ||
calculator: "FaceDetectionFullRangeGpu" | ||
input_stream: "IMAGE:throttled_input_video" | ||
output_stream: "DETECTIONS:detections" | ||
} | ||
|
||
node { | ||
calculator: "TrackingSubgraphGpu" | ||
input_stream: "IMAGE:throttled_input_video" | ||
input_stream: "DETECTIONS:detections" | ||
output_stream: "DETECTIONS:tracked_detections" | ||
} | ||
|
||
node { | ||
calculator: "DetectionTrackingOverlaySubgraphGpu" | ||
input_stream: "IMAGE_GPU:throttled_input_video" | ||
input_stream: "detections" | ||
input_stream: "tracked_detections" | ||
output_stream: "IMAGE_GPU:output_video" | ||
} | ||
|
Oops, something went wrong.