Patent ID: 11830235

Abstract:
The present application discloses an image optimization method and system based on artificial intelligence, comprising: performing image object recognition for a template image, and extracting and recording template information of the template image; identifying the number and categories of primary objects in a to-be-optimized image by using an image recognition algorithm of a neural network; performing matching in a template database for the to-be-optimized image according to a set matching condition and the recorded template information to obtain optimal template information; scaling the primary object in the to-be-optimized image according to layout information in the optimal template information; cropping and adjusting a background part of the to-be-optimized image according to resolution requirements of an output target image and a basic composition principle; combining an image of the processed primary object with a background image according to the layout information in the optimal template information to restore to a complete image; if an original to-be-optimized image is partly missing after being processed, patching an image of a missing part is patched according to an image completion algorithm. By the technical solution of the present application, the composition and spatial relationship of the image can be optimized.