Patent attributes
Embodiments of the present disclosure disclose a method and apparatus for compressing an image. A specific embodiment of the method includes: acquiring a to-be-processed image; and performing feature extraction on the to-be-processed image by using a convolutional neural network corresponding to a trained image compression model to obtain a plurality of feature maps, a difference between the to-be-processed image and a reconstructed image obtained by reconstructing the plurality of feature maps through a deconvolution neural network corresponding to a trained image reconstruction model satisfying a preset condition. This embodiment achieves compression of the data size of an image while ensuring the restoration quality of the image.