instantX-research / InstantID

InstantID: Zero-shot Identity-Preserving Generation in Seconds 🔥
https://instantid.github.io/
Apache License 2.0
11.12k stars 807 forks source link

Would a cropped face have better fidelity or not? #131

Closed machineminded closed 9 months ago

machineminded commented 9 months ago

I have some images of my face that are very cropped - meaning you can't see hairline, ears, etc. But these images do not work with InstantID. Is it preferred to use further zoomed out photos? Would we gain fidelity from using heavily cropped face images?

I see this error often:

    face_info = sorted(face_info, key=lambda x:(x['bbox'][2]-x['bbox'][0])*x['bbox'][3]-x['bbox'][1])[-1]  # only use the maximum face
IndexError: list index out of range
haofanwang commented 9 months ago

We don't suggest using very cropped image, because face detector may not find a face. It actually does not matter, the face will automatically detect and crop before extracting features.

machineminded commented 9 months ago

Thanks @haofanwang !!