io.py 431 Bytes
Newer Older
1
2
3
4
"""
Loading functions for some databases
"""

5
from bob.bio.base.score.load import get_split_dataframe
6
7


8
def load(filename):
Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
9
10
    # return get_split_dataframe(filename)
    import dask
11

Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
12
13
14
15
16
17
18
    # Chuncks of 100MB
    df = dask.dataframe.read_csv(filename, 100 * 1024 * 1024)

    genuines = df[df.probe_subject_id == df.bio_ref_subject_id]
    impostors = df[df.probe_subject_id != df.bio_ref_subject_id]

    return impostors, genuines