def to_id(file_name):
    """
    Converts the file name of an image to the corresponding base name.
    Example: image.jpg -> image
    :param file_name: the name of an image file (JPG)
    :return: the base name of the given image file
    """
    if file_name[-4:] == ".jpg":
        file_name = file_name[:-4]
    return file_name