def check_image_validity(filename_stem, invalid_images_list):
    """
    There are a number of bad images in the dataset.
    invalid_images_list lists the bad images.
    Images present in invalid_images_list will not be processed.

    """

    for inv in invalid_images_list:
        if(filename_stem == inv):
            return False

    return True