Skip to content

Bug: Error when using Detector::RETINAFACE #23

@AdaiasMagdiel

Description

@AdaiasMagdiel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions