Marine remote sensing visual question-answering method and system based on multi-order knowledge comparison

Through the method of multi-order knowledge comparison, the problem of noise and semantic distribution imbalance in ocean remote sensing visual question and answer is solved, the robustness of features and the quality of answers are improved, and more accurate geospatial object relationship modeling and multi-modality are achieved. Fusion.

CN118799690AInactive Publication Date: 2024-10-18OCEAN UNIV OF CHINA

Patent Information

Application Number
CN202411273116.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When existing ocean remote sensing visual question answering methods deal with ocean remote sensing images with complex noise and imbalanced distribution of high- and low-order semantics, it is difficult to accurately extract and match the spatial relationships of geospatial objects, and the multi-modal fusion efficiency is low, resulting in unstable answer quality.

Method used

Using a multi-level knowledge comparison method, we learn multiple features guided by text through a multi-level semantic decoupling module, combine with the cross-attention mechanism for semantic fusion, and design a multi-level comparison learning module to enhance the multi-level knowledge perception ability of the question and answer system. Improve the model’s reasoning capabilities.

Benefits of technology

Adaptively eliminate noise interference, improve the robustness and discriminability of features, enhance supervision of downstream tasks, and improve the reliability and quality of answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799690A_ABST
    Figure CN118799690A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and discloses an ocean remote sensing visual question-answering method and system based on multi-order knowledge comparison, which adopts a structure following a double-tower network, is respectively a text stream and an ocean remote sensing image stream, and comprises a multi-order representation module, a multi-order semantic decoupling module, a multi-order semantic fusion module and a multi-order comparison learning module, obtaining multi-order representation of the text and the ocean remote sensing image through a multi-order representation module; the low-order representation and the high-order representation are obtained through the multi-order semantic decoupling module, the low-order representation and the high-order representation obtained by the multi-order semantic decoupling module are fused through the multi-order semantic fusion module, and the final low-order representation and the final high-order representation are obtained; and the multi-order comparison learning module compares the high-order features with the low-order features, and adopts three loss functions dominated by multi-order comparison learning loss to constrain characterization and fusion of multi-modal information. According to the invention, interaction and fusion of multi-order features are realized, perception of a question-answering system to multi-order knowledge is enhanced, and the reasoning ability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to an ocean remote sensing visual question answering method and system based on multi-order knowledge comparison. Background Art

[0002] Marine remote sensing images are all-day, all-weather, and all-round, and are widely used in important fields such as military reconnaissance, maritime traffic control, marine pollution monitoring, and resource exploration. As one of the important means of processing and analyzing marine remote sensing images, visual question answering is to answer the corresponding questions based on the image. Visual question answering includes two important steps: first, feature extraction of remote sensing images and texts to mine their deep / high-level / semantic representations. Second, predict the answer to the question based on the extracted deep / high-level / semantic representations.

[0003] The cutting-edge visual question answering network uses contextual information mining methods such as multi-scale, attention mechanism and graph convolutional network to adaptively model the connection between natural language text and remote sensing visual images, and improve the multimodal feature representation ability. Taking SHRNet, the remote sensing visual question answering model currently recognized as the best performing in the industry, as an example, the researchers proposed a hash-based spatial multi-scale visual representation module to bridge the semantic gap caused by the scale difference and spatial position sensitivity of remote sensing images, and learn the text-guided internal group visual and semantic relationships through the spatial hierarchical reasoning module.

[0004] However, the above remote sensing visual question answering methods have the following problems when applied to marine remote sensing images: First, it is unable to adaptively cope with complex noise accumulation. The relationship modeling of high-order features can obtain rich information representation, but it introduces a lot of noise. Existing methods lack robust representation of multi-order visual information, which makes the model's feature extraction and matching capabilities at different stages insufficient, and it is difficult to accurately infer the spatial relationship between geospatial objects with scale differences. Therefore, existing methods are not reliable in mining data distribution in marine remote sensing images with imbalanced high- and low-order semantic distribution.

[0005] Second, the visual spatial reasoning ability is insufficient. One of the characteristics of remote sensing vision problems is that satellite images contain a large number of complexly distributed geospatial objects. The SHRNet model uses a simple attention mechanism to extract visual features related to the problem, but ignores the modeling and learning of the spatial and semantic relationships between geospatial objects in the reasoning stage. This makes it difficult for the model to handle problems involving multiple scales, positions, directions, quantities and other spatial information.

[0006] Third, the efficiency of multimodal fusion of remote sensing data is low. Insufficient fusion is a field problem in visual question answering. Even if effective features are extracted and rich high-level information is obtained, if it cannot be mapped into the co-occurrence semantic space, it will affect the quality of downstream answers. In addition, remote sensing data is often affected by various environmental factors such as interference, occlusion, and illumination changes, resulting in unstable and inconsistent data quality. Most existing models (including SHRNet) use a simple fusion mechanism to integrate visual features related to the question, while ignoring the mining and utilization of the intrinsic connection and mutual complementarity between different modalities. Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention provides a marine remote sensing visual question answering method and system based on multi-order knowledge comparison, which (1) learns multiple features guided by text through a multi-order semantic decoupling module to obtain rich semantic representations and construct high-order representations and low-order representations; (2) proposes a multi-order semantic fusion module, which combines the cross-attention mechanism to obtain a fully fused robust multi-order representation; (3) designs a multi-order contrast learning module: by introducing a variety of supervisory information dominated by multi-order contrast learning, it aims to enhance the question answering system's perception of multi-order knowledge, and then enhance the model's reasoning ability.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: The marine remote sensing visual question answering method based on multi-order knowledge comparison includes the following steps: Step S1, input text and ocean remote sensing images; Step S2, multi-level semantic decoupling: It includes two stages: multi-level representation and decoupling. Specifically, in the multi-level representation stage, for images, a visual encoder based on Swin Transformer is used to visually represent the input image, and image features are extracted at multiple scale levels to finally obtain a low-level representation. , mid-level representation , high-level representation ; For text, a text encoder is used to annotate the words, phrases, and sentences of the question, and finally obtain word representations , phrase representation , sentence representation ; In the decoupling stage, the three semantic dimensions of characters, words, and sentences are used for guidance, and the image features at different stages are combined to finally cascade decoupling into high- and low-order multimodal representations. The low-order representation is finally obtained through the bottom-up guided attention mechanism. and high-level representation ; Step S3, multi-order semantic fusion: adopt the bridge fusion encoding mechanism, and use self-attention, cross-attention, and cross-modal bridge layers to transform the low-level representations obtained in step S2 into and high-level representation Fusion to obtain the final low-level representation and high-level representation ; Step S4, multi-order contrastive learning: compare high-order features with low-order features, and use three loss functions dominated by contrastive learning loss to constrain the representation and fusion of multimodal information. The three loss functions include: visual question answering loss, multi-order contrastive learning loss, and multi-order matching loss.

[0009] Furthermore, the visual encoder based on Swin Transformer includes an image block segmentation layer and a multi-layer encoding layer. The image block segmentation layer is used to segment the input image into small blocks. The multi-layer encoding layer includes a multi-layer Swin Transformer module. The Swin Transformer module of each layer is composed of a multi-head self-attention module based on a moving window and a feedforward network module. The multi-layer encoding layer processes image data at different scales through a hierarchical structure and a moving window mechanism, and captures global and local context information. The specific steps of multi-level representation of the image in step S2 are as follows: the image block size is initialized to H / 4 and W / 4 by image block segmentation, and feature extraction is performed at multiple scale levels. By image block merging operations, multi-scale features with resolutions of H / 8× W / 8, H / 16 × W / 16, and H / 32 × W / 32 are obtained respectively; for each input 2D image , where H and W are the height and width of the input image, (H, W) represents the resolution of the input image, and C represents the number of channels. The visual encoder based on Swin Transformer reshapes it into a flattened 2D sequence ,in represents the number of image blocks, By adding category tags before the image block sequence and using learnable 1D position embedding to enhance the position information, the input image is represented as follows after passing through the visual encoder: (1); in is the visual relative position index, is the category index, , ..., are the 1st, ..., Nth image block sequences respectively; is a trainable linear projection layer that uniformly represents the extracted multi-scale features of H / 8 × W / 8, H / 16 × W / 16, and H / 32 × W / 32 resolutions as , and simplify it to EncoderV, The layer is represented as , ,in represents the number of layers of the visual encoder, is the total number of layers of the visual encoder; finally, the low-level representation is obtained , mid-level representation , high-level representation .

[0010] Furthermore, the specific steps for the multi-level representation of text in step S2 are as follows: Using BERT BASE As a text encoder, the model first uses the text input in step S1 as the input sequence w to perform word segmentation through byte-level encoding, and adds text index words at the beginning and end of the sequence as start and end markers respectively; then it converts the input sequence into the following form: (2); In the formula, are the start and end indices, is the relative position index of the text, T is the word embedding matrix, and then the input is sent to BERT BASE The model is processed, and the text encoder The layer is represented as , No. The text representation of the layer text encoder is , ,in is the total number of layers of the text encoder, BERT BASE The model acts as a text encoder, annotating the words, phrases, and sentences of the question, and finally obtains word representations , phrase representation , sentence representation .

[0011] Furthermore, in step S3, the bridge fusion coding mechanism uses a cross-modal bridging layer as a bridge for interaction between modalities. Specifically, it is implemented by a cross-modal fusion encoder, and the cross-modal fusion encoder includes a single-modal encoder and a cross-modal encoder, wherein the single-modal encoder includes two single-order encoders, the single-order encoder includes a self-attention layer and a feedforward neural network, and the high-order representation and the low-order representation are respectively input into the two single-order encoders; the first The layer is defined as , it consists of a low-order part and a high-order part, each of which contains a self-attention layer, a cross-attention layer and a feedforward neural network layer; the cross-modal bridging layer establishes a connection between the top layer of the unimodal encoder and the layers of the cross-modal encoder, and aligns and fuses the cross-modal encoder with the unimodal encoder from bottom to top, thereby converting the single-order representation of the multi-order semantic level, i.e., the low-order representation and high-level representation Integrate into multi-level interactions.

[0012] Furthermore, the interaction between each layer of the cross-modal encoder is defined as: (3); (4); (5); in , They are Layer, -1 layer single-stage encoder output representation of the low-order part, , They are Layer, -1 layer single-stage encoder output representation of the high-order part, , is the input of each part, is the number of layers of the cross-modal encoder, and the output of the previous layer of the cross-modal encoder is represented as The input is as shown in formulas (3) and (4); , The last layer representation obtained by two single-stage encoders is initialized: , ,in and is a linear projection, and are the multimodal vectors of the last layer of the two single-stage encoders, and It is an order type embedding; multiple bridge layers are used to connect the top layer of the single-order encoder with each layer of the multi-order encoder, as shown below: (6); (7); Among them, BridgeLayer represents the bridging operation. represents a bridging operation of the low-level representation, represents a bridging operation for higher-order representations, represents the high-level representation of the previous layer, Represents the high-level representation of the next layer.

[0013] Furthermore, the fusion process of step S3 is expressed as follows: (8); in, represents the low-level representation, represents high-order representation, LayerNorm represents layer normalization operation, and formula (8) represents its fusion process, which aims to promote the interactive fusion of single-order data streams and multi-order data streams.

[0014] Furthermore, in step S4, it is determined whether a pair of high-order representations and low-order representations match to perform multi-order matching prediction. Specifically, the output embedding of the [CLS] word of the multi-order encoder is used as the joint representation of the high-order and low-order representation pairs, and a fully connected layer and a softmax layer are added thereafter to predict the binary classification probability. , The multi-order matching loss is expressed as follows: (10); In the formula, represents a two-dimensional one-hot representation of the true value label, represents the expected value, represents the multi-order matching loss, represents the cross entropy loss.

[0015] Furthermore, in step S4, the multi-order contrastive learning loss function Defined as and The cross entropy loss function between is as follows: (11); Total loss function for: (12); in, is the visual question answering loss, Represents the low-order to high-order cross entropy loss, which is used to measure the difference between the low-order to high-order similarity distribution p predicted by the model and the true label y; Represents the high-order to low-order cross entropy loss, which is used to measure the difference between the high-order to low-order similarity distribution p predicted by the model and the true label y; Indicates expected value; , is the last layer of vector representation obtained by the unimodal encoder, and Represents the true one-hot similarity, the probability of a negative sample pair is 0, and the probability of a positive sample pair is 1. and They are the cosine similarity functions from low order to high order and from high order to low order respectively.

[0016] The present invention also provides an ocean remote sensing visual question-answering system based on multi-order knowledge comparison, which is used to implement the ocean remote sensing visual question-answering method based on multi-order knowledge comparison as described above. The system adopts a structure following a double-tower network, which is a text stream and an ocean remote sensing image stream respectively. The system includes: a multi-order representation module, a multi-order semantic decoupling module, a multi-order semantic fusion module and a multi-order contrast learning module. The multi-order representation module uses a text encoder and a visual encoder to extract features of the input text and ocean remote sensing images at different scales to obtain multi-order representations of the text and the ocean remote sensing images; The multi-order semantic decoupling module is guided by the three semantic dimensions of characters, words, and sentences, combined with the image features at different stages, cascaded decoupling into high- and low-order multimodal representations, and obtains low-order and high-order representations through a bottom-up guided attention mechanism; The multi-order semantic fusion module adopts a bridge fusion encoding mechanism to fuse the low-order representation and high-order representation obtained by the multi-order semantic decoupling module through self-attention, cross-attention, and cross-modal bridging layers to obtain the final low-order representation and high-order representation; The multi-order contrastive learning module compares high-order features with low-order features, and uses three loss functions dominated by contrastive learning loss to constrain the representation and fusion of multimodal information.

[0017] Compared with the prior art, the present invention has the advantages of: (1) Adaptively eliminate / mitigate complex noise interference caused by the imbalance of multi-order semantic features. The present invention models multi-order semantic associations and regards multi-order representations as complementary knowledge. The semantic coreference of multi-order representations is enhanced by the mutual supervision mode of contrastive learning, which plays a role in eliminating ambiguity and denoising.

[0018] (2) It improves the compactness of low-order features while expanding the discriminability of high-order features. By guiding attention from the bottom up, the characters, words, sentences and multi-order visual features are decoupled. Due to the mutual information guidance of characters, words, sentences and multi-order visual features, the information is superimposed from the bottom up, and finally robust high-order features and low-order features are obtained.

[0019] (3) The robustness of the features is further improved. A fusion encoder is constructed. By adding an inference mechanism to the top layer of the single-order encoder and the multi-order encoder layer, the bottom-up alignment and fusion of multi-order representations in the encoder are achieved. The interaction of multi-order features is achieved, further improving the robustness of the features.

[0020] (4) Enhanced supervision of downstream tasks Based on cross-attention, the present invention adaptively aligns and fuses multi-order features through training objectives such as self-supervision paradigm, contrastive learning method, and image-text matching mechanism, and assists in predicting the final answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0022] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a schematic diagram of the multi-level image characterization process of the present invention; Figure 3 It is a multi-order semantic decoupling module diagram of the present invention; Figure 4 This is a diagram of the architecture of the multi-level semantic fusion module of the present invention; Figure 5 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0024] Example 1 like Figure 1 As shown, this embodiment designs an ocean remote sensing visual question answering method based on multi-order knowledge comparison, including the following steps: Step S1, input text and ocean remote sensing images.

[0025] Step S2, multi-order semantic decoupling: includes two stages: multi-order representation and decoupling.

[0026] Specifically, in the multi-level representation stage, for images, a visual encoder based on Swin Transformer is used to visually represent the input image, extract image features at multiple scale levels, and finally obtain a low-level representation. , mid-level representation , high-level representation For text, a text encoder is used to annotate the words, phrases, and sentences of the question, and finally obtain word representations , phrase representation , sentence representation .

[0027] In the decoupling stage, the three semantic dimensions of characters, words, and sentences are used for guidance, and the image features at different stages are combined to finally cascade decoupling into high- and low-order multimodal representations. The low-order representation is finally obtained through the bottom-up guided attention mechanism. and high-level representation , the decoupling process is as follows Figure 3shown.

[0028] Combination Figure 2 As shown in the figure, the visual encoder based on Swin Transformer includes an image block segmentation layer and a multi-layer encoding layer. The image block segmentation layer is used to divide the input image into small blocks. The multi-layer encoding layer includes a multi-layer Swin Transformer module. The Swin Transformer module of each layer is composed of a multi-head self-attention module based on a moving window and a feedforward network module. The multi-layer encoding layer processes image data at different scales through a hierarchical structure and a moving window mechanism, and captures global and local contextual information.

[0029] As a preferred implementation, the specific steps for multi-level representation of the image in step S1 are as follows: the image block size is initialized to H / 4 and W / 4 by image block segmentation, and feature extraction is performed at multiple scale levels. By image block merging operations, multi-scale features with resolutions of H / 8 × W / 8, H / 16 × W / 16, and H / 32 × W / 32 are obtained respectively; for each input 2D image , where H and W are the height and width of the input image, (H, W) represents the resolution of the input image, and C represents the number of channels. The visual encoder based on Swin Transformer reshapes it into a flattened 2D sequence ,in Indicates the number of image blocks.

[0030] By adding category labels to the image patch sequence and using learnable 1D position embedding To enhance the location information, where D v Represents the dimension of the visual encoder. The input image is represented as follows after passing through the visual encoder: (1); in is the visual relative position index, is the category index, , ..., are the 1st, ..., Nth image block sequences respectively; is a trainable linear projection layer; the extracted multi-scale features of H / 8 × W / 8, H / 16 × W / 16, and H / 32 × W / 32 resolutions are uniformly represented as , and simplify it to EncoderV, The layer is represented as , ,in represents the number of layers of the visual encoder, is the total number of layers of the visual encoder; finally, the low-level representation is obtained , mid-level representation , high-level representation .

[0031] As a preferred implementation, the specific steps for multi-level representation of text in step S1 are as follows: using BERT BASE As a text encoder, the model first uses the text input in step S1 as the input sequence w to perform word segmentation through byte-level encoding, and adds text index words at the beginning and end of the sequence as start and end markers respectively; then it converts the input sequence into the following form: (2); In the formula, are the start and end indices, is the text relative position index (is the position embedding matrix), , is the word embedding matrix, M is the length of the sequence after word segmentation, D t is the dimension of the text encoder; then the input is fed into BERT BASE The model is processed, and the text encoder The layer is represented as , No. The text representation of the layer text encoder is , ,in is the total number of layers of the text encoder, BERT BASE The model acts as a text encoder, annotating the words, phrases, and sentences of the question, and finally obtains word representations , phrase representation , sentence representation .

[0032] Step S3, multi-order semantic fusion: adopt the bridge fusion encoding mechanism, and use self-attention, cross-attention, and cross-modal bridge layers to transform the low-level representations obtained in step S2 into and high-level representation Fusion to obtain the final low-level representation and high-level representation .

[0033] In step S3, the bridge fusion encoding mechanism uses a cross-modal bridging layer as a bridge for interaction between modalities. Specifically, a cross-modal fusion encoder is used to implement it, such as Figure 4 As shown, the cross-modal fusion encoder includes a single-modal encoder and a cross-modal encoder, wherein the single-modal encoder includes two single-stage encoders, the single-stage encoder includes a self-attention layer and a feedforward neural network, and the high-order representation and the low-order representation are respectively input into the two single-stage encoders; the first The layer is defined as , it consists of a low-order part and a high-order part, each of which contains a self-attention layer, a cross-attention layer and a feedforward neural network layer; the cross-modal bridging layer establishes a connection between the top layer of the unimodal encoder and the layers of the cross-modal encoder, and aligns and fuses the cross-modal encoder with the unimodal encoder from bottom to top, thereby converting the single-order representation of the multi-order semantic level, i.e., the low-order representation and high-level representation Integrate into multi-level interactions.

[0034] For simplicity, the interaction between each layer of the cross-modal encoder is defined as: (3); (4); (5); in , They are Layer, -1 layer single-stage encoder output representation of the low-order part, , They are Layer, -1 layer single-stage encoder output representation of the high-order part, , is the input of each part, is the number of layers of the cross-modal encoder, and the output of the previous layer of the cross-modal encoder is represented as The input is shown in formulas (3) and (4).

[0035] , The last layer representation obtained by two single-stage encoders is initialized: , ,in and is a linear projection, and are the multimodal vectors of the last layer of the two single-stage encoders, and It is an order type embedding; multiple bridge layers are used to connect the top layer of the single-order encoder with each layer of the multi-order encoder, as shown below: (6); (7); Among them, BridgeLayer represents the bridging operation. represents a bridging operation of the low-level representation, represents a bridging operation for higher-order representations, represents the high-level representation of the previous layer, Represents the high-level representation of the next layer.

[0036] In deep learning, layer normalization (LayerNorm) is a common normalization method that can be used to adjust the output and gradient inside the neural network layer. It can make the output of each neuron have the same statistical characteristics, thereby making the training of the neural network more stable. Inspired by this, the present invention uses the proposed bridge layer to connect the top-level representation of the single-modal encoder with each layer of the multi-order encoder (i.e., the cross-modal encoder), thereby integrating the single-order representation of the multi-order semantic level into the multi-order interaction. The bridge layer is essentially a fusion representation of the relationship between multi-order features, and the multi-order relationship is modeled by the arrangement of various nonlinear layers. The implicit modeling of various nonlinear layers is actually in line with the idea of ​​​​ultimate interaction of multi-order interactions. Therefore, the present invention uses a multi-order semantic decoupling module as a bridge between the multi-order encoder (i.e., the cross-modal encoder) and the single-order encoder.

[0037] The fusion process in step S3 is expressed in a simple form as follows: (8); in, represents the low-level representation, represents high-order representation, LayerNorm represents layer normalization operation, and formula (8) represents its fusion process, which aims to promote the interactive fusion of single-order data streams and multi-order data streams.

[0038] Step S4, multi-order contrastive learning: compare high-order features with low-order features, and use three loss functions dominated by contrastive learning loss to constrain the representation and fusion of multimodal information. The three loss functions include: visual question answering loss, multi-order contrastive learning loss, and multi-order matching loss.

[0039] The present invention proposes a multi-order knowledge contrastive visual question answering model, which can effectively use multi-order reasoning to improve the consistency and credibility between questions and answers. However, this mechanism will also increase the complexity of the model structure and parameters, reduce the efficiency and stability of model training and testing, and may introduce some erroneous or irrelevant knowledge or assumptions. To solve the above problems, the present invention adopts three loss function constraints dominated by multi-order contrastive learning loss to ensure the semantic space consistency of multimodal information and enhance the ability to measure the semantic similarity between images and texts.

[0040] Loss function: In addition to the traditional visual question answering loss, this paper also uses multi-order contrastive learning loss and multi-order matching loss to represent and fuse multimodal information.

[0041] Traditional Visual Question Answering Loss: Given an image representation V and a corresponding question Q, the goal of the Visual Question Answering (VQA) task is to infer the correct answer from the answer space A. , which is a set of predefined candidate answers to open-ended questions. In general, it can be expressed as follows: (9); Where a is an element in the answer space A, f is the scoring function of the model with trainable parameters θ, and the loss function is obtained by cross entropy, which is the visual question answering loss This loss can be achieved using existing technology and will not be described in detail here. The following is a detailed introduction to multi-order matching loss and multi-order contrastive learning loss.

[0042] (1) Multi-order matching loss In step S4, the multi-order matching loss is used to determine whether a pair of high-order representations and low-order representations match, that is, whether they are positive examples (match) or negative examples (mismatch), to perform multi-order matching prediction.

[0043] Specifically, the output embedding of the [CLS] word of the multi-order encoder is used as the joint representation of the high-order and low-order representation pairs, and a fully connected layer and a softmax layer are added after it to predict the binary classification probability. , The multi-order matching loss is expressed as follows: (10); In the formula, represents a two-dimensional one-hot representation of the true value label, represents the expected value, represents the multi-order matching loss, represents the cross entropy loss.

[0044] (2) Multi-order contrastive learning loss In step S4, multi-order contrastive learning aims to learn better single-order representations before fusion. It does this by learning a similarity function that results in higher similarity scores between pairs of high-order and low-order representations. Defined as and The cross entropy loss function between is as follows: (11); Total loss function for: (12); in, is the visual question answering loss, Represents the low-order to high-order cross entropy loss, which is used to measure the difference between the low-order to high-order similarity distribution p predicted by the model and the true label y; Represents the high-order to low-order cross entropy loss, which is used to measure the difference between the high-order to low-order similarity distribution p predicted by the model and the true label y; denotes the expected value, which is the expectation over all high-order-low-order pairs (H, L).

[0045] , is the last layer of vector representation obtained by the unimodal encoder, and Represents the true one-hot similarity, the probability of a negative sample pair is 0, and the probability of a positive sample pair is 1. and They are the cosine similarity functions from low order to high order and from high order to low order respectively. The low order to high order is shown as .

[0046] Example 2 like Figure 5 As shown, this embodiment provides an ocean remote sensing visual question answering system based on multi-order knowledge comparison, which is used to implement the ocean remote sensing visual question answering method based on multi-order knowledge comparison as described in Example 1. The system adopts a structure following a double-tower network, which is a text stream and an ocean remote sensing image stream respectively. The system includes: a multi-order representation module, a multi-order semantic decoupling module, a multi-order semantic fusion module and a multi-order contrast learning module.

[0047] The multi-order representation module uses a text encoder and a visual encoder to extract features of input text and ocean remote sensing images at different scales to obtain multi-order representations of the text and ocean remote sensing images.

[0048] The multi-order semantic decoupling module is guided by the three semantic dimensions of characters, words, and sentences, combined with the image features at different stages, cascaded decoupling into high- and low-order multimodal representations, and obtains low-order representations through a bottom-up guided attention mechanism. and high-level representation .

[0049] The multi-order semantic fusion module adopts a bridge fusion encoding mechanism to fuse the low-order representation and high-order representation obtained by the multi-order semantic decoupling module through self-attention, cross-attention, and cross-modal bridging layers to obtain the final low-order representation and high-order representation.

[0050] The multi-order contrastive learning module compares high-order features with low-order features, and uses three loss functions dominated by multi-order contrastive learning loss to constrain the representation and fusion of multimodal information.

[0051] The functions of each module and the data processing process can be found in the steps described in Example 1, which will not be repeated here.

[0052] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.

Claims

1. A marine remote sensing visual question answering method based on multi-order knowledge comparison, characterized in that: The following steps are involved: Step S1, input text and ocean remote sensing images; Step S2, multi-level semantic decoupling: It includes two stages: multi-level representation and decoupling. Specifically, in the multi-level representation stage, for images, a visual encoder based on Swin Transformer is used to visually represent the input image, and image features are extracted at multiple scale levels to finally obtain a low-level representation. , mid-level representation , high-level representation ; For text, a text encoder is used to annotate the words, phrases, and sentences of the question, and finally obtain word representations , phrase representation , sentence representation ; In the decoupling stage, the three semantic dimensions of characters, words, and sentences are used for guidance, and the image features at different stages are combined to finally cascade decoupling into high- and low-order multimodal representations. The low-order representation is finally obtained through the bottom-up guided attention mechanism. and high-level representation ; Step S3, multi-order semantic fusion: adopt the bridge fusion encoding mechanism, and use self-attention, cross-attention, and cross-modal bridge layers to transform the low-level representations obtained in step S2 into and high-level representation Fusion to obtain the final low-level representation and high-level representation ; Step S4, multi-order contrastive learning: compare high-order features with low-order features, and use three loss functions dominated by contrastive learning loss to constrain the representation and fusion of multimodal information. The three loss functions include: visual question answering loss, multi-order contrastive learning loss, and multi-order matching loss.

2. The method for marine remote sensing visual question answering based on multi-order knowledge comparison according to claim 1, characterized in that: The visual encoder based on Swin Transformer includes an image block segmentation layer and a multi-layer encoding layer. The image block segmentation layer is used to divide the input image into small blocks. The multi-layer encoding layer includes a multi-layer Swin Transformer module. The Swin Transformer module of each layer is composed of a multi-head self-attention module based on a moving window and a feedforward network module. The multi-layer encoding layer processes image data at different scales through a hierarchical structure and a moving window mechanism, and captures global and local context information. The specific steps of multi-level representation of the image in step S2 are as follows: the image block size is initialized to H / 4 and W / 4 by image block segmentation, and feature extraction is performed at multiple scale levels. By image block merging operations, multi-scale features with resolutions of H / 8 × W / 8, H / 16 × W / 16, and H / 32 × W / 32 are obtained respectively; for each input 2D image , where H and W are the height and width of the input image, (H, W) represents the resolution of the input image, and C represents the number of channels. The visual encoder based on Swin Transformer reshapes it into a flattened 2D sequence ,in represents the number of image blocks, By adding category tags before the image block sequence and using learnable 1D position embedding to enhance the position information, the input image is represented as follows after passing through the visual encoder: (1); in is the visual relative position index, is the category index, , ..., are the 1st, ..., Nth image block sequences respectively; is a trainable linear projection layer that uniformly represents the extracted multi-scale features of H / 8 × W / 8, H / 16 × W / 16, and H / 32 × W / 32 resolutions as , and simplify it to EncoderV, The layer is represented as , ,in represents the number of layers of the visual encoder, is the total number of layers of the visual encoder; finally, the low-level representation is obtained , mid-level representation , high-level representation .

3. The marine remote sensing visual question answering method based on multi-order knowledge comparison according to claim 1 is characterized in that: The specific steps for the multi-level representation of text in step S2 are as follows: Using BERT BASE As a text encoder, the model first uses the text input in step S1 as the input sequence w to perform word segmentation through byte-level encoding, and adds text index words at the beginning and end of the sequence as start and end markers respectively; then it converts the input sequence into the following form: (2); In the formula, are the start and end indices, is the relative position index of the text, T is the word embedding matrix, and then the input is sent to BERT BASE The model is processed, and the text encoder The layer is represented as , No. The text representation of the layer text encoder is , ,in is the total number of layers of the text encoder, BERT BASE The model acts as a text encoder, annotating the words, phrases, and sentences of the question, and finally obtains word representations , phrase representation , sentence representation .

4. The method for marine remote sensing visual question answering based on multi-order knowledge comparison according to claim 1, characterized in that: In step S3, the bridge fusion coding mechanism uses a cross-modal bridging layer as a bridge for interaction between modalities. Specifically, it is implemented by a cross-modal fusion encoder, and the cross-modal fusion encoder includes a single-modal encoder and a cross-modal encoder, wherein the single-modal encoder includes two single-order encoders, the single-order encoder includes a self-attention layer and a feedforward neural network, and the high-order representation and the low-order representation are respectively input into the two single-order encoders; the first The layer is defined as , it consists of a low-order part and a high-order part, each of which contains a self-attention layer, a cross-attention layer and a feedforward neural network layer; the cross-modal bridging layer establishes a connection between the top layer of the unimodal encoder and the layers of the cross-modal encoder, and aligns and fuses the cross-modal encoder with the unimodal encoder from bottom to top, thereby converting the single-order representation of the multi-order semantic level, i.e., the low-order representation and high-level representation Integrate into multi-level interactions.

5. The method for marine remote sensing visual question answering based on multi-order knowledge comparison according to claim 4 is characterized in that: The interaction between each layer of the cross-modal encoder is defined as: (3); (4); (5); in , They are Layer, -1 layer single-stage encoder output representation of the low-order part, , They are Layer, -1 layer single-stage encoder output representation of the high-order part, , is the input of each part, is the number of layers of the cross-modal encoder, and the output of the previous layer of the cross-modal encoder is represented as The input is as shown in formulas (3) and (4); , The last layer representation obtained by two single-stage encoders is initialized: , ,in and is a linear projection, and are the multimodal vectors of the last layer of the two single-stage encoders, and It is an order type embedding; multiple bridge layers are used to connect the top layer of the single-order encoder with each layer of the multi-order encoder, as shown below: (6); (7); Among them, BridgeLayer represents the bridging operation. represents a bridging operation of a low-level representation, represents a bridging operation for higher-order representations, represents the high-level representation of the previous layer, Represents the high-level representation of the next layer.

6. The marine remote sensing visual question answering method based on multi-order knowledge comparison according to claim 5 is characterized in that: The fusion process of step S3 is expressed as follows: (8); in, represents the low-level representation, represents high-order representation, LayerNorm represents layer normalization operation, and formula (8) represents its fusion process, which aims to promote the interactive fusion of single-order data streams and multi-order data streams.

7. The method for marine remote sensing visual question answering based on multi-order knowledge comparison according to claim 1, characterized in that: In step S4, it is determined whether a pair of high-order representations and low-order representations match to perform multi-order matching prediction. Specifically, the output embedding of the [CLS] word of the multi-order encoder is used as the joint representation of the high-order and low-order representation pairs, and a fully connected layer and a softmax layer are added after it to predict the binary classification probability. , The multi-order matching loss is expressed as follows: (10); In the formula, represents a two-dimensional one-hot representation of the true value label, represents the expected value, represents the multi-order matching loss, represents the cross entropy loss.

8. The method for marine remote sensing visual question answering based on multi-order knowledge comparison according to claim 7, characterized in that: In step S4, the multi-order contrastive learning loss function Defined as and The cross entropy loss function between is as follows: (11); Total loss function for: (12); in, is the visual question answering loss, Represents the low-order to high-order cross entropy loss, which is used to measure the difference between the low-order to high-order similarity distribution p predicted by the model and the true label y; Represents the high-order to low-order cross entropy loss, which is used to measure the difference between the high-order to low-order similarity distribution p predicted by the model and the true label y; Indicates expected value; , is the last layer of vector representation obtained by the unimodal encoder, and Represents the true one-hot similarity, the probability of a negative sample pair is 0, and the probability of a positive sample pair is 1. and They are the cosine similarity functions from low order to high order and from high order to low order respectively.

9. The marine remote sensing visual question answering system based on multi-order knowledge comparison is characterized by: Used to implement the marine remote sensing visual question answering method based on multi-order knowledge comparison as described in any one of claims 1 to 8, the system adopts a structure following a double-tower network, which is a text stream and a marine remote sensing image stream respectively, and the system includes: a multi-order representation module, a multi-order semantic decoupling module, a multi-order semantic fusion module and a multi-order contrast learning module, The multi-order representation module uses a text encoder and a visual encoder to extract features of the input text and ocean remote sensing images at different scales to obtain multi-order representations of the text and the ocean remote sensing images; The multi-order semantic decoupling module is guided by the three semantic dimensions of characters, words, and sentences, combined with the image features at different stages, cascaded decoupling into high- and low-order multimodal representations, and obtains low-order and high-order representations through a bottom-up guided attention mechanism; The multi-order semantic fusion module adopts a bridge fusion encoding mechanism to fuse the low-order representation and high-order representation obtained by the multi-order semantic decoupling module through self-attention, cross-attention, and cross-modal bridging layers to obtain the final low-order representation and high-order representation; The multi-order contrastive learning module compares high-order features with low-order features, and uses three loss functions dominated by multi-order contrastive learning loss to constrain the representation and fusion of multimodal information.

Citation Information

Patent Citations

  • Marine remote sensing image retrieval method and system based on multi-label guidance and multi-view measurement

    CN115309927A

  • Class-guided multi-scale decoupling marine remote sensing image text retrieval method and system

    CN115311463A

  • Graph neural network-based chart question and answer method

    CN115375984A

  • Progressive marine remote sensing image-text retrieval method based on semantic instance relationship

    CN116127123A

  • Remote sensing image-text retrieval method based on historical experience

    CN118332151A

Cited By

  • Ocean remote sensing visual question and answer method based on high-order knowledge enhancement

    CN119068206A

  • Semantic enhancement-based marine ship positioning method

    CN119228897A

  • Intelligent black tide forecasting method and system based on ocean three-dimensional environment information

    CN119783549A

  • Lightweight remote sensing visual question answering method and system

    CN122391915A

  • Lightweight remote sensing visual question answering method and system

    CN122391915B