- Follow the stepsHERE
- Can build the Brazel project for both desktop and Android:
-
ubuntu
$ bazel build -c opt \ --define MEDIAPIPE_DISABLE_GPU=1 \ --define no_aws_support=true \ mediapipe/examples/desktop/object_detection:object_detection_tensorflowand then$ GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/object_detection/object_detection_tensorflow \ --calculator_graph_config_file=mediapipe/graphs/object_detection/object_detection_desktop_tensorflow_graph.pbtxt \ --input_side_packets=input_video_path=<input video path>,output_video_path=<output video path> -
android
bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu:objectdetectiongpu -
My own example
bazel-bin/mediapipe/examples/desktop/orb_slam/orb_slam
-
MainActivityis the only Java interface that is different for each program. Use camera setting to start camera here(front/end)- Use Brazel
BUILDfile to config asCMakeLists, so dependencies are clear here. - Import -> Config -> Sync -> Run. Refer to the document
- Java environment problem, update local JDK or refer to this post
- ffmpeg error
- Opencv should be 4.0+
Graph
In the folder
graphs,*.pbtxtdefines a bunch of graphs that can be used. Visualize them HERE._gpuor_cpucould be minimal. In most cases, justuse_gpuflag that can be sent to calculators.