-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing landmarks, tracking multiple hands, and enabling depth on desktop #200
Comments
@JECBello For C++ desktop example, what you described is correct way to get result protos
A. For multi-hands, we are working on an example that will hopefully be available in early mid Nov. |
can you tell us the details for " modify the graph so that it contains multiple branches of hand landmark localization (e.g., two branches for up to 2 hands)" and how to do this? |
@JECBello Hi, could you share your code of getting hand landmarks based on the Desktop CPU example? I also tried to do it but failed. |
I have tested what @mgyong had mentioned with hand_tracking. It built successfully, but failed running and appeared to be some sort of memory lick |
@shadowver @Sara533 it runs perfectly on ubuntu 18 |
@mgyong Great, thank you for the clarification and example! I will definitely share my implementation when I have time. |
I just found out what went wrong with my code. I coded landmark_packet.Get<std::vector<::mediapipe::Landmark>>() when it really should be landmark_packet.Get<std::vector<::mediapipe::NormalizedLandmark>>() as the graph takes normalized landmark as input |
@chuoling please let me know about the different branch of handmark localization, i have made another branch but it takes a single hand and detects it twice |
@alizahidraja We are looking into releasing something on multi-hands shortly. Pls monitor this thread @eknight7 |
I created a gist showing how to do this for retrieve hand landmarks (Based on @mgyong example. Thank you!) You can find it HERE There other important thing to note is that you need to modify the desktop/BUILD and I also added a new hand_tracking/BUILD that look like this desktop
The important additions here are hand_tracking
The build command looks as follows: and the run command is: |
@mgyong @pablovela5620 |
Thanks to @JECBello and especially @pablovela5620 I reproduced the code for how to printout the hand tracking landmarks. Is there a more analytical documentation of the mediapipe functions and their methods? |
@Sara533 In order to access the hand landmarks from the GPU buffer, you need to use a for loop.
If anyone knows a more efficient way of accessing the landmark coordinates, please feel free to correct me! |
@JECBello I used the same method to output landmark coordinates, but the z value looks pretty strange to me. I guess because it was normalized. What is your result on the z value? Maybe I need to calibrate the camera first then use PnP to calculate the z value? |
@shadowver I believe I read in another thread that the z-values are determined with respect to the wrist(#156). I'm getting values ranging from -80 to 80 (I might have to double check this). Regarding calibrating the camera and using PnP, I believe @mgyong might be a better person to ask! |
@JECBello Thanks for the quick reply. Ya, I read that thread as well but so far it has not getting any update yet. I will keep an eye on it. |
@mgyong In the hand tracking example, I have been trying to get the info about the bounding box that surrounds the hand and I have added the following code lines, with respect to the code used to get the hand landmarks (clearly more code is needed, but the problem starts at the include files):
But I get the complile error:
Even if I comment-out the first include, the second line does not pass the compilation either. I see in the bazel-bin and bazel-genfiles folders that these pb.h files do exist, so what is wrong and how is it possible to get the info about the rectangular that surrounds the hand? I would guess that similar to the landmark proto files, the rect would also be available, but clearly I am missing something fundamental in the process. Also, after a lot of reading on the mediapipe project, I am still puzzled on how to find information describing how to use it. Without any manuals the code is too overwelmingly complicated to understand how to use its functions and methods. Any suggestions? |
@gitBitHubNet did you try adding |
Thumbs up to @shadowver. So to sum up, the correct steps to include the hand rectangular landmarks are: a. follow the steps described by @pablovela5620 to add the hand landmarks b. then, in order to add the rect landmarks, add the following lines in your demo_run_graph_main_out.cc file, each in the corresponding place according to @pablovela5620 's additions for the hand landmarks
note that as it turns out, the lines
are not necessary in the demo_run_graph_main_out.cc file ii. in the streams definition section add
iii. after the other ASSIGN_OR_RETURN statements add
iv. in the packet pollers section add
v. after printing out the hand landmarks, add the following to printout the rectangular info
c. finally add the following lines to the .BUILD file
|
So are z-values available for the desktop app? I am just getting zero values. |
@alxcpa01101 |
With the new release https://github.com/google/mediapipe/releases/tag/v0.6.4, we have multi-hand tracking examples: |
Great work here! I'm also looking for how to get the landmarks with mediapipe. Could you please share the final code for GPU and multi-hand tracking? It would make us save a huge amount of time... ;-) |
multi_hand_tracking_landmarks_gpu.txt I put this file with .cc extension in examples/desktop. I added to desktop/BUILD:
And I added to multi_hand_tracking/BUILD:
My command to build:
My command to run:
If you find any way to improve performances, please let me know! |
@QBoulanger Thanks for the concise summary with multiple hand tracking, it was quite helpful! Does anyone know in what order the landmarks are stored in the landmark list? Visually speaking, in what order do the landmarks correspond to the key-points on the hand? |
Hi! I tried running the code from @pablovela5620 and keep getting this error: I've been looking in the demo_run_graph_main_out.cc but I guess I'm still a little confused as to how we could iterate through the mediapipe::NormalizedLandmarkList and output it without vector. For my purposes I am ideally trying to get the landmark points out in a file so I can do some visualizations with them. Any recommendations, etc are appreciated! I'm on MacOS |
@ninalutz see this comment and this comment. The code has been updated a while back to output a |
@eknight7 If I use
I get a huge string that i need to process to get the x y for each joint - > but it works ! If i add the following code from this comment
i get the following error:
Could you tell me how I can fix this issue ? Thanks :) (I use ubuntu 18) |
@chillcloud-dev There seems to be an issue with the type of Context:
it seems the code is saying that |
@eknight7 What I wanted to achieve with the following codesnipplet: is that i want to access every finger joint cleanly without processing the DebugString. |
Here is some code to help you with this @chillcloud-dev: https://gist.github.com/eknight7/d4a57504c8f866fc80c0eb2c61ff6b4f. |
Is there any way to output the z-coordinate of the landmarks? right now its always zero and i actually read that they are all normalized relative to wrist. But that would be fine for my application I have in mind. I am using a realsense D415 camera that gives me good FPS ( currently around 25 FPS ) |
it works to solve the above problem about the type of Landmark. |
I did as the above. There's no error. Just I can't get the landmarks. Anyone have the idea to solve the problem? |
@Pan-zhaoyu same here.. did u find out whats happening here? edit: I'ma dumbass.. i forgot to use: std::cout |
the above code is in the main function. |
How can I retrieve the coordinates of the keypoints of fingers in android FOR MULTI-HAND TRACKING? Please let me know. Any suggestions would be helpful. |
Does this still work for the latest version? I followed your steps and recevied the following error: ERROR: /home/tony/mediapipe/mediapipe/calculators/tflite/BUILD:401:1: C++ compilation of rule '//mediapipe/calculators/tflite:tflite_tensors_to_detections_calculator' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 118 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox In file included from /usr/include/EGL/eglplatform.h:128, from /usr/include/EGL/egl.h:39, from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/portable_gl31.h:21, from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:27, from ./mediapipe/util/tflite/config.h:39, from mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:28: external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:63:9: error: expected unqualified-id before 'int' 63 | absl::Status Read(absl::Span<T> data) const; | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:67:9: error: expected unqualified-id before 'int' 67 | absl::Status Write(absl::Span<const T> data); | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:72:9: error: expected unqualified-id before 'int' 72 | absl::Status MappedRead( | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:78:9: error: expected unqualified-id before 'int' 78 | absl::Status MappedWrite( | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:81:9: error: expected unqualified-id before 'int' 81 | absl::Status MakeView(size_t offset, size_t bytes_size, GlBuffer* gl_buffer); | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:87:9: error: expected unqualified-id before 'int' 87 | absl::Status BindToIndex(uint32_t index) const; | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:116:7: error: expected unqualified-id before 'int' 116 | absl::Status CopyBuffer(const GlBuffer& read_buffer, | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:119:7: error: expected unqualified-id before 'int' 119 | absl::Status GetSSBOSize(GLuint id, int64_t* size_bytes); | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:127:7: error: expected unqualified-id before 'int' 127 | absl::Status CreateReadWriteShaderStorageBuffer(uint32_t num_elements, | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:133:7: error: expected unqualified-id before 'int' 133 | absl::Status CreateReadOnlyShaderStorageBuffer(absl::Span<const T> data, | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:138:7: error: expected unqualified-id before 'int' 138 | absl::Status AppendFromBuffer(const GlBuffer& buffer, std::vector<T>* data) { | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:172:7: error: expected unqualified-id before 'int' 172 | absl::Status CreatePersistentBuffer(size_t size, GlPersistentBuffer* gl_buffer); | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:248:7: error: expected unqualified-id before 'int' 248 | absl::Status CreateReadWriteShaderStorageBuffer(uint32_t num_elements, | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:262:7: error: expected unqualified-id before 'int' 262 | absl::Status CreateReadOnlyShaderStorageBuffer(absl::Span<const T> data, | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:275:7: error: expected unqualified-id before 'int' 275 | absl::Status GlBuffer::Read(absl::Span<T> data) const { | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:288:7: error: expected unqualified-id before 'int' 288 | absl::Status GlBuffer::Write(absl::Span<const T> data) { | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:299:7: error: expected unqualified-id before 'int' 299 | absl::Status GlBuffer::MappedRead( | ^~~~~~ external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_buffer.h:315:7: error: expected unqualified-id before 'int' 315 | absl::Status GlBuffer::MappedWrite( | ^~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:61:26: error: 'tflite::gpu::gl::CreateReadWriteShaderStorageBuffer' has not been declared 61 | using ::tflite::gpu::gl::CreateReadWriteShaderStorageBuffer; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./mediapipe/framework/port/status_macros.h:18, from ./mediapipe/framework/packet.h:38, from ./mediapipe/framework/calculator_state.h:30, from ./mediapipe/framework/calculator_context.h:23, from ./mediapipe/framework/calculator_base.h:22, from ./mediapipe/framework/calculator_framework.h:54, from mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:22: mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc: In lambda function: mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:407:20: error: 'CopyBuffer' was not declared in this scope; did you mean 'GpuBuffer'? 407 | RET_CHECK_CALL(CopyBuffer(input_tensors[0], gpu_data_->raw_boxes_buffer)); | ^~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:407:5: note: in expansion of macro 'RET_CHECK_CALL' 407 | RET_CHECK_CALL(CopyBuffer(input_tensors[0], gpu_data_->raw_boxes_buffer)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:408:20: error: 'CopyBuffer' was not declared in this scope; did you mean 'GpuBuffer'? 408 | RET_CHECK_CALL(CopyBuffer(input_tensors[1], gpu_data_->raw_scores_buffer)); | ^~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:408:5: note: in expansion of macro 'RET_CHECK_CALL' 408 | RET_CHECK_CALL(CopyBuffer(input_tensors[1], gpu_data_->raw_scores_buffer)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:54: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'Write' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:9: note: in expansion of macro 'RET_CHECK_CALL' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:60: error: expected primary-expression before 'float' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:9: note: in expansion of macro 'RET_CHECK_CALL' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:60: error: expected ')' before 'float' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:9: note: in expansion of macro 'RET_CHECK_CALL' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:416:9: note: in expansion of macro 'RET_CHECK_CALL' 416 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.Write<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:421:13: error: 'CopyBuffer' was not declared in this scope; did you mean 'GpuBuffer'? 421 | CopyBuffer(input_tensors[2], gpu_data_->raw_anchors_buffer)); | ^~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:420:9: note: in expansion of macro 'RET_CHECK_CALL' 420 | RET_CHECK_CALL( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:428:52: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'BindToIndex' 428 | RET_CHECK_CALL(gpu_data_->decoded_boxes_buffer.BindToIndex(0)); | ^~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:428:5: note: in expansion of macro 'RET_CHECK_CALL' 428 | RET_CHECK_CALL(gpu_data_->decoded_boxes_buffer.BindToIndex(0)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:429:48: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'BindToIndex' 429 | RET_CHECK_CALL(gpu_data_->raw_boxes_buffer.BindToIndex(1)); | ^~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:429:5: note: in expansion of macro 'RET_CHECK_CALL' 429 | RET_CHECK_CALL(gpu_data_->raw_boxes_buffer.BindToIndex(1)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:430:50: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'BindToIndex' 430 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.BindToIndex(2)); | ^~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:430:5: note: in expansion of macro 'RET_CHECK_CALL' 430 | RET_CHECK_CALL(gpu_data_->raw_anchors_buffer.BindToIndex(2)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:435:51: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'BindToIndex' 435 | RET_CHECK_CALL(gpu_data_->scored_boxes_buffer.BindToIndex(0)); | ^~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:435:5: note: in expansion of macro 'RET_CHECK_CALL' 435 | RET_CHECK_CALL(gpu_data_->scored_boxes_buffer.BindToIndex(0)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:436:49: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'BindToIndex' 436 | RET_CHECK_CALL(gpu_data_->raw_scores_buffer.BindToIndex(1)); | ^~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:436:5: note: in expansion of macro 'RET_CHECK_CALL' 436 | RET_CHECK_CALL(gpu_data_->raw_scores_buffer.BindToIndex(1)); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:442:52: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'Read' 442 | RET_CHECK_CALL(gpu_data_->decoded_boxes_buffer.Read(absl::MakeSpan(boxes))); | ^~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:442:5: note: in expansion of macro 'RET_CHECK_CALL' 442 | RET_CHECK_CALL(gpu_data_->decoded_boxes_buffer.Read(absl::MakeSpan(boxes))); | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:444:51: error: 'mediapipe::GpuTensor' {aka 'class tflite::gpu::gl::GlBuffer'} has no member named 'Read' 444 | RET_CHECK_CALL(gpu_data_->scored_boxes_buffer.Read( | ^~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:444:5: note: in expansion of macro 'RET_CHECK_CALL' 444 | RET_CHECK_CALL(gpu_data_->scored_boxes_buffer.Read( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc: In lambda function: mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:20: error: 'CreateReadWriteShaderStorageBuffer' was not declared in this scope 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:5: note: in expansion of macro 'RET_CHECK_CALL' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:55: error: expected primary-expression before 'float' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:5: note: in expansion of macro 'RET_CHECK_CALL' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:55: error: expected ')' before 'float' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:5: note: in expansion of macro 'RET_CHECK_CALL' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:811:5: note: in expansion of macro 'RET_CHECK_CALL' 811 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:20: error: 'CreateReadWriteShaderStorageBuffer' was not declared in this scope 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:5: note: in expansion of macro 'RET_CHECK_CALL' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:55: error: expected primary-expression before 'float' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:5: note: in expansion of macro 'RET_CHECK_CALL' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:55: error: expected ')' before 'float' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:5: note: in expansion of macro 'RET_CHECK_CALL' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:815:5: note: in expansion of macro 'RET_CHECK_CALL' 815 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:20: error: 'CreateReadWriteShaderStorageBuffer' was not declared in this scope 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:5: note: in expansion of macro 'RET_CHECK_CALL' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:55: error: expected primary-expression before 'float' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:5: note: in expansion of macro 'RET_CHECK_CALL' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:55: error: expected ')' before 'float' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:5: note: in expansion of macro 'RET_CHECK_CALL' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:818:5: note: in expansion of macro 'RET_CHECK_CALL' 818 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:20: error: 'CreateReadWriteShaderStorageBuffer' was not declared in this scope 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:5: note: in expansion of macro 'RET_CHECK_CALL' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:55: error: expected primary-expression before 'float' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:5: note: in expansion of macro 'RET_CHECK_CALL' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:55: error: expected ')' before 'float' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:5: note: in expansion of macro 'RET_CHECK_CALL' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:905:5: note: in expansion of macro 'RET_CHECK_CALL' 905 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:20: error: 'CreateReadWriteShaderStorageBuffer' was not declared in this scope 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:5: note: in expansion of macro 'RET_CHECK_CALL' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:55: error: expected primary-expression before 'float' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:5: note: in expansion of macro 'RET_CHECK_CALL' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:55: error: expected ')' before 'float' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:5: note: in expansion of macro 'RET_CHECK_CALL' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ ./mediapipe/calculators/tflite/util.h:20:25: note: to match this '(' 20 | const auto status = (call); \ | ^ ./mediapipe/framework/deps/status_macros.h:87:45: note: in definition of macro 'MP_RETURN_IF_ERROR' 87 | status_macro_internal_adaptor = {(expr), __FILE__, __LINE__}) { \ | ^~~~ mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc:909:5: note: in expansion of macro 'RET_CHECK_CALL' 909 | RET_CHECK_CALL(CreateReadWriteShaderStorageBuffer<float>( | ^~~~~~~~~~~~~~ Target //mediapipe/examples/desktop/multi_hand_tracking:multi_hand_tracking_landmarks_gpu failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 4.945s, Critical Path: 4.77s INFO: 5 processes: 5 linux-sandbox. FAILED: Build did NOT complete successfully |
i recall having similar issues
best luck |
yeah I'm also getting same error |
…fier_codelab added beginning version of digit classifier android codelab
Hello,
I found out about Mediapipe after seeing Google's blog post regarding hand tracking. Currently, I am working on using Mediapipe to build a cross platform interface using gestures to control multiple systems. I am using the Desktop CPU example as a base for how to move forward, and I have successfully retrieved the hand landmarks. I just want to ensure that I am retrieving them in the most efficient and proper way.
The process I use is as follows:
Is this process correct or is there a better way to go about retrieving the coordinates of the hand landmarks?
I have additional questions, but I am unsure if I should place them in a separate issue. I will ask them here but please let me know if I should open a separate issue.
The text was updated successfully, but these errors were encountered: