mmm2016 / mediapipemultihandstrackingapp

Gesture recognition through mediapipe
60 stars 19 forks source link

mediapipe version? #5

Open 307509256 opened 3 years ago

mmm2016 commented 3 years ago

0.76

307509256 commented 3 years ago

0.7.6目前无法编译多手势的aar,想问下作者是怎么编译的aar

load("//mediapipe/java/com/google/mediapipe:mediapipe_aar.bzl", "mediapipe_aar")

mediapipe_aar( name = "mediapipe_hand_tracking", calculators = ["//mediapipe/graphs/hand_tracking:multi_hand_mobile_calculators"], )

307509256 commented 3 years ago

target 'multi_hand_mobile_calculators' not declared in package 'mediapipe/graphs/hand_tracking' defined by /home/gongjia/rsyncd/dest/mediapipe/mediapipe/graphs/hand_tracking/BUILD and referenced by '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:libmediapipe_jni.so' ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mediapipe_hand_tracking' failed; build aborted: Analysis failed

mmm2016 commented 3 years ago

已经更新最新版本 。

mmm2016 commented 3 years ago

0.7.6当前无法编译多手势的aar,想问下作者是怎么编译的aar

load(“ // mediapipe / java / com / google / mediapipe:mediapipe_aar.bzl”,“ mediapipe_aar”)

mediapipe_aar( name =“ mediapipe_hand_tracking”, 计算器= [“ // mediapipe / graphs / hand_tracking:multi_hand_mobile_calculators”], )

写法没有问题 ,不过最新版不区分多手单手。

307509256 commented 3 years ago

我编译出来的aar包,解压出来的classes.jar里面没有RectProto,但我看你的里面有 java里面也有引用import com.google.mediapipe.formats.proto.RectProto;

是不是编译选项的问题? bazel build -c opt --fat_apk_cpu=arm64-v8a //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar

307509256 commented 3 years ago

查了下:我的这个文件下./mediapipe/java/com/google/mediapipe/mediapipe_aar.bzl ... android_library( name = name + "_android_lib", srcs = [ "//mediapipe/java/com/google/mediapipe/components:java_src", "//mediapipe/java/com/google/mediapipe/framework:java_src", "//mediapipe/java/com/google/mediapipe/glutil:java_src", "com/google/mediapipe/proto/CalculatorProto.java", "com/google/mediapipe/formats/proto/LandmarkProto.java", "com/google/mediapipe/formats/proto/DetectionProto.java", "com/google/mediapipe/formats/proto/LocationDataProto.java", "com/google/mediapipe/formats/annotation/proto/RasterizationProto.java", ],

没有 "com/google/mediapipe/formats/proto/RectProto.java",

mmm2016 commented 3 years ago

没有就自己加嘛,要什么加什么接口 。

307509256 commented 3 years ago

没有就自己加嘛,要什么加什么接口 。

在中间加了com/google/mediapipe/formats/proto/RectProto.java,它不认,报错,没有这个类

ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar_android_lib: missing input file '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:com/google/mediapipe/formats/proto/RectProto.java' Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14 1 input file(s) do not exist

mmm2016 commented 3 years ago

"com/google/mediapipe/formats/proto/LandmarkProto.java", 你看这个类 加了什么 ,你就参照一下 。加什么 就可以了。应该要加两个地方 。

307509256 commented 3 years ago

搞定了,谢谢群主

wxk2008 commented 3 years ago

搞定了,谢谢群主

meet the same problem, can you give me a hand, thanks!!

wxk2008 commented 3 years ago

没有就自己加嘛,要什么加什么接口 。

在中间加了com/google/mediapipe/formats/proto/RectProto.java,它不认,报错,没有这个类

ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar_android_lib: missing input file '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:com/google/mediapipe/formats/proto/RectProto.java' Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14 1 input file(s) do not exist I have met the same problem, but there is no RectProto.java file

mmm2016 commented 3 years ago

搞定了,谢谢群主

meet the same problem, can you give me a hand, thanks!!

Add an interface in mediapipe_aar.bzl by yourself