Two-Stage Inpainting for Natural Image Size Adjustment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing image size adjustment methods are inefficient and result in low-quality images due to manual padding and simple filling of blank areas, which is time-consuming and often leads to unnatural boundaries.
Innovation Solution
An image processing method using a pre-trained image inpainting model followed by a large language model to inpaint blank areas, improving efficiency and quality by automatically generating realistic image content.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If manual padding and simple filling methods are used to adjust image size, then the operation is simple and easy to implement, but the image quality deteriorates with unnatural boundaries and low efficiency
Solution Approach 1:
The patent replaces manual mechanical padding operations with automated neural network-based inpainting systems. The first neural network performs initial inpainting of blank areas, and the second neural network refines the results, substituting human manual operations with intelligent automated systems that maintain both ease of operation and high image quality.
Solution Approach 2:
The patent introduces intermediate processing steps between simple padding and final image output. The first neural network generates intermediate inpainted results, which are then further refined by the second neural network, creating a multi-stage intermediary processing chain that improves overall image quality while maintaining operational simplicity.
2Device complexity
If manual padding methods are used for image size adjustment, then the device complexity is low, but the productivity deteriorates due to time-consuming manual operations
Solution Approach 1:
The patent enables the image processing system to perform inpainting operations automatically without human intervention. The neural networks self-service by automatically detecting blank areas, generating inpaint content, and refining results, eliminating time-consuming manual operations while maintaining reasonable system complexity.
Solution Approach 2:
The patent performs preliminary inpainting actions using the first neural network before final processing. By pre-filling blank areas with generated content and then refining with the second neural network, the system prepares images in advance, significantly improving processing efficiency without adding excessive complexity.
3Speed
If simple filling methods are used for blank areas, then the processing speed is fast, but the image quality deteriorates with unnatural boundaries
Solution Approach 1:
The patent segments the inpainting process into two distinct stages performed by separate neural networks. The first neural network handles initial content generation in blank areas, while the second neural network focuses on boundary refinement and natural transition processing. This segmentation allows each network to specialize, improving both speed and quality.
Solution Approach 2:
The patent applies different processing qualities to different regions of the image. The first neural network performs general inpainting in blank areas, while the second neural network applies refined processing specifically to boundary regions and transition zones, ensuring natural quality where it matters most while maintaining processing efficiency.
Data Source
AI summary
Provided are an image processing method, an electronic device and a storage medium. In the method, a to-be-inpainted image is obtained based on an original image, where an image size of the to-be-inpainted image is a target image size to which the original image is desired to be adjusted, the to-be-inpainted image includes a first image area corresponding to the original image and a second image area other than the first image area, and the second image area is an area for which image inpainting is to be performed. The second image area in the to-be-inpainted image is inpainted with a pre-trained image inpainting model, and an intermediate image is obtained. The second image area in the intermediate image is inpainted with a pre-trained large language model, and a first target image is obtained.


