google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.41k stars 5.15k forks source link

Replace the image with the landmark coordinates returned by the hand detection module as input to the model #4725

Open Fuzixing2001 opened 1 year ago

Fuzixing2001 commented 1 year ago

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

None

OS Platform and Distribution

Windows 10

Python Version

3.9

MediaPipe Model Maker version

No response

Task name (e.g. Image classification, Gesture recognition etc.)

Gesture recognition

Describe the actual behavior

I see that this model includes two parts: hand detection and gesture recognition. The input of the gesture recognition module is landmark coordinates and other information. But I saw that the instance code is directly input into the image, and the two modules are running together. I want to directly input the landmark coordinates to the gesture recognition module

Describe the expected behaviour

One of my devices obtained some landmark coordinates by running the hand detection module and sent this information to another device. After receiving the information, this device wants to input it into the model for gesture recognition.  Now I don't know how to do this

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

mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=img)
timestamp = mp.Timestamp.microseconds(mp.Timestamp.from_seconds(time.time()))
results = recognizer.recognize_async(mp_image,timestamp) # I don't want to input image

Other info / Complete Logs

No response

kuaashish commented 1 year ago

Hello @yichunk,

Could you please look into this issue. Thank you