Use the CCD/CMOS dataset from AliceVision to calculate the focal length.
from EXIF.utils import focal_length_helper
focal_obtainer = focal_length_helper(img_path)
f = 0
try:
f = focal_obtainer.obtain_focal_length_px(method='db')
except:
f = focal_obtainer.obtain_focal_length_px(method='efl')
logging.info('f_exif = %f', (f))
return f