sczhou / CodeFormer

[NeurIPS 2022] Towards Robust Blind Face Restoration with Codebook Lookup Transformer
Other
14.53k stars 3.13k forks source link

Wrong eye distance calculation #242

Open pftjoeyyang opened 1 year ago

pftjoeyyang commented 1 year ago

In face_restoration_helper.py, I noticed the indices used in eye distance calculation were incorrect https://github.com/sczhou/CodeFormer/blob/4724c90b6b9d5183da383f2bdae6ddf9b0bf045d/facelib/utils/face_restoration_helper.py#L226

Since the first 5 elements in the bbox array are 4 bbox landmarks + 1 score, the 5 face landmarks indices start at index 5; hence the eye landmarks should be index 5, 6, 7 and 8, instead of using 6, 7, 8, 9.

pftjoeyyang commented 1 year ago

This error was fixed in facelib https://github.com/xinntao/facexlib/pull/29