Next Article in Journal
A Three-Phased Fuzzy Logic Multi-Criteria Decision-Making Model for Evaluating Operation Systems for Smart TVs
Previous Article in Journal
A Research on Manipulator-Path Tracking Based on Deep Reinforcement Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Novel Object Captioning with Semantic Match from External Knowledge

1
School of Automation and Information Engineering, Xi’an University of Technology, Xi’an 710048, China
2
School of Printing, Packaging and Digital Media, Xi’an University of Technology, Xi’an 710054, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(13), 7868; https://doi.org/10.3390/app13137868
Submission received: 8 June 2023 / Revised: 1 July 2023 / Accepted: 2 July 2023 / Published: 4 July 2023

Abstract

:
Automatically describing the content of an image is a challenging task that is on the edge between natural language and computer vision. The current image caption models can describe the objects that are frequently seen in the training set very well, but they fail to describe the novel objects that are rarely seen or never seen in the training set. Despite describing novel objects being important for practical applications, only a few works investigate this issue. Furthermore, those works only investigate rarely seen objects, but ignore the never-seen objects. Meanwhile, the number of never-seen objects is more than the number of frequently seen and rarely seen objects. In this paper, we propose two blocks that incorporate external knowledge into the captioning model to solve this issue. Initially, in the encoding phase, the Semi-Fixed Word Embedding block is an improvement for the word embedding layer that enables the captioning model to understand the meaning of the arbitrary visual words rather than a fixed number of words. Furthermore, the Candidate Sentences Selection block chooses candidate sentences by semantic matching rather than probability, avoiding the influence of never-seen words. In experiments, we qualitatively analyze the proposed blocks and quantitatively evaluate several captioning models with the proposed blocks on the Nocaps dataset. The experimental results show the effectiveness of the proposed blocks for novel objects, especially when describing never-seen objects, CIDEr and SPICE improved by 13.1% and 12.0%, respectively.

1. Introduction

Image captioning is a classical task that aims at automatically describing an image using natural language. This research is at the intersection of two popular research fields, i.e., Computer Vision and Natural Language Processing. This task is simple for humans. However, it is a considerable challenge for computers, which not only requires understanding the content of the image but also generates sentences with human language habits. Image captioning has wide applications in image retrieval, image indexing, human–computer interaction, assisting visually impaired people, automatic video security monitoring, and journalism. Because of its importance, it is becoming a research hotspot.
Typically, image captioning models are based on the encoder-decoder structure. Most models are trained on parallel data of image-sentence pairs. Some models [1,2,3,4] even outperform humans on the MSCOCO dataset in some metrics. Those models perform well when describing the objects that often appear in the training set, but fail to describe novel objects (rarely seen or never-seen). The most straightforward way to overcome this limitation is to collect more data [5,6]. Such methods are effective, but the data collection process is highly expensive and time-consumption. In order to reduce consumption while still maintaining a competitive performance, most inexpensive approaches rely on the object detection model [7,8,9]. Modern object detection models can recognize a wide range of objects through incredibly large training sets [10] or zero-shot methods [11]. Those captioning models improve the noun-region matching ability by describing the nouns corresponding to the attended regions. Those models are good for describing rarely seen objects but are useless for never-seen objects. In particular, the number of never-seen objects is unknown while the dimension of the word embedding layer and final fully-connected layer in the captioning model is fixed. It is impossible to understand the meaning of the never-seen word and describe it.
Even though the current novel captioning model can generate sentences containing selected tags through constrained beam search (CBS) [12], when the selected tag is semantically unclear novel words, it is harmful to the probability of subsequent words and affects the final sentence selection. The harm is especially severe when the selected tag is incorrect. However, the current novel object captioning model does not address this issue.
To overcome those issues, we propose an external knowledge-based novel image captioning method that purposefully uses external knowledge to extend the word embedding casually, and makes the captioning model understand the meaning of the extended words. Specifically, the main contribution of our work is two blocks, i.e., the Semi-Fixed Word Embedding and Candidate Sentences Selection. The Semi-Fixed Word Embedding is a new embedding layer that can be extended to the never-seen word through external knowledge while assisting the captioning model in understanding the meaning of the extended never-seen word. The Candidate Sentences Selection block assists the captioning model in the selection of the candidate sentences to avoid the influence of the novel words in CBS.
The study’s contributions are as follows:
(1)
We propose a novel prior-based word embedding block that incorporates semantic information to enable the model to understand various words, including never-seen words. It is beneficial for the captioning model to understand the meaning of the novel words and generate more accurate subsequent words.
(2)
We propose a new block to evaluate candidate sentences through the semantic similarity between generated sentences and the given image which is obtained by external knowledge so as to reduce the influence of never-seen words.
(3)
Proposed blocks can be attached to a detection-based captioning model to enable them to describe the rarely seen and never-seen objects.
(4)
We performed a comprehensive evaluation of the captioning datasets MSCOCO and Nocaps, demonstrating that the proposed blocks outperform several state-of-the-art methods in most metrics and have the ability to describe never-seen objects without additional data.

2. Related Work

In this section, we will introduce related work from two aspects: image captioning and novel object captioning.

2.1. Image Captioning

The structure of image captioning is mainly divided into three approaches. (1) The first is the template-based method [13,14], which fills the sentences with object detection results. Farhadi et al. [13] detect all candidate scenes, objects, and objects’ attributes, then use the CRF algorithm to predict the correct three-element filling in the template as the captioning. The template-based methods require a manually designed syntactic template but have higher accuracy than the retrieval-based models. (2) The second is retrieval-based methods [15,16], which retrieve similar images from the whole database and selectively combine the sentences of similar images to create image captioning. The quality of the caption depends on the similarity evaluation method and the quality of the database. The retrieval-based methods can generate sufficiently fluent sentences, but they heavily rely on the sentences in the database. Hence, it is difficult to generate a new corpus to describe new images. (3) The second is encoder-decoder-based methods, in which the encoder structure first converts the image into some vectors to represent the content of the image, and then, the decoder structure generates sentences word by word based on the vector. Early encoder-decoder methods [14,17] encode images with soft attention to focus on different regions to generate a feature vector, and then decode the feature vector to sentences. Long et al. [18] incorporate spatial and channel-wise attention into CNN to encourage the model to focus on meaningful regions. Considering that the whole image contains a large amount of redundant information, to reduce redundant information, Anderson et al. [19] propose a bottom-up attention mechanism to provide region information, which comes from the detection network (Faster R-CNN [20]). The detection model trained on the large dataset not only removes redundant areas irrelevant to the description but also extracts better visual features. However, the region features a lack of relationship information. Some researchers [21,22,23] adopt the scene graph [24] to express objects and the semantic relationship between objects. Scene graphs bring richer information, but richer information contains more redundancy information, and the scene graph must be processed by graph convolution. These reasons limit the development of the methods based on the scene graph.
In particular, with the success of transformers [25] in the field of NLP, many state-of-the-art models [26,27,28] adopt the transformer structure to design the encoder or decoder. Huang et al. [26] incorporate the attention block into the encoder and decoder to measure the relevance between the attention result and the query. Cornia et al. [27] extend self-attention with additional “slots” to encode prior information. Sharma et al. [29] design an LRN that discovers the relationship between the object and the image regions. Apart from this, BERT, a pre-trained model composed of deep bidirectional transformers, achieved outstanding results. Many models [30,31,32] exploit BERT-like structures pre-trained on a large corpus to achieve state-of-the-art performance.
Although many researchers have improved the accuracy of generated sentences through the attention-based model or transformer-based model, since the captioning model needs to be trained on the dataset, the number of images and the types of objects in the training set are limited. Hence, it is difficult to describe objects that are rarely seen or never seen in the training set.

2.2. Novel Object Captioning

The novel object captioning task is an extension of the image captioning task for describing objects that are rarely seen or never seen in the training set. Some works have been proposed to address this challenge through visual and semantic alignment. LSTM_C [33] exploited a copying mechanism to copy the selected words into the sentences. However, LSTM_C is difficult to determine which detected objects need to be described, the ANOC [34] utilizes human attention from visual information to identify novel objects that need to be described. CRN [35] selects more accurate words from the detection result by the visual matching module, and ensures that the novel words fit in the right position through a semantic matching module. NOC-NER [36] designs a retrieved vocabulary to find the novel objects that might be described. Oscar [31] and VinVL [30] pre-train large-scale models and then fine-tune the model to adopt downstream tasks. Those methods are effective for rarely seen objects in the dataset, but not for never-seen objects.
Hence, some researchers focus on the zero-shot novel object captioning task, which does not require additional training sentences for never-seen objects. NBT [37], DNOC [8], and ZSC [9] use a special token to represent all the novel objects, which enables them to replace the novel object label with the special token. The common issue for those models is how to select a proper word to replace the novel object label. SNOC [38] uses words of most similar objects as proxy visual words to solve the out-of-vocabulary issue, and retrieves proper nouns through the designed switchable LSTM to replace the similar objects. Similar to the special token-based model, the issue of which words should be replaced is central. SMALLCAP [39] generates a caption conditioned on the image and related captions retrieved from a datastore. This method can effectively avoid the problem of replacing special tokens, but the accuracy of the generated statements is low. Compared with those zero-shot novel captioning methods, rather than based on the special token, our designed blocks allow the captioning model to understand the meaning of rarely-seen and never-seen objects. Meanwhile, the designed blocks can be attached to the most popular captioning models, enabling them to describe novel objects without additional training data.

3. Preliminary

Constrained Beam Search

The constrained beam search (CBS) [12] is a commonly used method to generate sentences containing selected tag words at inference time. This method enables existing deep captioning models to describe novel objects.
The example of the constrained beam search is shown in Figure 1, in which the selected tag is “dolphin” and the b e a m s i z e = 1 . To generate a sentence containing the selected tag “dolphin”, the candidate sentences are distinguished into two cases: 1. Not containing “dolphin” 2. Containing “dolphin”.
First, generate the words “a” and “dolphin” based on the start symbol for two cases. After obtaining case 1 “a” and case 2 “dolphin”, generate subsequent words for case 1 and case 2. The generated sentence “a swimming” belongs to case 1, and the sentences “a dolphin”, “dolphin swimming”, and “dolphin dolphin” belong to case 2. Keep beam size sentences for each case according to probability. The retained sentences are “a swimming” and “a dolphin”, respectively. Continuing the above operation, the CBS will eventually output b e a m s i z e × 2 candidate sentences, where 2 is the number of the case. In CSB, the final output is the sentence with the selected tag and the highest score.
Traditional captioning models with CBS can generate a sentence containing the selected tags, but novel tags with unclear semantic content are harmful to the probability of candidate sentences and will affect the selection of the final sentence. Particularly when tags are incorrect, the harm is more severe.

4. Proposed Model

Novel object captioning is a subtask of image captioning. The captioning model contains a training phase and an inference phase. In the training phase, the model is trained by the Masked Language Model (MLM) [1,2,3] or Language Model (LM) [4,19]. The MLM is to predict the middle words on both sides. LM is the autoregressive approach to predicting word by word. In the inference phase, either MLM or LM, the sentences are generated through the autoregressive approach, as shown in Figure 2.
The earlier encoder-decoder structure and the current transformer structure predict the next word based on the previous word vectors and the image features as follows,
p ( y t ) = M o d e l ( E ( y t 1 , , 0 ) , I )
where y t is the word generated by the M o d e l at time step t. E is word embedding. I denotes the input image.
All captioning models exploit the word embedding layer E to encode the word y t into a word vector and predict the word probability through the final fully-connected layer.
Even if CBS enables the captioning model to describe the selected words in the vocabulary, current novel image captioning models still have three shortcomings: firstly, the final fully-connected layer cannot predict the probability of never-seen words that are out of the dimension vocabulary; secondly, the word embedding cannot encode the never-seen words; thirdly, even if the captioning model is able to encode never-seen words, inappropriate word embedding leads the model to generate incorrect subsequent words and corresponding probabilities.

4.1. Motivation

This manuscript is inspired by the experiments of CLIP [40]. The structure of CLIP is shown in Figure 3. The CLIP jointly trains an image encoder and a text decoder to predict the correct image-text pair. The image encoder can be ResNet [41] or VIT [42]. The text encoder is a transformer-based model [43]. The CLIP evaluates the similarity between the image feature and the text feature through the cosine function.
Table 1 shows the visual similarity of each image and word. When images and words have higher matching scores, they have similar visual concepts. This means that CLIP features express the visual concepts of words and images. Meanwhile, the CLIP text decoder can encode any word. Considering the characteristics of CLIP, we construct two blocks to assist the traditional captioning model in solving the three shortcomings. In the following, we describe the proposed Semi-Fixed Word Embedding and candidate sentence selection methods in detail.

4.2. Semi-Fixed Word Embedding

In the current novel image captioning task, some models initialize word embedding via glove [44]. The experiments in Nocaps [45] use glove for initial word embedding and demonstrate that glove is useful for rarely seen and never-seen words (out-of-domain), but harmful for common words (in-domain). For in-domain, the model with glove outperforms the model without glove by 0.4 in Spice but underperforms by 0.7 in CIDEr. According to the definitions of SPICE and CIDEr, CIDEr takes into account non-visual words, while SPICE only considers the relationship between visual words. This shows that glove works well for visual words, but slightly worse for non-visual words.
Considering the CLIP predicts the correct image-text pair from the visual content. The non-visual words do not have visual information, while the novel object captioning task aims to describe the novel object. The word for the novel object must be a visual word. Therefore, we decide to fix the embedding of visual words through the CLIP feature and learn the embedding of non-visual words from the training set.
Figure 4 shows the structure of our proposed Semi-Fixed Word Embedding. It mainly consists of three parts. The first part is a trainable non-visual word embedding E n w . The second part is fixed in-domain visual word embedding E i w , which enables the captioning model to understand the meaning of CLIP noun features. The third part is the never-seen visual word feature E o w used in the inference phase, which allows the embedding layer to be extensible and can be used to understand the meaning of the novel words specified by the CBS.
In the training phase and inference phase, word features can be calculated by Equation (2) and Equation (3), respectively.
v w = c o n c a t ( E n w , E i w ) Π t
v w = c o n c a t ( E n w , E i w , E o w ) Π t
where Π t is the one-hot encoding of the input word y t at time step t.
The traditional captioning model calculates the probabilities of candidate words through the fully-connected layer and softmax layer as follows,
p y t y 1 : t 1 = softmax W p h t + b p
where h t is the hidden semantic feature. The size of the fully-connected layer is unchangeable in the inference stage.
The traditional CBS predicts y t through Equation (4) for each case based on p y t y 1 : t 1 . When the selected word is not included in the vocabulary, the probability and loss for the selected word are uncomputable. Hence, this manuscript calculates the loss for each word as follows:
l o g p y t y 1 : t 1 = l o g p y t y 1 : t 1 , if y t v o c a b l f i x , if y t v o c a b
where y t can be a selected tag or generated word. l f i x is a fixed loss. This modification enables CBS to generate words beyond the dimension of the final fully-connected layer.

4.3. Candidate Sentences Selection

The selected tag in the CBS is obtained by the detection method but does not always need to be described. The CBS contains multiple cases, each case contains various selected tags and generates beam size candidate sentences. Traditional CBS only outputs sentences that contain all the selected tags with the highest loss. However, the never-seen word with a fixed loss is harmful for sentence selection, and the sentences containing all selected tags may not always be optimal.
In order to reduce the impact of never-seen words and the selected tags for the captioning process. This manuscript designs a novel candidate sentence selection to replace the original selection method. The candidate sentence selection evaluates the semantic similarity between the given image and candidate sentences using external knowledge through Equation (2).
s i = c o s ( v i , w a l l s , i )
where v i is the CLIP feature of the given image i, w a l l s , i = ( w 1 s , i , , w n s , i ) is the CLIP feature of all candidate sentences, n is the number of candidate sentences. The final output is the similarity of each sentence with the image i.
In this way, this manuscript avoids the condition that output sentences must contain all selected tags, further improving the accuracy of the generated sentences.

5. Experiments

5.1. Dataset

All of the experiments were conducted on the Open Images V4 [10], Microsoft COCO (MSCOCO) 2015 Captions datasets [46], and Nocaps [45] datasets. The Open Images is the object detection training set, which has 1.7M images annotated with bounding boxes for 600 object classes. The detected objects may be the selected tag in CBS. MS COCO dataset contains 123,287 images labeled with 5 captions for each. We follow the Karpathy split [47], where 113,287 images are used for training, 5000 for validation, and 5000 for testing. MSCOCO is used to train the captioning model. Nocaps consist of 15,100 images, each annotated with 11 human-generated captions, of which 4500 are for validation and 10,600 for testing. The images in Nocaps to validate the model can be further divided into three subsets, namely in-domain, near-domain, and out-of-domain, where the in-domain images contain only objects described in the MS COCO, the near-domain images contain some objects described in the MS COCO, the out-of-domain images are very distinct from the MS COCO images, i.e., the out-of-domain contain novel objects that are rarely-seen or never-seen in the MS COCO. All of the corresponding results were obtained from the Nocaps dataset. The selected tags in CBS are obtained by performing a filter on the detected objects.

5.2. Evaluation Metrics

To evaluate the performance of proposed blocks and generated sentences, we employ a set of commonly used captioning metrics: BLEU, METEOR, ROUGE-L, CIDEr-D, and SPICE.
BLEU [48]: This metric is usually used in machine translation. It measures the co-occurrences of n-grams (n = 1, 2, 3, 4) in generated sentences and ground truth sentences. The metrics are calculated by counting the mean of the n-grams precision scores as follows,
BLEU - n = BP × e n = 1 N B w n B log P n B
where P n B and w n B are the precision and weight for n-grams, respectively. B P is a brevity penalty as Equation (8) is used to penalize sentences that are shorter than ground truth sentences.
BP = 1 , if l c > l r e 1 l r / l c , if l c l r
where l c and l r are the lengths of the generated and ground truth sentences, respectively.
METEOR [49]: These metrics evaluate an alignment between the generated and ground truth sentences. First, METEOR calculates the F-Score ( F M ) based on the uni-gram precision P M and recalls R M as follows:
F mean = 10 P M R M R M + 9 P M
The METEOR is calculated as follows:
METEOR = F mean ( 1 0.5 × | C h u n k s | | u n i g r a m s | )
where | C h u n k s | is the number of contiguous order matches of the generated and ground truth sentence. | u n i g r a m s | is the number of matched uni-grams.
ROUGE-L [50]: This metric calculates the recall to measure the longest common sequence (LCS) between the generated and ground truth sentences. The ROUGE-L is based on the precision P L and recall R L score of LCS as follows:
R L = L C S ( X l , Y l ) m l
P L = L C S ( X l , Y l ) n l
ROUGE - L = ( 1 × β 2 ) × R L × P L R L + β 2 × P L
where m l and n l are the length of ground truth sentence X l and generated sentences Y l . L C S ( X l , Y l ) is the longest common subsequence of X l and Y l .
CIDEr-D [51]: This metric gives different weights based on the frequency of n-grams. That is, CIDEr-D gives higher weights to rarely seen n-grams. It calculates a term frequency-inverse document frequency (TF-IDF) weight to n-grams. C I D E r n for n-grams as follows,
C I D E r n ( Y c , X c ) = 1 m c j = 1 m c g n ( Y c ) · g n ( X j c ) g n ( Y c ) g n ( X j c )
where m c is the number of ground truth sentences, X j c is the j t h ground truth sentence, Y c is the generated sentence. g n is the TF-IDF weighting for n-gram. The CIDEr is calculated as follows,
C I D E r ( Y c , X c ) = n = 1 N w n C I D E r n ( Y c , X c )
where w n = 1 / N and N = 4 .
SPICE [52]: This metric uses the rule-based method to parse the sentence into a dependency tree and map the tree into a scene graph. Finally, it calculates the F-score of the objects, attributes, and relations. The SPICE focuses on evaluating the objects, attributes, and relations in generated sentences.

5.3. Implementation Details

Our structure was developed in PyTorch. For a fair comparison, this manuscript utilizes UPDN [19], X-LAN [4], and Oscar [31] as the basis of our network structure for comparison experiments, respectively. Note that Oscar is a transformer-based model trained on a larger dataset. The parameter settings of the UPDN, X-LAN, and Oscar are the same as the original model, except for the word embedding and the subsequent feature dimensions. The training strategy of each model is the same as the original. To better extract semantic features for each image, we use Faster R-CNN [20] fine-tuned on the Visual Genome dataset [53] to detect object regions and extract regional features through CLIP. When the selected word was never seen in the MS COCO, we set the loss of the word l f i x to −20. The experiments were conducted on an NVIDIA GTX 1080 Ti.

5.4. Ablative Analysis

We conducted ablative studies to explore the impact of our proposed blocks, including (1) the effectiveness of proposed blocks on various captioning models and (2) the effectiveness of the proposed embedding method for never-seen words. All of the results were obtained using XE-loss, self-critic, and trained under the same training strategy and dataset.

5.4.1. The Effectiveness of Proposed Blocks on Various Captioning Models

We tried to explore the effectiveness of Candidate Sentences Selection, Semi-Fixed Word Embedding on various captioning models, i.e., UpDown [19] and XLAN [4], and insert each block into these approaches. The experiment was performed on the Nocaps dataset [45], where the images in “In-domain” only contain frequently seen objects, the image in “Near-domain” contain frequently seen, rarely seen and never-seen objects, the images in “Out-Of-domain” only contain rarely seen or never seen objects. To illustrate the impact of Semi-Fixed Word Embedding more clearly, we also compare it with the commonly used glove initialization.
From the results shown in Table 2, we can see the efficacy of each block. Comparing the results of rows 1, 2, and 3 with other rows shows that CBS reduces the score of in-domain, but significantly improves the scores of out-of-domain, indicating that CBS is necessary for the novel object captioning task.
The comparison of rows 4/5, 6/8, and 7/9 shows the effectiveness of Candidate Sentences Selection. The improvement of CIDEr and SPICE on in-domain/near-domain/out-of-domain is 4.93/4.49/5.28 and 0.64/0.34/0.69 for rows 4 and 5, 4.86/5.76/8.23 and 0.27/0.5/0.54 for rows 6 and 8, 3.23/5.04/7.12 and 0.71/0.44/0.51 for rows 7 and 9, respectively. It is clear that Candidate Sentences Selection can effectively solve the problem of semantic mismatch, and therefore, the accuracy of generated sentences is significantly improved.
The effectiveness of Semi-Fixed Word Embedding is shown by the comparison of rows 6/7. The improvement of CIDEr and SPICE on in-domain/near-domain/out-of-domain is 0.79/1.2/0.81 and −0.01/0.25/0.34 for rows 6 and 7. The Semi-Fixed Word Embedding outperforms the glove in the near-domain and out-of-domain, showing that the Semi-Fixed Word Embedding assists the captioning model in understanding the meaning of the novel words. In particular, the SPICE metrics reflect the semantic matching of the described object and relationship. The most significant improvement on the out-of-domain shows that Semi-Fixed Word Embedding works better for novel words.
Rows 8/9 show the result of using Semi-Fixed Word Embedding or glove on the basis of Candidate Sentences Selection, respectively. The metrics of SPICE are improved in all domains, which means that the semantic matching can be improved by Semi-Fixed Word Embedding.
When replacing the captioning model with the XLAN [4], the same results can be observed, indicating the effectiveness and robustness of the proposed blocks.

5.4.2. The Effectiveness of Proposed Embedding Block for Never-Seen Objects

Consider that out-of-domain images contain rarely seen and never-seen objects, while the Semi-Fixed Word Embedding focuses on never-seen objects. To further demonstrate the effectiveness of the proposed block, Table 3 shows the scores of sentences generated by various embedding methods for the never-seen selected tags. In this table, we only analyze the results for different sentences, ignoring the same generated sentences, in which the Common and Never denote the words included or not included in the training set. The our, glove, replace, and random denote the different ways to obtain word embedding.
From the result, we can see that the improvement of the CIDEr/SPICE in rows 1 and 2, rows 9 and 10, rows 3 and 4, and rows 11 and 12 is −0.12/0.08, 6.62/1.53, 10.18/5.39, and 10.97/6.58. Compared with random embedding, Semi-Fixed Word Embedding significantly improves the accuracy of generated sentences. Compared with manual replacement, Semi-Fixed Word Embedding performs well on XLAN and slightly worse on UPDN; meanwhile, Semi-Fixed Word Embedding does not need manual replacement.
By observing the corresponding results of glove, it is better than random embedding, but worse than manual replacement and Semi-Fixed Word Embedding in UPDN and XLAN, indicating that glove is difficult to reflect the visual semantic of the noun. It is also demonstrated that the proposed block is beneficial for the captioning model to understand the meaning of the noun.

5.5. Quantitative Analysis

In this subsection, we will present the experiment results to demonstrate that the proposed blocks can enhance the performance of the novel image captioning tasks. First, we chose several of the most representative state-of-the-art methods, which include both regular and transformer-based methods. The comparison methods are briefly described as follows: (1) OVE [7] (2020), in which a low-cost method is proposed to expand word embeddings from a few images of the novel objects; (2) ANOC [34] (2021), which combines object detector and human attention to guide the model to describe novel objects; (3) NOC-REK [36] (2022) retrieves vocabulary from external knowledge and generates captions; (4) VIVO [54] (2021), (5) VinVL [30] (2021), and (6) Oscar [31] (2020), which are the large-scale vision-language transformer model and fine-tune the pre-trained model to adopt downstream tasks; (7) ClipCap [55] (2021) produces a prefix by applying a mapping network over the CLIP visual embedding; (8) SMALLCAP [39] (2023) generates sentences conditioned on the input image and related captions retrieved from a datastore; (9) UpDown [19] (2018) proposes the standard two-layer LSTM structure, in which the attention LSTM encodes the previous words to decide the current attended region features, and the language LSTM generates the next word based on the attended region features and the previous words; (10) XLAN [4] (2020), which proposes an X-Linear attention to model the 2nd order interactions with both spatial and channel-wise bilinear attention. In those models, UpDown and XLAN are the regular image captioning models without any models designed for the novel objects. Other models contain particular modules for the novel objects.
For a fair comparison, we re-implemented some methods and attached the proposed blocks to those models. The model with “*” indicates our re-implementations. “+our” indicates attaching the proposed blocks. From Table 4, it can be seen that the model with our proposed block presented a higher performance in the Nocaps dataset than the base model, especially on the out-of-domain, which contains many novel objects. Compared with other novel image captioning models that pay more attention to rarely seen objects but ignore the never-seen object, the model with our blocks has remarkable results. In particular, observing the results of UPDown*, XLAN*, OVE, UpDown+our, and XLAN+our. The models of UpDown* and XLAN* are lower than OVE in out-of-domain at CIDEr/SPICE metrics by 4.1/0.2 and 3.2/−0.1, respectively. However, the UpDown+our and XLAN+our outperform the OVE in CIDEr/SPICE metrics by 2.5/0.4 and 3.2/1.2. This shows that the proposed blocks enable the regular captioning model to better describe the novel objects. Compared with VIVO, VinVL, ClipCap, SMALLCAP, and Oscar, the Oscar+our achieves the best performance, and improves the SPICE metrics in in-domain and near-domain by 0.3, and 0.2, and both metrics in out-of-domain by 5.1 and 0.4, respectively. The improvement in SPICE and CIDEr indicates that the proposed blocks enable the captioning model to generate more semantically accurate sentences. The improvement of all metrics in the out-of-domain further demonstrates the effectiveness of the proposed blocks for novel objects.

5.6. Qualitative Analysis

Table 5 shows a few examples of image, caption, and the loss for each word generated by the base models (random) and the model with Semi-Fixed Word Embedding (fixEmbed). We generated the sentences with the same setting, base model, training data, and training strategy. From these examples, we found that although some images can also generate the same sentence through random initialization of the word embedding for novel words, the random initialization increases the loss of words after the novel word. For example, our proposed block benefits the model more confidently by generating “in a field” in the first example, “in a living room” in the second example, “sitting on top of a table” in the third example, “with a bunch of fish” in the fourth example. The fact that the captioning model with Semi-Fixed Word Embedding is able to say subsequent words more accurately means that the proposed block enables the captioning model to better understand the meanings of the never-seen words.
Table 6 shows a few examples with images and captions generated by the traditional selection way (base) and our proposed Candidate Sentences Selection (CSS). We generate the captions using the same model and only modify the way to select candidate sentences. Observing the examples, we found that this “base” method is difficult to accurately reflect the image content, while our block can result in better captions. More specifically, our proposed block is superior in the following two aspects: (1) The proposed CSS could assist the captioning model in choosing selected tags. For example, our proposed blocks help the model only describe the ”jaguar“ in the first example. (2) The proposed CSS could assist the captioning model in generating sentences that better match the content of the image. For example, there is “canary” not ”canary bird“ sitting on top of a chair in the second example, there is “a swimming pool and palm trees and a umbrella” not “a group of chairs and palm trees on a umbrella.” in the third example, which incorrectly describes the relationships between the palm trees and umbrella. In the fourth example, the base model chooses “a invertebrates of fish on top of a fish.”, but CSS chooses “a bunch of fish on top of a invertebrates”. It is clear that although the model does not understand the meaning of “invertebrates”, the CSS is able to select sentences that better match the meaning of the image.

6. Conclusions

This manuscript is oriented to the novel object captioning task. In view of the current model’s failure to describe the rarely seen and never-seen object, through the experiment and the analysis of the captioning model, we found that there are three reasons why the current models fail to describe never-seen words. Firstly, in the inference stage, the dimension of the word embedding layer is fixed; hence, it cannot encode new words. Secondly, the captioning model cannot understand the meaning of the never-seen words. Thirdly, the novel words affect the total loss of generated sentences and interfere with the way to select optimal sentences.
In this paper, we believe that the traditional captioning model can describe novel objects when the above problems are solved. Hence, we propose a Semi-Fixed Word Embedding block and Candidate Sentences Selection block to assist the captioning model in describing novel objects. For the first issue, the Semi-Fixed Word Embedding is an extensible embedding layer to encode arbitrary visual words. For the second issue, the Semi-Fixed Word Embedding incorporating external knowledge helps the captioning model understand the meaning of the never-seen words. For the third issue, the Candidate Sentences Selection block chooses candidate sentences by semantic matching rather than total loss, avoiding the influence of never-seen words. This method is simple to implement and can be plug-and-play, with only a few changes to various models. In the following experiment, the effectiveness of the proposed blocks for novel objects was proven. In future work, we intend to investigate the problem of declining metrics for in-domain.

Author Contributions

S.D. and H.Z. conceived and designed the whole experiment. S.D. designed and performed the experiment, and wrote the original draft. H.Z. contributed to the review of this paper. J.S. and D.W. participated in the design of the experiments and in the verification of the experimental results. G.L. participated in the review and revision of the paper and provided funding support. H.Z. contributed to the review of this paper and provided funding support. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the NSFC No. 61771386, and by the Key Research and Development Program of Shaanxi No. 2020SF-359, and by the Research and development of manufacturing information system platform supporting product lifecycle management No. 2018GY-030, Doctoral Research Fund of Xi’an University of Technology, China under Grant Program no. 103-451119003, the Xi’an Science and Technology Foundation under Grant No. 2019217814GXRC014CG015-GXYD14.11., Natural Science Foundation of Shaanxi Province, Under Grant No. 2023-JC-YB-550, and by the Natural Science Foundation of Shaanxi Province No. 2021JQ-487.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used to support the findings of this study are included within the paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hsu, W.N.; Bolte, B.; Tsai, Y.H.H.; Lakhotia, K.; Salakhutdinov, R.; Mohamed, A. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM Trans. Audio Speech Lang. Process. 2021, 29, 3451–3460. [Google Scholar] [CrossRef]
  2. Kenton, J.D.M.W.C.; Toutanova, L.K. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the NAACL-HLT, Minneapolis, MN, USA, 2–7 June 2019; Volume 1, p. 2. [Google Scholar]
  3. Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
  4. Pan, Y.; Yao, T.; Li, Y.; Mei, T. X-linear attention networks for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 10971–10980. [Google Scholar]
  5. Hossain, M.Z.; Sohel, F.; Shiratuddin, M.F.; Laga, H. A comprehensive survey of deep learning for image captioning. ACM Comput. Surv. (CsUR) 2019, 51, 1–36. [Google Scholar] [CrossRef] [Green Version]
  6. Venugopalan, S.; Anne Hendricks, L.; Rohrbach, M.; Mooney, R.; Darrell, T.; Saenko, K. Captioning images with diverse objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 5753–5761. [Google Scholar]
  7. Tanaka, M.; Harada, T. Captioning images with novel objects via online vocabulary expansion. In Proceedings of the European Conference on Computer Vision (ECCV), Glasgow, UK, 23–28 August 2021. [Google Scholar]
  8. Wu, Y.; Zhu, L.; Jiang, L.; Yang, Y. Decoupled novel object captioner. In Proceedings of the 26th ACM international conference on Multimedia, Seoul, Republic of Korea, 22–26 October 2018; pp. 1029–1037. [Google Scholar]
  9. Demirel, B.; Cinbiş, R.G.; İkizler Cinbiş, N. Image Captioning with Unseen Objects. arXiv 2019, arXiv:1908.00047. [Google Scholar]
  10. Kuznetsova, A.; Rom, H.; Alldrin, N.; Uijlings, J.; Krasin, I.; Pont-Tuset, J.; Kamali, S.; Popov, S.; Malloci, M.; Kolesnikov, A.; et al. The open images dataset v4: Unified image classification, object detection, and visual relationship detection at scale. Int. J. Comput. Vis. 2020, 128, 1956–1981. [Google Scholar] [CrossRef] [Green Version]
  11. Bansal, A.; Sikka, K.; Sharma, G.; Chellappa, R.; Divakaran, A. Zero-shot object detection. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 384–400. [Google Scholar]
  12. Anderson, P.; Fernando, B.; Johnson, M.; Gould, S. Guided Open Vocabulary Image Captioning with Constrained Beam Search. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark, 7–11 September 2017. [Google Scholar]
  13. Farhadi, A.; Hejrati, M.; Sadeghi, M.A.; Young, P.; Rashtchian, C.; Hockenmaier, J.; Forsyth, D. Every picture tells a story: Generating sentences from images. In Proceedings of the Computer Vision—ECCV 2010: 11th European Conference on Computer Vision, Heraklion, Crete, Greece, 5–11 September 2010; Proceedings, Part IV 11. Springer: Berlin/Heidelberg, Germany, 2010; pp. 15–29. [Google Scholar]
  14. Kulkarni, G.; Premraj, V.; Ordonez, V.; Dhar, S.; Li, S.; Choi, Y.; Berg, A.C.; Berg, T.L. Babytalk: Understanding and generating simple image descriptions. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 35, 2891–2903. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  15. Kuznetsova, P.; Ordonez, V.; Berg, A.; Berg, T.; Choi, Y. Collective generation of natural image descriptions. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Jeju Island, Korea, 8–14 July 2012; pp. 359–368. [Google Scholar]
  16. Ordonez, V.; Kulkarni, G.; Berg, T. Im2text: Describing images using 1 million captioned photographs. Adv. Neural Inf. Process. Syst. 2011, 24. Available online: https://proceedings.neurips.cc/paper_files/paper/2011/hash/5dd9db5e033da9c6fb5ba83c7a7ebea9-Abstract.html (accessed on 7 June 2023).
  17. Vinyals, O.; Toshev, A.; Bengio, S.; Erhan, D. Show and tell: A neural image caption generator. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 3156–3164. [Google Scholar]
  18. Chen, L.; Zhang, H.; Xiao, J.; Nie, L.; Shao, J.; Liu, W.; Chua, T.S. Sca-cnn: Spatial and channel-wise attention in convolutional networks for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 5659–5667. [Google Scholar]
  19. Anderson, P.; He, X.; Buehler, C.; Teney, D.; Johnson, M.; Gould, S.; Zhang, L. Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 6077–6086. [Google Scholar]
  20. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 28. Available online: https://proceedings.neurips.cc/paper_files/paper/2015/hash/14bfa6bb14875e45bba028a21ed38046-Abstract.html (accessed on 7 June 2023). [CrossRef] [PubMed] [Green Version]
  21. Yang, X.; Tang, K.; Zhang, H.; Cai, J. Auto-encoding scene graphs for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 10685–10694. [Google Scholar]
  22. Guo, L.; Liu, J.; Tang, J.; Li, J.; Luo, W.; Lu, H. Aligning linguistic words and visual semantic units for image captioning. In Proceedings of the 27th ACM International Conference on Multimedia, Nice, France, 21–25 October 2019; pp. 765–773. [Google Scholar]
  23. Ma, S.; Wan, W.; Yu, Z.; Zhao, Y. EDET: Entity Descriptor Encoder of Transformer for Multi-Modal Knowledge Graph in Scene Parsing. Appl. Sci. 2023, 13, 7115. [Google Scholar] [CrossRef]
  24. Zellers, R.; Yatskar, M.; Thomson, S.; Choi, Y. Neural motifs: Scene graph parsing with global context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 5831–5840. [Google Scholar]
  25. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. Available online: https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html (accessed on 7 June 2023).
  26. Huang, L.; Wang, W.; Chen, J.; Wei, X.Y. Attention on attention for image captioning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 4634–4643. [Google Scholar]
  27. Cornia, M.; Stefanini, M.; Baraldi, L.; Cucchiara, R. Meshed-memory transformer for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 10578–10587. [Google Scholar]
  28. Xian, T.; Li, Z.; Zhang, C.; Ma, H. Dual global enhanced transformer for image captioning. Neural Netw. 2022, 148, 129–141. [Google Scholar] [CrossRef] [PubMed]
  29. Sharma, H.; Srivastava, S. Multilevel attention and relation network based image captioning model. Multimed. Tools Appl. 2023, 82, 10981–11003. [Google Scholar] [CrossRef]
  30. Zhang, P.; Li, X.; Hu, X.; Yang, J.; Zhang, L.; Wang, L.; Choi, Y.; Gao, J. Vinvl: Revisiting visual representations in vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 19–25 June 2021; pp. 5579–5588. [Google Scholar]
  31. Li, X.; Yin, X.; Li, C.; Zhang, P.; Hu, X.; Zhang, L.; Wang, L.; Hu, H.; Dong, L.; Wei, F.; et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In Proceedings of the Computer Vision—ECCV 2020: 16th European Conference, Glasgow, UK, 23–28 August 2020; Proceedings, Part XXX 16. Springer: Berlin/Heidelberg, Germany, 2020; pp. 121–137. [Google Scholar]
  32. Wang, Z.; Yu, J.; Yu, A.W.; Dai, Z.; Tsvetkov, Y.; Cao, Y. Simvlm: Simple visual language model pretraining with weak supervision. arXiv 2021, arXiv:2108.10904. [Google Scholar]
  33. Yao, T.; Pan, Y.; Li, Y.; Mei, T. Incorporating copying mechanism in image captioning for learning novel objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 6580–6588. [Google Scholar]
  34. Chen, X.; Jiang, M.; Zhao, Q. Leveraging human attention in novel object captioning. In Proceedings of the International Joint Conference on Artificial Intelligence, Montreal, QC, Canada, 19–27 August 2021. [Google Scholar]
  35. Feng, Q.; Wu, Y.; Fan, H.; Yan, C.; Xu, M.; Yang, Y. Cascaded revision network for novel object captioning. IEEE Trans. Circuits Syst. Video Technol. 2020, 30, 3413–3421. [Google Scholar] [CrossRef] [Green Version]
  36. Vo, D.M.; Chen, H.; Sugimoto, A.; Nakayama, H. Noc-rek: Novel object captioning with retrieved vocabulary from external knowledge. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 17979–17987. [Google Scholar]
  37. Lu, J.; Yang, J.; Batra, D.; Parikh, D. Neural baby talk. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7219–7228. [Google Scholar]
  38. Wu, Y.; Jiang, L.; Yang, Y. Switchable novel object captioner. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 45, 1162–1173. [Google Scholar] [CrossRef] [PubMed]
  39. Ramos, R.; Martins, B.; Elliott, D.; Kementchedjhieva, Y. Smallcap: Lightweight image captioning prompted with retrieval augmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Convention Center, Convention Center, Vancouver, Canada, 18–22 June 2023; pp. 2840–2849. [Google Scholar]
  40. Radford, A.; Kim, J.W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. Learning transferable visual models from natural language supervision. In Proceedings of the International Conference on Machine Learning, PMLR, Virtual, 18–24 July 2021; pp. 8748–8763. [Google Scholar]
  41. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  42. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  43. Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language models are unsupervised multitask learners. OpenAI Blog 2019, 1, 9. [Google Scholar]
  44. Pennington, J.; Socher, R.; Manning, C.D. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1532–1543. [Google Scholar]
  45. Agrawal, H.; Desai, K.; Wang, Y.; Chen, X.; Jain, R.; Johnson, M.; Batra, D.; Parikh, D.; Lee, S.; Anderson, P. Nocaps: Novel object captioning at scale. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 8948–8957. [Google Scholar]
  46. Chen, X.; Fang, H.; Lin, T.Y.; Vedantam, R.; Gupta, S.; Dollár, P.; Zitnick, C.L. Microsoft coco captions: Data collection and evaluation server. arXiv 2015, arXiv:1504.00325. [Google Scholar]
  47. Karpathy, A.; Fei-Fei, L. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 3128–3137. [Google Scholar]
  48. Papineni, K.; Roukos, S.; Ward, T.; Zhu, W.J. Bleu: A method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, Philadelphia, PA, USA, 6–12 July 2002; pp. 311–318. [Google Scholar]
  49. Banerjee, S.; Lavie, A. METEOR: An automatic metric for MT evaluation with improved correlation with human judgments. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics, Ann Arbor, MI, USA, 25–30 June 2005; pp. 228–231. [Google Scholar]
  50. Lin, C.Y. Rouge: A package for automatic evaluation of summaries. In Text Summarization Branches Out; Association for Computational Linguistics: Barcelona, Spain, 2004; pp. 74–81. [Google Scholar]
  51. Vedantam, R.; Lawrence Zitnick, C.; Parikh, D. Cider: Consensus-based image description evaluation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 4566–4575. [Google Scholar]
  52. Anderson, P.; Fernando, B.; Johnson, M.; Gould, S. Spice: Semantic propositional image caption evaluation. In Proceedings of the Computer Vision—ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part V 14. Springer: Berlin/Heidelberg, Germany, 2016; pp. 382–398. [Google Scholar]
  53. Krishna, R.; Zhu, Y.; Groth, O.; Johnson, J.; Hata, K.; Kravitz, J.; Chen, S.; Kalantidis, Y.; Li, L.J.; Shamma, D.A.; et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. Int. J. Comput. Vis. 2017, 123, 32–73. [Google Scholar] [CrossRef] [Green Version]
  54. Hu, X.; Yin, X.; Lin, K.; Wang, L.; Zhang, L.; Gao, J.; Liu, Z. Vivo: Surpassing human performance in novel object captioning with visual vocabulary pre-training. In Proceedings of the AAAI Conference on Artificial Intelligenc (AAAI), Virtual, 2–9 February 2021. [Google Scholar]
  55. Mokady, R.; Hertz, A.; Bermano, A.H. Clipcap: Clip prefix for image captioning. arXiv 2021, arXiv:2111.09734. [Google Scholar]
Figure 1. The example of the constrained beam search.
Figure 1. The example of the constrained beam search.
Applsci 13 07868 g001
Figure 2. The structure of the image captioning in inference phase.
Figure 2. The structure of the image captioning in inference phase.
Applsci 13 07868 g002
Figure 3. The structure of the CLIP [40].
Figure 3. The structure of the CLIP [40].
Applsci 13 07868 g003
Figure 4. The structure of the Semi-Fixed Word Embedding.
Figure 4. The structure of the Semi-Fixed Word Embedding.
Applsci 13 07868 g004
Table 1. Similarity results of word with image.
Table 1. Similarity results of word with image.
Applsci 13 07868 i001Applsci 13 07868 i002Applsci 13 07868 i003Bear
panda20.9416.9717.3978.63
bear15.6218.3124.72100.13
koala13.5526.0817.3078.00
animal15.4818.6319.5082.69
Table 2. Ablation analysis for the proposed block on two base models. The F, G, and S denote Semi-Fixed Word Embedding, take glove as word embedding, and Candidate Sentences Selection, respectively. Bold for the best. ✓ for attach the corresponding module.
Table 2. Ablation analysis for the proposed block on two base models. The F, G, and S denote Semi-Fixed Word Embedding, take glove as word embedding, and Candidate Sentences Selection, respectively. Bold for the best. ✓ for attach the corresponding module.
RowIn-DomainNear-DomainOut-of-DomainOverall
ModelCBSFGS CSCSCSB1B4MRCS
UpDown 190.0512.0174.3810.9952.989.5476.9620.0524.3853.0872.2910.87
288.3111.8874.4711.0155.029.4977.1319.4424.3253.0972.5110.85
392.6012.5179.6011.4962.6110.0678.2620.7525.1953.8178.0211.37
487.7711.8580.0011.7174.0610.5078.1518.8724.9853.0279.9111.49
592.7012.4984.4912.0579.3411.1979.2820.1925.8153.9984.6311.95
686.1411.8578.6311.3972.7310.2278.3518.5824.5353.1478.5111.23
786.9311.8479.8311.6473.5410.5678.3218.6424.8453.0679.5711.45
891.0012.1284.3911.8980.9610.7679.9220.1125.4854.2484.6511.70
990.1612.5584.8712.0880.6611.0779.5420.6325.8954.1284.7811.95
XLAN 1091.5612.8784.3012.4275.0310.7979.1220.6325.9654.4683.4712.17
1193.9013.5987.4212.8280.9111.5880.1521.8526.6655.1087.0312.69
1289.9812.7182.9512.4074.9710.8679.1020.5725.7854.1082.3412.14
1390.4112.5883.8712.4275.9511.0679.1521.3426.0754.5283.2112.17
1493.2113.2186.4812.8779.2211.4180.0321.6226.4754.9185.9812.63
1591.4413.3487.5612.8681.3911.8680.3021.7026.7255.1386.8712.73
Table 3. Ablation analysis of different embedding methods for never-seen selected tags, where Common and Never denote the embedding of words included or not included in the training set, respectively. Our, glove, replace, and random denote the corresponding word embedding obtained by Semi-Fixed Word Embedding, glove, manual synonym replacement, and random initialization, respectively. Bold for the best.
Table 3. Ablation analysis of different embedding methods for never-seen selected tags, where Common and Never denote the embedding of words included or not included in the training set, respectively. Our, glove, replace, and random denote the corresponding word embedding obtained by Semi-Fixed Word Embedding, glove, manual synonym replacement, and random initialization, respectively. Bold for the best.
CommonNeverRowDiffSenB@1B@4MRCS
UpDownourour14471.3813.1622.7147.0273.2548.86
replace269.5915.5023.5648.4473.3748.94
ourour315775.7615.6424.2549.8387.9350.13
random473.3913.9224.2049.7877.7544.74
gloveglove54774.469.5723.5849.72,85.7946.62
replace673.8612.9123.7650.9687.1746.85
gloveglove710772.446.7322.3747.4374.1447.26
random869.926.8622.1547.2973.8248.24
XLANourour94773.3616.2725.2451.7179.6752.75
replace1071.2111.4024.6151.0073.0551.22
ourour1116174.5517.6425.6353.0693.3950.79
random1271.1413.9325.1052.1382.4244.21
gloveglove135475.5612.3225.1251.0793.5246.26
replace1475.9418.3125.5851.7796.5345.93
gloveglove1510474.0311.9724.5350.6780.9447.89
random1672.7715.4924.5551.6478.8346.21
Table 4. Comparison results of Nocaps online validation. Bold for the best. * indicates our implementations. Bold for the best.
Table 4. Comparison results of Nocaps online validation. Bold for the best. * indicates our implementations. Bold for the best.
In-DomainNear-DomainOut-of-DomainOverall
CSCSCSCS
OVE [7]79.511.574.711.178.210.776.111.1
ANOC [34]86.112.080.711.973.710.180.111.6
NOC-REK [36]104.714.8100.214.1100.713.0100.914.0
VIVO [54]92.212.987.812.687.511.588.312.4
VinVL [30]96.813.590.713.187.411.690.912.8
VinVL + VIVO [30,54]103.713.795.613.483.811.994.313.1
ClipCap [55]74.5-65.6-47.1-63.4-
SMALLCAP [39]87.9-84.6-84.4-85.0-
Oscar * [31]107.714.7102.114.499.613.2102.414.2
UpDown * [19]87.811.980.011.774.110.579.911.5
XLAN * [4]91.612.984.312.475.010.883.512.2
Oscar+our106.215.0101.814.6104.713.6103.014.5
UpDown+our90.212.684.912.180.711.184.812.0
XLAN+our91.413.387.612.981.411.986.912.7
Human84.414.385.014.395.714.087.114.2
Table 5. The example of different word embedding ways for generated word loss. Bold for the never-seen nouns and corresponding loss.
Table 5. The example of different word embedding ways for generated word loss. Bold for the never-seen nouns and corresponding loss.
Applsci 13 07868 i004a man is holding a shotgun in a field.

random: −0.0, −0.0, −0.659, −0.723, −0.0, −20, −0.051, −0.004, −0.060, −0.175
fixEmbed: −0.0, −0.0, −0.659, −0.723, −0.0, −20, −0.001, −0.005, −0.001, −0.019
Applsci 13 07868 i005a woman holding a harp in a living room.

random: −0.0, −0.0, −0.583, −0.147, −20, −0.01, −0.238, −0.447, −0.0, −0.004
fixEmbed: −0.0, −0.0, −0.583, −0.147, −20, −0.0, −0.008, −0.490, −0.0, −0.0
Applsci 13 07868 i006a sewing machine sitting on top of a table.

random: −9 × 10 5 , −20, −2.53, −0.002, −0.02, −2 × 10 5 , −1 × 10 5 , −0.005, −0.169
fixEmbed: −9 × 10 5 , −20, −0.10, −0.001, −0.005, −2 × 10 5 , −1 × 10 5 , −0.002, −0.001
Applsci 13 07868 i007a marine invertebrates with a bunch of fish.

random: −0.0, −20, −20, −0.133, −0.01, −0.131, −0.0, −1.756, −0.032
fixEmbed: −0.0, −20, −20,−0.028, −0.022, −0.155, −4 × 10 5 , −1.991, −0.116
Table 6. Example of image captioning selected according to the maximum probability (base) and the Candidate Sentences Selection. Bold for the never-seen nouns.
Table 6. Example of image captioning selected according to the maximum probability (base) and the Candidate Sentences Selection. Bold for the never-seen nouns.
Applsci 13 07868 i008base: jaguar cat laying on top of a tree.
CSS: jaguar laying on top of a tree.
Applsci 13 07868 i009base: canary bird is sitting on top of a chair.
CSS: canary is standing on top of a chair.
Applsci 13 07868 i010base: a group of chairs and palm trees on a umbrella.
CSS: a swimming pool and palm trees and a umbrella.
Applsci 13 07868 i011base: a invertebrates of fish on top of a fish.
CSS: a bunch of fish on top of a invertebrates.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Du, S.; Zhu, H.; Lin, G.; Wang, D.; Shi, J. Novel Object Captioning with Semantic Match from External Knowledge. Appl. Sci. 2023, 13, 7868. https://doi.org/10.3390/app13137868

AMA Style

Du S, Zhu H, Lin G, Wang D, Shi J. Novel Object Captioning with Semantic Match from External Knowledge. Applied Sciences. 2023; 13(13):7868. https://doi.org/10.3390/app13137868

Chicago/Turabian Style

Du, Sen, Hong Zhu, Guangfeng Lin, Dong Wang, and Jing Shi. 2023. "Novel Object Captioning with Semantic Match from External Knowledge" Applied Sciences 13, no. 13: 7868. https://doi.org/10.3390/app13137868

APA Style

Du, S., Zhu, H., Lin, G., Wang, D., & Shi, J. (2023). Novel Object Captioning with Semantic Match from External Knowledge. Applied Sciences, 13(13), 7868. https://doi.org/10.3390/app13137868

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop