def filter_captions(images_with_sd):
    """Remove images that already have captions from recommendations."""
    recs = {}
    for i in images_with_sd:
        if images_with_sd[i]['sd'] != 'exists':
            recs[i] = images_with_sd[i]
    return recs