1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
6.89k stars 1.33k forks source link

What does the 0.12 factor means when calculating image center #209

Closed dwy6626 closed 3 years ago

dwy6626 commented 3 years ago

As title, I am looking at your code and find the centor of an image is shifted by 0.12 times of the face width:

# api.py
center = torch.FloatTensor(
  [d[2] - (d[2] - d[0]) / 2.0, d[3] - (d[3] - d[1]) / 2.0])
center[1] = center[1] - (d[3] - d[1]) * 0.12

Could someone tell me what does this means, thanks.

1adrianb commented 3 years ago

Apologies for the delay. If its still relevant, that was simply used due to a shift present in the original data vs the detected bounding box.