def check_identity(id_npy, query_features, max_min_dist=1.0):
    distances_from_id = {}
    for (name, id_npy_arr) in id_npy.items():
        distances_from_id[name] = []
        for id_npy_row in id_npy_arr:
            dist = np.linalg.norm((id_npy_row - query_features))
            distances_from_id[name].append(dist)
    min_dist = np.finfo(float).max
    name_match = ''
    for (name, distances) in distances_from_id.items():
        avg = np.mean(distances)
        if (avg < min_dist):
            min_dist = avg
            name_match = name
    if (min_dist > max_min_dist):
        name_match = 'Unknown'
    return (name_match, min_dist)
def check_identity(id_npy, query_features, max_min_dist=1.0):
    distances_from_id = {}
    for (name, id_npy_arr) in id_npy.items():
        distances_from_id[name] = []
        for id_npy_row in id_npy_arr:
            dist = np.linalg.norm((id_npy_row - query_features))
            distances_from_id[name].append(dist)
    min_dist = np.finfo(float).max
    name_match = 
    for (name, distances) in distances_from_id.items():
        avg = np.mean(distances)
        if (avg < min_dist):
            min_dist = avg
            name_match = name
    if (min_dist > max_min_dist):
        name_match = 'Unknown'
    return (name_match, min_dist)