Coherence-enhanced image paragraph semantic description method

Through the visual information enhancement module and fusion gate mechanism, visual features are directly aligned with sentence descriptions and the information is fused, which solves the problems of visual information loss and insufficient inter-sentence relationship modeling in the existing technology, and significantly improves the coherence of the semantic description of image paragraphs. performance and detail acquisition capabilities.

CN118734857APending Publication Date: 2024-10-01BEIJING INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410552569.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing image paragraph semantic description models cause visual information loss due to pooling operations when generating paragraph descriptions, resulting in insufficient description coherence and poor image-text correlation, and fail to effectively model inter-sentence relationships.

Method used

The visual information enhancement module is used to directly align the visual feature vector with the sentence description, and integrate visual information and text information through the fusion gate mechanism to generate a paragraph description with strong coherence and sufficient details.

Benefits of technology

It effectively alleviates the loss of visual information, improves the coherence of paragraph descriptions and the smoothness of transitions between sentences, enhances the ability to acquire image details, and improves the overall performance of semantic description of image paragraphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734857A_ABST
    Figure CN118734857A_ABST
Patent Text Reader

Abstract

The invention relates to a coherence-enhanced image paragraph semantic description method, and belongs to the technical field of natural language processing and computer vision. Firstly, feature vectors of salient objects in an image are extracted by using a pre-trained visual model; and secondly, in visual information enhancement, firstly aggregating the number of feature vectors into the number of sentence descriptions through an aggregation layer to realize direct alignment of the visual feature vectors and the sentence descriptions, and then projecting the feature vectors into a description generation space through a projection layer. Thirdly, fusing the semantic vector with the generated description of the previous sentence and the projected feature vector by using a fusion gate mechanism; and finally, constructing sentence-level loss and word-level loss, and updating model parameters by using a gradient descent method. According to the image paragraph semantic description method, the continuity of image paragraph semantic description is effectively improved, the problems that paragraph texts are not coherent, image details are missing and the like caused by a traditional image paragraph semantic description model are solved, and guidance and reference are provided for further improving the performance of an image paragraph semantic description system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for describing image paragraph semantics with enhanced coherence, and belongs to the technical field of natural language processing and computer vision. Background Art

[0002] Image paragraph semantic description technology is dedicated to enabling computers to process input images and, based on understanding the meaning of images, use natural language paragraphs to describe the content of images. As a basic and important task in the multimodal field, it plays an important role in testing machine vision comprehension and text generation capabilities. At the same time, image paragraph description technology also has broad application prospects. For example, it can enhance the content of social media, automatically add descriptions to pictures on social media platforms, and enhance users' communication and sharing experience on social media platforms. It can also provide condition descriptions for medical images, provide doctors with automated diagnostic assistance, and help doctors diagnose conditions more accurately.

[0003] As a simplified version of the image paragraph semantic description task, image semantic description has achieved good results because it only needs one sentence to describe the content of an image. However, image paragraph semantic description needs to use natural paragraphs for description, there is a dependency between the semantics between sentences, and richer visual features are needed to describe more details of the image. The generated paragraphs are still far behind human text in terms of coherence and readability, and it is still a very challenging task.

[0004] In the prior art, there have been many studies on the task of semantic description of image paragraphs, and a basic model architecture has been formed: using an encoder-decoder architecture, in which the encoder part is usually also called the visual end, which mainly uses a target detection model (such as a pre-trained convolutional neural network Faster R-CNN) to identify salient areas in the original image and output an image feature vector; the decoder part is also called the text end, which uses a recurrent neural network (such as LSTM, Long Short-Term Memory) to generate a paragraph text description based on the output of the visual end.

[0005] However, the existing image paragraph semantic description model chooses to pool multiple feature vectors of an image output by the encoder into a single global vector, which inevitably causes the loss of visual information, making it difficult for the decoder to obtain sufficient visual information to describe the image details. Therefore, the final generated paragraph description lacks coherence and has poor image-text correlation.

[0006] In addition, the existing technology does not pay attention to the fact that the visual information and the generated text information will simultaneously affect the next generated content, and does not implement the inter-sentence relationship modeling well. Summary of the invention

[0007] The purpose of the present invention is to creatively propose a method for describing image paragraph semantics with enhanced coherence in order to solve the problems and shortcomings of the prior art.

[0008] The innovations of the present invention include: for the first time, it proposes to use visual information enhancement to optimize the pooling operation, align the visual feature vector directly with each sentence description, and avoid the loss of visual information in the paragraph description generation. At the same time, the fusion gate mechanism is used to fuse the visual information and text information, so that the model can pay attention to the visual features of the image and the semantics of the generated description at the same time, thereby generating a paragraph description with strong coherence and sufficient details.

[0009] First, the pre-trained visual model (Faster R-CNN) is used to extract the feature vectors of salient objects in the image. Secondly, since the use of pooling operations will lead to the loss of visual information, the visual information enhancement module is introduced to replace the pooling operation. In the visual information enhancement, the number of feature vectors is first aggregated into the number of sentence descriptions through the aggregation layer, so that the visual feature vector is directly aligned with the sentence description, and then the feature vector is projected into the description generation space through the projection layer. Thirdly, the semantic vector of the generated description of the previous sentence and the projected feature vector are fused using the fusion gate mechanism. Finally, sentence-level loss and word-level loss are constructed, and the model parameters are updated using the gradient descent method.

[0010] The present invention is implemented by adopting the following technical solutions.

[0011] A method for describing image paragraph semantics with enhanced coherence includes the following steps:

[0012] Step 1: Data preprocessing, including deleting and replacing some characters, and marking the paragraph description P G Divide into multiple sentence-level descriptions and count the maximum number of sentences S contained in a paragraph.

[0013] Step 2: Visual feature extraction, obtain the visual features V of the image to be described, V = {v1, v2, ..., v N},v N represents the Nth extracted visual feature vector.

[0014] Step 3: Visual information enhancement: Based on visual information enhancement, the visual features are directly mapped to the topic vector V described by the sentence proj , Represents the topic vector after the Sth mapping.

[0015] Step 4: Coherence modeling.

[0016] For each sentence description to be generated, the semantic vector of the generated sentence is With the projected vector After the fusion gate, the fusion vector F is obtained t ; F t Input the text generation model to obtain a generated sentence-level description d i Multiple sentence descriptions are connected together to form the paragraph description P generated by the model. g .

[0017] Step 5: Model training.

[0018] Predict the end of sentence sign, use the end sign and word probability distribution to build a cross entropy loss function, and use the gradient descent algorithm to train the model.

[0019] First, the end of the paragraph is predicted. To enhance the model's perception of sentence-level semantics, the topic vector described by the sentence is used Predict whether this sentence is the last token of the paragraph i , token i =STOP or CONTINUE.

[0020] Then based on token i , P g and P G Perform model training.

[0021] Step 6: Based on the trained model, perform paragraph semantic description on the input image.

[0022] Specifically, the trained model parameters are loaded. First, the visual features of the image are extracted based on the pre-trained Faster R-CNN model. The topic vector mapped to the paragraph semantic description space is obtained through visual information enhancement. Then, the topic vector and the semantic vector of the previous sentence are fused through a fusion gate and together with the hidden state of a recurrent neural network (such as LSTM), sentence generation is guided. The generated multiple sentences constitute a paragraph semantic description of the input image.

[0023] Beneficial Effects

[0024] Compared with the prior art, this method has the following advantages:

[0025] 1. This method optimizes the pooling operation through visual information enhancement, alleviates the loss of visual information from the encoder to the decoder, and directly aligns the visual feature vector with each sentence description through visual enhancement, helping the model to obtain richer visual information in the process of generating the corresponding sentence description, and enhancing the model's acquisition of image details.

[0026] 2. This method can better model the inter-sentence dependency of paragraph descriptions. Through the fusion gate mechanism, the model can not only focus on the enhanced visual feature vectors, but also on the generated text information, thereby improving the smoothness of the inter-sentence transition of the entire paragraph and further improving the coherence of the entire paragraph.

[0027] 3. The present invention can effectively improve the coherence of the semantic description of image paragraphs, make up for the problems of incoherent paragraph text and missing image details caused by the traditional image paragraph semantic description model, and provide a good guidance and reference for further improving the performance of the image paragraph semantic description system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of an image paragraph semantic description model according to an embodiment of the present invention;

[0029] Figure 2 Schematic diagram of the polymerization layer of an embodiment of the present invention

[0030] Figure 3 is a flow chart of the polymerization layer of an embodiment of the present invention;

[0031] Figure 4 Schematic diagram of a text generation model according to an embodiment of the present invention.

[0032] Figure 5 A comparison diagram of text generation guided by fusion vectors according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0034] Example

[0035] like Figure 1 As shown, a method for semantic description of image paragraphs with enhanced coherence includes the following steps:

[0036] Step 1: Data preprocessing, including deleting and replacing some characters, and marking the paragraph description P G Divide into multiple sentence-level descriptions and count the maximum number of sentences S contained in a paragraph.

[0037] Furthermore, the data preprocessing method is as follows:

[0038] First, we manually designed a character deletion strategy to delete meaningless and useless characters. For example, some special characters that are not commonly used in descriptions: TM ,é, etc.

[0039] Secondly, replace some characters that affect paragraph segmentation, such as "tv" → "tv", "…" → ".", etc.

[0040] Then, use “.” as the sentence end mark to divide the entire paragraph into multiple sentence descriptions.

[0041] Finally, the maximum number of sentences S that a paragraph can be segmented into is counted.

[0042] To facilitate the modeling of inter-sentence relations, during data preprocessing, the paragraph description is segmented into multiple sentence descriptions instead of treating the entire paragraph as the generated object.

[0043] Step 2: Visual feature extraction, obtain the visual features V = {v1, v2, ..., v N}.

[0044] Specifically, the image is input into the pre-trained Faster R-CNN model to obtain the visual features of the image:

[0045] V=FCNN(I) (1)

[0046] Where I represents the input image, FCNN represents the pre-trained Faster R-CNN model; V∈R N*D is the extracted visual feature map, N represents the number of visual feature vectors, and D represents the dimension of the feature vector. For example, N = 50, D = 4096, which means that 50 4096-dimensional features are extracted.

[0047] Faster R-CNN is a model that applies convolutional neural networks to target recognition tasks. It is a representative of two-stage target recognition models, where two stages refer to the fact that this type of model generally divides the task into two parts: extracting areas that may contain objects and classifying objects in the area. Faster R-CNN can be divided into four modules. First, it uses a CNN with 13 convolutional layers, 13 ReLU activation layers, and 4 pooling layers to extract the feature map of the input image. Then, the feature map is passed through a region proposal network (RPN) to obtain candidate boxes that may contain objects. After that, the region of interest pooling layer (RoIPooling Layer) combines the feature map and the candidate box, extracts the feature map corresponding to the candidate box from the previous feature map of the entire image and pools it into a fixed size. Finally, these pooled feature maps are fed to a classifier to predict the specific category and precise position coordinates of the object in the candidate box.

[0048] Faster R-CNN has improved processing speed, accuracy, training flexibility, and scalability. It has now become an important benchmark model in the field of object detection and has achieved remarkable success in many applications.

[0049] Step 3: Visual information enhancement. Based on visual information enhancement technology, the visual features are directly mapped into the topic vector of the sentence description.

[0050] Specifically, visual information enhancement includes an aggregation layer and a projection layer.

[0051] The idea of ​​the aggregation layer is as follows Figure 2 As shown in the figure, we hope to "distill" the original large number of feature maps into new feature maps with richer information and fewer numbers by focusing on the information between different feature maps. Each of the original 50 feature maps represents an object for target detection, but a sentence describing a picture usually reflects the relationship between two or more objects. Therefore, we hope to merge the feature maps of objects that may be involved in a sentence into a new feature map through the aggregation layer.

[0052] Specifically, the aggregation layer aggregates the extracted visual features at the feature quantity level. First, a nonlinear mapping is used to aggregate the number of features into S, that is, each new feature corresponds to a sentence description, and then the layer normalization is used to converge the feature vector value, making the model training process more stable and easier to converge:

[0053] V al =ReLU(W l V T +b l ) (2)

[0054]

[0055] Among them, V al Represents the features after the nonlinear layer; V aggre represents the aggregated feature vector, V aggre ∈R S *4096 , R represents the real number domain; T represents the transposition operation; W l , b l are the learnable parameter matrix and bias matrix respectively; ReLU represents the activation function; LayerNorm represents the layer normalization operation. The operation process of the aggregation layer on the visual feature vector is as follows Figure 3 shown.

[0056] The projection layer projects the aggregated features at the feature dimension level. Since Faster R-CNN is pre-trained on the target recognition task, the extracted feature maps inevitably exist in the target recognition space. When applied to the image paragraph description task, there is a domain gap. Therefore, the projection layer is used to project the feature maps from the target recognition space to the description generation space.

[0057] Specifically, the projection layer constructs the description generation space using nonlinear mapping:

[0058]

[0059] Among them, Q(R 4096 →R 1024 ) is a learnable linear mapping, Represents the result of projecting the i-th visual feature vector into the description generation space.

[0060] Visual information enhancement can directly align visual features with sentence descriptions instead of pooling multiple visual feature maps into a single global vector, which effectively alleviates the loss of visual information and improves the richness of visual information that can be obtained by text generation.

[0061] Step 4: Coherence modeling. For each sentence description to be generated, the semantic vector of the generated sentence is With the projected vector After the fusion gate, the fusion vector F is obtained t , F t Input the text generation model to obtain a generated sentence-level description d i , multiple sentence descriptions are connected together to form the paragraph description P generated by the model g .

[0062] Specifically, the implementation method of coherence modeling based on the fusion gate mechanism is as follows:

[0063] First, obtain the semantic vector of the generated sentence. The semantic vector is the result of converting the symbolic representation of the text into a vector representation in the semantic space. The semantic vector corresponding to a sentence represents its semantic information. For the model of the present invention, the sentence is generated by word-level LSTM, and the hidden state of each time step of LSTM contains the information of this time step and the previous data. Related research work also shows that the hidden state of a time step stores the output word corresponding to the hidden state and the semantic information of the prefix sentence composed of all previous output words. For a sentence, the last hidden state contains the semantic information of the entire sentence. Therefore, the semantic vector of the generated sentence is the last hidden state of LSTM in this generation process:

[0064]

[0065] Among them, h i represents the hidden state of LSTM, k t represents the length of the description of the tth sentence (i.e. the number of words contained), e t Represents the semantic vector of the tth sentence.

[0066] Then, the semantic vector e is fused using the fusion gate t and features from visual information enhancement

[0067]

[0068] Among them, W p and W e is the learnable parameter matrix; σ is the sigmoid activation function; g t is an intermediate variable, controlling the model to focus on semantic information e t-1 and visual information degree; ⊙ represents the element-by-element multiplication operation; F t It is the fused vector after fusion, which is used to guide the subsequent description generation.

[0069] Finally, text description generation is performed. Text generation is based on the LSTM model, and the words described are predicted based on the fusion vector and LSTM hidden state:

[0070]

[0071] Among them, FC represents a fully connected network; F i represents the fusion vector of the i-th sentence; h ij 、p ij They represent the hidden state corresponding to the jth word in the i-th sentence and the predicted word probability distribution respectively.

[0072] In the present invention, the description generation is guided, and a fusion vector F with prompt information is generated for each word. i The intervention is delayed until LSTM generates hidden states, which is a kind of "merge structure". Figure 5 Four methods of integrating vectors into word generation are shown:

[0073] Init-inject: The fused vector is input into LSTM as the initial hidden state h0 of LSTM;

[0074] Pre-inject: The fused vector is used as the first input of LSTM, and the fused vector is regarded as the first "word" of the prefix of the input sentence;

[0075] Par-inject: The fusion vector and the word vector are concatenated and input into LSTM together;

[0076] Merge: LSTM does not use the fusion vector until the hidden state of the word to be predicted is generated. The fusion vector is not introduced into the language model until the entire prefix of the input LSTM is encoded. This is a late binding merge architecture.

[0077] In the first three schemes, the fused vectors are involved in the generation of words at an earlier stage and will be modified by LSTM during the encoding process, while the fused vectors in the merged structure are involved at a later stage and will not be modified at any time step.

[0078] Experiments show that the first three solutions tend to regenerate the description of a picture based on the text description of the dataset and show less vocabulary changes, while the merging structure used in the present invention regards the fused vector as a fixed feature and more effectively utilizes information from multiple modalities.

[0079] After LSTM generates multiple sentence descriptions, these sentence descriptions are connected together in the order of generation to form the entire paragraph description.

[0080] Step 5: Model training. First, the end of paragraph prediction is performed. To enhance the model’s perception of sentence-level semantics, the topic vector described by the sentence is used. Predict whether this sentence is the last token of the paragraph i =STOP or CONTINUE; then based on token i , P g and P G Perform model training.

[0081] Specifically, the model training method is as follows:

[0082] The model loss functions include sentence-level loss and word-level loss.

[0083] For the sentence-level loss function, the model uses a classifier based on Predict whether the i-th sentence is the last sentence of the paragraph description. The flag STOP=1 indicates that the sentence is the last sentence and stops generating. The flag CONTINNUE=0 indicates that the sentence description needs to be continued and the cross entropy is used to calculate the loss.

[0084]

[0085] Among them, p i The sign of the model prediction, y i Indicates a true sign.

[0086] For word-level loss, the predicted word distribution p is calculated using the cross entropy loss function. ij and the real word distribution y ij The difference between

[0087]

[0088] Among them, y ijIt is a one-hot encoding.

[0089] The final loss function is the weighted sum of sentence-level loss and word-level loss.

[0090]

[0091] Among them, λ sent and λ word The weights are taken as 5.0 and 1.0 respectively.

[0092] After obtaining the entire loss function of the model, the gradient descent algorithm is used to train the model.

[0093] Step 6: Based on the trained model, perform paragraph semantic description on the input image.

[0094] Load the trained model parameters. First, extract N visual features of the image based on the pre-trained Faster R-CNN model, and map them to S topic vectors in the paragraph semantic description space through the visual information enhancement module. Then, the topic vector and the semantic vector of the previous sentence are fused through the fusion gate and used together with the hidden state of the LSTM to guide sentence generation. The generated multiple sentences constitute the paragraph semantic description of the input image.

[0095] For each sentence, whether to stop generating is determined based on the result of the paragraph end prediction. Specifically, when the prediction result is STOP (= 1), the generation of the entire paragraph is stopped, otherwise the next sentence is generated.

Claims

1. A coherence-enhanced semantic description method for image paragraphs, It is characterized in that The following steps are involved: Step 1: Data preprocessing, including deleting and replacing some characters, and marking the paragraph description P G Split into multiple sentence-level descriptions and count the maximum number of sentences S contained in a paragraph; Step 2: Visual feature extraction, obtain the visual feature V of the image to be described, V = {v 1 ,v 2 ,…,v N },v N represents the Nth extracted visual feature vector; Step 3: Visual information enhancement: Based on visual information enhancement, the visual features are directly mapped to the topic vector V described by the sentence proj , Represents the topic vector after the Sth mapping; Step 4: Coherence modeling; For each sentence description to be generated, the semantic vector of the generated sentence is With the projected vector After the fusion gate, the fusion vector F is obtained t ; F t Input the text generation model to obtain a generated sentence-level description d i ; Multiple sentence descriptions are connected together to form the paragraph description P generated by the model g ; Step 5: Model training; Predict the end of sentence sign, use the end sign and word probability distribution to construct the cross entropy loss function, and use the gradient descent algorithm to train the model; First, the end of the paragraph is predicted. To enhance the model's perception of sentence-level semantics, the topic vector described by the sentence is used Predict whether this sentence is the last token of the paragraph i , token i =STOP or CONTINUE; Then based on token i , P g and P G Conduct model training; Step 6: Based on the trained model, perform paragraph semantic description on the input image.

2. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 1, first, a character deletion strategy is manually designed to delete meaningless and useless characters; Secondly, replace some characters that affect paragraph segmentation; Then, use "." as the sentence end mark to split the entire paragraph into multiple sentence descriptions; Finally, the maximum number of sentences S that a paragraph can be segmented into is counted.

3. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 2, the image is input into the pre-trained Faster R-CNN model to obtain the visual features of the image: V=FCNN(I) Where I represents the input image, FCNN represents the pre-trained Faster R-CNN model; V∈R N*D is the extracted visual feature map, N represents the number of visual feature vectors, and D represents the dimension of the feature vector.

4. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 3, visual information enhancement includes aggregation layer and projection layer; The aggregation layer aggregates the extracted visual features at the feature quantity level; first, a nonlinear mapping is used to aggregate the number of features into S, where each new feature corresponds to a sentence description, and then layer normalization is used to converge the feature vector values, making the model training process more stable and easier to converge: V al =ReLU(W l V T +b l ) Among them, V al Represents the features after the nonlinear layer; V aggre represents the aggregated feature vector, V aggre ∈R S*4096 , R represents the real number domain; T represents the transposition operation; W l , b l They are respectively the learnable parameter matrix and bias matrix; ReLU represents the activation function; LayerNorm represents the layer normalization operation; The projection layer projects the aggregated features at the feature dimension level, and uses the projection layer to project the feature map from the target recognition space to the description generation space; The projection layer constructs the description generation space using nonlinear mapping: Among them, Q(R 4096 →R 1024 ) is a learnable linear mapping, Represents the result of projecting the i-th visual feature vector into the description generation space.

5. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 4, the implementation method of coherence modeling based on the fusion gate mechanism is as follows: First, the semantic vector of the generated sentence is obtained; the semantic vector is the result of converting the symbolic representation of the text into a vector representation in the semantic space. The semantic vector corresponding to a sentence represents its semantic information; The semantic vector of the generated sentence is the last hidden state of the long short-term memory network LSTM during the generation process: h i =LSTM(h i-1 ),i=0,1,…,k t-1 Among them, h i represents the hidden state of LSTM, k t represents the length of the description of the tth sentence, e t Represents the semantic vector of the tth sentence; Then, the semantic vector e is fused using the fusion gate t and features from visual information enhancement Among them, W p and W e is the learnable parameter matrix; σ is the sigmoid activation function; g t is an intermediate variable, controlling the model to focus on semantic information e t-1 and visual information degree; ⊙ represents the element-by-element multiplication operation; F t is the fused vector after fusion, which is used to guide the subsequent description generation; Finally, text description generation is performed; text generation is based on the LSTM model, and the words described are predicted based on the fusion vector and LSTM hidden state: p ij =FC(Concat(F i ,h ij )) Among them, FC represents a fully connected network; F i represents the fusion vector of the i-th sentence; h ij 、p ij Respectively represent the hidden state corresponding to the jth word in the i-th sentence and the predicted word probability distribution; Guide description generation and generate a fusion vector F with prompt information for each word i The intervention is delayed until the long short-term memory network LSTM generates a hidden state. It is a "merge structure" Merge. Merge: LSTM will not use the fusion vector before generating the hidden state of the word to be predicted. The fusion vector is not introduced into the language model until the entire prefix of the input LSTM is encoded. It is a late-binding merge architecture. The fusion vector in the merge structure is involved in the later stage and will not be modified at any time step. After LSTM generates multiple sentence descriptions, these sentence descriptions are connected together in the order of generation to form the entire paragraph description.

6. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 5, the model loss function includes sentence-level loss and word-level loss; For the sentence-level loss function, the model uses a classifier based on Predict whether the i-th sentence is the last sentence of the paragraph description. The flag STOP=1 indicates that the sentence is the last sentence and stops generating. The flag CONTINNUE=0 indicates that the sentence description needs to be continued and the cross entropy is used to calculate the loss. Among them, p i The sign of the model prediction, y i Indicates a true sign; For word-level loss, the predicted word distribution p is calculated using the cross entropy loss function. ij and the real word distribution y ij The difference between Among them, y ij One-hot encoding; The final loss function is the weighted sum of sentence-level loss and word-level loss. After obtaining the entire loss function of the model, the gradient descent algorithm is used to train the model.

7. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 6, It is characterized in that λ sent and λ word The weights are taken as 5.0 and 1.0 respectively.

8. The method for describing image paragraph semantics with enhanced coherence as claimed in claim 1, It is characterized in that In step 6, the trained model parameters are loaded. First, N visual features of the image are extracted based on the pre-trained model, and then mapped to S topic vectors in the paragraph semantic description space through the visual information enhancement module. Then, the topic vector and the semantic vector of the previous sentence are fused through the fusion gate and the hidden state of the LSTM to guide sentence generation. The generated multiple sentences constitute the paragraph semantic description of the input image.