From 22aa075b47850daa50b5d020418453e5d899b8ec Mon Sep 17 00:00:00 2001 From: mslight Date: Wed, 20 Jul 2022 14:48:01 +0400 Subject: [PATCH] README file --- WORKSPACE | 9 +++---- mediapipe/graphs/deformation/README.md | 37 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 mediapipe/graphs/deformation/README.md diff --git a/WORKSPACE b/WORKSPACE index bb6fa6e4c..deeb3d9e6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -35,8 +35,8 @@ http_archive( http_archive( name = "rules_cc", - strip_prefix = "rules_cc-8bb0eb5c5ccd96b91753bb112096bb6993d16d13", - urls = ["https://github.com/bazelbuild/rules_cc/archive/8bb0eb5.zip"], + strip_prefix = "rules_cc-main", + urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"], ) http_archive( @@ -190,7 +190,7 @@ http_archive( new_local_repository( name = "linux_opencv", build_file = "@//third_party:opencv_linux.BUILD", - path = "/usr/local", + path = "/usr", ) new_local_repository( @@ -225,7 +225,6 @@ http_archive( build_file = "@//third_party:opencv_android.BUILD", strip_prefix = "OpenCV-android-sdk", type = "zip", - # url = "https://github.com/opencv/opencv/releases/download/3.4.10/opencv-3.4.10-#android-sdk.zip", url = "https://github.com/opencv/opencv/releases/download/4.0.1/opencv-4.0.1-android-sdk.zip" ) @@ -417,5 +416,3 @@ libedgetpu_dependencies() load("@coral_crosstool//:configure.bzl", "cc_crosstool") cc_crosstool(name = "crosstool") -android_sdk_repository(name = "androidsdk", build_tools_version = "30.0.1") -android_ndk_repository(name = "androidndk", api_level=21) diff --git a/mediapipe/graphs/deformation/README.md b/mediapipe/graphs/deformation/README.md new file mode 100644 index 000000000..cab1ebdc7 --- /dev/null +++ b/mediapipe/graphs/deformation/README.md @@ -0,0 +1,37 @@ +# Beauty + +this graph performs face processing + +## Getting started + +Clone branch. + +1. Deformation-CPU + +Build with: +``` +bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/deformation:deformation_cpu +``` +Run with (using your camera): +``` +bazel-bin/mediapipe/examples/desktop/deformation/deformation_cpu +--calculator_graph_config_file=mediapipe/graphs/deformation/deformation_cpu.pbtxt +``` +Run with (using video): +``` +bazel-bin/mediapipe/examples/desktop//deformation/deformation_cpu +--calculator_graph_config_file=mediapipe/graphs/deformation/deformation_cpu.pbtxt +--input_video_path=/path/video.mp4 +--output_video_path=/path/outvideo.mp4 +``` + +2. Mobile (Android) + +Build with: +``` +bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/deformation:deformationgpu +``` +Install with: +``` +adb install bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/deformation/deformationgpu.apk +```