NVlabs / eg3d

Other
3.24k stars 363 forks source link

Why is the focal length equal to 2985.29? #71

Closed Rodger-Huang closed 2 years ago

Rodger-Huang commented 2 years ago

I follow your advice to prepare the training datasets by cropping in-the-wild face images and extracting poses using Deep3DFaceRecon_pytorch. But I don't understand why the focal length is calculated as:

https://github.com/NVlabs/eg3d/blob/493076071bc400be3289dd6725ef1eef0a552a9d/dataset_preprocessing/ffhq/3dface2idr_mat.py#L53

Why it is divided by 466.285? In Deep3DFaceRecon_pytorch, the rescale factor is equal to 102, so I think it should be:

focal = 1015*1024/224*(300/102)

Is my understanding right?

luminohope commented 2 years ago

The 102 scale factor corresponds to the image resolution 224. We cropped at 1024 resolution instead of 224. so 466.285 = 102*1024/224

chenerg commented 2 years ago

@Rodger-Huang @luminohope Hi, I'm confused about the rescale factor, would you mind giving a brief introduction to the rescale factor?

ghost commented 2 years ago

@Rodger-Huang @luminohope Hi, I'm confused about the rescale factor, would you mind giving a brief introduction to the rescale factor?

+1

pfeducode commented 1 year ago

@Rodger-Huang @luminohope嗨,我对重新缩放因子感到困惑,你介意简单介绍一下重新缩放因子吗?

+1

3D perspective projection