def filter_ignore(annotations, filter_fns):
    """ Set the ``ignore`` attribute of the annotations to **True** when they do not pass the provided filter functions.

    Args:
        annotations (dict or list): Dictionary containing box objects per image ``{"image_id": [box, box, ...], ...}`` or list of annotations
        filter_fns (list or fn): List of filter functions that get applied or single filter function

    Returns:
        (dict or list): boxes after filtering
    """
    if callable(filter_fns):
        filter_fns = [filter_fns]

    if isinstance(annotations, dict):
        for _, values in annotations.items():
            for anno in values:
                if not anno.ignore:
                    for fn in filter_fns:
                        if not fn(anno):
                            anno.ignore = True
                            break
    else:
        for anno in annotations:
            if not anno.ignore:
                for fn in filter_fns:
                    if not fn(anno):
                        anno.ignore = True
                        break

    return annotations