Fix ObjectDetector C++ flow limiter and improve documentation.

PiperOrigin-RevId: 481774191
This commit is contained in:
MediaPipe Team 2022-10-17 16:56:12 -07:00 committed by Copybara-Service
parent b09c0e9938
commit ba93bab286
2 changed files with 5 additions and 3 deletions

View File

@ -101,8 +101,8 @@ CalculatorGraphConfig CreateGraphConfig(
task_subgraph.Out(kImageTag).SetName(kImageOutStreamName) >>
graph.Out(kImageTag);
if (enable_flow_limiting) {
return tasks::core::AddFlowLimiterCalculator(graph, task_subgraph,
{kImageTag}, kDetectionsTag);
return tasks::core::AddFlowLimiterCalculator(
graph, task_subgraph, {kImageTag, kNormRectTag}, kDetectionsTag);
}
graph.In(kImageTag) >> task_subgraph.In(kImageTag);
graph.In(kNormRectTag) >> task_subgraph.In(kNormRectTag);

View File

@ -460,7 +460,7 @@ void ConfigureTensorsToDetectionsCalculator(
// IMAGE - Image
// Image to perform detection on.
// NORM_RECT - NormalizedRect @Optional
// Describes image rotation and region of image to perform classification
// Describes image rotation and region of image to perform detection
// on.
// @Optional: rect covering the whole image is used if not specified.
//
@ -469,6 +469,8 @@ void ConfigureTensorsToDetectionsCalculator(
// Detected objects with bounding box in pixel units.
// IMAGE - mediapipe::Image
// The image that object detection runs on.
// All returned coordinates are in the unrotated and uncropped input image
// coordinates system.
//
// Example:
// node {