1

I've recently been trying to use the MediaPipe hand landmark detection library, and it works just fine until I try to import Tensorflow. No matter what code/program I try to run, if I import Tensorflow in any capacity, either the whole module, or a function within it, it causes the MediaPipe function .process to freeze. The setup is as follows:

mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
mp_hands = mp.solutions.hands

hands = mp_hands.Hands(
    static_image_mode=True,
    max_num_hands=2,
    min_detection_confidence=.5)

image = cv2.imread('some_image')

results = hands.process(image)

Any variation of that freezes without fail at the results = hands.process(image) line, but works perfectly fine if I don't import Tensorflow in any capacity. My tensorflow version is 1.14.0, keras version is 2.3.1, and python version is 3.7.6, if that helps at all.

You smart folks have any idea why this might be happening, and how it might be remedied?

Thanks,

Sam

Sam Skinner
  • 376
  • 3
  • 12
  • Can you try upgrade Tensorflow to 2.6.0 and let us know if the issue still persists in newer versions? –  Oct 04 '21 at 10:18
  • I also tried using a version of Tensorflow 2 (not the most current one) and the problem persisted. But I'll try upgrading to the absolute newest version and see what happens. I'd like if this can be resolved without having to use the newest tensorflow, as the model optimizer I'd like to use doesn't support it, but if that's all that works, then so be it. – Sam Skinner Oct 04 '21 at 10:27

0 Answers0