Method, device and equipment for generating high-definition commodity graph based on Lantent and Super, and medium
By combining the Latent and Supir models, the problem of image corruption in product image generation at high resolutions was resolved, enabling the generation of high-definition and high-quality product images, improving the display quality and usability of product images.
Patent Information
- Application Number
- CN202510582047.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional product image generation methods are prone to image corruption and poor clarity at 2048 resolution, making it difficult to meet the high-quality requirements of e-commerce and advertising.
A method combining the Latent and Supir models is used to generate high-definition product images, including Latent space preprocessing, noise reduction, magnification and redrawing, Supir magnification and restoration, edge smoothing, and color optimization.
Generate stable high-definition product images at a resolution of 2048, which improves the clarity of product details and display effects, and increases the usability of product images.
Smart Images

Figure CN120655747A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of commodity image generation, and in particular to a method, device, equipment and medium for generating high-definition commodity images based on Lantent and Supir. Background Art
[0002] In the field of product image generation, traditional workflow solutions often suffer from image corruption when directly outputting 2048 resolution, such as texture distortion and object deformation, which seriously affects the product display effect.
[0003] If the latent enlargement and redrawing method is used alone, although it can process the image to a certain extent, the resulting product image lacks clarity and cannot meet the demand for high-quality product images in e-commerce and advertising. It is difficult to effectively highlight the details and texture of the product, which reduces the usability of the product image. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for generating high-definition product images based on Lantent and Supir, which ensures that the image has high clarity while directly outputting product images with a resolution of 2048, improves the ability to present product images in detail and the overall quality, and improves the availability of automatically generated product images.
[0005] In a first aspect, the present invention provides a method for generating high-definition product images based on Lantent and Supir, comprising the following steps:
[0006] Step 1: Perform latent space preprocessing, latent noise reduction, and latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The latent space preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a latent space vector. The latent noise reduction specifically includes denoising the latent space vector to obtain a de-noised latent space vector. The latent magnification redrawing specifically includes inputting the de-noised latent space vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution.
[0007] Step 2: Use the Supir magnification model to magnify and repair the redrawn image to obtain the repaired image;
[0008] Step 3: Smooth the edges and optimize the colors of the repaired image to obtain the final image.
[0009] In a second aspect, the present invention provides a device for generating high-definition product images based on Lantent and Supir, comprising:
[0010] The Latent processing module performs Latent spatial preprocessing, Latent noise reduction, and Latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The Latent spatial preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a Latent spatial vector. The Latent noise reduction specifically includes denoising the Latent spatial vector to obtain a de-noised Latent spatial vector. The Latent magnification redrawing specifically includes inputting the de-noised Latent spatial vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution.
[0011] The Supir processing module magnifies and repairs the redrawn image through the Supir magnification model to obtain the repaired image;
[0012] The restoration module performs edge smoothing and color optimization on the restored image to obtain the final image.
[0013] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0014] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the method described in the first aspect when the program is executed by a processor.
[0015] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0016] (1) Stable high-resolution generation: This approach successfully overcomes the bottleneck of image degradation when directly generating 2048-resolution images in traditional workflows. By optimizing and rationally arranging image structures through Latent zoom and redrawing, it ensures stable product images with no object deformation or texture distortion, even at high-resolution output. This provides a reliable high-resolution foundation for product display.
[0017] (2) Significantly Improved Clarity: Combined with the Supir magnification model, the clarity of product images is significantly improved. Actual testing shows that at a resolution of 2048, the clarity of product details, such as complex textures and tiny patterns, is improved by over 40%. This allows for the clear presentation of exquisite product details, meeting the stringent requirements for high-quality imagery in e-commerce and advertising.
[0018] (3) Improving the availability of product images: The product images generated by the present invention have both high resolution and high definition, which greatly improves the quality and availability of product images. They can be directly applied to various product display scenarios, reducing material waste caused by image quality issues, saving time and costs for merchants, and improving the overall efficiency and availability of product image generation, helping merchants to be more competitive in the market.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0021] Figure 1 This is a flowchart of the method in Example 1 of the present invention;
[0022] Figure 2 This is a schematic diagram of the structure of the device in Example 2 of the present invention. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of this application have the following general ideas:
[0024] Latent Amplification and Redrawing: Utilizing the latent image representation space in the diffusion model, product images are mapped to a low-dimensional vector space, where they are amplified. By optimizing and adjusting the latent vectors, the image redrawing process is guided, preserving the image's structural features and essential elements, and avoiding image corruption caused by direct high-resolution generation.
[0025] Supir upscaling model: A super-resolution upscaling model built based on deep learning. By learning from massive amounts of high-definition image data, it grasps the image detail characteristics and pixel distribution patterns. It can intelligently infer and fill in missing detail information during the image upscaling process, effectively improving image clarity and compensating for the shortcomings of latent upscaling and redrawing in terms of detail clarity.
[0026] Denoising Autoencoder (DAE) is a type of autoencoder that accepts corrupted data as input and is trained to predict the original uncorrupted data as output.
[0027] Diffusion models: In image generation and processing, diffusion models simulate the diffusion of data in noise and infer the process of recovering the original data from the noise. This algorithm may use the principles of diffusion models to guide or optimize the image redrawing process.
[0028] (1) Lantent space preprocessing
[0029] Normalize the input product image to a specific range, for example, normalize the pixel values to [0, 1]. Specifically, assume that the value of point A in the latent space is pixel_a, and the normalized value is latentB = (max(latentA) - pixel_a) / max(latentA). This will give the data a uniform scale, help the diffusion model learn and converge better, and thus improve the clarity and quality of the generated image.
[0030] (2) Latent noise reduction processing
[0031] Using deep learning denoising autoencoders (DAEs), the input latenB is denoised. Reducing the noise in latenB makes it easier for the model to capture the true features and details of the image, thereby obtaining latenC, which in turn better represents the image in the latentC space and produces a clearer picture.
[0032] (3) Latent zoom redraw
[0033] Based on the adjusted LatentC vector, it is input into the stable diffusion model, and a 2048 resolution image is directly drawn according to the input prompt word.
[0034] (4) Supir amplification model processing
[0035] The Latent magnified and redrawn image is fed into the Supir magnification model. Based on the trained image features, the model analyzes and optimizes the pixels in each area of the image, intelligently filling in missing details after magnification, such as subtle surface textures on the product and the sharpness of text edges. This significantly enhances image clarity while increasing the resolution to 2048.
[0036] (5) Edge smoothing
[0037] The Gaussian blur algorithm is used to process the image edges to eliminate the jagged phenomenon that may be caused by magnification, making the image edge transition natural and smooth, and improving the overall visual effect.
[0038] (6) Color optimization
[0039] Use the automatic white balance (AWB) algorithm to adjust the image color balance and contrast, correct color deviation, make the product color more vivid and realistic, highlight the product characteristics, and enhance the image's appeal.
[0040] Example 1
[0041] like Figure 1 As shown, this embodiment provides a method for generating high-definition product images based on Lantent and Supir, including the following steps:
[0042] Step 1: Perform latent space preprocessing, latent noise reduction, and latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The latent space preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a latent space vector. The latent noise reduction specifically includes denoising the latent space vector to obtain a de-noised latent space vector. The latent magnification redrawing specifically includes inputting the de-noised latent space vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution.
[0043] Step 2: Use the Supir magnification model to magnify and repair the redrawn image to obtain the repaired image;
[0044] Step 3: Smooth the edges and optimize the colors of the repaired image to obtain the final image.
[0045] In this embodiment, preferably, the latent space preprocessing is specifically: standardizing the product image, the standardization processing is: the value of point A in the latent space is pixel_a, and the normalized value is latentB = (max(latentA)-pixel_a) / max(latentA); then normalizing it to [0, 1] to obtain the latent space vector.
[0046] In this embodiment, preferably, the step 2 is specifically: inputting the redrawing image into the Supir magnification model, the Supir magnification model analyzes and optimizes the pixels of each area of the redrawing image, fills the missing parts after magnification, and obtains the repaired image.
[0047] In this embodiment, preferably, step 3 specifically includes: using a Gaussian blur algorithm to process the edge of the repaired image to eliminate jagged edges; and using an automatic white balance algorithm to adjust the color balance and contrast of the image, correct color deviation, and obtain the final image.
[0048] Based on the same inventive concept, this application also provides a device corresponding to the method in Example 1, see Example 2 for details.
[0049] Example 2
[0050] like Figure 2As shown, in this embodiment, a device for generating high-definition product images based on Lantent and Supir is provided, including:
[0051] The Latent processing module performs Latent spatial preprocessing, Latent noise reduction, and Latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The Latent spatial preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a Latent spatial vector. The Latent noise reduction specifically includes denoising the Latent spatial vector to obtain a de-noised Latent spatial vector. The Latent magnification redrawing specifically includes inputting the de-noised Latent spatial vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution.
[0052] The Supir processing module magnifies and repairs the redrawn image through the Supir magnification model to obtain the repaired image;
[0053] The restoration module performs edge smoothing and color optimization on the restored image to obtain the final image.
[0054] In this embodiment, preferably, the latent space preprocessing is specifically: standardizing the product image, the standardization processing is: the value of point A in the latent space is pixel_a, and the normalized value is latentB = (max(latentA)-pixel_a) / max(latentA); then normalizing it to [0, 1] to obtain the latent space vector.
[0055] In this embodiment, preferably, the Supir processing module specifically inputs the redrawing image into the Supir magnification model, and the Supir magnification model analyzes and optimizes pixels in each area of the redrawing image, fills in the missing parts after magnification, and obtains a repaired image.
[0056] In this embodiment, preferably, the repair module specifically: uses a Gaussian blur algorithm to process the edge of the repaired image to eliminate jagged phenomena; and uses an automatic white balance algorithm to adjust the image color balance and contrast, correct color deviation, and obtain the final image.
[0057] Since the device described in the second embodiment of the present invention is used to implement the method of the first embodiment of the present invention, those skilled in the art will be able to understand the specific structure and variations of the device based on the method described in the first embodiment of the present invention, and therefore will not be described in detail here. All devices used in the method of the first embodiment of the present invention fall within the scope of protection of the present invention.
[0058] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.
[0059] Example 3
[0060] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.
[0061] Since the electronic device described in this embodiment is the device used to implement the method in Example 1 of this application, based on the method described in Example 1 of this application, those skilled in the art will be able to understand the specific implementation of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. As long as the device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection to be provided by this application.
[0062] Based on the same inventive concept, this application provides a storage medium corresponding to Example 1, see Example 4 for details.
[0063] Example 4
[0064] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any implementation method in the first embodiment can be implemented.
[0065] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0069] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for generating high-definition product images based on Lantent and Supir, characterized by: The steps include: Step 1: Perform latent space preprocessing, latent noise reduction, and latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The latent space preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a latent space vector. The latent noise reduction specifically includes denoising the latent space vector to obtain a de-noised latent space vector. The latent magnification redrawing specifically includes inputting the de-noised latent space vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution. Step 2: Use the Supir magnification model to magnify and repair the redrawn image to obtain the repaired image; Step 3: Smooth the edges and optimize the colors of the repaired image to obtain the final image.
2. The method for generating high-definition product images based on Lantent and Supir according to claim 1, characterized in that: The latent space preprocessing is specifically as follows: the product image is normalized, and the normalization process is as follows: the value of point A in the latent space is pixel_a, and the normalized value is latentB = (max(latentA)-pixel_a) / max(latentA); then it is normalized to [0, 1] to obtain the latent space vector.
3. The method for generating high-definition product images based on Lantent and Supir according to claim 1, characterized in that: The step 2 is specifically as follows: inputting the redrawing image into the Supir magnification model, the Supir magnification model analyzes and optimizes the pixels of each area of the redrawing image, fills the missing parts after magnification, and obtains the repaired image.
4. The method for generating high-definition product images based on Lantent and Supir according to claim 1, characterized in that: The step 3 specifically includes: using a Gaussian blur algorithm to process the edge of the repaired image to eliminate jagged edges; and using an automatic white balance algorithm to adjust the image color balance and contrast, correct color deviation, and obtain the final image.
5. A device for generating high-definition product images based on Lantent and Supir, characterized by: include: The Latent processing module performs Latent spatial preprocessing, Latent noise reduction, and Latent magnification redrawing on the product image to obtain a redrawn image at a set resolution. The Latent spatial preprocessing specifically includes standardizing the product image and then normalizing it to a set range to obtain a Latent spatial vector. The Latent noise reduction specifically includes denoising the Latent spatial vector to obtain a de-noised Latent spatial vector. The Latent magnification redrawing specifically includes inputting the de-noised Latent spatial vector and a set prompt word into a diffusion model for redrawing to obtain a redrawn image at a set resolution. The Supir processing module magnifies and repairs the redrawn image through the Supir magnification model to obtain the repaired image; The restoration module performs edge smoothing and color optimization on the restored image to obtain the final image.
6. The device for generating high-definition product images based on Lantent and Supir according to claim 5, characterized in that: The latent space preprocessing is specifically as follows: the product image is normalized, and the normalization process is as follows: the value of point A in the latent space is pixel_a, and the normalized value is latentB = (max(latentA)-pixel_a) / max(latentA); then it is normalized to [0, 1] to obtain the latent space vector.
7. The device for generating high-definition product images based on Lantent and Supir according to claim 5, characterized in that: The Supir processing module specifically inputs the redrawing image into the Supir magnification model, and the Supir magnification model analyzes and optimizes the pixels in each area of the redrawing image, fills in the missing parts after magnification, and obtains the repaired image.
8. The device for generating high-definition product images based on Lantent and Supir according to claim 5, characterized in that: The repair module specifically uses a Gaussian blur algorithm to process the edges of the repaired image to eliminate jagged edges; and uses an automatic white balance algorithm to adjust the image color balance and contrast, correct color deviation, and obtain the final image.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.