1adrianb / 1adrianb/face-alignment

about tensor input

Offen
#330 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
7.5k
Forks
1.4k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

hey, thanks for your share.
when using the method 'get_landmarks_from_image', I input a tensor whose size is (1, 3, 128, 128) to image_or_path. then it will call method 'get_image' from face_alignment.utils. first, it transforms tensor into numpy, then steps into 'elif image.ndim == 4: \n\t image = image[..., :3]. this step changes the size of numpy from (1, 3, 128, 128) into (1, 3, 128, 3). actually, final size will not be used correctly in the method 'detect_from_image' in face_alignment.detection.sfd.sfd_detector.SFDDecetector. if it's a bug here, or it because of my wrong usage.
hope for your reply!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Look at the `get_landmarks_from_image` method and the `get_image` function in `face_alignment/utils.py`. The issue describes a tensor shape transformation from (1, 3, 128, 128) to (1, 3, 128, 3). Examine the indexing logic in the `elif image.ndim == 4:` block. Then trace the call to `detect_from_image` in `face_alignment/detection/sfd/sfd_detector.py` to see how the resulting shape is used. Run a test with a dummy tensor to reproduce the shape mismatch.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
computer-vision
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.