mediapipe/mediapipe/examples/desktop
MediaPipe Team dc9216dc59 Project import generated by Copybara.
PiperOrigin-RevId: 267280553
2019-09-04 19:11:29 -07:00
..
hello_world Project import generated by Copybara. 2019-06-28 17:55:52 -07:00
media_sequence Project import generated by Copybara. 2019-08-16 18:56:48 -07:00
object_detection Project import generated by Copybara. 2019-08-16 18:56:48 -07:00
youtube8m Project import generated by Copybara. 2019-09-04 19:00:29 -07:00
__init__.py Project import generated by Copybara. 2019-06-16 16:06:57 -07:00
BUILD Project import generated by Copybara. 2019-06-16 16:06:57 -07:00
README.md Project import generated by Copybara. 2019-09-04 19:11:29 -07:00
simple_run_graph_main.cc Project import generated by Copybara. 2019-08-16 18:56:48 -07:00

Hello World

To build the "Hello World" example, use:

bazel build -c opt mediapipe/examples/desktop/hello_world:hello_world

and then run it using:

bazel-bin/mediapipe/examples/desktop/hello_world/hello_world --logtostderr

TFlite Object Detection

To build the object detection demo using a TFLite model on desktop, use:

bazel build -c opt mediapipe/examples/desktop/object_detection:object_detection_tflite --define MEDIAPIPE_DISABLE_GPU=1

and run it using:

bazel-bin/mediapipe/examples/desktop/object_detection/object_detection_tflite \
  --calculator_graph_config_file=mediapipe/graphs/object_detection/object_detection_desktop_tflite_graph.pbtxt \
  --input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file \
  --alsologtostderr

TensorFlow Object Detection

To build the object detection demo using a TensorFlow model on desktop, use:

bazel build -c opt mediapipe/examples/desktop/object_detection:object_detection_tensorflow \
  --define MEDIAPIPE_DISABLE_GPU=1

and run it using:

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=/path/to/input/file,output_video_path=/path/to/output/file
  --alsologtostderr