google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://mediapipe.dev
Apache License 2.0
26.6k stars 5.07k forks source link

Differences and usage of outputSegmentationMasks optiom when using #5530

Open theguaz opened 1 month ago

theguaz commented 1 month ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes

OS Platform and Distribution

Mac OS

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

Chrome

Programming Language and version

javascript

MediaPipe version

0.10.14

Bazel version

No response

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

Not being able to consistenly get to know how to use the outputSegmentationMasks option

Describe the expected behaviour

Getting an example on how to get the mask as a bitmap information

Standalone code/steps you may have used to try to get what you need

Followed the CodePen example, and it works nicely to get the landmarks, but when enabling the outputSegmentationMasks I cannot figure how to access the segmentation mask and draw it on the canvas where I'm already drawing the bones.

Also, the logged result of this, changes a lot when switching between GPU and CPU:
const mask = result.segmentationMasks[0];

Other info / Complete Logs

No response

S3od22 commented 1 month ago

سعودددًًs3.@“..

في ثلاثاء، 16 يوليو، 2024 في 1:44 م، كتب Luis Guajardo Díaz < @.***>:

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes OS Platform and Distribution

Mac OS Mobile device if the issue happens on mobile device

No response Browser and version if the issue happens on browser

Chrome Programming Language and version

javascript MediaPipe version

0.10.14 Bazel version

No response Solution

Pose Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response Xcode & Tulsi version (if issue is related to building for iOS)

No response Describe the actual behavior

Not being able to consistenly get to know how to use the outputSegmentationMasks option Describe the expected behaviour

Getting an example on how to get the mask as a bitmap information Standalone code/steps you may have used to try to get what you need

Followed the CodePen example, and it works nicely to get the landmarks, but when enabling the outputSegmentationMasks I cannot figure how to access the segmentation mask and draw it on the canvas where I'm already drawing the bones.Also, the logged result of this, changes a lot when switching between GPU and CPU:const mask = result.segmentationMasks[0];

Other info / Complete Logs

No response

— Reply to this email directly, view it on GitHub https://github.com/google-ai-edge/mediapipe/issues/5530, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARBYYXTJTUDIPJ753F6NPVTZMT2RRAVCNFSM6AAAAABK6KBHZ6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTAOBSGIZTGOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>