php-deepface icon indicating copy to clipboard operation
php-deepface copied to clipboard

Bug: Error when using Detector::RETINAFACE

Open AdaiasMagdiel opened this issue 4 months ago • 0 comments

Description

When calling represent() with the RetinaFace detector, the library crashes with the following error:

Unknown named parameter $nose

It seems that RetinaFace returns landmarks with keys like nose, left_eye, right_eye, etc., which aren’t mapped correctly and cause the error.

Steps to reproduce

$df = new DeepFace(python: PYTHON_DIR);

$reps = $df->represent(
    img_path: $imgPath,
    model_name: FaceRecognitionModel::ARCFACE,
    detector_backend: Detector::RETINAFACE,
    normalization: Normalization::ARCFACE,
    max_faces: 10,
    expand_percentage: 10
);

Expected behavior

  • represent() should return embeddings normally when using Detector::RETINAFACE.
  • Landmarks should either be mapped correctly or ignored if they’re not needed.

Actual behavior

  • A fatal error is thrown: Unknown named parameter $nose.

Environment

  • PHP version: 8.4.7
  • Python version: 3.8.10
  • Package version: 0.4.0
  • OS: Windows

AdaiasMagdiel avatar Sep 22 '25 14:09 AdaiasMagdiel