import pathlib


def get_filename(pth):
    """
    Convert image path to file name.

    :param path: Absolute path to Image.
    :return: Image name with file extension.
    """
    pth = pathlib.Path(pth)
    pth = pth.name
    pth = str(pth)
    return pth