[Python] How to draw predicted palm lines from custom TFLite model on hand using MediaPipe and...

Discussão em 'Python' iniciado por Stack, Junho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I’ve trained a custom TensorFlow Lite model that detects palm lines in a hand image — specifically the life line, heart line, fate line, etc. The model works well and returns bounding boxes or coordinate points with labels and confidence scores (e.g., life 0.63, heart 0.73, fate 0.32). the model result is this this is the result of yolov8 model

    Now I'm trying to visualize these detected lines on top of the hand using MediaPipe for hand detection and OpenCV to draw the lines, but I’m stuck.

    What I'm doing: Using MediaPipe Hands to detect and get the hand landmarks.

    Running inference using my custom palm-line TFLite model.

    Trying to overlay the predicted lines on the image using OpenCV.

    I want to align the drawn lines with the palm orientation using MediaPipe's landmarks.

    My Questions: How can I correctly draw the predicted palm lines (from my model) on the detected hand using MediaPipe and OpenCV in Android?

    Should I map my model's output to MediaPipe landmarks or draw them independently?

    Is there a standard or reliable approach to combine custom model predictions with MediaPipe visualizations?

    Is there any way to draw custom palm lines in Android Studio, especially for curved or smooth lines that follow hand structure?

    Continue reading...

Compartilhe esta Página