Lake and Hunan theme image intelligent generation algorithm based on AIGC
Through the intelligent generation algorithm of Hunan theme images based on AIGC, combined with conditional generation adversarial network and augmented reality technology, the problem of low image generation efficiency in the existing technology is solved, and efficient and optimized image generation effect is achieved, bringing about the Better business value.
Patent Information
- Application Number
- CN202411168707.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-03
AI Technical Summary
The existing image generation technology is inefficient and complex in the generation of the Hunan theme of AIGC, and it fails to effectively solve the problem of image generation.
Using the intelligent image generation algorithm of Hunan theme based on AIGC, the image data in Hunan area is collected and preprocessed, and the adversarial network model is generated, combined with image loss function and real-time weather data, the image generation is optimized, and augmented reality technology is used to perform the User interaction.
It realizes efficient Hunan theme image generation, improves image generation efficiency and effect, and provides better usage prospects and commercial value.
Smart Images

Figure CN119068310A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image generation, and in particular to an AIGC-based intelligent generation algorithm for Hunan-themed images. Background Art
[0002] With the substantial improvement of processing technology and the development of graphics rendering technology, digital signal processing technology, sensor technology, and graphics technology, a research boom on virtual reality was formed both internationally and domestically in the late 1980s and early 1990s. The so-called virtual reality technology uses computer-generated realistic three-dimensional vision, hearing, touch and other sensations to enable users to interact, observe and control entities in the virtual environment naturally by using special equipment. Since the 1920s, when humans first transmitted pictures between New York and London via submarine cables, digital image processing technology has made rapid progress. In its short history, it has been successfully applied to almost all imaging-related fields.
[0003] The existing image generation technology does not have an intelligent algorithm specifically for the Huxiang theme of AIGC. When generating images of the Huxiang theme of AIGC, the image generation efficiency is low and the algorithm is complex. Summary of the invention
[0004] In order to solve the above technical problems, an AIGC-based intelligent generation algorithm for Hunan theme images is provided. This technical solution solves the above problems.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] The AIGC-based intelligent generation algorithm for Hunan-themed images includes:
[0007] Collect the scenery, historical sites, and traditional cultural activities in the Hunan and Xiangxi regions, and pre-process the collected images;
[0008] Based on the Hunan data, a conditional generative adversarial network model is generated. Based on the output of the conditional generative adversarial network model, the generator creates Hunan-themed images.
[0009] Optimize the image based on the image loss function;
[0010] Generate images of Hunan and Xiangjiang in different seasons and weather based on real-time weather data and time information;
[0011] Output Huxiang images and combine them with augmented reality technology, so that users can preview and interact with Huxiang images in the real environment.
[0012] Preferably, the collecting of the scenery, historical sites, and traditional cultural activities in the Hunan and Xiangxi regions and preprocessing of the collected images specifically include:
[0013] Collect images of Hunan from various data sources, including photography, tourism websites and historical archives;
[0014] Label images to identify specific categories of landscapes, monuments, and cultural activities;
[0015] Based on the collected image data, image cleaning, image enhancement and image standardization are performed;
[0016] Among them, the image cleaning formula is:
[0017]
[0018] Where I(x,y) is the pixel value of the filtered image at position (x,y), I(x+i,y+i) is the pixel value of the original image at position (x+i,y+i), k is the size of the filter, i and j are the relative position indexes of the filter, and k is the value of the original image at position (x+i,y+i). 2 is the total number of pixels in the filter;
[0019] Among them, the image enhancement formula is:
[0020] G(x,y)=α(x,y)+β
[0021] Where α is the contrast factor, β is the brightness offset, and G(x,y) is the pixel value of the contrast-adjusted image at position (x,y);
[0022] Among them, the image standardization processing formula is:
[0023]
[0024] Where μ is the mean of the original image pixel values, σ is the standard deviation of the original image pixel values, and Z(x,y) is the pixel value of the image at (x,y) after normalization.
[0025] Preferably, based on the Hunan data, a conditional generative adversarial network model is generated, and based on the output of the conditional generative adversarial network model, the generator creates an image of the Hunan theme, specifically including:
[0026] Input random noise and Huxiang labels;
[0027] Connect the random noise and the Huxiang label;
[0028] Generate images through convolutional layers and activation functions;
[0029] Output based on the generated image;
[0030] Calculate the true probability of the image through the discriminator;
[0031] Calculate the loss function, the generator maximizes the probability of the discriminator's judgment on the generated image;
[0032] Use real images and generated images to update the weights of the discriminator respectively;
[0033] By fixing the weights of the discriminator, the weights of the generator are updated to minimize the generator loss;
[0034] Use the trained generator to input new random noise and Huxiang labels and output an image.
[0035] Preferably, generating an image through a convolutional layer and an activation function specifically includes:
[0036] Among them, the image generation formula is:
[0037] G(z,c)=CT(LR(BN(D(z*c))))
[0038] Where CT is the transposed convolutional layer, LR is the activation function, BN is the batch normalization layer, D is the fully connected layer, * is the connection operation, z is random noise, and c is the label of Huxiang;
[0039] Based on the generated image, the true probability of the image is calculated through the discriminator;
[0040] The true probability calculation formula is:
[0041] D(x,c)=S(LR(C(x*c)))
[0042] Where D(x,c) is the true probability of the image, S is the activation function, LR is the convolutional layer, and * is the connection operation;
[0043] Based on the true probability, determine whether the image is real. x is the image feature and c is the label of Huxiang.
[0044] Preferably, calculating the loss function so that the generator maximizes the probability of the discriminator judging the generated image specifically includes:
[0045] Among them, the loss function calculation formula is:
[0046] L=α·L1+β·L2
[0047] Where L is the total loss, L1 is the mean square error of content loss, L2 is the mean square error of style loss, α is the hyperparameter of content loss weight, and β is the hyperparameter of style loss weight.
[0048] Preferably, based on the image loss function, optimizing the image specifically includes:
[0049] Use the Adam optimization algorithm to minimize the total loss L;
[0050] Based on the Adam optimization algorithm, deviation correction is performed and parameters are updated;
[0051] Update the generated image;
[0052] The updated image will be saved.
[0053] Preferably, the parameter update formula is:
[0054]
[0055] Among them, θ t Current parameters, θ t+1 is the updated parameter, α is the learning rate, ∈ is a constant, is the corrected moment estimate, is the second-order moment estimate;
[0056] Based on the calculated parameters, the image parameters are adjusted.
[0057] Preferably, based on the real-time weather data and time information, generating the Hunan images of different seasons and weather specifically includes:
[0058] Get real-time weather data and time information;
[0059] Determine season and weather effects;
[0060] Apply seasonality and weather templates to process time information;
[0061] Apply effects to Huxiang images, adjust and optimize;
[0062] Generate and display the final image and set up a real-time update mechanism.
[0063] Preferably, the output of the Huxiang image is combined with augmented reality technology, and the user previews and interacts with the Huxiang image in a real environment, specifically including:
[0064] Use real-time weather and time data to generate images of Hunan and Xiang in different seasons and weather;
[0065] Select the ARKit tool, create an AR project, and configure the basic AR environment, including the positioning system and camera settings;
[0066] Convert the Huxiang image into a 3D model, set up the scene in the AR platform, and arrange the display location and method of the Huxiang image or model;
[0067] Apply the generated Huxiang image as texture or background to the AR scene;
[0068] Design and implement user interaction functions, and use gestures to adjust the perspective and position of images;
[0069] Adjust images and trigger special effects through voice control;
[0070] Trigger specific AR effects based on user position, perspective, and environmental changes.
[0071] Preferably, test the AR application on different devices and environments;
[0072] Publish AR apps to app stores and distribution channels;
[0073] Provide user guidance and help documentation on how to use AR features and interactive designs;
[0074] Collect user feedback, understand their usage experience, and make further optimizations based on the feedback.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] The present invention proposes intelligent extraction of the Hunan-Xiang theme images of AIGC, which can efficiently generate images for the Hunan-Xiang theme, and can quickly correct and update parameters based on image features, so as to achieve better image generation effects and bring better usage prospects and commercial value. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a step flow framework diagram of the present invention. DETAILED DESCRIPTION
[0078] In order to better understand the present application, a more detailed description will be made of various aspects of the present application with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0079] In the accompanying drawings, the size, dimensions and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustration only and are not strictly drawn to scale. As used herein, the terms "substantially", "approximately" and similar terms are used as terms of approximation, not as terms of degree, and are intended to illustrate the inherent deviations in measurements or calculations that would be recognized by a person of ordinary skill in the art. In addition, in this application, the order in which the processing of each step is described does not necessarily represent the order in which these processes occur in actual operation, unless otherwise specified or can be derived from the context.
[0080] It should also be understood that expressions such as "include", "including", "have", "contain" and / or "comprising" are open rather than closed expressions in this specification, which indicate the presence of the stated features, elements and / or components, but do not exclude the presence of one or more other features, elements, components and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application". And, the term "exemplary" is intended to refer to an example or illustration.
[0081] Unless otherwise defined, all words (including engineering terms and scientific and technological terms) used in this article have the same meaning as commonly understood by ordinary technical citizens in the field to which this application belongs. It should also be understood that, unless explicitly stated in this application, words defined in commonly used dictionaries should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0082] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0083] Reference Figure 1 As shown in the figure, the intelligent generation algorithm of Huxiang theme images based on AIGC includes:
[0084] Collect the scenery, historical sites, and traditional cultural activities in the Hunan and Xiangxi regions, and pre-process the collected images;
[0085] Based on the Hunan data, a conditional generative adversarial network model is generated. Based on the output of the conditional generative adversarial network model, the generator creates Hunan-themed images.
[0086] Optimize the image based on the image loss function;
[0087] Generate images of Hunan and Xiangjiang in different seasons and weather based on real-time weather data and time information;
[0088] Output Huxiang images and combine them with augmented reality technology, so that users can preview and interact with Huxiang images in the real environment.
[0089] Furthermore, the scenery, historical sites, and traditional cultural activities of the Hunan region are collected, and the preprocessing of the collected images includes:
[0090] Collect images of Hunan from various data sources, including photography, tourism websites and historical archives;
[0091] Label images to identify specific categories of landscapes, monuments, and cultural activities;
[0092] Based on the collected image data, image cleaning, image enhancement and image standardization are performed;
[0093] Among them, the image cleaning formula is:
[0094]
[0095] Where I(x,y) is the pixel value of the filtered image at position (x,y), I(x+i,y+i) is the pixel value of the original image at position (x+i,y+i), k is the size of the filter, i and j are the relative position indexes of the filter, and k is the value of the original image at position (x+i,y+i). 2 is the total number of pixels in the filter;
[0096] Among them, the image enhancement formula is:
[0097] G(x,y)=α(x,y)+β
[0098] Where α is the contrast factor, β is the brightness offset, and G(x,y) is the pixel value of the contrast-adjusted image at position (x,y);
[0099] Among them, the image standardization processing formula is:
[0100]
[0101] Where μ is the mean of the original image pixel values, σ is the standard deviation of the original image pixel values, and Z(x,y) is the pixel value of the image at (x,y) after normalization.
[0102] Furthermore, based on the Hunan data, a conditional generative adversarial network model is generated. Based on the output of the conditional generative adversarial network model, the generator creates Hunan-themed images, including:
[0103] Input random noise and Huxiang labels;
[0104] Connect the random noise and the Huxiang label;
[0105] Generate images through convolutional layers and activation functions;
[0106] Output based on the generated image;
[0107] Calculate the true probability of the image through the discriminator;
[0108] Calculate the loss function, the generator maximizes the probability of the discriminator's judgment on the generated image;
[0109] Use real images and generated images to update the weights of the discriminator respectively;
[0110] By fixing the weights of the discriminator, the weights of the generator are updated to minimize the generator loss;
[0111] Use the trained generator to input new random noise and Huxiang labels and output an image.
[0112] Furthermore, generating images through convolutional layers and activation functions specifically includes:
[0113] Among them, the image generation formula is:
[0114] G(z,c)=CT(LR(BN(D(z*c))))
[0115] Where CT is the transposed convolutional layer, LR is the activation function, BN is the batch normalization layer, D is the fully connected layer, * is the connection operation, z is random noise, and c is the label of Huxiang;
[0116] Based on the generated image, the true probability of the image is calculated through the discriminator;
[0117] The true probability calculation formula is:
[0118] D(x,c)=S(LR(C(x*c)))
[0119] Where D9x,c) is the true probability of the image, S is the activation function, LR is the convolutional layer, and * is the connection operation;
[0120] Based on the true probability, determine whether the image is real. x is the image feature and c is the label of Huxiang.
[0121] Furthermore, the loss function is calculated, and the generator maximizes the probability of the discriminator's judgment on the generated image, specifically including:
[0122] Among them, the loss function calculation formula is:
[0123] L=α·L1+β·L2
[0124] Where L is the total loss, L1 is the mean square error of content loss, L2 is the mean square error of style loss, α is the hyperparameter of content loss weight, and β is the hyperparameter of style loss weight.
[0125] Furthermore, based on the image loss function, the image is optimized specifically including:
[0126] Use the Adam optimization algorithm to minimize the total loss L;
[0127] Based on the Adam optimization algorithm, deviation correction is performed and parameters are updated;
[0128] Update the generated image;
[0129] The updated image will be saved.
[0130] Furthermore, the parameter update formula is:
[0131]
[0132] Among them, θ t Current parameters, θ t+1 is the updated parameter, α is the learning rate, ∈ is a constant, is the corrected moment estimate, is the second-order moment estimate;
[0133] Based on the calculated parameters, the image parameters are adjusted.
[0134] Furthermore, based on real-time weather data and time information, the Huxiang images of different seasons and weather are generated, including:
[0135] Get real-time weather data and time information;
[0136] Determine season and weather effects;
[0137] Apply seasonality and weather templates to process time information;
[0138] Apply effects to Huxiang images, adjust and optimize;
[0139] Generate and display the final image and set up a real-time update mechanism.
[0140] Furthermore, the output of Huxiang images is combined with augmented reality technology, and users can preview and interact with Huxiang images in a real environment. Specifically, the following are included:
[0141] Use real-time weather and time data to generate images of Hunan and Xiang in different seasons and weather;
[0142] Select the ARKit tool, create an AR project, and configure the basic AR environment, including the positioning system and camera settings;
[0143] Convert the Huxiang image into a 3D model, set up the scene in the AR platform, and arrange the display location and method of the Huxiang image or model;
[0144] Apply the generated Huxiang image as texture or background to the AR scene;
[0145] Design and implement user interaction functions, and use gestures to adjust the perspective and position of images;
[0146] Adjust images and trigger special effects through voice control;
[0147] Trigger specific AR effects based on user position, perspective, and environmental changes.
[0148] Furthermore, test AR applications on different devices and environments;
[0149] Publish AR apps to app stores and distribution channels;
[0150] Provide user guidance and help documentation on how to use AR features and interactive designs;
[0151] Collect user feedback, understand their usage experience, and make further optimizations based on the feedback.
[0152] The use process of the present invention is:
[0153] Step 1: Collect images related to Hunan from various data sources, including photographic works, tourism websites and historical archives;
[0154] Step 2: Label the images to identify the specific categories of landscapes, relics and cultural activities;
[0155] Step 3: Based on the collected image data, perform image cleaning, image enhancement and image standardization;
[0156] Step 4: Input random noise and Huxiang's label, and connect the random noise and Huxiang's label;
[0157] Step 5: Generate an image through the convolution layer and activation function, and calculate the true probability of the image through the discriminator;
[0158] Step 6: Calculate the loss function, the generator maximizes the probability of the discriminator's judgment on the generated image;
[0159] Step 7: Use real images and generated images to update the weights of the discriminator respectively;
[0160] Step 8: By fixing the weights of the discriminator, update the weights of the generator to minimize the generator loss;
[0161] Step 9: Use the trained generator to input new random noise and Huxiang labels and output an image;
[0162] Step 10: Get real-time weather data and time information;
[0163] Step 11: Determine the season and weather effects
[0164] Step 12: Apply seasonal and weather templates to process time information;
[0165] Step 13: Apply the effect to the Huxiang image, adjust and optimize;
[0166] Step 14: Generate and display the final image and set up a real-time update mechanism;
[0167] Step 15: Convert the Huxiang image into a 3D model, set up the scene in the AR platform, and arrange the display location and method of the Huxiang image or model.
[0168] To sum up, the advantages of the present invention are: the present invention proposes intelligent extraction of the Hunan-Xiang theme images of AIGC, can perform efficient image generation for the Hunan theme, can perform rapid correction and parameter update based on image features, so that the image generation effect is better, bringing better usage prospects and commercial value.
[0169] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. The intelligent generation algorithm of Huxiang theme images based on AIGC is characterized by: include: Collect the scenery, historical sites, and traditional cultural activities in the Hunan and Xiangxi regions, and pre-process the collected images; Based on the Hunan data, a conditional generative adversarial network model is generated. Based on the output of the conditional generative adversarial network model, the generator creates Hunan-themed images. Optimize the image based on the image loss function; Generate images of Hunan and Xiangxi in different seasons and weather based on real-time weather data and time information; Output Huxiang images and combine them with augmented reality technology, so that users can preview and interact with Huxiang images in the real environment.
2. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 1 is characterized in that: The collecting of the scenery, historical sites, and traditional cultural activities in the Hunan and Xiangxi regions and the preprocessing of the collected images specifically include: Collect images of Hunan from various data sources, including photography, tourism websites and historical archives; Label images to identify specific categories of landscapes, monuments, and cultural activities; Based on the collected image data, image cleaning, image enhancement and image standardization are performed; Among them, the image cleaning formula is: Where I(x, y) is the pixel value of the filtered image at position (x, y), I(x+i, y+i) is the pixel value of the original image at position (x+i, y+i), k is the size of the filter, i and j are the relative position indexes of the filter, and k is the value of the original image at position (x+i, y+i). 2 is the total number of pixels in the filter; Among them, the image enhancement formula is: G(x, y) = α(x, y) + β Where α is the contrast factor, β is the brightness offset, and G(x, y) is the pixel value of the contrast-adjusted image at position (x, y); Among them, the image standardization processing formula is: Where μ is the mean of the original image pixel values, σ is the standard deviation of the original image pixel values, and Z(x, y) is the pixel value of the standardized image at (x, y).
3. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 2 is characterized in that: Based on the Hunan data, a conditional generative adversarial network model is generated. Based on the output of the conditional generative adversarial network model, the generator creates Hunan-themed images, including: Input random noise and Huxiang labels; Connect the random noise and the Huxiang label; Generate images through convolutional layers and activation functions; Output based on the generated image; Calculate the true probability of the image through the discriminator; Calculate the loss function, the generator maximizes the probability of the discriminator's judgment on the generated image; Use real images and generated images to update the weights of the discriminator respectively; By fixing the weights of the discriminator, the weights of the generator are updated to minimize the generator loss; Use the trained generator to input new random noise and Huxiang labels and output an image.
4. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 3 is characterized in that: Generate images through convolutional layers and activation functions include: Among them, the image generation formula is: G(z,c)=CT(LR(BN(D(z*c)))) Where CT is the transposed convolutional layer, LR is the activation function, BN is the batch normalization layer, D is the fully connected layer, z is random noise, and c is the label of Huxiang; Based on the generated image, the true probability of the image is calculated through the discriminator; The true probability calculation formula is: D(x,c)=S(LR(C(x*c))) In the formula, D( x, c) is the true probability of the image, S is the activation function, and LR is the convolutional layer; Based on the true probability, determine whether the image is real. x is the image feature and c is the label of Huxiang.
5. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 4 is characterized in that: Calculate the loss function, the generator maximizes the probability of the discriminator's judgment on the generated image include: Among them, the loss function calculation formula is: L=α·L1+β·L2 Where L is the total loss, L1 is the mean square error of content loss, L2 is the mean square error of style loss, α is the hyperparameter of content loss weight, and β is the hyperparameter of style loss weight.
6. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 5 is characterized in that: Based on the image loss function, the image optimization specifically includes: Use the Adam optimization algorithm to minimize the total loss L; Based on the Adam optimization algorithm, deviation correction is performed and parameters are updated; Update the generated image; The updated image will be saved.
7. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 6 is characterized in that: The parameter update formula is: Among them, θ t Current parameters, θ t+1 is the updated parameter, α is the learning rate, ∈ is a constant, is the corrected moment estimate, is the second-order moment estimate; Based on the calculated parameters, the image parameters are adjusted.
8. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 7 is characterized in that: Based on real-time weather data and time information, the Huxiang images of different seasons and weather are generated, including: Get real-time weather data and time information; Determine season and weather effects; Apply seasonality and weather templates to process time information; Apply effects to Huxiang images, adjust and optimize; Generate and display the final image and set up a real-time update mechanism.
9. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 8 is characterized in that: Output Huxiang images, combined with augmented reality technology, users can preview and interact with Huxiang images in the real environment. The specific details include: Use real-time weather and time data to generate images of Hunan and Xiang in different seasons and weather; Select the ARKit tool, create an AR project, and configure the basic AR environment, including the positioning system and camera settings; Convert the Huxiang image into a 3D model, set up the scene in the AR platform, and arrange the display location and method of the Huxiang image or model; Apply the generated Huxiang image as texture or background to the AR scene; Design and implement user interaction functions, and use gestures to adjust the perspective and position of images; Adjust images and trigger special effects through voice control; Trigger specific AR effects based on user position, perspective, and environmental changes.
10. The AIGC-based intelligent generation algorithm for Hunan-themed images according to claim 9 is characterized by: Test AR apps on different devices and environments; Publish AR apps to app stores and distribution channels; Provide user guidance and help documentation on how to use AR features and interactive designs; Collect user feedback, understand their usage experience, and make further optimizations based on the feedback.
