Method and electronic device for visual generation

The multi-scale autoregressive model for computer vision addresses inefficiencies in next-token prediction by using next-scale prediction, improving image quality and computational efficiency.

WO2025217918A1PCT designated stage Publication Date: 2025-10-23BEIJING YOUZHUJU NETWORK TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/088885
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2025-10-23

AI Technical Summary

Technical Problem

Existing autoregressive models for computer vision face challenges in scaling laws, performance lagging behind diffusion models, and inefficiencies in next-token prediction, which disrupt spatial locality and violate unidirectional dependency assumptions.

Method used

A multi-scale autoregressive paradigm with next-scale prediction, generating predicted token maps at varying resolutions, determining visual feature codes, scaling them to a target resolution, and aggregating to form a target feature map for improved image generation.

Benefits of technology

The proposed method addresses the issues of spatial locality and computational inefficiency, aligning with human perception and enhancing image quality while reducing computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024088885_23102025_PF_FP_ABST
    Figure CN2024088885_23102025_PF_FP_ABST
Patent Text Reader

Abstract

A method and electronic device for visual generation are provided. The method comprises: generating, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively; determining, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information; scaling the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively; generating a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes; and generating a target image from the target feature map.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND ELECTRONIC DEVICE FOR VISUAL GENERATIONField

[0001] The disclosed example embodiments relate generally to machine learning and, more particularly, to a method, apparatus, device and computer readable storage medium for visual generation.Background

[0002] The advent of generative transformer models and other autoregressive (AR) large language models (LLMs) has heralded a new epoch in the field of artificial intelligence. These models exhibit promising intelligence in generality and versatility that, despite issues like hallucinations are still considered to take a solid step toward the general artificial intelligence (AGI) . The crux behind these large models is a self-supervised learning strategy -predicting the next token in a sequence, a simple yet profound approach. Studies into the success of these large AR models have highlighted their scalability and generalizability: the former, as exemplified by scaling laws, allows to predict performance of a large model from smaller ones and thus guides better resource allocation. While the latter, as evidenced by zero-shot and few-shot learning underscores the unsupervised-trained models’ adaptability to diverse, unseen tasks. These properties reveal the potential of AR models in learning from vast unlabeled data, encapsulating the essence of AGI.Summary

[0003] In a first aspect of the present disclosure, there is provided a method for visual generation. The method comprises: generating, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively; determining, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information; scaling the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution , respectively; generating a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes; and generating a target image from the target feature map.

[0004] In a second aspect of the present disclosure, there is provided an apparatus for visual generation. The apparatus comprises: a predicted token map generating module configured to generate, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively; a visual feature code determining module configured to determine, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information; a scaling module configured to scale the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively; a target feature map generating module configured to generate a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes; and a target image generating module configured to generate a target image from the target feature map.

[0005] In a third aspect of the present disclosure, there is provided an electronic device. The device comprises at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions executable by the at least one processing unit. The instructions, upon execution by the at least one processing unit, cause the device to perform the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program which, when executed by a processor, causes the method of the first aspect to be implemented.

[0007] It would be appreciated that the content described in the Summary section of the present invention is neither intended to identify key or essential features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily envisaged through the following description.Brief Description of the Drawings

[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent in combination with the accompanying drawings and with reference to the following detailed description. In the drawings, the same or similar reference symbols refer to the same or similar elements, where:

[0009] FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure may be implemented;

[0010] FIG. 2 illustrates a schematic diagram of image generation by next-image-token prediction;

[0011] FIG. 3 illustrates a schematic block diagram of the architecture of the visual generation model in accordance with some embodiments of the present disclosure;

[0012] FIG. 4A illustrates a schematic diagram of training a multi-scale quantized autoencoder (VQVAE) in accordance with some embodiments of the present disclosure;

[0013] FIG. 4B illustrates a schematic diagram of training the token prediction model on tokens in accordance with some embodiments of the present disclosure;

[0014] FIG. 5A illustrates an example algorithm for multi-scale VQVAE encoding in accordance with some embodiments of the present disclosure;

[0015] FIG. 5B illustrates an example algorithm for multi-scale VQVAE reconstruction in accordance with some embodiments of the present disclosure;

[0016] FIG. 5C illustrates an example of the visual generation model in accordance with some embodiments of the present disclosure;

[0017] FIGS. 6A-6B illustrates diagrams of the correlation between test loss and model parameters in accordance with some embodiments of the present disclosure;

[0018] FIGS. 6C-6D illustrates diagrams of the correlation between token error rate and model parameters in accordance with some embodiments of the present disclosure;

[0019] FIG. 7 illustrates a flow chart of a process for visual generation in accordance with some embodiments of the present disclosure;

[0020] FIG. 8 illustrates a block diagram of an apparatus for visual generation according to some embodiments of the present disclosure; and

[0021] FIG. 9 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure can be implemented.Detailed Description

[0022] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it would be appreciated that the present disclosure may be implemented in various forms and should not be interpreted as limited to the embodiments described herein. On the contrary, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It would be appreciated that the drawings and embodiments of the present disclosure are only for the purpose of illustration and are not intended to limit the scope of protection of the present disclosure.

[0023] In the description of the embodiments of the present disclosure, the term "including" and similar terms would be appreciated as open inclusion, that is, "including but not limited to" . The term "based on" would be appreciated as " at least partially based on" . The term "one embodiment" or "the embodiment" would be appreciated as "at least one embodiment" . The term "some embodiments" would be appreciated as "at least some embodiments" . Other explicit and implicit definitions may also be included below. As used herein, the term "model" can represent the matching degree between various data. For example, the above matching degree can be obtained based on various technical solutions currently available and / or to be developed in the future.

[0024] It will be appreciated that the data involved in this technical proposal (including but not limited to the data itself, data acquisition or use) shall comply with the requirements of corresponding laws, regulations and relevant provisions.

[0025] It will be appreciated that before using the technical solution disclosed in each embodiment of the present disclosure, users should be informed of the type, the scope of use, the use scenario, etc. of the personal information involved in the present disclosure in an appropriate manner in accordance with relevant laws and regulations, and the user’s authorization should be obtained.

[0026] For example, in response to receiving an active request from a user, a prompt message is sent to the user to explicitly prompt the user that the operation requested operation by the user will need to obtain and use the user's personal information. Thus, users may select whether to provide personal information to the software or the hardware such as an electronic device, an application, a server or a storage medium that perform the operation of the technical solution of the present disclosure according to the prompt information.

[0027] As an optional but non-restrictive implementation, in response to receiving the user's active request, the method of sending prompt information to the user may be, for example, a pop-up window in which prompt information may be presented in text. In addition, pop-up windows may also contain selection controls for users to choose “agree” or “disagree” to provide personal information to electronic devices.

[0028] It will be appreciated that the above notification and acquisition of user authorization process are only schematic and do not limit the implementations of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0029] As used herein, the term "model" can learn a correlation between respective inputs and outputs from training data, so that a corresponding output can be generated for a given input after training is completed. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural networks model is an example of a deep learning-based model. As used herein, "model" may also be referred to as "machine learning model" , "learning model" , "machine learning network" , or "learning network" , and these terms are used interchangeably herein.

[0030] “Neural networks” are a type of machine learning network based on deep learning. Neural networks are capable of processing inputs and providing corresponding outputs, typically comprising input and output layers and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications typically comprise many hidden layers, thereby increasing the depth of the network. The layers of neural networks are sequentially connected so that the output of the previous layer is provided as input to the latter layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network comprises one or more nodes (also known as processing nodes or neurons) , each of which processes input from the previous layer.

[0031] Usually, machine learning can roughly comprise three stages, namely training stage, test stage, and application stage (also known as inference stage) . During the training stage, a given model can be trained using a large scale of training data, iteratively updating parameter values until the model can obtain consistent inference from the training data that  meets the expected objective. Through the training, the model can be considered to learn the correlation between input and output (also known as input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the test stage, test inputs are applied to the trained model to test whether the model can provide correct outputs, thereby determining the performance of the model. In the application stage, the model can be used to process actual inputs and determine corresponding outputs based on the parameter values obtained from training. "

[0032] FIG. 1 illustrates a block diagram of an example environment 100 in which various embodiments of the present disclosure may be implemented. In the environment 100 of FIG. 1, a computer system 110 applies a visual generation model 105 to perform image generation. The visual generation model 105 is configured to generate a target image 114. The visual generation model 105 is configured to process condition information 112 input by a user to generate the target image 114.

[0033] In FIG. 1, the computer system 110 may include any computing system with computing capability, such as various computing devices / systems, terminal devices, servers, etc. Terminal devices may include any type of mobile terminals, fixed terminals, or portable terminals, including mobile phones, desktop computers, laptops, netbooks, tablets, media computers, multimedia tablets, or any combination of the aforementioned, including accessories and peripherals of these devices or any combination thereof. Servers include but are not limited to mainframe, edge computing nodes, computing devices in cloud environment, etc.

[0034] It should be understood that the structure and function of each element in the environment 100 is described for illustrative purposes only and does not imply any limitations on the scope of the present disclosure.

[0035] As brief discussed, the AR models has potential in learning from vast unlabeled data, encapsulating the essence of AGI. In parallel, the field of computer vision has been striving to develop large autoregressive or world models, aiming to emulate their scalability and generalizability. Trailblazing efforts along with their successors have showcased the potential of AR models in image generation. These models utilize a visual tokenizer to discretize continuous images into grids of two-dimensional (2D) tokens, which are then flattened to a one-dimensional (1D) sequence for AR learning, mirroring the process of  sequential language modeling. However, the scaling laws of these models remain underexplored, and more frustratingly, their performance significantly lags behind diffusion models. In contrast to the remarkable achievements of LLMs, the power of autoregressive models in computer vision appears to be somewhat locked.

[0036] To address the above limitations, embodiments of the present disclosure propose an improved solution for visual generation. In this solution, a plurality of predicted token maps for a plurality of resolutions are generated based on at least one of a start token or condition information respectively. The plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps are determined from a codebook containing visual feature vectors respectively. A visual feature code comprises corresponding visual feature information. The plurality of visual feature codes with the plurality of resolutions are scaled to a plurality of scaled visual feature codes with a target resolution respectively. A target feature map with the target resolution is generated by aggregating the plurality of scaled visual feature codes. Further, a target image is generated from the target feature map.

[0037] In this way, a target feature map may include more accurate features by aggregating the plurality of scaled visual feature codes and thus the target image generated from target feature map may have a better image quality.

[0038] Autoregressive modeling requires defining the order of data. The present disclosure reconsiders how to “order” an image. Humans typically perceive or create images in a hierarchical manner, first capturing the global structure and then local details. This multi-scale, coarse-to-fine method naturally suggests an “order” for images. Also inspired by the widespread multi-scale designs, autoregressive learning is defined for images as “next-scale prediction” . The approach proposed by the present disclosure begins by encoding an image into multi-scale token maps. The autoregressive process is then started from the 1x1 token map, and progressively expands in resolution: at each step, the transformer predicts the next higher-resolution token map conditioned on all previous ones. This methodology is referred to as Visual AutoRegressive (VAR) modeling and the model proposed by the present disclosure is referred to as VAR model. Therefore, a new visual generative framework using a multi-scale autoregressive paradigm with next-scale prediction, offering new insights in autoregressive algorithm design for computer vision.

[0039] For ease of understanding, the following will describe autoregressive modeling via next-token prediction first and then the example embodiments of the present disclosure.

[0040] Consider a sequence of discrete tokens x= (x1, x2, …, xT) , where each token xt∈ [V] is an integer from a vocabulary of V. The next-token autoregressive model posits that the probability of observing the current token xt depends only on its prefix (x1, x2, …, xt-1) . This assumption of unidirectional token dependency allows to decompose the likelihood of sequence x into the product of T conditional probabilities as follows:

[0041] Training an autoregressive model pθ parameterized by θ involves optimizing the pθ (xt | x1, x2, …, xt-1) across a dataset. This optimization process is known as the “next-token prediction” , and the trained pθ may generate new sequences.

[0042] Images are inherently 2D continuous signals. To apply autoregressive modeling to images via next-token prediction, an image is tokenized into several discrete tokens and a 1D order of tokens is defined for unidirectional modeling. A quantized autoencoder is often used to convert the image feature map to discrete tokens q∈ [V] h×w:

[0043] In the Eq. (2) , im denotes the raw image, f denotes the feature of the raw image, ε (·) denotes an image encoder and denotes a quantizer. The quantizer typically includes a learnable codebook containing V vectors. The quantization process will map each feature vector f (i, j) to the code index q (i, j) of its nearest code in the Euclidean sense as follows:

[0044] In the Eq. (3) , lookup (Z, v) means taking the v-th vector in codebook Z. To train the quantized autoencoder, Z is looked up by every q (i, j) to get which is the approximation of original feature map f. Then a new image is reconstructed using the image decoder given the constructed feature map  and a compound loss is minimized. The above process is summarized as formulas in the following:

[0045] In the Eq. (5) ,  represents a perceptual loss,  represents a discriminative loss, and λP, λG represent loss weights. Once the autoencoder is fully trained, it will be used to tokenize images for subsequent training of a unidirectional autoregressive model.

[0046] The image tokens in q∈ [V] h×w are arranged in a 2D grid. Unlike natural language sentences with an inherent left-to-right ordering, the order of image tokens is explicitly defined for unidirectional autoregressive learning. Previous AR methods flatten the 2D grid of q into a 1D sequence x= (x1, …, xh×w) using some strategy such as row-major raster scan, spiral, or z-curve order. Once flattened, they can extract a set of sequences x from the dataset, and then train an autoregressive model to maximize the likelihood in the Eq. (1) via next-token prediction.

[0047] An example visual generation based on the above autoregressive modeling process is illustrated in FIG. 2. FIG. 2 shows a schematic diagram 200 of image generation by next-image-token prediction. As illustrated, an image may be divided into 9 image blocks (i.e., x1, x2, …, x9) . For each image block, a visual feature code may be looked up from a codebook. Then, the 9 visual feature codes may be decoded and reshaped to form a reconstructed image 210.

[0048] The above tokenizing and flattening enable next-token autoregressive learning on images, but they introduce several issues. The first issue is mathematical premise violation. Image encoders typically produce image feature map f with inter-dependent feature vectors f (i, j) for all i, j, so after quantization and flattening, the sequence of tokens (x1, x2, …, xh×w) exhibits bidirectional correlations. This contradicts the unidirectional dependency assumption of autoregressive models, which dictates that each token xtshould only depend on its prefix (x1, x2, …, xt-1) . The second issue is structural degradation. The flattening disrupts the spatial locality inherent in image feature maps. For instance, the token q (i, h) and its 4 immediate neighbors q (i±1, j) , q (i, j±1) are closely correlated due to their proximity. This spatial relationship is compromised in the linear sequence x, where unidirectional constraints diminish these correlations. The third issue is  inefficiency. Generating an image token sequence x= (x1, x2, …, xn×n) with a conventional self-attention transformer incurs autoregressive steps and computational cost.

[0049] To leverage the autoregressive learning for visual generation, instead of applying the next-token prediction, as briefly introduced above, example embodiments of the present disclosure is based on next-scale (or next-resolution) prediction.

[0050] FIG. 3 illustrates a schematic block diagram of a model architecture 300 in accordance with some embodiments of the present disclosure. The model architecture 300 involves an image encoder 310, an image decoder 330 and a token prediction model 345.

[0051] As illustrated, a raw image 305 may be input to the image encoder 310 generate a feature map 315 (represented as ) . By processing the feature map 315, a quantizer 310 may output a reconstructed feature map 325 (represented as with the same resolution of the feature map 315) using a codebook The reconstructed feature map 325 may input to the image decoder 330 to generate a reconstructed image 335 corresponding to the raw image 305. The image encoder 310 and the image decoder 330 forms multi-scale quantized autoencoder (VQVAE) structure. In some embodiments, the image encoder 310 may include a Variational Autoencoder (VAE) or any other suitable visual encoding structure that can encode image features, and the image decoder 320 may include a corresponding decoder.

[0052] FIG. 4A illustrates a schematic diagram 400A of training the image encoder 310 and the image decoder 330 in accordance with some embodiments of the present disclosure. As illustrated in FIG. 4 A, the target image 402 may be generated from the target feature map 404 using the image decoder 330. The image decoder 330 may be trained jointly with an image encoder 310 by for a sample image 406, extracting, using the image encoder 310, a sample feature map 408 with the target resolution from the sample image 406. At the encoding phase 410, the sample image 406 may be represented as im and the process of extracting the sample feature map 408 may be represented as f=ε (im) , where ε (·) denotes the image encoder and f denotes the sample feature map 408. It would be appreciated that a number of sample images are required to train the image encoder 310 and image decoder 330. The working principle of the image encoder 310 and the image decoder 330 will be described in connection with their processing on sample images during the  model training process.

[0053] In some embodiments, the image decoder 330 may be trained jointly with the image encoder 310 by generating, based on the sample feature map 408 of the sample image, a plurality of sample predicted token maps with the plurality of resolutions. After extracting the sample feature map, at the multi-scale quantization and embedding phase 412, a plurality of sample predicted token maps (e.g., K predicted token maps represented as r1, …, rK-2, rK-1, rK) with K different resolutions (e.g., 32x32, 64x64, …, 1024x1024, etc. ) may be generated based on the sample feature map. The K resolutions are predefined, respectively, and K is predefined.

[0054] In embodiments of the present disclosure, the following operations may be performed by the image encoder 310 iteratively for a given resolution (hk, wk) amongst the K resolutions to generate the K sample predicted token maps. First, the sample feature map 408 or a residual feature map obtained from a last round of iteration may be scaled to obtain a scaled feature map with the given resolution. If it is the first round of iteration, the original sample feature map 408 is scaled to obtain a scaled feature map with the given resolution, otherwise the residual feature map obtained from the last round is scaled to obtain a scaled feature map with the given resolution. The process of obtaining the scaled feature map may be represented as interpolate (f, hk, wk) , where f represents the sample feature map 408 or residual feature map, hk and wk represent the given resolution.

[0055] A sample predicted token map with the given resolution may be determined based on the scaled feature map using a quantizer based on a distance between the scaled feature map and a sample visual feature code corresponding to the sample predicted token map in the codebook. The process of determining the sample predicted token map using a quantizer may be represented as where denotes the quantizer and rk denotes the sample predicted token map. The quantization process may be represented as and the objective of the quantizer is to obtain a sample visual feature code (represented as zk) in the codebook which has the shortest distance to the scaled feature map (represented as f) .

[0056] Further, a residual feature map for use in a next round of iteration may be determined based on a difference between the sample feature map or the residual feature  map used in the current round of iteration and a scaled sample visual feature code with the target resolution. The scaled sample visual feature code is scaled from a sample visual feature code corresponding to the determined sample predicted token map with the given resolution. The sample visual feature code may be obtained by looking up the codebook which may be represented as zk= lookup (Z, rk) , where Z is the codebook containing V visual feature codes (or vectors) . Then, the obtained sample visual feature code may be scaled to the scaled sample visual feature code with the target resolution which may be represented as zk= interpolate (zk, hK, wK) , where hK and wK represent the target resolution. After obtaining the scaled sample visual feature code, the residual feature map for use in the next round may be determined. The determination process may be represented as f= f-φk (zk) , where f on the right side of the equation denotes the sample feature map or the residual feature map used in the current round of iteration, φk (·) denotes a convolution operation, and f on the left side of the equation denotes the residual feature map for use in the next round of iteration.

[0057] The above process may be summarized in FIG. 5A which illustrates an example algorithm 500A for multi-scale VQVAE encoding (i.e., in the image encoder 310) in accordance with some embodiments of the present disclosure.

[0058] In addition, the image decoder 330 may be trained jointly with the image encoder 310 by determining, from the codebook Z containing visual feature vectors to be learned, a K sample visual feature codes with the K resolutions corresponding to the K sample predicted token maps and determining a predicted feature map for the sample image based on the K sample visual feature codes. The process of determining the K sample visual feature codes with the K resolutions may be represented as zk=lookup (Z, rk) , where lookup (Z, rk) means taking the sample visual feature code (represented as zk) corresponding to sample predicted token map (represented as rk) in the codebook Z. After determining the K sample visual feature codes, these sample visual feature codes may be scaled to the target resolution. The scaling process may be represented as zk=interpolate (zk, hK, wK) , where hK and wK represent the target resolution. After scaling, the predicted feature map may be determined by iteratively aggregating the scaled sample visual feature codes which have undergone convolution operation. The process of determining the predicted feature map may be represented as where φk (·) denotes the convolution operation and denotes the predicted feature map whose  initial value may be 0.

[0059] In addition, the image decoder 330 may be trained jointly with the image encoder 310 by generating, using the image decoder 330, a reconstructed image for the sample image from the predicted feature map. At the decoding phase 414, the image decoder 330 may generate the target image 402 (also referred to as the reconstructed image) . The reconstructed image generation process may be represented as where represents the image decoder,  represents the predicted feature map and represents the reconstructed image.

[0060] The above process may be summarized in FIG. 5B which illustrates an example algorithm 500B for multi-scale VQVAE reconstruction (i.e., in the image decoder 330) in accordance with some embodiments of the present disclosure.

[0061] The image decoder 330 may further be trained jointly with the image encoder 310 by training the image decoder 330 and the image encoder 310 at least based on a second loss function of an image loss between the reconstructed image and the sample image and a feature loss between the sample feature map and the predicted feature map. The objective of the training process is to minimize the second loss function. The second loss function may be represented as where represents the image loss between the reconstructed image and the sample image and represents the feature loss between the sample feature map and the predicted feature map.

[0062] Embodiments of the present disclosure reconceptualize the autoregressive modeling on images by shifting from “next token prediction” to “next-scale prediction” strategy. Here, the autoregressive unit is an entire token map, rather than a single token. A feature map into K multi-scale token maps (r1, r2, …, rK) , each at an increasingly higher resolution hk×wk, culminating in rK matches the original feature map’s resolution h×w. The autoregressive likelihood is formulated as:

[0063] where each autoregressive unit rk∈ [V] h×w is the token map at scale k, and the sequence (r1, r2, …, rk-1) serves as the “prefix” for rk. During the k-th autoregressive step, all  distributions over the hk×wk tokens in rk are inter-dependent and will be generated in parallel, conditioned on rk’s prefix and associated k-th position embedding map.

[0064] In embodiments of the present disclosure, a K predicted token maps are generated using the token prediction model 345. To perform visual generation, a start token or condition information 340 may be input to the token prediction model 345 to generate a K predicted token maps 350 (represented as r1, …, rK-2, rK-1, rK) for K resolutions (where K is larger than one) . The condition information 340 may be provided by a user which may indicate any conditions for the visual generation. For example, the condition information 340 may indicate an image category or an object category in the image to be generated. If no condition is specified by the user, then a start token is provided as an input to the token prediction model 345.

[0065] Then, a lookup unit 355 may determine K visual feature codes 360 corresponding to the K predicted token maps 350. The K visual feature codes 360 may be used to generate a reconstructed feature map as discussed above, which is then input to the image decoder 330 for generate a reconstructed image as the target image. Then, the image decoder 330 to generate a reconstructed image 335 based on the reconstructed feature map 325. In some embodiments, the token prediction model 345 may be constructed based on a transformer, e.g., a VAR transformer, or may be constructed based on any other content generative model structure.

[0066] In some embodiments, the token prediction model 345 is trained by a first loss function based on respective likelihoods or a cross-entropy loss between a K sample predicted token maps generated by the token prediction model and a K ground-truth token maps for a sample image. FIG. 4B illustrates a schematic diagram 400B of training the token prediction model 345 (sometimes also referred to as VAR transformer) on tokens in accordance with some embodiments of the present disclosure. As illustrated, the ground-truth token maps are generated from the sample image using an image encoder. The token prediction model may be trained by maximizing the likelihood or minimizing the cross-entropy loss in Eq. (6) .

[0067] In some embodiments, the image encoder 310 may be configured to encode a sample image to K multi-scale discrete token maps R= (r1, r2, …, rK) which can be used as ground-truth learning of the token prediction model 345 in Eq. (6) .

[0068] After training the image encoder 310, image decoder 330 and token prediction model 345, the image decoder 330 together with the token prediction model 345 may be used to generate a target image. FIG. 5C illustrates an example of the visual generation model 105 (also referred to as a VAR model) which is constructed based on the trained token prediction model 345 and the trained image decoder 330.

[0069] The visual generation may be triggered by a user. As shown, K predicted token maps for K resolutions are generated respectively based on at least one of a start token or condition information 502. The condition information 502 may be specified by the user for the target image 114 to be generated.

[0070] In embodiments of the present disclosure, the K predicted token maps may be generated sequentially in an ascending order of the K resolutions, e.g., from the lowest resolution to the highest resolution. In an example, the K resolutions are represented as hk×wk (where k=1, 2, …, K) , where hk represents height and wk represents width.

[0071] In embodiments of the present disclosure, a reference token map may be generated by the token prediction model 345 based on the at least one of the start token or the condition information. The process of generating the reference token map may be represented as p (r0) = δ ( [S] ) , where [S] represents a start token or condition information which may be input by a user, r0 represents the reference token map and p (r0) represents probability of the reference token map.

[0072] After generating the reference token map, a first predicted token map r1 with a lowest resolution may be generated based on the reference token map r0. A second predicted token map with a second higher resolution may be generated based on the reference token map and at least one predicted token map with at least one resolution lower than the second resolution. That is, each predicted token map is generated conditioned on its prefix predicted token map. The process of generating the first predicted token map or the second predicted token map may be presented by Eq. (6) . Because the sequence (r1, r2, …, rk-1) serves as the “prefix” for rk, for the first predicted token map (i.e., r1) , it may be generated based on the reference token map (i.e., r0) . For the second predicted token map (e.g., r2 ) , it may be generated based on the reference token map (i.e., r0) and at least one predicted token map with at least one resolution lower than the second resolution (e.g., r1) . As a result, the K predicted token maps (e.g., r1, …, rK-2, rK-1, rK) may be  generated.

[0073] In embodiments of the present disclosure, a resolution amongst of the K resolutions may be an integral multiple of a further resolution amongst of the K resolutions. In an example, a further resolution may be 16x16 and a resolution amongst of the K resolutions may be 256x256 (i.e., 16 times of the further resolution) . Alternatively, or in addition, one of the K resolutions is equal to the target resolution. In an example, if the target resolution may be 1024x1024, then the K resolutions may include 32x32, 64x64, 256x256, 1024x1024 (i.e., the one being equal to the target resolution) , ... etc.

[0074] After generating the K predicted token maps, a K visual feature codes with the K resolutions corresponding to the K predicted token maps are determined from a codebook containing visual feature vectors. The visual feature code comprises corresponding visual feature information. The process of degerming the visual feature codes from the codebook may be represented as zk=lookup (Z, rk) , where visual feature codes (represented as zk) corresponding to the predicted token maps (represented as rk) are looked up in the codebook (represented as Z) .

[0075] Then, the K visual feature codes with the K resolutions are scaled to a K scaled visual feature codes with a target resolution, respectively. The scaling process may be represented as zk=interpolate (zk, hK, wK) , where hK and wK represent the target resolution. The dimension of zk may be hK×wK×C, where C is the number of channels. After scaling, a target feature map with the target resolution is generated by aggregating the K scaled visual feature codes.

[0076] In embodiments of the present disclosure, a K convolutional operations on the K scaled visual feature codes may be applied respectively, to obtain a K convolution results and the K convolution results may be aggregated to obtain the target feature map. The process of obtaining the target feature map may be represented as where φk (·) denotes the convolution operation, zk denotes the scaled visual feature code and denotes the target feature map whose initial value may be 0. In this way, by using K extra convolution layers the information loss in upscaling zk to hK×wK may be addressed.

[0077] After generating the target feature map, the target image is generated from the target feature map. The target image is generated using the image decoder from the target  feature map which may be represented as where represents the image decoder 330, represents the target feature map 404 and represents the target image 402.

[0078] According to embodiments of the present disclosure, the proposed solution addresses the previously mentioned three issues in autoregressive modeling. Firstly, the mathematical premise is satisfied if each rk is constrained to depend only on its prefix, that is, the process of getting rk is solely related to (r1, r2, …, rk-1) . This constraint is acceptable as it aligns with the natural, coarse-to-fine progression characteristics like human visual perception and artistic drawing. Secondly, the spatial locality is preserved as there is no flattening operation in VAR, and tokens in each rk are fully correlated. The multi-scale design additionally reinforces the spatial structure. Further, the complexity for generating an image with n×n latent is significantly reduced to This efficiency gain arises from the parallel token generation in each rk.

[0079] According to embodiments of the present disclosure, the model for visual generation complies with scaling laws. FIGS. 6A-6B illustrates diagrams of the correlation between test loss and model parameters in accordance with some embodiments of the present disclosure. As illustrated, the test loss decreases with the model parameters increase and thus there is a clear power-law scaling trend for test loss. FIGS. 6C-6D illustrates diagrams of the correlation between token error rate and model parameters in accordance with some embodiments of the present disclosure. As illustrated, the token error rate decreases with the model parameters increase and thus there is a clear power-law scaling trend for test loss or token error rate. These results verify the strong scalability of VAR, by which scaling up VAR transformers can continuously improve the test performance of the model.

[0080] FIG. 7 illustrates a flowchart of a process 700 for visual generation in accordance with some embodiments of the present disclosure. The process 700 may be implemented at the computer system 110 of FIG. 1.

[0081] At block 710, the computer system 110 generates, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively.

[0082] At block 720, the computer system 110 determines, from a codebook containing  visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information.

[0083] At block 730, the computer system 110 scales the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively.

[0084] At block 740, the computer system 110 generates a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes.

[0085] At block 750, the computer system 110 generates a target image from the target feature map.

[0086] In some embodiments, generating the plurality of predicted token maps with the plurality of resolutions comprises: generating the plurality of predicted token maps sequentially in an ascending order of the plurality of resolutions.

[0087] In some embodiments, generating the plurality of predicted token maps sequentially in the ascending order of the plurality of resolution comprises: generating a reference token map based on the at least one of the start token or the condition information; generating a first predicted token map with a lowest resolution based on the reference token map; and generating a second predicted token map with a second resolution based on the reference token map and at least one predicted token map with at least one resolution lower than the second resolution.

[0088] In some embodiments, the plurality of predicted token maps are generated using a token prediction model and the token prediction model being trained by a first loss function based on respective likelihoods or a cross-entropy loss between a plurality of sample predicted token maps generated by the token prediction model and a plurality of ground-truth token maps for a sample image, the ground-truth token maps being generated from the sample image using an image encoder.

[0089] In some embodiments, generating the target feature map with the target resolution comprises: applying a plurality of convolutional operations on the plurality of scaled visual feature codes, respectively, to obtain a plurality of convolution results; and aggregating the plurality of convolution results to obtain the target feature map.

[0090] In some embodiments, the target image is generated from the target feature map using an image decoder and the image decoder is trained jointly with an image encoder by the following: for a sample image, extracting, using the image encoder, a sample feature map with the target resolution from the sample image; generating, based on the sample feature map, a plurality of sample predicted token maps with the plurality of resolutions; determining, from the codebook containing visual feature vectors to be learned, a plurality of sample visual feature codes with the plurality of resolutions corresponding to the plurality of sample predicted token maps; determining a predicted feature map for the sample image based on the plurality of sample visual feature codes; generating, using the image decoder, a reconstructed image for the sample image from the predicted feature map; and training the image decoder and the image encoder at least based on a second loss function of an image loss between the reconstructed image and the sample image and a feature loss between the sample feature map and the predicted feature map.

[0091] In some embodiments, generating, based on the sample feature map, the plurality of sample predicted token maps with the plurality of resolutions comprises: performing the following iteratively for a given resolution amongst the plurality of resolutions, scaling the sample feature map or a residual feature map obtained from a last round of iteration to obtain a scaled feature map with the given resolution, determining a sample predicted token map with the given resolution based on the scaled feature map using a quantizer based on a distance between the scaled feature map and a sample visual feature code corresponding to the sample predicted token map in the codebook, and determining a residual feature map for use in a next round of iteration based on a difference between the sample feature map or the residual feature map used in the current round of iteration and a scaled sample visual feature code with the target resolution, wherein the scaled sample visual feature code is scaled from a sample visual feature code corresponding to the determined sample predicted token map with the given resolution.

[0092] In some embodiments, a resolution amongst of the plurality of resolutions is an integral multiple of a further resolution amongst of the plurality of resolutions, and / or one of the plurality of resolutions is equal to the target resolution.

[0093] In some embodiments, the plurality of resolutions are predefined, respectively, and the number of the plurality of resolutions is predefined.

[0094] FIG. 8 shows a block diagram of an apparatus 800 for visual generation in accordance with some embodiments of the present disclosure. The apparatus 800 may be implemented, for example, or included at the computer system 110 of FIG. 1. Various modules / components in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.

[0095] As shown, the apparatus 800 includes a predicted token map generating module 810 configured to generate, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively.

[0096] The apparatus 800 includes a visual feature code determining module 820 configured to determine, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information.

[0097] The apparatus 800 further includes a scaling module 830 configured to scale the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively.

[0098] The apparatus 800 further includes a target feature map generating module 840 configured to generate a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes.

[0099] The apparatus 800 further includes a target image generating module 850 configured to generate a target image from the target feature map.

[0100] The apparatus 800 may further comprises corresponding modules that are configured to perform the operations of the process700 and other embodiments as described herein.

[0101] FIG. 9 illustrates a block diagram of an electronic device 900 in which one or more embodiments of the present disclosure can be implemented. It would be appreciated that the electronic device 900 shown in FIG. 9 is only an example and should not constitute any restriction on the function and scope of the embodiments described herein. The electronic device 900 may be used, for example, to implement the computer system 110 of FIG. 1. The electronic device 900 may also be used to implement the apparatus 800 of FIG.  8.

[0102] As shown in FIG. 9, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to, one or more processors or processing units 910, a memory 920, a storage device 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. The processing unit 910 may be an actual or virtual processor and can execute various processes according to the programs stored in the memory 920. In a multiprocessor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 900.

[0103] The electronic device 900 typically includes a variety of computer storage medium. Such medium may be any available medium that is accessible to the electronic device 900, including but not limited to volatile and non-volatile medium, removable and non-removable medium. The memory 920 may be volatile memory (for example, a register, cache, a random access memory (RAM) ) , a non-volatile memory (for example, a read-only memory (ROM) , an electrically erasable programmable read-only memory (EEPROM) , a flash memory) or any combination thereof. The storage device 930 may be any removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data (such as training data for training) and can be accessed within the electronic device 900.

[0104] The electronic device 900 may further include additional removable / non-removable, volatile / non-volatile, transitory / non-transitory storage medium. Although not shown in FIG. 9, a disk driver for reading from or writing to a removable, non-volatile disk (such as a "floppy disk" ) , and an optical disk driver for reading from or writing to a removable, non-volatile optical disk can be provided. In these cases, each driver may be connected to the bus (not shown) by one or more data medium interfaces. The memory 920 may include a computer program product 925, which has one or more program modules configured to perform various methods or acts of various embodiments of the present disclosure.

[0105] The communication unit 940 communicates with a further computing device through the communication medium. In addition, functions of components in the electronic device 900 may be implemented by a single computing cluster or multiple computing  machines, which can communicate through a communication connection. Therefore, the electronic device 900 may be operated in a networking environment using a logical connection with one or more other servers, a network personal computer (PC) , or another network node.

[0106] The input device 950 may be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 960 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 900 may also communicate with one or more external devices (not shown) through the communication unit 940 as required. The external device, such as a storage device, a display device, etc., communicate with one or more devices that enable users to interact with the electronic device 900, or communicate with any device (for example, a network card, a modem, etc. ) that makes the electronic device 900 communicate with one or more other computing devices. Such communication may be executed via an input / output (I / O) interface (not shown) .

[0107] According to example implementation of the present disclosure, a computer-readable storage medium is provided, on which a computer-executable instruction or computer program is stored, where the computer-executable instructions or the computer program is executed by the processor to implement the method described above. According to example implementation of the present disclosure, a computer program product is also provided. The computer program product is physically stored on a non-transient computer-readable medium and includes computer-executable instructions, which are executed by the processor to implement the method described above.

[0108] Various aspects of the present disclosure are described herein with reference to the flow chart and / or the block diagram of the method, the device, the equipment and the computer program product implemented in accordance with the present disclosure. It would be appreciated that each block of the flowchart and / or the block diagram and the combination of each block in the flowchart and / or the block diagram may be implemented by computer-readable program instructions.

[0109] These computer-readable program instructions may be provided to the processing units of general-purpose computers, special computers or other programmable data processing devices to produce a machine that generates a device to implement the functions / acts specified in one or more blocks in the flow chart and / or the block diagram  when these instructions are executed through the processing units of the computer or other programmable data processing devices. These computer-readable program instructions may also be stored in a computer-readable storage medium. These instructions enable a computer, a programmable data processing device and / or other devices to work in a specific way. Therefore, the computer-readable medium containing the instructions includes a product, which includes instructions to implement various aspects of the functions / acts specified in one or more blocks in the flowchart and / or the block diagram.

[0110] The computer-readable program instructions may be loaded onto a computer, other programmable data processing apparatus, or other devices, so that a series of operational steps can be performed on a computer, other programmable data processing apparatus, or other devices, to generate a computer-implemented process, such that the instructions which execute on a computer, other programmable data processing apparatus, or other devices implement the functions / acts specified in one or more blocks in the flowchart and / or the block diagram.

[0111] The flowchart and the block diagram in the drawings show the possible architecture, functions and operations of the system, the method and the computer program product implemented in accordance with the present disclosure. In this regard, each block in the flowchart or the block diagram may represent a part of a module, a program segment or instructions, which contains one or more executable instructions for implementing the specified logic function. In some alternative implementations, the functions marked in the block may also occur in a different order from those marked in the drawings. For example, two consecutive blocks may actually be executed in parallel, and sometimes can also be executed in a reverse order, depending on the function involved. It should also be noted that each block in the block diagram and / or the flowchart, and combinations of blocks in the block diagram and / or the flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by the combination of dedicated hardware and computer instructions.

[0112] Each implementation of the present disclosure has been described above. The above description is example, not exhaustive, and is not limited to the disclosed implementations. Without departing from the scope and spirit of the described implementations, many modifications and changes are obvious to ordinary skill in the art. The selection of terms used in this article aims to best explain the principles, practical  application or improvement of technology in the market of each implementation, or to enable other ordinary skill in the art to understand the various embodiments disclosed herein.

Claims

1.A method for visual generation, comprising:generating, based on at least one of a start token or condition information, a plurality of predicted token maps with a plurality of resolutions, respectively;determining, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information;scaling the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively;generating a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes; andgenerating a target image from the target feature map.2.The method of claim 1, wherein generating the plurality of predicted token maps with the plurality of resolutions comprises:generating the plurality of predicted token maps sequentially in an ascending order of the plurality of resolutions.3.The method of claim 2, wherein generating the plurality of predicted token maps sequentially in the ascending order of the plurality of resolution comprises:generating a reference token map based on the at least one of the start token or the condition information;generating a first predicted token map with a lowest resolution based on the reference token map; andgenerating a second predicted token map with a second resolution based on the reference token map and at least one predicted token map with at least one resolution lower than the second resolution.4.The method of claim 1, wherein the plurality of predicted token maps are generated using a token prediction model, andwherein the token prediction model being trained by a first loss function based on respective likelihoods or a cross-entropy loss between a plurality of sample predicted token maps generated by the token prediction model and a plurality of ground-truth token maps for a sample image, the ground-truth token maps being generated from the sample image using an image encoder.5.The method of claim 1, wherein generating the target feature map with the target resolution comprises:applying a plurality of convolutional operations on the plurality of scaled visual feature codes, respectively, to obtain a plurality of convolution results; andaggregating the plurality of convolution results to obtain the target feature map.6.The method of claim 1, wherein the target image is generated from the target feature map using an image decoder, and wherein the image decoder is trained jointly with an image encoder by the following:for a sample image, extracting, using the image encoder, a sample feature map with the target resolution from the sample image;generating, based on the sample feature map, a plurality of sample predicted token maps with the plurality of resolutions;determining, from the codebook containing visual feature vectors to be learned, a plurality of sample visual feature codes with the plurality of resolutions corresponding to the plurality of sample predicted token maps;determining a predicted feature map for the sample image based on the plurality of sample visual feature codes;generating, using the image decoder, a reconstructed image for the sample image from the predicted feature map; andtraining the image decoder and the image encoder at least based on a second loss function of an image loss between the reconstructed image and the sample image and a feature loss between the sample feature map and the predicted feature map.7.The method of claim 6, wherein generating, based on the sample feature map, the plurality of sample predicted token maps with the plurality of resolutions comprises:performing the following iteratively for a given resolution amongst the plurality of resolutions,scaling the sample feature map or a residual feature map obtained from a last round of iteration to obtain a scaled feature map with the given resolution,determining a sample predicted token map with the given resolution based on the scaled feature map using a quantizer based on a distance between the scaled feature map and a sample visual feature code corresponding to the sample predicted token map in the codebook, anddetermining a residual feature map for use in a next round of iteration based on a difference between the sample feature map or the residual feature map used in the current round of iteration and a scaled sample visual feature code with the target resolution,wherein the scaled sample visual feature code is scaled from a sample visual feature code corresponding to the determined sample predicted token map with the given resolution.8.The method of claim 1, wherein a resolution amongst of the plurality of resolutions is an integral multiple of a further resolution amongst of the plurality of resolutions, and / orwherein one of the plurality of resolutions is equal to the target resolution.9.The method of claim 1, wherein the plurality of resolutions are predefined, respectively, and the number of the plurality of resolutions is predefined.10.An electronic device, comprising:at least one processing unit; andat least one memory coupled to the at least one processing unit and storing instructions executable by the at least one processing unit, the instructions, upon execution by the at least one processing unit, causing the electronic device to perform:generating, based on at least one of a start token or condition information, a plurality of predicted token maps for a plurality of resolutions, respectively;determining, from a codebook containing visual feature vectors, a plurality of visual feature codes with the plurality of resolutions corresponding to the plurality of predicted token maps, respectively, a visual feature code comprising corresponding visual feature information;scaling the plurality of visual feature codes with the plurality of resolutions to a plurality of scaled visual feature codes with a target resolution, respectively;generating a target feature map with the target resolution by aggregating the plurality of scaled visual feature codes; andgenerating a target image from the target feature map.11.The electronic device of claim 10, wherein generating the plurality of predicted token maps with the plurality of resolutions comprises:generating the plurality of predicted token maps sequentially in an ascending order of the plurality of resolutions.12.The electronic device of claim 11, wherein generating the plurality of predicted token maps sequentially in the ascending order of the plurality of resolution comprises:generating a reference token map based on the at least one of the start token or the condition information;generating a first predicted token map with a lowest resolution based on the reference token map; andgenerating a second predicted token map with a second resolution based on the reference token map and at least one predicted token map with at least one resolution lower than the second resolution.13.The electronic device of claim 10, wherein the plurality of predicted token maps are generated using a token prediction model, andwherein the token prediction model being trained by a first loss function based on respective likelihoods or a cross-entropy loss between a plurality of sample predicted token maps generated by the token prediction model and a plurality of ground-truth token maps for a sample image, the ground-truth token maps being generated from the sample image using an image encoder.14.The electronic device of claim 10, wherein generating the target feature map with the target resolution comprises:applying a plurality of convolutional operations on the plurality of scaled visual feature codes, respectively, to obtain a plurality of convolution results; andaggregating the plurality of convolution results to obtain the target feature map.15.The electronic device of claim 10, wherein the target image is generated from the target feature map using an image decoder, and wherein the image decoder is trained jointly with an image encoder by the following:for a sample image, extracting, using the image encoder, a sample feature map with the target resolution from the sample image;generating, based on the sample feature map, a plurality of sample predicted token maps with the plurality of resolutions;determining, from the codebook containing visual feature vectors to be learned, a plurality of sample visual feature codes with the plurality of resolutions corresponding to the plurality of sample predicted token maps;determining a predicted feature map for the sample image based on the plurality of sample visual feature codes;generating, using the image decoder, a reconstructed image for the sample image from the predicted feature map; andtraining the image decoder and the image encoder at least based on a second loss function of an image loss between the reconstructed image and the sample image and a feature loss between the sample feature map and the predicted feature map.16.The electronic device of claim 15, wherein generating, based on the sample feature map, the plurality of sample predicted token maps with the plurality of resolutions comprises:performing the following iteratively for a given resolution amongst the plurality of resolutions,scaling the sample feature map or a residual feature map obtained from a last round of iteration to obtain a scaled feature map with the given resolution,determining a sample predicted token map with the given resolution based on the scaled feature map using a quantizer based on a distance between the scaled feature map and a sample visual feature code corresponding to the sample predicted token map in the codebook, anddetermining a residual feature map for use in a next round of iteration based on a difference between the sample feature map or the residual feature map used in the current round of iteration and a scaled sample visual feature code with the target resolution,wherein the scaled sample visual feature code is scaled from a sample visual feature code corresponding to the determined sample predicted token map with the given resolution.17.The electronic device of claim 10, wherein a resolution amongst of the plurality of resolutions is an integral multiple of a further resolution amongst of the plurality of resolutions, and / orwherein one of the plurality of resolutions is equal to the target resolution.18.The electronic device of claim 10, wherein the plurality of resolutions are predefined, respectively, and the number of the plurality of resolutions is predefined.19.A computer-readable storage medium, having a computer program stored thereon which, upon execution by an electronic device, causes the device to perform the method according to any of claims 1 to 9.20.A computer program product being tangibly stored on a computer-readable medium and comprising computer-executable instructions which, when executed by a device, cause the device to implement the method according to any of claims 1 to 9.

Citation Information

Patent Citations

  • Convolutional mask-based visual feature learning device, acquisition device and storage medium

    CN114998671A