NVlabs / eg3d

Other
3.24k stars 363 forks source link

The issue of camera intrinsic. #114

Open LPHFAQ opened 10 months ago

LPHFAQ commented 10 months ago

Hello! I'm confused about the camera intrinsic given in preprocess_face_cameras.py. I wonder how is the number "2985.29" gained? And why are fx and fy divided by 700? Can the camera with intrinsic (fx, fy, cx, cy) = (2985.29, 2985.29, 350, 350) be regarded as the camera capturing the 700×700 image gained after center cropping?(where 350 = 700×1/2) image

Looking forward to your reply! It could help me a lot!

johnren-code commented 10 months ago

In the paper, the authors mention ‘We assume fixed camera intrinsics across the entire dataset, with a focal length of 4.26 × image width’. The FFHQ dataset is given the parameters in dataset.json as (fx, fy, cx, cy) = (4.2647, 4.2647, 0.5, 0.5), so from what I understand, the authors may be dividing by 700 in this step just to get a uniform unit value independent of the image resolution, and you can get the actual focal length used via the calculation focal = 4.2647 * image_resolution. I am also a beginner, I can't guarantee that I am completely right, my understanding is this.