[FIXED] Movement multi person pose estimation does not import

Issue

I previously used Movenet for multi person pose estimation. However, just today it got an error when importing the multipose lightning model as follows:

import tensorflow as tf
import tensorflow_hub as hub

model = hub.load("https://tfhub.dev/google/movenet/multipose/lightning/1")
movenet = model.signatures['serving_default']

Then I got the following error:

OSError: SavedModel file does not exist at: /var/folders/tc/c08qbx_s61bbx4bxq4rt8wxw0000gn/T/tfhub_modules/312f001449331ee3d410d758fccdc9945a65dbc3/{saved_model.pbtxt|saved_model.pb}

I don’t understand why it does not work, as it has worked before and on the site of Tensorflow it is explained to be done just like this. Does anyone know what could be going wrong? I also did download the model to my own device via the import link, but I cannot find how to import it from my local files to my program. Does anyone know how this is possible?

Thanks in advance.

Solution

The code to load the model through tensorflow_hub looks ok. However you can try loading the model manually, first downloading the .pb file into a folder and then loading it with keras function load_model, like this:

model = tf.keras.models.load_model('path/to/folder')

Answered By – ClaudiaR

Answer Checked By – Dawn Plyler (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published