Link between mediapipe and Touchdesigner

Hi everyone !
I’m trying to run the python library ‘mediapipe’ into Touchdesigner.
I got some problem for the moment.
When i try this little piece of work :
" import cv2
import mediapipe as mp
mp_drawing = mp.solutions.drawing_utils"

i got as an answer :
“Traceback (most recent call last):
File “</base_mediapipe/text_template:op(‘/base_mediapipe/text_template’).run()>”, line 1
td.Error: File “/base_mediapipe/text_template”, line 3
AttributeError: module ‘mediapipe’ has no attribute ‘solutions’
Results of run operation resulted in exception.”

When i try this way :
“import cv2
import mediapipe
import mediapipe.python.solutions.drawing_utils”

i got this :
“Traceback (most recent call last):
File “</base_mediapipe/text_template:op(‘/base_mediapipe/text_template’).run()>”, line 1
td.Error: File “/base_mediapipe/text_template”, line 3
r = previousimport(*args, **kw)
File “/Users/hugo/mediapipe/mediapipe/python/init.py”, line 17
from mediapipe.python._framework_bindings import resource_util
r = previousimport(*args, **kw)
ModuleNotFoundError: No module named ‘mediapipe.python._framework_bindings’”

if anyone already succed to work with mediapipe, i would enjoy some advice to go forward.
thank you

2 Likes

Have you achieved any solution?

I’ve seen your posts at github issues page too. I’m out of clues what to do to get this full functional at TD

1 Like

Anyone get anywhere with this. I think I managed to follow / translate these instructions over from Chung’s MacOs instructions to Windows11. Although I cannot get TD to correctly import mediapipe.

I downloaded latest version of Python to my PATH, so its in my AppData-Local-Programs area.
Then used CMD prompt to install mediapipe.
Then I linked Touchdesigner to the ‘site-packages’ folder, but I cannot get it to import mediapipe.
error No module named 'mediapipe.python._framework_bindings

I tried referencing the instructions on the mediapipe page, but don’t understand it.

I’d appreciate any help as I my last webcam based hand tracker has become obsolete.
chung’s macOS install
mediapipe python install instructions

1 Like