def METHOD_NAME(im_path, im_dir):
    """get the saved name"""
    if im_dir is not None:
        im_file = im_path.replace(im_dir, '')
    else:
        im_file = os.path.basename(im_path)
    if im_file[0] == '/':
        im_file = im_file[1:]
    return im_file