def get_cents(f0_hz):
    """
    F_{cent} = 1200 * log2 (F/440)

    Reference:
        APSIPA'17, Perceptual Evaluation of Singing Quality
    """
    voiced_f0 = f0_hz[f0_hz != 0]
    return 1200 * np.log2(voiced_f0 / 440)
F_{cent} = 1200 * log2 (F/440)

Reference:
APSIPA'17, Perceptual Evaluation of Singing Quality
utils/f0.py