mediapipe sub-graph registration
This commit is contained in:
parent
8c95126a67
commit
81557e0590
|
@ -134,7 +134,7 @@ def mediapipe_simple_subgraph(
|
|||
expand_template(
|
||||
name = name + "_linked_cc",
|
||||
template = clean_dep("//mediapipe/framework/tool:simple_subgraph_template.cc"),
|
||||
out = name + "_linked.cc",
|
||||
out = name + "_linked.h",
|
||||
substitutions = {
|
||||
"{{SUBGRAPH_CLASS_NAME}}": register_as,
|
||||
"{{SUBGRAPH_INC_FILE_PATH}}": native.package_name() + "/" + graph_base_name + ".inc",
|
||||
|
@ -145,7 +145,7 @@ def mediapipe_simple_subgraph(
|
|||
native.cc_library(
|
||||
name = name,
|
||||
srcs = [
|
||||
name + "_linked.cc",
|
||||
name + "_linked.h",
|
||||
graph_base_name + ".inc",
|
||||
],
|
||||
deps = [
|
||||
|
@ -161,7 +161,7 @@ def mediapipe_simple_subgraph(
|
|||
cc_library_with_tflite(
|
||||
name = name,
|
||||
srcs = [
|
||||
name + "_linked.cc",
|
||||
name + "_linked.h",
|
||||
graph_base_name + ".inc",
|
||||
],
|
||||
tflite_deps = tflite_deps,
|
||||
|
|
|
@ -5,8 +5,14 @@
|
|||
#include "mediapipe/framework/packet.h"
|
||||
#include "mediapipe/calculators/core/flow_limiter_calculator.h"
|
||||
#include "mediapipe/calculators/core/constant_side_packet_calculator.h"
|
||||
#include "mediapipe/modules/pose_landmark/pose_landmark_gpu_linked.h"
|
||||
|
||||
void registerCalculators(){
|
||||
typeid(::mediapipe::FlowLimiterCalculator);
|
||||
typeid(::mediapipe::ConstantSidePacketCalculator);
|
||||
typeid(::mediapipe::PoseLandmarkGpu);
|
||||
|
||||
}
|
||||
|
||||
static const char* kVideoQueueLabel = "com.google.mediapipe.example.videoQueue";
|
||||
static const char* kLandmarksOutputStream = "pose_landmarks";
|
||||
|
@ -131,9 +137,8 @@ static const char* kLandmarksOutputStream = "pose_landmarks";
|
|||
}
|
||||
|
||||
- (instancetype) initWithPoseTrackingOptions: (PoseTrackingOptions*) poseTrackingOptions{
|
||||
typeid(::mediapipe::FlowLimiterCalculator);
|
||||
typeid(::mediapipe::ConstantSidePacketCalculator);
|
||||
|
||||
registerCalculators();
|
||||
self.renderer = [[MPPLayerRenderer alloc] init];
|
||||
self.renderer.frameScaleMode = MPPFrameScaleModeFillAndCrop;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user