def read_landmarks(f_landmarks):
    """
    Reads file containing landmarks for image list. Specifically,
    <image name> x1 y1 ... xK yK is expected format.
    :param f_landmarks: text file with image list and corresponding landmarks
    :return:        landmarks as type dictionary.
    """
    landmarks_lut = {}
    with open(f_landmarks) as f:
        landmark_lines = f.readlines()
    for line in landmark_lines:
        line = line.replace("\n", "").split("\t")
        landmarks_lut[line[0]] = [int(k) for k in line[1:]]

    return landmarks_lut