def read_im_and_landmarks(fname): im = cv2.imread(fname, cv2.IMREAD_COLOR) try: s = get_landmarks(im,fname) return im, s except: return im,fname