Image generation method and device based on frequency domain autoregression and electronic equipment

By employing a frequency domain autoregressive method and utilizing discrete cosine transform and nested spectral tokenization, the problems of causal modeling and computational efficiency in autoregressive visual generation methods are solved, achieving efficient and strictly causal image generation, reducing token redundancy and improving generation quality.

CN120931752APending Publication Date: 2025-11-11TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511027341.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing autoregressive visual generation methods have significant shortcomings in causal modeling, computational efficiency, and generation quality, resulting in token redundancy and limited hierarchical generation.

Method used

An image generation method based on frequency domain autoregression is adopted. The image is transformed to the frequency domain through discrete cosine transform and decomposed into multi-level sub-images. Then, nested spectral tokenization and causal spectral masking are used to perform non-uniform token-frequency mapping and autoregressive token prediction to achieve strictly causal image generation.

Benefits of technology

It improves generation quality and computational efficiency, reduces token redundancy, supports flexible control over generation resolution and quality, and achieves efficient and strictly causal visual generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931752A_ABST
    Figure CN120931752A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine learning, in particular to an image generation method and device based on frequency domain autoregression, electronic equipment and a computer readable storage medium, and the method comprises the steps: carrying out the discrete cosine transform of an input image, and obtaining a spectral density matrix; decomposing the spectral density matrix into multiple levels of sub-images, and sorting the sub-images according to a preset value; reconstructing the multi-level sub-images into spatial domain sub-images by using inverse discrete cosine transform, and encoding the spatial domain sub-images into a one-dimensional causal token sequence by using a nested spectrum token module; based on spectrum energy long-tail distribution, performing distribution processing on the one-dimensional causal token sequence, and introducing a causal spectrum mask; and performing autoregressive token prediction on the distributed one-dimensional causal token sequence, and reconstructing a corresponding sub-image. Through nested spectrum tokenization, non-uniform token-frequency mapping and causal spectrum mask, efficient, strict causal and rich-detail visual generation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to an image generation method, apparatus, electronic device, and computer-readable storage medium based on frequency domain autoregression. Background Technology

[0002] With the rapid development of artificial intelligence technology, visual generative models have shown great application potential in image synthesis, video generation, and cross-modal content creation. While traditional generative models such as Generative Adversarial Networks (GANs) and diffusion models have made significant progress in generation quality, they still face many technical challenges. In recent years, autoregressive models have gradually become a research hotspot in the field of visual generation due to their sequential generation characteristics, high scalability, and natural compatibility with multimodal tasks. However, existing autoregressive visual generation methods still have significant shortcomings in causal modeling, computational efficiency, and generation quality. They fail to fully utilize the long-tail characteristics of frequency domain energy (low-frequency dominates the structure, high-frequency encodes details), leading to token redundancy and limited hierarchical generation.

[0003] In summary, designing an efficient, rigorously causal, and visually rich image generation method is a problem that urgently needs to be solved. Summary of the Invention

[0004] This application aims to at least partially address one of the technical problems in the related art.

[0005] Therefore, the first objective of this application is to propose an image generation method based on frequency domain autoregression, in order to solve the significant defects of existing autoregressive visual generation methods in terms of causal modeling, computational efficiency and generation quality, which lead to problems such as token redundancy and limited hierarchical generation.

[0006] The second objective of this application is to provide an apparatus.

[0007] The third objective of this application is to propose an electronic device.

[0008] The fourth objective of this application is to provide a computer-readable storage medium.

[0009] To achieve the above objectives, a first aspect of this application proposes an image generation method based on frequency domain autoregression, comprising:

[0010] Perform a discrete cosine transform on the input image to obtain the spectral density matrix;

[0011] The spectral density matrix is ​​decomposed into multi-level sub-images and sorted according to preset values;

[0012] The multi-level sub-images are reconstructed into spatial domain sub-images using inverse discrete cosine transform, and the spatial domain sub-images are encoded into a one-dimensional causal token sequence using a nested spectral tokenization module.

[0013] Based on the long-tailed distribution of spectral energy, the one-dimensional causal token sequence is allocated, and a causal spectral mask is introduced.

[0014] The assigned one-dimensional causal token sequence is subjected to autoregressive token prediction, and the corresponding sub-image is reconstructed.

[0015] Preferably, performing a discrete cosine transform on the input image to obtain the spectral density matrix includes:

[0016] Calculate the cosine product term for each pixel of the input image;

[0017] Accumulate all pixel values ​​with their corresponding cosine products, adjust the amplitude, and generate the spectral density matrix. The calculation formula is as follows:

[0018]

[0019] Where C(u) = 1 / 2 or C(u) = 1, and each element D(u,v) represents the corresponding basis function g. u,v The intensity of (x,y).

[0020] Preferably, the step of decomposing the spectral density matrix into multi-level sub-images and sorting them according to preset values ​​includes:

[0021] The spectral density matrix is ​​decomposed into multi-level sub-images according to frequency from low to high, wherein the i-th level sub-image retains only the first i-th level low-frequency region and sets the high-frequency region to zero.

[0022] Preferably, the step of reconstructing the multi-level sub-image into a spatial domain sub-image using inverse discrete cosine transform, and encoding the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module includes:

[0023] Multiply the discrete cosine transform spectrum matrix element by element by a binary mask matrix;

[0024] Perform an inverse discrete cosine transform on the masked spectrum to obtain the reconstructed sub-image;

[0025] Each reconstructed sub-image is input into a lightweight visual encoder to generate a one-dimensional causal token sequence.

[0026] Preferably, the process of allocating the one-dimensional causal token sequence based on the long-tailed distribution of spectral energy and introducing a causal spectral mask includes:

[0027] Based on the long-tail distribution of spectral energy, dense token allocation is used in the low-frequency region and sparse token allocation is used in the high-frequency region, forming a non-uniform token-frequency mapping. A causal spectral mask is then introduced, where the causal spectral mask is defined as: M ≤ i if and only if j ≤ i. i,j =0, otherwise, M i,j = -∞, where i is the row index of the query token and j represents the column index of the key token.

[0028] Preferably, the step of performing autoregressive token prediction on the assigned one-dimensional causal token sequence and reconstructing the corresponding sub-image includes:

[0029] The one-dimensional causal token sequence after allocation and processing is used to generate frequency domain tokens step by step from low frequency to high frequency. At each generation, the current token is predicted by an autoregressive model. The current token is added to the historical sequence, the sub-image is reconstructed, and optimization processing is performed by combining perceptual loss and adversarial loss.

[0030] Preferably, the autoregressive model prediction expression is:

[0031]

[0032] Among them, s i This is the current token.

[0033] To achieve the above objectives, a second aspect of this application provides an image generation apparatus based on frequency domain autoregression, comprising:

[0034] The initialization module performs a discrete cosine transform on the input image to obtain the spectral density matrix.

[0035] The image decomposition module decomposes the spectral density matrix into multi-level sub-images and sorts them according to preset values;

[0036] The sequence generation module reconstructs the multi-level sub-image into a spatial domain sub-image using the inverse discrete cosine transform, and encodes the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module.

[0037] The allocation module, based on the long-tail distribution of spectral energy, performs allocation processing on the one-dimensional causal token sequence and introduces a causal spectral mask;

[0038] The reconstruction module performs autoregressive token prediction on the assigned one-dimensional causal token sequence and reconstructs the corresponding sub-image.

[0039] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0040] The memory stores computer-executed instructions;

[0041] The processor executes computer execution instructions stored in the memory to implement the method described in any of the preceding descriptions.

[0042] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium, comprising computer-executable instructions stored therein, which, when executed by a processor, are used to implement the method described in any of the above embodiments.

[0043] This application provides a frequency-domain autoregressive image generation method. It uses discrete cosine transform (DCT) to convert the input image to the frequency domain, decomposes it into multi-level sub-images from low to high frequency, and reconstructs them into a hierarchical sequence with increasing detail using inverse DCT. By nesting spectral tokenization modules, each level of sub-image is encoded as a one-dimensional causal token sequence, with subsequent tokens encoding only high-frequency incremental information not covered by previous tokens. Based on the long-tail distribution characteristics of spectral energy, a non-uniform token-frequency mapping strategy is adopted. Dense tokens are allocated to low-frequency regions to accurately model the overall structure, while the frequency interval is expanded in high-frequency regions to sparsely encode details. A causal spectral masking mechanism is introduced in the encoder and decoder to restrict each token to focus only on the current and lower frequency bands, eliminating leakage of high-frequency information into the low-frequency generation process. Strict autoregressive causal constraints are achieved through pure unidirectional attention. The token sequence is predicted level by level from low to high frequency. During each generation, historical tokens are fused to reconstruct the corresponding sub-image, supporting dynamic truncation during the generation process, enabling flexible control of resolution and quality.

[0044] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0045] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0046] Figure 1 A flowchart of a first specific embodiment of an image generation method based on frequency domain autoregression provided by the present invention;

[0047] Figure 2 A flowchart illustrating another specific embodiment of the frequency domain autoregressive image generation method provided by the present invention.

[0048] Figure 3 This is a structural block diagram of an image generation device based on frequency domain autoregression provided in an embodiment of the present invention. Detailed Implementation

[0049] The core of this invention is to provide an image generation method, apparatus, electronic device, and computer-readable storage medium based on frequency domain autoregression. By nesting spectral tokenization, non-uniform token-frequency mapping, and causal spectral masking, it achieves efficient, strictly causal, and richly detailed visual generation.

[0050] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] Please refer to Figure 1 , Figure 1 The flowchart illustrates a first specific embodiment of an image generation method based on frequency domain autoregression provided by the present invention; the specific operation steps are as follows:

[0052] Step S101: Perform a discrete cosine transform on the input image to obtain the spectral density matrix;

[0053] Step S102: Decompose the spectral density matrix into multi-level sub-images and sort them according to preset values;

[0054] Step S103: Reconstruct the multi-level sub-image into a spatial domain sub-image using the inverse discrete cosine transform, and encode the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module;

[0055] Step S104: Based on the long-tailed distribution of spectral energy, the one-dimensional causal token sequence is allocated, and a causal spectral mask is introduced;

[0056] Step S105: Perform autoregressive token prediction on the assigned one-dimensional causal token sequence and reconstruct the corresponding sub-image.

[0057] Based on the above embodiments, this embodiment provides a detailed explanation of the above steps, such as... Figure 2 As shown, the details are as follows:

[0058] Based on the above embodiments, this embodiment will provide a detailed description of step S101:

[0059] In one embodiment, a cosine product term is calculated for each pixel of the input image; all pixel values ​​are summed with their corresponding cosine product terms, and the magnitudes are adjusted to generate a spectral density matrix, the calculation formula of which is as follows:

[0060]

[0061] Where C(u) = 1 / 2 or C(u) = 1, and each element F(u,v) represents the corresponding basis function g. u,v The intensity of (x,y).

[0062] Specifically, for the input image Performing a Discrete Cosine Transform (DCT) yields the spectral density matrix. Each element F(u,v) represents the corresponding basis function g. u,v The intensity of (x,y).

[0063] Based on the above embodiments, this embodiment will provide a detailed description of step S102:

[0064] In one embodiment, the spectral density matrix is ​​decomposed into multi-level sub-images in ascending order of frequency, wherein the i-th level sub-image retains only the first i-th level low-frequency region and sets the high-frequency region to zero.

[0065] Based on the above embodiments, this embodiment will provide a detailed description of step S103:

[0066] In one embodiment, the discrete cosine transform spectrum matrix is ​​multiplied element-wise by a binary mask matrix; the inverse discrete cosine transform is performed on the masked spectrum to obtain a reconstructed sub-image; each level of reconstructed sub-image is input into a lightweight visual encoder to generate a one-dimensional causal token sequence.

[0067] Specifically, the spectrum matrix is ​​decomposed into L-level sub-images according to frequency from low to high. For the i-th level sub-image, the first ω values ​​in the spectrum matrix are retained. i ×ω i The low-frequency region (ω) i <ω i+1 The remaining areas are set to zero, and the image is reconstructed into sub-image I′ using inverse DCT. i :

[0068] I' i =DCT -1 (D′ i )

[0069] in For element-wise multiplication, The mask matrix is ​​used. A lightweight visual Transformer encoder is used to encode each sub-image level as a one-dimensional token sequence S = {s1, s2, ..., s}. L}

[0070] During the encoding process, causal spectral masks are used to restrict each token to access features in the current and lower frequency bands only.

[0071] Based on the above embodiments, this embodiment will provide a detailed description of step S104:

[0072] In one embodiment, based on the long-tailed distribution of spectral energy, dense token allocation is used for low-frequency regions and sparse token allocation is used for high-frequency regions, forming a non-uniform token-frequency mapping. A causal spectral mask is then introduced, where the causal spectral mask is defined as: M ≤ i if and only if j ≤ i. i,j =0, otherwise, M i,j = -∞, where i is the row index of the query token and j represents the column index of the key token.

[0073] Specifically, the absolute value distribution of the spectral matrix D follows a power-law distribution (high energy at low frequencies, low energy at high frequencies). A frequency threshold sequence {ω} is designed. i}, satisfying ω i -ω i-1 <ω i+1 -ω i .

[0074] For example, for a 256×256 image, the settings are:

[0075]

[0076] The first 32 tokens densely encode the low-frequency structure (with a spacing of 1), while the latter 32 tokens sparsely encode the high-frequency details (with the spacing gradually increasing to 12). A dense sampling strategy is used for the low-frequency region, with each frequency point assigned an independent token; a region merging strategy is used for the high-frequency region, with multiple adjacent frequency points sharing the same token.

[0077] Among them, the causal spectral attention interaction mechanism defines a mask matrix. Where M i,j =0 if and only if j≤i (allowing the current token to follow historical tokens), otherwise M i,j = -∞ (masks future information). In the Transformer's attention layer, a mask is applied to query-key-value pairs:

[0078]

[0079] Where d k Let S be the dimension of the key vector. In the decoder, the current token sequence S... 1:i Concatenated with a mask token, sub-image I′ is reconstructed step-by-step through causal attention. i This ensures that the generation of high-frequency tokens strictly depends on low-frequency tokens.

[0080] Based on the above embodiments, this embodiment will provide a detailed description of step S105:

[0081] In one embodiment, the one-dimensional causal token sequence after allocation processing is used to generate frequency domain tokens step by step from low frequency to high frequency. At each generation, the current token is predicted by an autoregressive model, the current token is added to the historical sequence, the sub-image is reconstructed, and optimization processing is performed by combining perceptual loss and adversarial loss.

[0082] The autoregressive model prediction expression is:

[0083]

[0084] Among them, s i This is the current token.

[0085] Specifically, frequency domain tokens are generated level by level. At each level, the current token is predicted using an autoregressive model, and the new token s is generated. i Add to historical sequence and reconstruct sub-image I′ i It optimizes details through joint perceptual loss (LPIPS) and adversarial loss (GAN). It supports truncating the generation process at any stage.

[0086] For example, generating the first 32 tokens outputs a low-resolution image, while generating all 64 tokens outputs a high-resolution image. For super-resolution tasks, the input image is divided into blocks and generated in parallel, and then stitched together to form a complete high-resolution image.

[0087] This embodiment provides a frequency-domain autoregressive image generation method. It uses discrete cosine transform (DCT) to convert the input image to the frequency domain, decomposes it into multi-level sub-images from low to high frequency, and reconstructs them into a hierarchical sequence with increasing detail using inverse DCT. By nesting spectral tokenization modules, each level of sub-image is encoded as a one-dimensional causal token sequence, with subsequent tokens encoding only high-frequency incremental information not covered by previous tokens. Based on the long-tail distribution characteristics of spectral energy, a non-uniform token-frequency mapping strategy is adopted. Dense tokens are allocated to low-frequency regions to accurately model the overall structure, while the frequency interval is expanded in high-frequency regions to sparsely encode details. A causal spectral masking mechanism is introduced in the encoder and decoder to restrict each token to focus only on the current and lower frequency bands, eliminating leakage of high-frequency information into the low-frequency generation process. Strict autoregressive causal constraints are achieved through pure unidirectional attention. The token sequence is predicted level by level from low to high frequency. During each generation, historical tokens are fused to reconstruct the corresponding sub-image, supporting dynamic truncation during the generation process and enabling flexible control of resolution and quality.

[0088] Please refer to Figure 3 , Figure 3 A structural block diagram of a frequency domain autoregressive image generation device provided in an embodiment of the present invention; the specific device may include:

[0089] Initialize module 100 to perform discrete cosine transform on the input image and obtain the spectral density matrix;

[0090] The image decomposition module 200 decomposes the spectral density matrix into multi-level sub-images and sorts them according to preset values;

[0091] The sequence generation module 300 reconstructs the multi-level sub-image into a spatial domain sub-image using the inverse discrete cosine transform, and encodes the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module.

[0092] The allocation module 400 performs allocation processing on the one-dimensional causal token sequence based on the long-tail distribution of spectral energy and introduces a causal spectral mask;

[0093] The reconstruction module 500 performs autoregressive token prediction on the processed one-dimensional causal token sequence and reconstructs the corresponding sub-image.

[0094] This embodiment provides an image generation device based on frequency domain autoregression to implement the aforementioned image generation method based on frequency domain autoregression. Therefore, the specific implementation of the image generation device based on frequency domain autoregression can be found in the embodiment section of the image generation method based on frequency domain autoregression described above. For example, the initialization module 100, image decomposition module 200, sequence generation module 300, allocation module 400, and reconstruction module 500 are respectively used to implement steps S101, S102, S103, S104, and S105 in the aforementioned image generation method based on frequency domain autoregression. Therefore, the specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.

[0095] To implement the above embodiments, this application also proposes an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0096] To implement the above embodiments, this application also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0097] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0098] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0099] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.

[0100] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.

[0101] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0102] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0103] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0104] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0105] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0106] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0108] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. An image generation method based on frequency domain autoregression, characterized in that, include: Perform a discrete cosine transform on the input image to obtain the spectral density matrix; The spectral density matrix is ​​decomposed into multi-level sub-images and sorted according to preset values; The multi-level sub-images are reconstructed into spatial domain sub-images using inverse discrete cosine transform, and the spatial domain sub-images are encoded into a one-dimensional causal token sequence using a nested spectral tokenization module. Based on the long-tailed distribution of spectral energy, the one-dimensional causal token sequence is allocated, and a causal spectral mask is introduced. The assigned one-dimensional causal token sequence is subjected to autoregressive token prediction, and the corresponding sub-image is reconstructed.

2. The image generation method based on frequency domain autoregression according to claim 1, characterized in that, The step of performing a discrete cosine transform on the input image to obtain the spectral density matrix includes: Calculate the cosine product term for each pixel of the input image; Accumulate all pixel values ​​with their corresponding cosine products, adjust the amplitude, and generate the spectral density matrix. The calculation formula is as follows: Where C(u) = 1 / 2 or C(u) = 1, and each element F(u,v) represents the corresponding basis function g. u,v The intensity of (x,y).

3. The image generation method based on frequency domain autoregression according to claim 1, characterized in that, The step of decomposing the spectral density matrix into multi-level sub-images and sorting them according to preset values ​​includes: The spectral density matrix is ​​decomposed into multi-level sub-images according to frequency from low to high, wherein the i-th level sub-image retains only the first i-th level low-frequency region and sets the high-frequency region to zero.

4. The image generation method based on frequency domain autoregression according to claim 1, characterized in that, The step of reconstructing the multi-level sub-image into a spatial domain sub-image using inverse discrete cosine transform, and encoding the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module includes: Multiply the discrete cosine transform spectrum matrix element by element by a binary mask matrix; Perform an inverse discrete cosine transform on the masked spectrum to obtain the reconstructed sub-image; Each reconstructed sub-image is input into a lightweight visual encoder to generate a one-dimensional causal token sequence.

5. The image generation method based on frequency domain autoregression according to claim 1, characterized in that, The allocation process for the one-dimensional causal token sequence based on the long-tailed distribution of spectral energy, and the introduction of a causal spectral mask, includes: Based on the long-tail distribution of spectral energy, dense token allocation is used in the low-frequency region and sparse token allocation is used in the high-frequency region, forming a non-uniform token-frequency mapping. A causal spectral mask is then introduced, where the causal spectral mask is defined as: M ≤ i if and only if j ≤ i. i,j =0, otherwise, M i,j = -∞, where i is the row index of the query token and j represents the column index of the key token.

6. The image generation method based on frequency domain autoregression according to claim 1, characterized in that, The step of performing autoregressive token prediction on the assigned one-dimensional causal token sequence and reconstructing the corresponding sub-image includes: The one-dimensional causal token sequence after allocation and processing is used to generate frequency domain tokens step by step from low frequency to high frequency. At each generation, the current token is predicted by an autoregressive model. The current token is added to the historical sequence, the sub-image is reconstructed, and optimization processing is performed by combining perceptual loss and adversarial loss.

7. The image generation method based on frequency domain autoregression according to claim 6, characterized in that, The autoregressive model prediction expression is as follows: Among them, s i This is the current token.

8. An image generation device based on frequency domain autoregression, characterized in that, include: The initialization module performs a discrete cosine transform on the input image to obtain the spectral density matrix. The image decomposition module decomposes the spectral density matrix into multi-level sub-images and sorts them according to preset values; The sequence generation module reconstructs the multi-level sub-image into a spatial domain sub-image using the inverse discrete cosine transform, and encodes the spatial domain sub-image into a one-dimensional causal token sequence using a nested spectral tokenization module. The allocation module, based on the long-tail distribution of spectral energy, performs allocation processing on the one-dimensional causal token sequence and introduces a causal spectral mask; The reconstruction module performs autoregressive token prediction on the assigned one-dimensional causal token sequence and reconstructs the corresponding sub-image.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the frequency domain autoregressive image generation method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the frequency-domain autoregressive image generation method as described in any one of claims 1-7.