Can't import MediaPipeFaceDetector

#1
by Kamlesh2806 - opened

Hi,
I am new to Python and getting below error on Colab and Jypyter Notebook. I could not see class defination under init.py.

ImportError: cannot import name 'MediaPipeFaceDetector' from 'qai_hub_models.models.mediapipe_face' (/usr/local/lib/python3.10/dist-packages/qai_hub_models/models/mediapipe_face/init.py)

From where I can get above class?

Qualcomm org
edited Nov 18

qai_hub_models.models.mediapipe_face.model

Its not under qai_hub_models.models.mediapipe_face.model... Throwing similar error

Qualcomm org

Sorry, the name is from qai_hub_models.models.mediapipe_face.model import FaceDetector

I'm not sure where you saw MediaPipeFaceDetector

The code is here https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/mediapipe_face/model.py

Its written in ModelCard as per below:
import torch

import qai_hub as hub
from qai_hub_models.models.mediapipe_face import MediaPipeFaceDetector,MediaPipeFaceLandmarkDetector

Qualcomm org

Ah got it, thanks for reporting, we will fix this

Sign up or log in to comment