# Detailed Image Captioning and Hashtag Generation
## 4 Experiments and Results
### Results
#### 4.4.2 Hashtag Generation Performance  
The performance of the hashtag generation model using KeyBERT was evaluated and compared to other techniques: Regular BERT, YAKE (Yet Another Keyword Extractor), and Gemma-2-2B-it. The results of this comparative analysis are presented in Table 3.  
KeyBERT demonstrated the highest precision at 0.6132, indicating that approximately 61% of the hashtags it generated were relevant and accurate (based on the test dataset). It also achieved the best recall score of 0.6105, suggesting that it successfully identified a significant portion of the relevant hashtags. The combination of these metrics resulted in an F1-score of 0.5932, the highest among the four methods. KeyBERT's average processing time was 0.0201 s per input, making it the second fastest method after YAKE.  
The precision recall curves in Figure 3 compares these four methods for automated hashtag generation. KeyBERT shows the best performance with an average precision (AP) of 0.791, maintaining consistent precision across recall values. Being specifically optimized for keyword extraction, KeyBERT effectively translates this strength to hashtag generation. Gemma (AP = 0.765) achieves strong precision in early recall regions but shows noticeable decline after mid-range recall. YAKE (AP = 0.721) demonstrates reliable performance as a non-neural method, benefiting from its keyword extraction optimization. Regular BERT (AP = 0.608) performed notably worse due to not being optimized for such a task. The results indicate that methods optimized for keyword extraction perform particularly well for hashtag generation, with KeyBERT providing the most reliable performance across all operating points.  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Method** & **Precision** & **Recall** & **F1-Score** & **Avg Time (s)** \\ \hline KeyBERT & **0.6132** & **0.6105** & **0.5932** & 0.0201 \\ Regular BERT & 0.3392 & 0.3222 & 0.3199 & 0.0107 \\ YAKE & 0.5126 & 0.5068 & 0.4939 & **0.0064** \\ Gemma-2-2B-it & 0.4808 & 0.4239 & 0.4537 & 2.6293 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Performance comparison of the Hashtag Generation Methods.  
Figure 2: Speed comparison of the different vision-language models.  
To better illustrate the balance between performance and speed, Figure 4 presents both the CAPTURE score against the average processing time for image captioning and the accuracy against speed for hashtag generation. Specifically, Figure 3(a) clearly demonstrates that our model achieves the best balance between performance (as measured by the CAPTURE score) and processing speed. It outperforms significantly larger models in detailed image captioning tasks while taking only a fraction of the time to process each image.  
Figure 3(b) demonstrates that KeyBERT offers the best combination of accuracy (as measured by F1-score) and speed. While YAKE is slightly faster, it achieves lower accuracy. Gemma-2-2B-it, despite its more complex architecture, did not outperform KeyBERT and was significantly slower, making it less suitable for real-time applications. Regular BERT's position on this graph underscores its suboptimal performance, offering neither a speed nor an accuracy advantage.  
Figure 4: Performance evaluation for both image captioning **(a)** and hashtag generation **(b)**.  
Figure 3: Precision vs. recall curve for Hashtag Generation Models.  
These results indicate that the KeyBERT-based approach provides an effective solution for hashtag generation, balancing accuracy and computational efficiency in a manner well-suited for real-time applications like the proposed browser extension.