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