hysts / pytorch_mpiigaze_demo

Gaze estimation using MPIIGaze and MPIIFaceGaze
MIT License
290 stars 66 forks source link

Dummy Camera Params - Focal Length #38

Open cancan101 opened 1 year ago

cancan101 commented 1 year ago

It looks like in generate_dummy_camera_params, when generating the camera matrix, the focal length is assumed to be the width: https://github.com/hysts/pytorch_mpiigaze_demo/blob/47cdf68414d20c8281bbb0a03112a298761aaa9b/ptgaze/utils.py#L125 and I am curious where that logic came from?

Ideally you would have the focal length in mm and the sensor size and then would use logic like this: https://github.com/google/mediapipe/blob/ecb5b5f44ab23ea620ef97a479407c699e424aa7/mediapipe/calculators/image/image_file_properties_calculator.cc#L52-L77