def fullsize_stats(f,bpred):
    """Summarizes a binary prediction file that has one row per tile.
    Calculates four items for a full-size file:
    1. is_empty (all tiles are empty)
    2. has_objects
    2. has_elephants (at least one tile has an elephant)
    3. is_uncertain; i.e. the file is a mix of empty and uncertain tiles but contains no other objects.
    """
    fmask = bpred[(bpred['filename']==f)].index
    tilerows = bpred.loc[fmask]
    n_tiles = len(tilerows)
    n_empty = len(tilerows[tilerows['empty']==1])
    n_elephants = len(tilerows[tilerows['elephant']==1])
    non_empty_mask = tilerows[tilerows['empty']==0].index
    nonemptyrows = tilerows.loc[non_empty_mask]
    n_uncertain = sum((nonemptyrows.iloc[:,3:].apply(sum,axis=1).values) == 0)
    n_objectrows = sum(nonemptyrows.iloc[:,4:].apply(sum,axis=1).values)
    is_empty = (True if n_tiles == n_empty else False)
    has_elephants = (True if n_elephants > 0 else False)
    is_uncertain = (True if (n_tiles - n_empty == n_uncertain) & (n_uncertain > 0) else False)
    has_objects = (True if n_objectrows > 0 else False)
    return (is_empty,has_objects,has_elephants,is_uncertain)