1. A non-transitory computer-readable medium storing a program, the program when executed performs image compression using at least one processor which comprises: an image reducing unit that reduces an input image having a first resolution at a predetermined reduction ratio to generate a reduced image having a second resolution lower than the first resolution; a reduced image compression unit that compresses the reduced image to generate reduced image data; a reduced image expansion unit that expands the reduced image data; a region of interest setting unit that sets a region of interest corresponding to a predetermined target object in the input image; a high resolution conversion unit that converts a partial image of an area of the expanded reduced image corresponding to the region of interest to a partial image having the first resolution by applying a prediction process that uses a learning result obtained by learning the predetermined object in advance; a differential image generation unit that generates a differential image by taking a difference between the partial image converted to the first resolution and a partial image of the region of interest portion of the input image; a differential image encoding unit that encodes the differential image to generate differential image data; and an output unit that outputs the reduced image data and the differential image data.