Reading Order by Pointer Transformer Networks

The self-attention encoder/decoder framework addresses the limitations of existing reading order detection methods by automatically predicting the order of layout components, improving accuracy and adaptability across diverse document types and languages.

JP2024535731AActive Publication Date: 2024-10-02GOOGLE LLC

Patent Information

Application Number
JP2024513770
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-09-01
Filing Date
2022-08-25
Publication Date
2024-10-02
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

Existing reading order detection methods for documents fail to provide satisfactory results, especially in complex layouts such as tables and receipts, and are not adaptable to different languages, requiring manual adjustments.

Method used

A self-attention encoder/decoder framework is used to predict the reading order of layout components by generating embeddings based on textual and visual information, employing a self-attention mechanism to weight relationships and autoregressively predict the next component in the order.

Benefits of technology

Improves reading order accuracy by automatically learning relationships between layout components, overcoming the limitations of manually designed rules and enhancing adaptability across various document structures and languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024535731000001_ABST
    Figure 2024535731000001_ABST
Patent Text Reader

Abstract

A method including: receiving an image representing a document including a plurality of layout components; identifying text information associated with the plurality of layout components; identifying visual information associated with the plurality of layout components; combining the text information with the visual information; and predicting a reading order of the plurality of layout components based on the combined text information and visual information using a self-attention encoder / decoder.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Provisional Patent Application No. 63 / 260,831, entitled "DEEP READING ORDER WITH POINTER TRANSFORMER NETWORKS," filed September 1, 2021, the disclosure of which is incorporated by reference in its entirety herein.

[0002] Field SUMMARY OF THE DISCLOSURE Embodiments relate to detecting the reading order of documents, images, and the like. [Background technology]

[0003] background Reading order detection is a component of any text perception system. Reading order detection is a document image understanding task that aims to identify coherent ordered relationships between layout components (e.g., paragraphs, summaries, images, etc.). Reading order detection algorithms often use a set of manually created reading order rules. However, these rules fail to provide satisfactory results in many instances (e.g., tables and receipts) and need to be carefully tuned or manually adapted to support different languages ​​(e.g., right-to-left languages ​​such as Japanese or Arabic). Reading order detection is a component that can be a part of many text-related applications (e.g., copy / paste text, reading in text-to-speech, document translation, etc.). Summary of the Invention [Problem to be solved by the invention]

[0004] overview In one example implementation, an encoder / decoder structure can be used to predict a document reading order: the encoder can be configured to generate an embedding based on a first randomly ordered sequence of layout components, and the decoder can be configured to generate a second reading order sequence of layout components based on the embedding.

[0005] In a general aspect, a device, system, non-transitory computer-readable medium (having computer-executable program code stored thereon that can be executed on a computer system), and / or method can perform a process including a method including receiving an image representing a document including a plurality of layout components, identifying text information associated with the plurality of layout components, identifying visual information associated with the plurality of layout components, combining the text information with the visual information, and predicting a reading order of the plurality of layout components based on the combined text information and visual information using a self-attention encoder / decoder.

[0006] Implementations may include one or more of the following features, or any combination thereof.

[0007] For example, identifying the textual information includes extracting text-based data from the image. Extracting the text-based data can include using a neural network configured to generate an embedding including the textual information. The neural network can be a pre-trained neural network that maps the textual data to an embedding, and the array can include an element including the text-based data associated with each layout component of the plurality of layout components. Identifying the visual information can include extracting the visual-based data from the image. Extracting the visual-based data can include using a neural network configured to generate an embedding including the visual information. The neural network can be a two-dimensional convolution operation, and the embedding can include an array, and the array can include an element including the visual-based data associated with each of the plurality of layout components. The neural network can include a plurality of two-dimensional convolution operations, and the embedding can include an array including an element including the visual-based data associated with the associated layout component and the visual-based data associated with at least one additional layout component. Also, the textual information can be associated with a first embedding, and the visual information can be associated with a second embedding, and combining the textual information with the visual information can include concatenating the first embedding with the second embedding. The self-attention encoder / decoder may include a self-attention encoder configured to generate an embedding based on a first sequence associated with the plurality of layout components, the first sequence having a first order, and a self-attention decoder configured to generate a second sequence based on the embedding, the second sequence having a second order. The self-attention encoder / decoder may include a self-attention encoder configured to weight relationships between pairs of elements in the set and generate embeddings for the elements.The self-attention encoder / decoder may include a self-attention encoder configured to determine an influence of each element in the embedding based on the combined textual and visual information. The self-attention encoder / decoder may include a self-attention decoder configured to operate as an autoregressive inference. The self-attention encoder / decoder may include a self-attention decoder configured to autoregressively predict a next layout component in a reading order associated with the multiple layout components. The self-attention encoder / decoder may include a self-attention encoder and a self-attention decoder, and the self-attention decoder may be configured to perform a QKV cross product between elements of the self-attention encoder and an input to the self-attention decoder.

[0008] Example embodiments will become more fully understood from the detailed description set forth hereinafter and the accompanying drawings, in which like elements are represented with like reference numerals, and which are provided for purposes of illustration only and therefore not for limiting the example embodiments. [Brief description of the drawings]

[0009] [Figure 1] FIG. 2 is a data flow block diagram according to an example embodiment. [Figure 2A] FIG. 2 is a data flow block diagram according to an example embodiment. [Figure 2B] FIG. 2 is a block diagram of a sequence loop according to an example embodiment. [Diagram 3] FIG. 2 is a data flow block diagram according to an example embodiment. [Figure 4] FIG. 2 is a block diagram of a method for generating a reading order according to an example embodiment. [Diagram 5] FIG. 1 is a block diagram of a system according to an example embodiment. [Figure 6] FIG. 2 illustrates an example of a computing device and a mobile computing device in accordance with at least one example embodiment. [Figure 7] FIG. 13 is a pictorial diagram illustrating a reading order according to an example embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] It should be noted that these figures are intended to illustrate the general features of methods, structures, and / or materials utilized in some example embodiments and to supplement the written description provided below. However, these figures are not to scale, may not precisely reflect the precise structural or performance characteristics of any given embodiment, and should not be construed as defining or limiting the range of values ​​or properties encompassed by the example embodiments. For example, relative thicknesses and positioning of layers, regions, and / or structural elements may be reduced or exaggerated for clarity. Use of similar or identical reference numbers in various figures is intended to indicate the presence of similar or identical elements or features.

[0011] Detailed Description Most techniques for reading order detection use manually developed rule-based algorithms, heuristics, or trained models for reading order detection. One trained technique for extracting a reading order from a set of layout components (e.g., paragraphs) uses a two-stage approach. First, a naive Bayes classifier can be used to learn the probability that any two paragraphs are consecutive based on a set of manually designed descriptors (e.g., based on the position, shape, type, and topological relationship of the two paragraphs). These probabilities are then converted into a reading order chain by first finding the most likely initial paragraph and gradually growing the chain along the edge with the highest probability. Although these techniques can theoretically learn adaptive reading order rules, they require manual feature engineering and hard-coded graph heuristics to convert pairwise probabilities into reading orders. In addition, trained models are often effective for one document structure, or documents with a well-known structure such as scientific papers.

[0012] Solving these reading order detection problems can include using a machine learning (ML) model to learn to predict the reading order of a set of layout components (e.g., paragraphs, titles, abstracts, images, etc.) from labeled data. Reading order detection can include reordering a set of N input layout components {P1,P2,...,PN} in an unspecified order into a coherent reading order {PC(i)}i=1...N, where C(i) ε[1,N], P represents a layout component, and C represents the order at position (e.g., index) i. Implementations can model the reading order as a sequence-to-sequence problem, where elements of the output sequence (reordered layout components) should be sampled from the input sequence. Exemplary implementations can use a modified pointer network to select members of the input sequence as output. The pointer network can use attention as a pointer to select members of the input sequence as output. Exemplary implementations can use a Long Short-Term Memory (LSTM) backbone or an encoder-decoder transformation module.

[0013] The approach can be generalized to variable-sized output sets, making it possible to detect or predict the reading order when the number of paragraphs in the input sequence is unknown a priori. This technique can improve reading order accuracy compared to existing approaches based on hand-designed rules and approaches that learn reading order rules.

[0014] In an example embodiment, the reading order can be determined using an encoder / decoder structure. The encoder can be configured to generate an embedding based on a first ordered sequence of layout components (e.g., an input sequence), and the decoder can be configured to generate a second ordered sequence of layout components (e.g., an output sequence or reading order sequence) based on the embedding. Figure 1 can be used to explain the data flow (or information flow) in the encoder / decoder structure.

[0015] FIG. 1 illustrates a block diagram of a data flow diagram according to an example embodiment. As illustrated in FIG. 1, the data flow can include a document 105 block, an encoder 110 block, a decoder 115 block, a sequencer 120 block, and an attention function 125 block. The document 105 can include any document that can be processed as an image. The document 105 can include at least one layout component (e.g., paragraph, summary, text, image, etc.). In an example embodiment, the document and / or image includes text and / or text data. A reading order for the document 105 can be desired. Thus, the document 105 can be referred to as an input to a system (e.g., a computing system, a system including at least a memory and a processor, etc.) configured to generate a reading order for the document 105. Example images 705-1-1, 705-1-2 representing the document 105 are illustrated in FIG. 7.

[0016] The encoder 110 may be configured to receive a portion of an image as a layout component. For example, images 705-1, 705-1-2 show a number of identified layout components with a box around each layout component. Layout component 715 is one example of a layout component shown in images 705-1, 705-1-2. The layout components received by the encoder 110 may be initially arranged in a random order. In other words, information related to the layout components may be stored in a data structure and labeled such that the layout components are initially stored (arranged) in a random order. The information and / or data structure may be encoded as an embedding. Thus, the encoder 110 may be configured to generate an embedding that includes information (including the random order sequence) that represents the layout components. The embedding may be used to represent a discrete variable as a continuous vector. In other words, the embedding may be a mapping of a discrete (e.g., categorical) variable to a vector of continuous numerical values.

[0017] The encoder 110 may be configured to classify each layout component as a discrete variable and map them to a vector of continuous numeric values ​​(e.g., embedding). The encoder 110 may be a neural network (e.g., deep learning, two-dimensional (2D) convolutional neural network (CNN), LSTM, Transformer, etc.) trained (e.g., pre-trained) to generate embeddings, including identifying layout components, classifying the identified layout components, and generating embeddings based on the classified, identified layout components. Training the neural network (of the encoder 110) may include using images with labeled (and thus identified) layout components. Thus, the training may include using supervised learning techniques.

[0018] The decoder 115 may be configured to map a vector of continuous numbers (e.g., a vector or embedding generated by the encoder 110) to a sequence of discrete variables. The discrete variables may be variables whose values ​​are obtained by counting. There is a certain number of layout components associated with the document 105, and each component may be associated with (or identified by) a discrete variable. Thus, the sequence of discrete variables may represent an initial sequence of layout components. The sequence of discrete variables may include information representing the layout (e.g., of the document) and indices of the layout components. In other words, the discrete variables may represent layout components, and the sequence represents information regarding the order of the layout components. Initially, the order of the sequence may be a random order. The sequence of discrete variables is the output of the decoder 115. The index of any particular layout component represents the position of that component in the reading order. The output of the decoder may be referred to as a predicted reading order.

[0019] The sequencer 120 can be configured to generate an ordered sequence as a reading order 130 based on the vectors. For example, each vector (of the embedding) can represent multiple features associated with a layout component. The elements of the vector can represent the probability that the layout component is the next layout component in the reading order. The element of the vector that is the largest or has the maximum value can represent the next layout component in the ordered sequence.

[0020] The sequencer 120 may perform an iterative analysis of the layout components (e.g., embeddings) to identify an ordered sequence, e.g., an output sequence. A first analysis of the vector may identify a first layout component in the reading order, a second analysis of the remaining vectors may identify a second layout component, and so on until all vectors in the embedding are analyzed. After a layout component is selected for an ordered sequence, the attention function 125 may be a self-attention function. The attention function 125 may be configured to not direct attention to a position in the sequence to a subsequent position in the sequence. This masking may ensure that predictions for position i may only rely on known outputs at positions less than i. The attention function 125 may attenuate the summed feature or each feature of the corresponding vector. For example, the attention function 125 may set the summed feature or each feature of the corresponding vector to a predetermined value (e.g., −1, 0, 1). Thus, the summed feature representing the selected layout component should not be the summed feature with the highest value, i.e., the maximum value. A stop token vector may be used to terminate the analysis. For example, a stop token value can be added to a vector in the embedding, and the sequencer 120 can terminate the analysis if the vector being analyzed has a value equal to the stop token value. The loop described above is represented by a line and arrow from the attention function 125 block to the decoder 115 block. The attention function 125 block can use a vector in the embedding as a basis for decaying a component or sum component. This stop token vector is represented by a line and arrow from the encoder 110 block to the attention function 125.

[0021] In some implementations, the decoder 115, the sequencer 120, and the attention function 125 may be implemented as a single process operating together. Thus, reference to the decoder 115 may imply that the sequencer 120 and the attention function 125 are included.

[0022] In an example embodiment, a neural network can be used as (or as an element of) an encoder (e.g., encoder 110) and / or a decoder (e.g., decoder 115). The neural network can be a recurrent neural network (RNN). The neural network can be a coding RNN that converts an input sequence into a code that is fed to a first layer of the RNN (sometimes called a generative network). At each step, the RNN can generate a vector that adjusts a content-based attention mechanism for the input. The content-based attention mechanism can be configured to create a vector based on similarity between a feature of the input (e.g., one of the layout components) and a feature stored in memory (e.g., a feature associated with a previously processed layout component).

[0023] Exemplary implementations may use a softmax function (or a normalized exponential function). The softmax function may be used to normalize the output of the network to a probability distribution for the predicted output class or category. The output of the softmax function may be used to represent the class or category distribution. The output of the content-based attention mechanism (e.g., the features of the vector) may be a softmax distribution with a dictionary size equal to the length of the input. The softmax distribution may be based on a function configured to generate weights for values ​​associated (e.g., in a distributed manner) with the features of the vector. The content-based attention mechanism may be an interface connecting an encoder and a decoder. The interface may be configured to provide information from a hidden state of the encoder to the decoder. A hidden state or output may be generated for each layout component in the input sequence (e.g., a non-reading order sequence). The hidden state may be an input (e.g., an input to the processing of a previous layout component in the input sequence) generated using data from a previous time step.

[0024] This framework allows the model to selectively focus on useful parts of the input sequence. In other words, the content-based attention mechanism can selectively process relevant features (e.g., features of layout components) and ignore other features. The content-based attention mechanism can be an attention mechanism based on cosine similarity. In machine learning, cosine similarity can be a measurement that quantifies the similarity between two or more vectors (as mentioned above, the vectors can represent layout components). The cosine similarity can be the cosine of the angle between the vectors. Mathematically, the cosine similarity can be described as a bound on the dot product of the vectors and the product of the Euclidean norm or magnitude of each vector.

[0025] Mathematically, a softmax function (e.g., a function configured to generate weights as described above) can take as input a vector z of K real numbers and normalize the vector into a probability distribution with K probabilities proportional to the exponents of the input numbers. The encoder / decoder described in FIG. 2A can be an example of an attention encoder (e.g., encoder 110) and / or an attention decoder (e.g., decoder 115).

[0026] FIG. 2A illustrates a data flow block diagram according to an example embodiment. As shown in FIG. 2A, the data flow includes a document 105 block, an encoder 110 block, a decoder 115 block, a sequencer 120 block, and an output 220 block. The document 105 includes layout components 225-1, 225-2, 225-3, 225-4, and 225-5. The document 105 is input to the encoder 110 (e.g., as an image). The layout components 225-1, 225-2, 225-3, 225-4, and 225-5 are also shown in random order within brackets 245 along with a stop token 230.

[0027] The encoder 110 includes a self-attention encoder 205 block. The self-attention encoder 205 can be configured to generate an embedding that includes a random order of the layout components 225-1, 225-2, 225-3, 225-4, 225-5 included in the bracket 245 and the stop token 230. Thus, each vector in the embedding 250 represents one of the layout components 225-1, 225-2, 225-3, 225-4, 225-5 included in the bracket 245 and the stop token 230.

[0028] The self-attention encoder 205 may be a self-attention module that weights the relationships between every pair of elements in a sequence and generates a high-dimensional embedding for every element in an input, e.g., an unordered layout component in brackets 245. Each embedding may be used as a query input and a key input to the attention encoder-decoder 210 included in the decoder 115. The self-attention encoder 205 may automatically learn to discover the influence of each element in the input on other elements. This is advantageous because the use of the self-attention encoder 205 may create a richer representation than using other encoder-decoder algorithms used for sequence-to-sequence learning, e.g., long short-term memory (LSTM).

[0029] The decoder 115 includes a self-attention decoder 215 block. The self-attention decoder 215 may operate in a loop to generate each element of the output sequentially. The output at time T may be based on the input at time T-1. For example, the self-attention decoder 215 may autoregressively predict a pointer to the input (e.g., an index of an element in the input sequence). In some implementations, the output elements may correspond to a position (e.g., an index) in the input sequence, rather than using only attention to the output of the encoder 110 to generate the reading order. The self-attention decoder 215 may be configured to apply attention (e.g., using a pointer network) to the input elements to select one as the output at each decoder step (or iteration). The element selected at each decoder step may be a predicted (e.g., autoregressively predicted) pointer. The autoregressively predicted pointer may be modeled as a logit distribution. The lines and arrows 240 represent that the decoder may operate as a loop operating on the embeddings (e.g., vectors) until a vector corresponding to the stop token 230 is reached. In other words, a stop token 230 may be added to the embedding 250 (as shown by bracket 245) and during the loop, once the stop token has been processed or manipulated, the loop terminates and the decoder 115 has completed processing. During the loop, if the stop token 230 is the vector with the maximum value, then all vectors (e.g., layout components) have been processed and the loop may terminate.

[0030] One or more (or each) layers of the decoder 215 may generate a matrix of size |decoder input|×|encoder input|, which is a query (or matrix), key, value (or token) (QKV) cross product between the encoder input and existing decoder elements as elements of Q·K, V of the existing decoder, and whose rows may be thought of as logits on the encoder's input identifiers (IDs), and thus may be regularized with any loss used for classification. The sequencer 120 may determine an index (e.g., a pointer) to the next element, for example, using the function argmax(). The sequencer 120 may start with a single-element sequence consisting of an auxiliary sequence start token, and autoregressively predict each new pointer given the preceding element, until a pointer to another additional token (e.g., a stop token 230 or sequence stop) is generated.

[0031] The output of the sequencer 120 may generate each element of the output sequence 255 during each loop represented by the lines and arrows 240. The output sequence 255 may represent a reading order when the loop is completed. The loop iterations are described below with respect to FIG. 2B. The output 220 shows the document 105 with each layout component 235-1, 235-2, 235-3, 235-4, and 235-5 in a reading order. In other words, the first layout component predicted to be read may be layout component 235-1, and the last layout component predicted to be read may be layout component 235-5. Referring again to FIG. 7, the dotted lines 720 in the image 705-1-2 may pictorially represent a reading order from start S to end E based on the associated output sequence.

[0032] FIG. 2B illustrates a block diagram of a sequence loop and its output according to an example implementation. The sequence loop can be a functional portion that executes the data flow of FIG. 2A, e.g., a loop represented by lines and arrows 240. As described above, the sequencer 120 can determine an index (e.g., a pointer) to the next element based on, e.g., a vector sum of features representing layout components, e.g., using the function argmax(). Using the function argmax(), the vector with the maximum value can be the next element, which is output to the output sequence 255. For example, each vector represents the likelihood that each layout component is next at a particular time step. Each element of the vector can be a number that represents the likelihood that the corresponding layout will be next in the output order. The element of the vector (e.g., representing a layout component) with the largest value can be (e.g., can be predicted to be) the next layout component in the reading order.

[0033] In iteration 260-1, the function of sequencer 120 (e.g., argmax()) is executed with the vector with the maximum value being the vector associated with layout component 225-4. Thus, sequencer 120 outputs the next element as layout component 225-4, which is added to output sequence 255 (in iteration 260-1, the output sequence includes only component 225-4). In iteration 260-2, the function of sequencer 120 is executed with the vector with the maximum value being the vector associated with layout component 225-1. Thus, sequencer 120 outputs the next element, layout component 225-1, and adds it to output sequence 255, for example, after component 225-4. In iteration 260-3, the function of sequencer 120 is executed with the vector with the maximum value being the vector associated with layout component 225-2. Therefore, sequencer 120 outputs layout component 225-2 as the next element and adds it to the output sequence 255 after component 225-1.

[0034] In iteration 260-4, the function of sequencer 120 is executed with the vector with the maximum value being the vector associated with layout component 225-3. Thus, sequencer 120 outputs layout component 225-3 as the next element in output sequence 255. In iteration 260-5, the function of sequencer 120 is executed with the vector with the maximum value being the vector associated with layout component 225-5. Thus, sequencer 120 outputs layout component 225-5 as the next element in output sequence 255. In iteration 260-6, the function of sequencer 120 is executed with the vector with the maximum value being the vector associated with stop token 230. Thus, sequencer 120 outputs stop token 230 as the next element in output sequence 255. As mentioned above, each vector in the embedding can represent a respective layout component. The generation of these vectors can be described with respect to FIG. 3.

[0035] FIG. 3 illustrates a data flow block diagram according to an example implementation. As shown in FIG. 3, the data flow includes a document 105 (as an input), layout components 305, ordered layout components 310, a component model 315 block, and a reading order 320 model block. The component model 315 can be configured to take the document 105 as an input and identify at least one layout component (e.g., paragraph, summary, text, image, etc.) as the layout component 305. The layout components 305 can be concatenated or linked together with embeddings 330 (e.g., initial or first embeddings) using a layout combiner 335 block, which is then input to the reading order model 320 to predict (or generate) the ordered layout components 310.

[0036] The component model 315 can be configured to identify at least one component (e.g., paragraph, summary, text, image, etc.) based on an input image (e.g., document 105). The component model 315 can include a neural network, e.g., at least one convolution 325 block, or convolution operation. The convolution 325 can be a two-dimensional (2D) convolution operation because 2D convolutions (e.g., CNNs) can be effective in capturing image information across multiple scales. The convolution 325 can be configured to generate an embedding 330 that includes multiple vectors 350. The number of vectors 350 can be based on the number of layout components associated with (e.g., identified in) the document 105. Thus, each vector can correspond to a respective layout component. Each vector 350 corresponds to a respective layout component, but can also include information (e.g., features) associated with at least one other layout component. In other words, each successive convolution 325 can generate information influences between components in the vector. For example, each vector 350 may contain information about its respective component and neighboring components after each successive convolution 325. This information influence may be useful in predicting the reading order.

[0037] The convolution 325 may be configured to extract features from an image representing the document 105. The features may be based on layout components (e.g., paragraphs, titles, abstracts, images, etc.), component location, component size, color, white space (no components), component location relative to other components, etc. The features may be represented using numerical values. The convolution may have a filter (sometimes called a kernel) and a stride. For example, the filter may be a 1×1 filter with a stride of 1 (or 1×1×n for conversion to n output channels, where the 1×1 filter may be called a pointwise convolution) that results in an output of cells generated based on a combination (e.g., addition, subtraction, multiplication, etc.) of the features of cells in each channel at the M×M grid locations. In other words, feature maps with more than one depth or channel are combined into a feature map with a single depth or channel. The filter may be a 3×3 filter with a stride of 1 that results in an output with fewer number of cells in / for each channel of the M×M grid or feature map. The output may have the same depth or number of channels (e.g., a 3×3×n filter, where n=number of depths or channels, sometimes referred to as a depthwise filter), or a reduced depth or number of channels (e.g., a 3×3×k filter, where k<number of depths or channels). Each channel, depth, or feature map may have an associated filter. Each associated filter may be configured to emphasize different aspects of the channel. In other words, different features may be extracted from each channel based on the filter (this may be referred to as a depthwise separable filter). The filter (sometimes referred to as a kernel or mask) may have one weight or multiple weights. The weights may be changed or learned during a training operation, e.g., during training of the component model 315.In other words, in an ML model (e.g., CNN, RNN, etc.), the weights associated with the filters (kernels or masks) can be modified during the training operation. Other filters are within the scope of this disclosure.

[0038] Another type of convolution can be a combination of two or more convolutions, sometimes called blended convolutions. For example, the convolution can be a depth-wise and point-wise separable convolution. This can include, for example, two stages of convolution. The first stage can be a depth-wise convolution (e.g., a 3×3 convolution). The second stage can be a point-wise convolution (e.g., a 1×1 convolution). The depth-wise and point-wise convolutions can be separable convolutions in that different filters (e.g., filters for extracting different features) can be used for each channel or each depth of the feature map. In some implementations, the first type of convolution can be used to extract text, while the second type of convolution can be used to extract pictures. The convolution can be a combination (or elements of) a recurrent neural network and a recurrent neural network. The recurrent neural network can be configured to extract information from an image by processing regions of the image. The recurrent neural network can be configured to process relationships of objects (e.g., layout components) within a scene (e.g., document 105 can be a scene, can contain a scene, or can be considered as a scene).

[0039] The convolution can be linear. A linear convolution describes the output as linear time-invariant (LTI) with respect to the input. The convolution can also include a rectified linear unit (ReLU). ReLU is an activation function that rectifies the LTI output of the convolution and limits the normalized output to a maximum value. ReLU can be used to speed up convergence (e.g., so that training the model becomes more efficient).

[0040] Training the component model 315 can include modifying weights (e.g., configuring filters) associated with the convolutions 325. The component model 315 can be trained (e.g., pre-trained) to identify layout components and identify relationships between layout components. Although three convolutions 325 are shown, example implementations can include using four or five or more additional convolutions 325.

[0041] Each convolution 325 in the component model 315 may have an associated weight. The associated weight may be randomly initialized and then modified at each training iteration (e.g., epoch). The training may relate to implementing (or helping to implement) discrimination between layout components and identifying relationships between layout components. In an example embodiment, a labeled input image (e.g., document 105 having labels indicating a preferred reading order) may be compared to a predicted reading order. A loss may be generated based on the difference between the labeled reading order and the predicted reading order. The training iterations may continue until the loss is minimized and / or until the loss does not change significantly from iteration to iteration. In an example embodiment, the smaller the loss, the better the predicted reading order.

[0042] The component model 315 can be configured to generate an embedding of the layout component 305. The embedding of the layout component 305 can have the same structure as the embedding 330. The layout combiner 335 can be configured to concatenate at least one of the embeddings 330 with the layout component 305. For example, a first of the embeddings 330 is shown to be concatenated with the layout component 305 by the layout combiner 335. Concatenating the embeddings 330 with the layout component 305 can result in highlighting of information associated with the embeddings 330 (e.g., associated with each vector of the embeddings 330).

[0043] The output of the layout combiner 335 is input to the reading order model 320 and the self-attention encoder 340 as an element of the reading order model 320. The self-attention encoder 340 can be configured to generate a context embedding 345, which is input to the self-attention decoder 355 as an element of the reading order model 320. The self-attention decoder 355 can be configured to generate a reading order as ordered layout components 310 based on the context embedding 345. The context embedding 345 can include multiple vectors 360. The number of vectors 360 can be based on the number of layout components associated with (e.g., identified in) the document 105. Each vector 360 can include information associated with each layout component. Each vector 360 can include multiple values ​​(e.g., integer values) that can be summed, for example.

[0044] The self-attention encoder 340 may be composed of, for example, a stack of N=6 identical layers. Each layer may have two sublayers. The first sublayer may be a multi-head self-attention mechanism. The second sublayer may be a position-wise fully connected feed-forward network. A residual connection may be applied around each of the two sublayers, followed by layer normalization. In other words, the output of each sublayer may be LayerNorm(x+Sublayer(x)), where Sublayer(x) is the function implemented by the sublayer. To facilitate these residual connections, all sublayers in the model, as well as the embedding layer, may be normalized, for example, by d model = 512. The hyperparameters can be obtained, for example through cross-validation.

[0045] The self-attention decoder 355 may also be configured with a stack of, for example, N=6 identical layers. In addition to the two sublayers of each encoder layer, the decoder may insert a third sublayer. The third sublayer may be configured to perform multi-head attention on the output of the encoder stack. As with the encoder, residual connections may be applied around each of the sublayers, followed by layer normalization. Self-attention may be modified at sublayers in the decoder stack to prevent a position from paying attention to a subsequent position. This masking may be combined with the output embedding being offset by one position to ensure that predictions for position i can only rely on known outputs at positions less than i. In other words, predicting ordered layout components 310 based on context embeddings 345 (e.g., multiple vectors 360) may be based on previously predicted vectors 360 (e.g., corresponding to the layout components). 2B, iteration 260-3 may be affected by the results of iterations 260-1 and 260-2 (e.g., layout components 225-4, 225-1). Additionally, the results of iteration 260-3 may not be affected by the remaining layout components or by layout components that have not been added to the output sequence 255 (e.g., layout components 225-3, 225-5).

[0046] An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, key, value, and output can all be vectors. In an encoder-decoder attention layer, the query can come from the preceding decoder layer, and the memory keys and values ​​can come from the output of the encoder. This can allow every position in the decoder to pay attention to every position in the input sequence. The output can be computed as a weighted sum of values, where the weight assigned to each value is calculated by a fitness function with the corresponding key in the query. Self-attention, sometimes called intra-attention, is an attention mechanism that associates different positions of a single sequence to compute a representation of that sequence.

[0047] The encoder can include a self-attention layer, where the keys, values, and queries can all come from the same place, in this case the output of a previous layer in the encoder. Each position in the encoder can attend to all positions in the previous layer of the encoder. Similarly, a self-attention layer in the decoder can allow each position in the decoder to attend to all positions in the decoder up to and including that position.

[0048] FIG. 4 shows a block diagram of a method for generating a reading order according to an example embodiment. As shown in FIG. 4, in step S405, an image representing a document including layout components is received (e.g., received by the encoder 110 from a scanning unit, a camera, or a storage medium). For example, the document (e.g., document 105) may include any readable document in the form of an image. The document may include at least one layout component (e.g., paragraph, summary, text, image, etc.). A reading order of the document may be desired. Example images representing the document may be images 705-1, 705-1-2 shown in FIG. 7.

[0049] In step S410, which is an optional step, optical character recognition (OCR) is performed on the image (e.g., to identify and / or separate textual and visual information). For example, OCR can be a process (e.g., performed by a computing device) that extracts data from a scanned document or image file and then converts the text into a machine-readable format that can then be used for additional data processing. In an example embodiment, OCR can be used to extract text-based data from the image. The text-based data can be extracted using convolution. In other words, OCR can be performed using machine learning. In some implementations, the machine learning may include neural networks and / or convolution operations (e.g., 2D convolution operations). Thus, the OCR can generate embeddings or text embeddings that include at least one array that includes text-based data associated with layout components of the input image (e.g., representing a document). The text-based data of the vectors can include data (e.g., numerical values) that represent word similarities, related word groupings, text classifications or features, document clustering (e.g., locations within a document), natural language, and the like. 3, the component model 315 can be configured to use the convolutions 325 to perform an OCR process on at least the document 105. As described above, the component model 315 can be configured to identify at least one layout component (e.g., a paragraph, an abstract, text, an image, etc.). Additionally, if the at least one layout component includes an image that includes text, the component model 315 can be configured to perform an OCR operation on the text. For example, one or more of the vectors 350 of the embedding 330 can include OCRed text.

[0050] In step S415, a visual embedding is generated based on the image. For example, the visual embedding may include at least one sequence including data or visual data (e.g., information and / or features associated with the image) associated with the layout components of the input image (e.g., representing a document). The visual data may include a location within the document and a relationship to text (e.g., a header associated with the image). The visual data may include color, type of image (e.g., thumbnail, heading, etc.), image content (e.g., people, cars, graphs, etc.), etc. In an example embodiment, layout components associated with the image (e.g., arranged in a random order) may be identified and encoded as a visual embedding. In other words, information associated with the layout components may be stored in a data structure and labeled such that the layout components are arranged in a random order. The information and / or data structure may be encoded as an embedding. Thus, the encoder 110 may be configured to generate an embedding including information (including a random order sequence) representing the layout components. For example, referring to FIG. 3, the component model 315 may be configured to use convolution 325 to generate a visual embedding generated based on an image associated with the document 105.

[0051] Embeddings can be used to represent discrete variables as continuous vectors. In other words, embeddings can be a mapping of discrete (e.g., categorical) variables to vectors of continuous numeric values. Visual embeddings can be generated using a neural network (e.g., deep learning, two-dimensional (2D) convolutional neural network (CNN)) trained (e.g., pre-trained) to generate embeddings, including being trained (e.g., pre-trained) to identify layout components, classify the identified layout components, and generate embeddings based on the classified, identified layout components. Training the neural network can include using images with labeled (and thus identified) layout components. Training can include using supervised learning techniques.

[0052] In step S420, the OCR output, if performed, is combined with the visual embedding. For example, as described above, the OCR can generate an embedding that includes at least one array that includes text-based data associated with a layout component of an input image (e.g., representing a document). The embedding generated by the OCR can have the same structure as the visual embedding. Thus, the OCR output can be combined with the visual embedding to generate an embedding that includes textual and visual information associated with the layout component. The combination can include concatenating the textual information (e.g., array elements) with the visual information (e.g., array elements). For example, referring to FIG. 3, the layout combiner 335 can combine the textual embedding and the visual embedding.

[0053] In step S425, a reading order for the layout components in the image is generated (i.e., predicted) by decoding the combined OCR output and visual embeddings. For example, the combined OCR output and visual embeddings can be processed by a self-attention encoder. The self-attention encoder (e.g., self-attention encoder 205, 340) can be configured to generate a context embedding (e.g., context embedding 345). The generated context embeddings can be processed by a self-attention decoder (e.g., self-attention decoder 215, 355). The self-attention decoder can be configured to generate a reading order as ordered layout components based on the context embeddings as described herein with respect to FIG. 3. Thus, the self-attention encoder can be the self-attention encoder 340, the self-attention decoder can be the self-attention decoder 355, and the embeddings can be the context embeddings 345.

[0054] FIG. 5 illustrates a block diagram of a system according to an example embodiment. In the example of FIG. 5, the system (e.g., an augmented reality system, a virtual reality system, and / or any system configured to read (e.g., text-to-speech, translate) a document) may include a computing system or at least one computing device, and should be understood to represent substantially any computing device configured to execute the techniques described herein. As such, the device may be understood to include various components that can be utilized to implement the techniques described herein, or different or future versions thereof. As an example, the system may include a processor 505 and a memory 510 (e.g., a non-transitory computer-readable memory). The processor 505 and the memory 510 may be coupled (e.g., communicatively coupled) by a bus 515.

[0055] The processor 505 may be utilized to execute instructions stored in the at least one memory 510. The processor 505 may thus perform various features and functions described herein, or additional or alternative features and functions. The processor 505 and the at least one memory 510 may also be utilized for a variety of other purposes. For example, the at least one memory 510 may represent one example of various types of memory and associated hardware and software that may be used to execute any one of the modules described herein.

[0056] The at least one memory 510 may be configured to store data and / or information associated with the device. The at least one memory 510 may be a shared resource. Thus, the at least one memory 510 may be configured to store data and / or information associated with other elements (e.g., image / video processing or wired / wireless communication) in a larger system. The processor 505 and the at least one memory 510 may be utilized together to execute the techniques described herein. In this manner, the techniques described herein may be executed as code segments (e.g., software) stored in the memory 510 and executed by the processor 505. Thus, the memory 510 may include a component model 315, a reading order model 320, and a layout combiner 335.

[0057] As discussed above, the component model 315 can be configured to use the document as an input to identify at least one component (e.g., a paragraph, a summary, text, an image, etc.) as a layout component. The component model 315 can be configured to generate embeddings corresponding to textual information associated with the layout component and embeddings corresponding to visual information associated with the layout component. The layout combiner 335 can be configured to concatenate embeddings corresponding to textual information associated with the layout component with embeddings corresponding to visual information associated with the layout component. The reading order model 320 can be configured to predict (or generate) ordered layout components based on the combined embeddings using a self-attention encoder / decoder.

[0058] Implementations may include one or more of the following examples and / or combinations thereof.

[0059] Example 1. A method including receiving an image representing a document including a plurality of layout components, identifying text information associated with the plurality of layout components, identifying visual information associated with the plurality of layout components, combining the text information with the visual information, and predicting a reading order of the plurality of layout components based on the combined text information and visual information using a self-attention encoder / decoder.

[0060] Example 2. The method of example 1, wherein identifying the text information can include extracting text-based data from the image.

[0061] Example 3. The method of Example 2, wherein extracting the text-based data can include using a neural network configured to generate an embedding that includes the text information.

[0062] Example 4. The method as described in Example 3, wherein the neural network can be a pre-trained neural network that maps text data to embeddings, and the array can include an element that includes text-based data associated with each layout component of the multiple layout components.

[0063] Example 5. The method of any of Examples 1-4, wherein identifying the visual information can include extracting visual-based data from the image.

[0064] Example 6. The method of Example 5, wherein extracting the vision-based data can include using a neural network configured to generate an embedding that includes the visual information.

[0065] Example 7. The method of Example 6, wherein the neural network can be a two-dimensional convolution operation, and the embedding can include an array, and the array can include elements including visual-based data associated with each of the plurality of layout components.

[0066] Example 8. The method as described in Example 6, wherein the neural network can include a plurality of two-dimensional convolution operations, and the embedding can include an array including elements including the visual-based data associated with the associated layout component and the visual-based data associated with at least one additional layout component.

[0067] Example 9. The method of any of Examples 1-8, wherein the textual information can be associated with the first embedding and the visual information can be associated with the second embedding, and combining the textual information with the visual information can include concatenating the first embedding with the second embedding.

[0068] Example 10. The method of any of Examples 1-9, wherein the self-attention encoder / decoder can include a self-attention encoder configured to generate an embedding based on a first sequence associated with the plurality of layout components. The first sequence has a first order. The self-attention encoder / decoder can further include a self-attention decoder configured to generate a second sequence based on the embedding. The second sequence has a second order.

[0069] Example 11. The method of any of Examples 1-10, wherein the self-attention encoder / decoder may include a self-attention encoder configured to weight relationships between pairs of elements in the set and generate embeddings for the elements.

[0070] Example 12. The method of any of Examples 1-11, wherein the self-attention encoder / decoder can include a self-attention encoder configured to determine an influence of each element in the embedding based on the combined textual and visual information.

[0071] Example 13. The method of any of Examples 1-12, wherein the self-attention encoder / decoder can include a self-attention decoder configured to operate as an autoregressive inference.

[0072] Example 14. The method of any of Examples 1 to 13, wherein the self-attention encoder / decoder may include a self-attention decoder configured to autoregressively predict a next layout component in a reading order associated with the plurality of layout components.

[0073] Example 15. The method described in any of Examples 1 to 14, wherein the self-attention encoder / decoder may include a self-attention encoder and a self-attention decoder, and the self-attention decoder may be configured to perform a QKV cross product between elements of the self-attention encoder and an input to the self-attention decoder.

[0074] Example 16. A non-transitory computer-readable storage medium having stored thereon instructions configured, when executed by at least one processor, to cause a computing system to perform a method as described in any of Examples 1-15.

[0075] Example 17. An apparatus comprising means for carrying out the method according to any one of Examples 1 to 15. Example 18. An apparatus comprising at least one processor and at least one memory containing computer program code, the at least one memory and the computer program code configured to cause the apparatus, by the at least one processor, to perform at least one of the methods described in any of Examples 1 to 15.

[0076] FIG. 6 illustrates an example of a computing device 600 and a mobile computing device 650 that can be used with the described techniques. The computing device 600 includes a processor 602, a memory 604, a storage device 606, a high-speed interface 608 that connects to the memory 604 and a high-speed expansion port 610, and a low-speed interface 612 that connects to a low-speed bus 614 and the storage device 606. Each of the components 602, 604, 606, 608, 610, and 612 are interconnected using various buses and may be mounted on a common motherboard or in other manners as needed. The processor 602 may process instructions that are executed within the computing device 600, including instructions stored in the memory 604 or the storage device 606 to display graphical information for a GUI on an external input / output device, such as a display 616 coupled to the high-speed interface 608. In other implementations, multiple processors and / or multiple buses may be used as needed, along with multiple memories and multiple types of memories. Additionally, multiple computing devices 600 may be connected together (eg, as a bank of servers, a group of blade servers, or a multi-processor system) with each device providing a portion of the required operations.

[0077] The memory 604 stores information within the computing device 600. In one implementation, the memory 604 is a volatile memory unit or multiple volatile memory units. In another implementation, the memory 604 is a non-volatile memory unit or multiple non-volatile memory units. The memory 604 may be another form of computer readable medium, such as a magnetic disk or an optical disk.

[0078] The storage device 606 can provide mass storage for the computing device 600. In one embodiment, the storage device 606 can be or include a computer-readable medium, such as a floppy disk device, a hard disk device, an optical disk device, or an array of devices including a tape device, a flash memory or other similar solid-state memory device, or a storage area network or other configuration of devices. The computer program product can be tangibly embodied in an information carrier. The computer program product can also include instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable medium or machine-readable medium, such as the memory 604, the storage device 606, or a memory on the processor 602.

[0079] The high-speed controller 608 manages the bandwidth-intensive operations of the computing device 600, while the low-speed controller 612 manages the less bandwidth-intensive operations. This allocation of functions is merely exemplary. In one embodiment, the high-speed controller 608 is coupled to the memory 604, to the display 616 (e.g., via a graphics processor or accelerator), and to a high-speed expansion port 610 that can accept various expansion cards (not shown). In an embodiment, the low-speed controller 612 is coupled to the storage device 606 and to a low-speed expansion port 614. The low-speed expansion port, which can include various communication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet), can be coupled to one or more input / output devices, such as a keyboard, a pointing device, a scanner, or a networking device, such as a switch or a router, for example, via a network adapter.

[0080] The computing device 600 can be implemented in many different forms, as shown. For example, it may be implemented as a standard server 620 or multiple times in a group of such servers. The computing device 600 may also be implemented as part of a rack server system 624. In addition, it may be implemented in a personal computer, such as a laptop computer 622. Alternatively, components from the computing device 600 may be combined with other components in a mobile device (not shown), such as device 650. Each such device may include one or more computing devices 600, 650, and the entire system may be made up of multiple computing devices 600, 650 in communication with each other.

[0081] Computing device 650 includes, among other components, a processor 652, a memory 664, input / output devices such as a display 654, a communication interface 666, and a transceiver 668. Device 650 may also be provided with a storage device, such as a microdrive or other device, to provide additional storage space. Each of components 650, 652, 664, 654, 666, and 668 are interconnected using various buses, and some of the components may be mounted on a common motherboard or otherwise as desired.

[0082] The processor 652 can execute instructions in the computing device 650, including instructions stored in the memory 664. The processor may be implemented as a chipset of chips including separate and multiple analog and digital processors. The processor can enable coordination of other components of the device 650, such as, for example, control of the user interface, applications run by the device 650, and wireless communications by the device 650.

[0083] The processor 652 can communicate with a user via a control interface 658 and a display interface 656 coupled to a display 654. The display 654 can be, for example, a TFT LCD (thin film transistor liquid crystal display), and an LED (light emitting diode) or OLED (organic light emitting diode) display, or other suitable display technology. The display interface 656 can include appropriate circuitry for driving the display 654 to present graphical and other information to the user. The control interface 658 can receive commands from the user and convert them for sending to the processor 652. Additionally, an external interface 662 can be provided to communicate with the processor 652 to enable short-range communication of the device 650 with other devices. The external interface 662 can provide, for example, wired communication in some implementations, or wireless communication in other implementations, and multiple interfaces may be used.

[0084] The memory 664 stores information within the computing device 650. The memory 664 may be implemented as one or more of a computer-readable medium or media, a volatile memory unit or units, or a non-volatile memory unit or units. An expansion memory 674 may be provided and connected to the device 650 via an expansion interface 672, which may include, for example, a SIMM (Single In-Line Memory Module) card interface. Such expansion memory 674 may provide additional storage space for the device 650 or may store applications or other information for the device 650. In particular, the expansion memory 674 may include instructions that perform or supplement the processes described above, and may also include secure information. Thus, for example, the expansion memory 674 may be provided as a security module of the device 650 and may be programmed with instructions that enable secure use of the device 650. Additionally, secure applications may be provided along with additional information via the SIMM card, such as by placing identifying information on the SIMM card in an unhackable manner.

[0085] The memory may include, for example, flash memory and / or NVRAM memory, as discussed below. In one embodiment, the computer program product is tangibly embodied in an information carrier. The computer program product includes instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable or machine-readable medium, such as memory 664, expansion memory 674, or memory on processor 652, that may be received, via transceiver 668 or external interface 662.

[0086] The device 650 can communicate wirelessly via a communication interface 666, which can include digital signal processing circuitry if necessary. The communication interface 666 can enable communication in various modes or protocols, such as GSM voice calls, SMS, EMS, or MMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000, or GPRS, among others. Such communication can occur, for example, via a radio frequency transceiver 668. In addition, short-range communication may occur, such as using Bluetooth, Wi-Fi, or other such transceivers (not shown). In addition, a global positioning system (GPS) receiver module 670 can provide additional navigation and location-related wireless data to the device 650, which can be used as needed by applications running on the device 650.

[0087] Device 650 can also communicate audibly using voice codec 660, which can receive spoken information from a user and convert it into usable digital information. Voice codec 660 may also generate audible sounds for the user, such as through a speaker in a handset of device 650. Such sounds may include sounds from a voice call, recorded sounds (voice messages, music files, etc.), and may also include sounds generated by applications running on device 650.

[0088] Computing device 650 may be implemented in many different forms, as shown in the figure. For example, computing device 650 may be implemented as a mobile phone 680. Computing device 650 may also be embodied as part of a smartphone 682, personal digital assistant, or other similar mobile device.

[0089] Various implementations of the systems and techniques described herein may be realized in digital electronic circuitry, integrated circuits, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementation in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special purpose or general purpose processor coupled to receive data and instructions from, and provide data and instructions to, a storage system, at least one input device, and at least one output device.

[0090] These computer programs (also known as programs, software, software applications, or code) contain machine instructions for a programmable processor and may be implemented in a high-level procedural and / or object-oriented programming language and / or in assembly / machine language. As used herein, the term "machine-readable medium" or "computer-readable medium" refers to any computer program product, apparatus, and / or device used to provide machine instructions and / or data to a programmable processor (e.g., magnetic disks, optical disks, memory, programmable logic devices (PLDs)), including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (such as an LED (light emitting diode), or OLED (organic LED), or LCD (liquid crystal display) monitor / screen) that displays information to the user, and a keyboard and pointing device (e.g., a mouse or trackball) by which the user can provide input to the computer. Other types of devices can be used to provide interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0092] The systems and techniques described herein may be implemented in a computing system that includes a back-end component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a front-end component (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), and the Internet.

[0093] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

[0094] In some implementations, the computing device shown in the figure may include sensors that interface with the AR headset / HMD device 690 to generate an augmented environment for viewing inserted content in a physical space. For example, one or more sensors included in the computing device 650 or other computing devices shown in the figure may provide input to the AR headset / HMD device 690 or generally provide input to the AR space. The sensors may include, but are not limited to, a touch screen, an accelerometer, a gyroscope, a pressure sensor, a biometric sensor, a temperature sensor, a humidity sensor, and an ambient light sensor. The computing device 650 may use the sensors to determine an absolute position and / or a detected rotation of the computing device in the AR space, which may then be used as input to the AR space. For example, the computing device 650 may be incorporated into the AR space as a virtual object such as a controller, a laser pointer, a keyboard, a weapon, etc. Once incorporated into the AR space, positioning of the computing device / virtual object by a user may allow the user to position the computing device to view the virtual object in some manner in the AR space. For example, if the virtual object represents a laser pointer, the user can manipulate the computing device as if it were an actual laser pointer. The user can move the computing device left and right, up and down, in a circular motion, etc., and use the device in a manner similar to using a laser pointer. In some implementations, the user can aim the virtual laser pointer at a target location.

[0095] In some implementations, one or more input devices included in or connected to the computing device 650 can be used as input to the AR space. The input devices can include, but are not limited to, a touch screen, a keyboard, one or more buttons, a trackpad, a touchpad, a pointing device, a mouse, a trackball, a joystick, a camera, a microphone, an earphone or bud with input capabilities, a game controller, or other connectable input devices. When the computing device is embedded in the AR space, a user interacting with an input device included in the computing device 650 can cause certain actions in the AR space.

[0096] In some implementations, the touch screen of the computing device 650 can be rendered as a touch pad in the AR space. A user can interact with the touch screen of the computing device 650. The interaction is rendered, for example in the AR headset / HMD device 690, as movements on the rendered touch pad in the AR space. The rendered movements can control virtual objects in the AR space.

[0097] In some implementations, one or more output devices included in the computing device 650 can provide output and / or feedback to a user of the AR headset / HMD device 690 in the AR space. The output and feedback can be visual, tactile, or auditory. The output and / or feedback can include, but is not limited to, vibration, turning on / off or blinking and / or flashing one or more lights or strobes, sounding an alarm, playing a chime, playing a song, and playing an audio file. Output devices can include, but are not limited to, vibration motors, vibration coils, piezoelectric devices, electrostatic devices, light emitting diodes (LEDs), strobes, and speakers.

[0098] In some implementations, the computing device 650 can appear as another object in the computer-generated 3D environment. A user's interaction with the computing device 650 (e.g., rotating, shaking, touching a touch screen, swiping a finger across a touch screen) can be interpreted as an interaction with an object in the AR space. In the example of a laser pointer in the AR space, the computing device 650 appears as a virtual laser pointer in the computer-generated 3D environment. As the user manipulates the computing device 650, the user in the AR space sees the movement of the laser pointer. The user receives feedback from the interaction with the computing device 650 in the AR environment at the computing device 650 or at the AR headset / HMD device 690. The user's interaction with the computing device may be translated into an interaction with a user interface generated in the AR environment of the controllable device.

[0099] In some implementations, the computing device 650 may include a touch screen. For example, a user may interact with the touch screen to interact with a user interface of the controllable device. For example, the touch screen may include user interface elements, such as sliders, that may control characteristics of the controllable device.

[0100] Computing device 600 is intended to represent various forms of digital computers and devices, including, but not limited to, laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Computing device 650 is intended to represent various forms of mobile devices, such as personal digital assistants, mobile phones, smart phones, and other similar computing devices. The components shown, their connections and relationships, and their functions are intended to be merely exemplary and are not intended to limit the implementation of the invention described and / or claimed herein.

[0101] A number of embodiments have been described. Nevertheless, it will be understood that various modifications can be made without departing from the spirit and scope of the specification.

[0102] Additionally, the logic flows depicted in the figures do not require the particular order shown, or sequential order, to achieve desirable results. Additionally, other steps may be provided or steps may be deleted from the described flows, and other components may be added to or removed from the described systems. Accordingly, other implementations are within the scope of the following claims.

[0103] In addition to the above, a user may be provided with controls that allow the user to make choices regarding both whether and when the systems, programs, or features described herein may enable collection of user information (e.g., information regarding the user's social network, social actions or activities, occupation, user preferences, or the user's current location), and whether the user is sent content or communications from the server. In addition, certain data may be processed in one or more ways such that personally identifiable information is removed before it is stored or used. For example, a user's identity may be processed such that personally identifiable information cannot be determined about the user, or the user's geographic location (such as to the city, zip code, or state level) from which location information is obtained may be generalized such that the user's specific location cannot be determined. In this way, the user can control what information is collected about the user, how that information is used, and what information is provided to the user.

[0104] Although certain features of the described embodiments have been illustrated as described herein, many modifications, substitutions, changes, and equivalents will occur to those skilled in the art. It will therefore be understood that the appended claims are intended to cover all such modifications and changes as fall within the scope of the embodiments. It should be understood that the embodiments are presented merely by way of example, not limitation, and that various changes in form and details may be made. Any portion of the apparatus and / or methods described herein may be combined in any combination, except mutually exclusive combinations. The embodiments described herein may include various combinations and / or subcombinations of the functions, components, and / or features of the different described embodiments.

[0105] While example embodiments may include various modifications and alternative forms, embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It is to be understood, however, that there is no intention to limit the example embodiments to the particular forms disclosed, but on the contrary, the example embodiments are intended to encompass all modifications, equivalents, and alternatives falling within the scope of the appended claims. Like numbers refer to like elements throughout the description of the figures.

[0106] Some of the example implementations above are described as a process or method depicted as a flowchart. Although the flowchart describes operations as a sequential process, many of the operations may be performed in parallel, together, or simultaneously. Additionally, the order of operations may be rearranged. A process may be terminated upon completion of those operations, or may have additional steps not included in the diagram. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0107] The methods discussed above, some of which are illustrated by flowcharts, can be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented by software, firmware, middleware, or microcode, the program code or code segments to perform the necessary tasks can be stored in a machine-readable or computer-readable medium such as a storage medium. A processor can perform the necessary tasks.

[0108] Specific structural and functional details disclosed herein are merely representative for purposes of describing example embodiments, however, the example embodiments may be embodied in many alternative forms and should not be construed as being limited to only the embodiments set forth herein.

[0109] In this specification, terms such as "first", "second", etc. may be used to describe various elements, but it is understood that these elements should not be limited by these terms. These terms are used only to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element, without departing from the scope of the example embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0110] When an element is referred to as "connected or coupled" to another element, it will be understood that the element can be directly connected or coupled to the other element, or intervening elements may be present. In contrast, when an element is referred to as "directly connected or coupled" to another element, there are no intervening elements present. Other language used to describe the relationship between elements should be interpreted similarly (e.g., "directly between" as opposed to "between," "directly adjacent" as opposed to "adjacent," etc.).

[0111] The terms used herein are merely for the purpose of describing particular embodiments and are not intended to limit the example embodiments. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and / or "including," as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0112] It should also be noted that in some alternative implementations, the functions / acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may in fact be executed concurrently, or may sometimes be executed in the reverse order, depending on the functions / acts involved.

[0113] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the exemplary embodiments belong. It will be further understood that terms, for example, terms defined in commonly used dictionaries, should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not in an idealized or overly formal sense unless expressly defined herein.

[0114] Some of the example embodiments above and the corresponding detailed description are presented in terms of software, or algorithms and symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the way those skilled in the art effectively convey the substance of their work to others skilled in the art. An algorithm, as the term is used herein, and as it is used generally, is conceived to be a self-consistent sequence of steps leading to a desired result. The steps require physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of optical, electrical, or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.

[0115] In the above exemplary implementations, references to acts and symbolic representations of operations that may be implemented as program modules or functional processes (e.g., in the form of flowcharts) include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types, and may be described and / or implemented in existing structural elements using existing hardware. Such existing hardware may include one or more central processing units (CPUs), digital signal processors (DSPs), application specific integrated circuits, field programmable gate array (FPGA) computers, etc.

[0116] It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, or as will be apparent from discussion, terms such as "processing" or "operation" or "calculation" or "determination" or "display" refer to operations and processes of a computer system or similar electronic computing device that manipulates and converts data represented as physical electronic quantities in the computer system's registers and memory into other data that are similarly represented as physical quantities in the computer system's memory or registers or other such information storage, transmission or display devices.

[0117] It should also be noted that the software-implemented aspects of the example embodiments are typically encoded on some form of non-transitory program storage medium or implemented via some type of transmission medium. The program storage medium may be a magnetic storage medium (e.g., a floppy disk or a hard drive) or an optical storage medium (e.g., a compact disk read-only memory, or CD ROM), or a read-only or random-access storage medium. Similarly, the transmission medium may be twisted wire pairs, coaxial cable, optical fiber, or other suitable transmission medium known in the art. Example embodiments are not limited by these aspects of any given implementation.

[0118] Finally, it should also be noted that, although the appended claims recite particular combinations of features described in this specification, the scope of the present disclosure is not limited to the specific combinations claimed below, but instead extends to encompass any combination of features or embodiments disclosed herein, whether or not that particular combination is currently specifically recited in the appended claims.

Claims

1. receiving an image representing a document including a plurality of layout components; identifying text information associated with the plurality of layout components; identifying visual information associated with the plurality of layout components; combining said textual information with said visual information; predicting a reading order of the layout components based on the combined textual and visual information using a self-attention encoder / decoder; The method includes:

2. The method of claim 1 , wherein the identifying the textual information comprises extracting text-based data from the image.

3. 3. The method of claim 2, wherein the extracting of the text-based data comprises using a neural network configured to generate embeddings that include the text information.

4. the neural network is a pre-trained neural network that maps text data to embeddings; an array including an element including the text-based data associated with each layout component of the plurality of layout components; The method according to claim 3.

5. The method of any of claims 1 to 4, wherein the identifying of the visual information comprises extracting vision-based data from the image.

6. 6. The method of claim 5, wherein the extracting of the vision-based data comprises using a neural network configured to generate an embedding that includes the visual information.

7. The neural network is a two-dimensional convolutional network. the embedding comprises a sequence, the array includes an element including the visual-based data associated with each of the plurality of layout components; The method according to claim 6.

8. The neural network includes a plurality of two-dimensional convolution operations; the embedding includes an array including an element including the visual-based data associated with a related layout component and the visual-based data associated with at least one additional layout component; The method according to claim 6.

9. The text information is associated with a first embedding; The visual information is associated with a second embedding; said combining said textual information with said visual information includes concatenating said first embedding with said second embedding. The method according to any one of claims 1 to 8.

10. The self-attention encoder / decoder comprises: a self-attention encoder configured to generate an embedding based on a first sequence associated with the plurality of layout components, the first sequence having a first order; a self-attention decoder configured to generate a second sequence based on the embedding, the second sequence having a second order. The method according to any one of claims 1 to 9.

11. The self-attention encoder / decoder comprises: weighting the relationships between pairs of elements in the set; Generate an embedding for the element The method according to any one of claims 1 to 10, comprising a self-attention encoder configured to:

12. The method of any of claims 1 to 11, wherein the self-attention encoder / decoder comprises a self-attention encoder configured to determine an influence of each element in an embedding based on the combined textual and visual information.

13. The method according to any of claims 1 to 12, wherein the self-attention encoder / decoder comprises a self-attention decoder configured to operate as an autoregressive inference.

14. The method of any of claims 1 to 13, wherein the self-attention encoder / decoder comprises a self-attention decoder configured to autoregressively predict a next layout component in the reading order associated with the plurality of layout components.

15. the self-attention encoder / decoder includes a self-attention encoder and a self-attention decoder; A method according to any preceding claim, wherein the self-attention decoder is configured to perform a QKV cross product between elements of the self-attention encoder and inputs to the self-attention decoder.

16. A non-transitory computer-readable storage medium having stored thereon instructions configured, when executed by at least one processor, to cause a computing system to perform a method according to any one of claims 1 to 15.

17. Apparatus comprising means for carrying out the method according to any one of claims 1 to 15.

18. 1. An apparatus comprising: At least one processor; at least one memory containing computer program code; Equipped with Apparatus, wherein said at least one memory and said computer program code are configured, by said at least one processor, to cause said apparatus to at least perform a method according to any of claims 1 to 15.

Citation Information

Patent Citations

  • Document processor and document processing method

    JP2003288334A

  • Document processor and document processing method

    JP2005043990A

  • Semantic ordering of image text

    US10706322B1

Cited By

  • Information processing systems, information processing methods, and programs

    JP2026139382A