def path_to_image_name(path, class_name):
    """
    for paths of the following structure:
        E:\ILSVRC2017\images\original\n01531178\n01531178_2421.JPEG
    returns the image name, e.g. n01531178_2421
    """
    t1 = path.split(class_name, 1)[1]
    t2 = t1.split('.', 1)[0]
    t3 = t2.split('\\', 1)[1]
    return t3