Instantiate GetDetectionVectorItemCalculator variant of GetVectorItemCalculator<>.

PiperOrigin-RevId: 491123314
This commit is contained in:
MediaPipe Team 2022-11-27 00:05:08 -08:00 committed by Copybara-Service
parent 0bdb48ceb1
commit 395d9d8ea2
2 changed files with 6 additions and 0 deletions

View File

@ -1299,6 +1299,7 @@ cc_library(
"//mediapipe/framework/api2:packet", "//mediapipe/framework/api2:packet",
"//mediapipe/framework/api2:port", "//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto", "//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:landmark_cc_proto", "//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/port:ret_check", "//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status", "//mediapipe/framework/port:status",

View File

@ -15,6 +15,7 @@
#include "mediapipe/calculators/core/get_vector_item_calculator.h" #include "mediapipe/calculators/core/get_vector_item_calculator.h"
#include "mediapipe/framework/formats/classification.pb.h" #include "mediapipe/framework/formats/classification.pb.h"
#include "mediapipe/framework/formats/detection.pb.h"
#include "mediapipe/framework/formats/landmark.pb.h" #include "mediapipe/framework/formats/landmark.pb.h"
namespace mediapipe { namespace mediapipe {
@ -32,5 +33,9 @@ using GetClassificationListVectorItemCalculator =
GetVectorItemCalculator<mediapipe::ClassificationList>; GetVectorItemCalculator<mediapipe::ClassificationList>;
REGISTER_CALCULATOR(GetClassificationListVectorItemCalculator); REGISTER_CALCULATOR(GetClassificationListVectorItemCalculator);
using GetDetectionVectorItemCalculator =
GetVectorItemCalculator<mediapipe::Detection>;
REGISTER_CALCULATOR(GetDetectionVectorItemCalculator);
} // namespace api2 } // namespace api2
} // namespace mediapipe } // namespace mediapipe