A method, system and device for generating content-aware graphic layout based on sequence coding and image feature learning
Through the method of sequence coding and image feature learning, combined with the Transformer encoder and self-attention mechanism, the problem of insufficient flexibility of traditional graphic layout design is solved, and the generation of content-aware graphic layout that conforms to user sequence constraints is achieved, improving graphic layout generation. quality and adaptability.
Patent Information
- Application Number
- CN202411011464.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-05
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-26
Smart Images

Figure CN118537449B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer vision and graphics, and in particular to a method, system and device for generating content-aware graphic layout based on sequence coding and image feature learning. Background Art
[0002] Graphic layout generation is one of the important research directions in the field of computer vision and graphics, and is widely used in multimedia information generation fields such as poster automatic generation, magazine automatic generation, web design, etc. However, traditional graphic layout design is based on certain rules, lacks flexibility and cannot meet different application scenarios.
[0003] In recent years, deep learning technology has made significant breakthroughs in the field of computer vision. Convolutional neural networks (CNNs) are widely used to process image data, which can effectively capture the spatial feature information of images. On the other hand, the transformer module is a method based on the self-attention mechanism, which can focus on global feature information. However, for the same image, the display requirements of posters are often diverse. How to enable the model to learn image feature information and encode the sequence statements of user display requirements, and generate content-aware graphic layouts that meet user sequence constraints has become a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention aims to address the deficiencies in the prior art and provide a method, system and device for generating content-aware graphic layouts based on sequence coding and image feature learning. Feature extraction and learning of sequences and images are performed, and then global processing is performed to generate content-aware graphic layouts that meet sequence constraints.
[0005] The objective of the present invention is achieved through the following technical solutions: In a first aspect, the present invention provides a content-aware graphic layout generation method based on sequence coding and image feature learning, the method comprising the following steps:
[0006] (1) Sequence feature extraction: Obtain sample constrained sequence information, combine sequence vocabulary mapping, sine-cosine position encoding, transformer encoder and fully connected network to extract sequence features;
[0007] (2) Multi-scale image feature extraction: Extract features from the input image based on the multi-scale feature convolution layer, and fuse the features of the two highest semantic layers as the final image features;
[0008] (3) Global feature learning: The sequence features are connected with the image features and flattened into a one-dimensional vector. The language and visual representation of the sequence and image feature information are learned through the self-attention transformation module. The self-attention mechanism is used to establish the association of global context information to learn global features.
[0009] (4) Graphic layout generation: Perform dimension mapping and nonlinear transformation on the learned global sequence features and image features to generate graphic element category information and position information.
[0010] Furthermore, the preprocessing includes: randomly generating a corresponding sequence sentence for each sample as a sequence sample according to the labeled image and layout information.
[0011] Furthermore, the input image data is scaled and transformed, and each data sample corresponds to a sequence annotation and a layout annotation.
[0012] Furthermore, each image data is RGB three-channel, with a length and width of 750 and 513 pixels respectively.
[0013] Furthermore, the position coding in the sequence feature extraction module adopts sine-cosine position coding.
[0014] Furthermore, global feature learning is performed through a self-attention transformation module, which includes multiple transformer encoders, each of which includes a self-attention mechanism and a feedforward neural network. The self-attention mechanism can learn the correlation of global features and capture long-distance dependencies in sequence and image data.
[0015] Furthermore, the overall model is trained using sequence sentences, images, and annotation layout information, and the model parameters are iteratively adjusted through a stochastic gradient descent optimization algorithm to improve the accuracy and generalization ability of the model.
[0016] Furthermore, the specific process of graphic layout generation is as follows: a fully connected layer is added to the output of the transformer encoder of the self-attention transformation module, the learned global features are dimensionally mapped and nonlinearly transformed, and then the softmax classifier is used to determine the category of graphic elements, and the sigmoid function is used to predict the position information of graphic elements.
[0017] In a second aspect, the present invention also provides a content-aware graphic layout generation system based on sequence coding and image feature learning, the system comprising: a sequence feature extraction module, a multi-scale image feature extraction module, a feature global learning module and a graphic layout generation module;
[0018] The sequence feature extraction module is used to design a transformer encoder with sine-cosine position encoding to learn the encoding features of sequence sentences;
[0019] The multi-scale image feature extraction module is used to extract multi-scale feature information of the image and fuse the last two layers of features rich in high semantic information, wherein the low-resolution feature information is upsampled and fused and added to the high-resolution feature information to obtain the final image feature fusion information;
[0020] The feature global learning module is used to flatten the connected sequence features and image features into a one-dimensional vector, perform language and visual representation learning on the sequence features and image features through the self-attention transformation module, and use the self-attention mechanism to establish the association of global context information to learn global features; and add position encoding information to the embedded encoding result;
[0021] The graphic layout generation module is used to perform dimension mapping and nonlinear transformation on the learned global sequence features and image features, so as to generate a content-aware graphic layout that meets the sequence constraints.
[0022] In the third aspect, the present invention also provides a content-aware graphic layout generation device based on sequence coding and image feature learning, comprising a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it implements the content-aware graphic layout generation method based on sequence coding and image feature learning.
[0023] In a fourth aspect, the present invention further provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the content-aware graphic layout generation method based on sequence coding and image feature learning.
[0024] In a fifth aspect, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the content-aware graphic layout generation method based on sequence coding and image feature learning.
[0025] The beneficial effects of the present invention are:
[0026] 1. It integrates the advantages of sequence mapping and feature extraction network, multi-scale convolutional feature extraction network, and Transformer encoder, improves the representation and feature extraction capabilities of sequence and image data, effectively improves the training stability and convergence speed of the model, and establishes the fusion information of global features.
[0027] 2. By introducing the self-attention mechanism, global context information can be captured, and the extraction and fusion of sequence features and image features can be improved. The self-attention mechanism can learn the dependencies between sequence features and image features at different positions, and improve the quality of graph layout generation.
[0028] 3. First, use the sequence feature encoding network and multi-scale convolutional network to encode and extract features of the sequence and image, and then the transformer encoder and decoder establish a global relationship on the extracted features, so as to model and learn the relationship between sequence features and image features.
[0029] 4. After learning sequence information and image information through ensemble modeling, the model can complete the task of generating content-aware graphic layout that meets sequence constraints. By comprehensively utilizing the characteristics of the sequence feature extraction module, the multi-scale convolution feature fusion module, the transformer encoder and the decoder, the method of the present invention can extract and fuse rich sequence feature information and image feature information, improve the model training stability and convergence speed, establish a global information receptive field, and complete the generation of content-aware graphic layout that meets sequence constraints.
[0030] In summary, the present invention provides a content-aware graphic layout generation method and system based on sequence coding and image feature learning, which can be widely used in multimedia information generation fields such as auxiliary poster generation, magazine generation, and web design. This method can effectively meet the graphic layout generation task for different display requirements of the same image, and has high application prospects and commercial value. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A flowchart of a content-aware graphic layout generation method based on sequence coding and image feature learning provided by the present invention.
[0033] Figure 2 The overall structural diagram of the model of the present invention.
[0034] Figure 3 Schematic diagram of the transformer encoder of the present invention.
[0035] Figure 4 This is an example diagram of the model generation layout of the present invention when the sequence expresses different categories.
[0036] Figure 5 This is an example diagram of the model correction layout based on different sequence layouts of the present invention.
[0037] Figure 6 A structural diagram of a content-aware graphic layout generation device based on sequence coding and image feature learning provided by the present invention. DETAILED DESCRIPTION
[0038] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0039] like Figure 1 and Figure 2 As shown, the present invention provides a method for generating content-aware graphic layout based on sequence coding and image feature learning, which uses a sequence encoder to extract sequence features, uses a multi-scale convolution module to extract image features, and then connects the sequence features with the image features, introduces a transformer encoder and decoder to learn global feature information, improves the representation ability of sequence and image data, and realizes the generation of content-aware graphic layout that meets sequence constraints. The method of the present invention specifically includes the following five steps:
[0040] (1) For a given image and layout annotation, obtain the sequence of corresponding annotation samples as training sequence samples, and resize and color normalize each sample image. Before feeding into the neural network model, each image needs to be resized to a length and width of 750 and 513 pixels respectively.
[0041] The sequence statement for obtaining the corresponding labeled sample is as follows: The sequence is composed of the starting mark "\emph{ <sos>}", separator "|", termination mark "\emph{ <eos>}" and constraint conditions "\emph{constraint content}". The category strings in \emph{constraint content} include LOGO, text (text element), underlay (underlay element) and embellishment (decorative element). \emph{class} in \emph{class\_num} also includes these four groups, and \emph{num} is an integer between [1,10] (including 1 and 10), totaling ten groups, so \emph{class\_num} can combine a total of 40 different strings. The position relationship between elements includes five different strings: left, right, top, bottom and center. The horizontal axis, vertical axis, width and length are integers between [-18,368] (including -18,368), totaling 387 different strings. In summary, there are 439 different strings in the mapping vocabulary used for word embedding.
[0042] For the task of constraining the category of graphic elements in the sequence layout, the sequence constraint content is generated according to the category of graphic elements contained in the annotation layout corresponding to each product image. The sequence constraint is in the form of a natural language sequence to guide the model to generate various content-aware graphic layouts that meet the sequence constraints, including the category constraints of graphic elements in the layout, the position relationship constraints between graphic elements, and the position adjustment based on the given layout to generate a more beautiful graphic layout. For example, the annotation layout corresponding to a product image contains two categories of graphic elements: text and background. The sequence information generated for this sample is " <sos>| text | underlay | <eos>”.
[0043] For the task of constraining the position relationship of graphic elements in sequence pair layout, the graphic elements in each sample are first labeled in sequence. Each sequence contains the category of the element and its unique identity within the category, in the form of \emph{class\_num}. Then, based on the position information of each graphic element, sequence information describing the position relationship between two elements is generated, including five relationships: left, right, top, bottom, and center.
[0044] Specifically, taking the elements \emph{class\_1} and \emph{class\_2} as examples:
[0045] When the lower right corner horizontal coordinate of \emph{class\_1} is smaller than the central horizontal coordinate of \emph{class\_2}, the sequence form is expressed as "\emph{class\_1} \emph{left} \emph{class\_2}";
[0046] When the upper left corner horizontal coordinate of \emph{class\_1} is greater than the central horizontal coordinate of \emph{class\_2}, the sequence form is expressed as "\emph{class\_1} \emph{right} \emph{class\_2}";
[0047] When the lower right ordinate of \emph{class\_1} is smaller than the center ordinate of \emph{class\_2}, the sequence is expressed as "\emph{class\_1} \emph{top} \emph{class\_2}";
[0048] When the upper left corner ordinate of \emph{class\_1} is greater than the center ordinate of \emph{class\_2}, the sequence is expressed as "\emph{class\_1} \emph{bottom} \emph{class\_2}";
[0049] When the upper left corner horizontal coordinate and vertical coordinate of \emph{class\_1} are greater than the upper left corner horizontal coordinate and vertical coordinate of \emph{class\_2}, respectively, and the lower right corner horizontal coordinate and vertical coordinate of \emph{class\_1} are less than the lower right corner horizontal coordinate and vertical coordinate of \emph{class\_2}, respectively, the sequence form is expressed as "\emph{class\_1} \emph{center} \emph{class\_2}".
[0050] In order to balance the model's modeling learning of image content and sequence constraints, when constructing this part of the constrained sequence dataset for model training, 50% of all sequences containing the four position relationships of left, right, top, and bottom are randomly removed, and 50% of the information is retained; 25% of all sequences containing the center position relationship are randomly removed, and 75% of the information is retained. The reason for the high retention of the center position relationship sequence is that the model is expected to better learn the combination relationship between the background and text elements. The design advantage of random removal is that it enables the model to generate diverse and reasonable content-aware graphic layouts based on different image contents while satisfying the sequence constraints. For example, when the sequence constraint is "\emph{class\_1} \emph{left} \emph{class\_2}", the model can flexibly decide whether \emph{class\_1} is above or below \emph{class\_2} according to the content of the specific product image. This method enhances the adaptability and flexibility of the model, so that the generated layout not only meets the sequence constraints, but also better meets the actual product image display needs.
[0051] For the task of optimizing and trimming the layout information in a given sequence, the information of the annotated graphic elements in each sample is first transformed into a sequence, including the category information and position coordinate information of each element. It should be noted that although the original width and height of the images in the dataset CGL-Dataset are 513 and 750 pixels respectively, the model will compress the image width and height to 240 and 350 pixels during preprocessing, that is, proportionally reduced to 0.467 times the original. Therefore, the mapping range of the position coordinates is based on \emph{0} to \emph{350}, and the floating range does not exceed 5\% based on the maximum value of 350, that is, the characters included in the mapping table are extended to \emph{-18} to \emph{368}.
[0052] The up and down fluctuations of the position information are mainly used to randomly perturb the original standard layout to generate unreasonable graphic layout samples as the input of the model. The task of the model is to optimize and trim the perturbed element position information and use the original annotated standard layout information for supervised training.
[0053] A specific example is as follows: a layout annotation information is "text 274 647 227 26, text 267 686 17119, underlay 276 649 308 36", where the four numbers of each element represent the horizontal coordinate, vertical coordinate, width and height of the element. First, this information is converted into a sequence, where the category information is converted into a sequence containing the element category and its unique identity within the category, and the coordinate information is all reduced to 0.467 times the original. The resulting serialized expression is " <sos>| text\_1 128 302 106 12 | text\_2 125 320 80 9 |underlay\_1 129 303 144 17 | <eos>". Then, the position coordinate information is randomly disturbed, and the final sequence form can be expressed as" <sos>| text\_1 118 312 108 18 | text\_2 127 329 88 -3 |underlay\_1 118 315 156 8 | <eos>Compared with the situation before the disturbance where "text\_1 128 302 106 12" was located in the middle of "underlay\_1 129 303 144 17", the combination relationship between "text\_1 118 312 108 18" and "underlay\_1 118 315 156 8" has become unsatisfactory after the disturbance, and the floating of the element box may also block the main area of the product. Therefore, the task of the model is to optimize and adjust the position information of all elements on the basis of retaining the category and quantity of elements, so that they form a graphic layout that is coordinated with the image content and beautiful.
[0054] (2) Map the sequence sentence into an encodable feature vector, then introduce sine and cosine to encode its position, and add the position encoding information to the mapped feature vector. Then input the feature vector into the transformer encoder, use the self-attention mechanism to model and learn the sequence features globally, and finally expand the extracted sequence features to keep the same size as the image features for subsequent connection.
[0055] (3) The image is input into the multi-scale convolutional layer to extract multi-scale image features. Each layer outputs a feature map. The feature map output by the first layer has the lowest semantics and the highest resolution. The feature map output by the last layer has the highest semantics and the lowest resolution. The image features of the two highest semantic layers are retained, and the low-resolution and high-semantic features are upsampled to the same size as the second highest semantic features. The two are connected and fused as the final extracted image fusion features, which are then connected with the sequence features as the input of the subsequent transformer encoder-decoder.
[0056] (4) The concatenated sequence features and image features are embedded and encoded, flattened into a one-dimensional vector, and sent to the Transformer encoder and decoder of the self-attention transformation module to simultaneously learn language and visual representations, and use the self-attention mechanism to establish the association of global context information to learn global sequence and image features. The present invention also needs to add a learnable parameter position encoding, and the dimension of the position encoding vector is the same as the dimension of the embedded encoding feature information, both of which are 512. It should be noted that the position encoding operation is addition, not concatenation, that is, the position encoding vector information is added on the basis of the original encoding feature vector result.
[0057] like Figure 3 As shown in the figure, the transformer encoder in each self-attention transformation module includes a self-attention mechanism and a feedforward neural network. The self-attention mechanism can learn the correlation of global features and capture the long-distance dependencies in sequence and image feature data. After the above summed embedded coding information is sent to the normalization layer, it is input into the multi-head self-attention layer and mapped to q, k, v. The feature q of the first block in the transformer will be multiplied by the k and v mapped in other areas to link the information of the first block with the information of other blocks to achieve the mutual correlation between global features. The multi-head self-attention layer has 16 heads, and the dimensions of q, k, and v are 50×(512 / 16), that is, 50×32, with a total of 16 groups of q, k, and v. Finally, the outputs of the 16 groups of q, k, and v are concatenated, and the output dimension is 50×512. Then, after another normalization layer, the dimension remains 50×512. The dimension is first enlarged to 50×1024 and then reduced to 50×512 through the multi-layer perceptron MLP. The dimensions after a block are still the same as the input, 50×512, so multiple blocks can be stacked.
[0058] Two fully connected layers are added to the output of the last transformer decoder of the self-attention transformation module. The language and visual representation vectors of the sequence features and image features learned by the transformer encoder are input to the fully connected layer. The learned global features are dimensionally mapped and nonlinearly transformed. The learned features are classified into graphic element categories through the softmax classifier. The position of each graphic element is predicted through the sigmoid function. The number of categories of these elements and the corresponding positions are combined into a graphic layout. During the training process of the entire model, the overall model is trained using the labeled image-sequence-layout information, and the model parameters are iteratively adjusted through the stochastic gradient descent optimization algorithm to improve the accuracy and generalization ability of the model.
[0059] like Figure 4 As shown in the figure, from left to right, the sequence constraints are: generating a graphic layout with text elements, generating a graphic layout with text and background elements, generating a graphic layout with text, background and LOGO, and generating a graphic layout with text, background, LOGO and decorative elements. It can be seen that for the same base image, different sequence constraints can generate different graphic layouts, that is, content-aware graphic layouts that meet different sequence constraints can be generated.
[0060] For example Figure 5 As shown, it contains 8 small pictures, from left to right, in groups of two. The left picture is the layout information of the sequence constraints, and the right picture is the modified graphic layout result based on the base picture and sequence constraints. It can be seen that for the same base picture, given different sequence information, these information have problems such as overlap or misalignment, but the model can correct different sequence information based on the same base picture. The modified graphic layout can avoid overlapping problems and also show better results in terms of alignment.
[0061] On the other hand, the present invention also provides a content-aware graphic layout generation system based on sequence coding and image feature learning, the system comprising: a sequence feature extraction module, an image feature extraction module, a feature global learning module and a graphic layout generation module; the specific implementation process of each module refers to the embodiment steps of a content-aware graphic layout generation method based on sequence coding and image feature learning provided above in the present invention.
[0062] The sequence feature extraction module is used to design a mapping transformation for the sequence, encode the sequence feature vector, and extract its sequence features;
[0063] The image feature extraction module is used to design a multi-scale convolution layer to extract multi-scale image features, and fuse the two layers of features with the highest semantic information to obtain image fusion features;
[0064] The feature global learning module is used to flatten the sequence features and image fusion features into a one-dimensional vector, perform global language and visual representation learning on the sequence and image feature information through the Transformer encoder and decoder, and use the self-attention mechanism to establish the association of global context information to learn the global feature information; and add position encoding information to the embedded encoding result;
[0065] The graphic layout generation module is used to perform dimension mapping and nonlinear transformation on the learned global sequence and image features to output graphic element category information and position information.
[0066] Corresponding to the aforementioned embodiment of a content-aware graphic layout generation method based on sequence coding and image feature learning, the present invention also provides an embodiment of a content-aware graphic layout generation device based on sequence coding and image feature learning.
[0067] See also Figure 6 An embodiment of the present invention provides a content-aware graphic layout generation device based on sequence coding and image feature learning, including a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it is used to implement a content-aware graphic layout generation method based on sequence coding and image feature learning in the above embodiment.
[0068] An embodiment of a content-aware graphic layout generation device based on sequence coding and image feature learning provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From a hardware perspective, if Figure 6 As shown, it is a hardware structure diagram of any device with data processing capability where a content-aware graphic layout generation device based on sequence coding and image feature learning provided by the present invention is located. Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0069] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0070] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0071] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a content-aware graphic layout generation method based on sequence coding and image feature learning in the above embodiment is implemented.
[0072] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0073] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.< / eos> < / sos> < / eos> < / sos> < / eos> < / sos> < / eos> < / sos>
Claims
1. A content-aware graphic layout generation method based on sequence coding and image feature learning, characterized in that: The method comprises the following steps: (1) Obtain the sequence sentences of the image layout annotation text and map them into feature vectors containing position encodings. Specifically, obtain the sample constrained sequence information, combine the sequence vocabulary mapping, sine-cosine position encoding, transformer encoder and fully connected network to extract sequence features, and use the self-attention mechanism to globally model and learn the sequence features; (2) Extract features from the input image based on the multi-scale feature convolution layer to obtain the image features of the top two semantic layers of the image. Upsample and fuse the features of the top two semantic layers and connect them with the sequence features as the final image features. (3) Expand the connected sequence features and image features into a one-dimensional vector, and learn the language and visual representation of the sequence and image feature information through self-attention transformation to obtain the global features of the global sequence sentence constraint information and image space information; (4) Predicting the categories and positions of graphic elements in the graphic layout based on the global features. Specifically, performing dimension mapping and nonlinear transformation on the learned global sequence features and image features to generate graphic element category information and position information. The number of element categories and corresponding positions are combined into a graphic layout.
2. The content-aware graphic layout generation method based on sequence coding and image feature learning according to claim 1, characterized in that: Randomly generate corresponding sequence sentences according to the image and graphic layout annotation information, and resize and color normalize the input image.
3. The method for generating content-aware graphic layout based on sequence coding and image feature learning according to claim 1, characterized in that: In step (2), multi-scale image features are extracted based on the multi-scale convolutional layer, the two highest semantic feature maps are retained for upsampling fusion, and the sequence features are expanded into feature vectors of the same size as the image features, which are then connected to the fused image features.
4. The method for generating content-aware graphic layout based on sequence coding and image feature learning according to claim 1, characterized in that: In step (3), the self-attention transformation includes multiple transformer encoders and decoders. Each transformer encoder includes a self-attention mechanism and a feedforward neural network. The self-attention mechanism learns the correlation of global features and captures the long-distance dependencies in spatiotemporal sequence data. The self-attention mechanism is used to establish the association of global context information to learn the global sequence sentence constraint information and the spatial information of the input image.
5. The method for generating content-aware graphic layout based on sequence coding and image feature learning according to claim 4, characterized in that: In the transformer encoder, the position encoding vector information is added based on the embedded encoding feature vector result, and the dimension of the position encoding vector is the same as that of the embedded encoding feature vector.
6. A content-aware graphic layout generation system based on sequence coding and image feature learning for implementing the method according to any one of claims 1 to 5, characterized in that: The system includes: The sequence feature extraction module is used to obtain the sequence sentences of the image layout annotation text, map them into feature vectors containing position encoding, and use the self-attention mechanism to model and learn the sequence features globally; The multi-scale image feature extraction module is used to obtain the image features of the highest two semantic layers of the image, and then connect them with the sequence features after upsampling and fusion; The feature global learning module is used to expand the connected sequence features and image features into a one-dimensional vector, perform language and visual representation learning on the sequence and image feature information through self-attention transformation, and obtain the global features of the global sequence sentence constraint information and image space information; The graphic layout generation module is used to predict the graphic element categories and graphic element positions in the graphic layout according to the global features, and the number of element categories and corresponding positions are combined into a graphic layout.
7. A content-aware graphic layout generation device based on sequence coding and image feature learning, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, a content-aware graphic layout generation method based on sequence coding and image feature learning as described in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, a content-aware graphic layout generation method based on sequence coding and image feature learning as described in any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the content-aware graphic layout generation method based on sequence coding and image feature learning as described in any one of claims 1 to 5 is implemented.
