Merge pull request #2 from HFVladimir/deformation

Deformation
This commit is contained in:
Vladimir 2022-07-27 17:19:26 +03:00 committed by GitHub
commit 7056bb1aa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 4 deletions

View File

@ -35,8 +35,8 @@ http_archive(
http_archive( http_archive(
name = "rules_cc", name = "rules_cc",
strip_prefix = "rules_cc-8bb0eb5c5ccd96b91753bb112096bb6993d16d13", strip_prefix = "rules_cc-main",
urls = ["https://github.com/bazelbuild/rules_cc/archive/8bb0eb5.zip"], urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"],
) )
http_archive( http_archive(
@ -190,7 +190,7 @@ http_archive(
new_local_repository( new_local_repository(
name = "linux_opencv", name = "linux_opencv",
build_file = "@//third_party:opencv_linux.BUILD", build_file = "@//third_party:opencv_linux.BUILD",
path = "/usr/local", path = "/usr",
) )
new_local_repository( new_local_repository(
@ -225,7 +225,6 @@ http_archive(
build_file = "@//third_party:opencv_android.BUILD", build_file = "@//third_party:opencv_android.BUILD",
strip_prefix = "OpenCV-android-sdk", strip_prefix = "OpenCV-android-sdk",
type = "zip", 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" url = "https://github.com/opencv/opencv/releases/download/4.0.1/opencv-4.0.1-android-sdk.zip"
) )

View File

@ -0,0 +1,37 @@
# Deformation
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
```