# Text Detection and Recognition for X-ray Weld Seam Images
## 4 Conclusions  
This paper introduces a deep-learning-based algorithm for text recognition in X-ray weld seam images, successfully achieving automated recognition of the textual information in X-ray weld seam images. The algorithm comprises two key components: text detection and text recognition. Firstly, the text detection model accurately locates the positions of the text lines. Subsequently, these text lines are extracted from the weld seam images, and text recognition is performed, ultimately yielding precise text recognition results. By incorporating post-processing techniques into the text detection model, we achieve accurate detection of partially longer text lines, achieving an accuracy of 91.0%, a recall of 92.4%, and an F1 score of 91.7% on the test dataset.  
In the text recognition phase, we introduce modules such as CA, CBAM, and HFA to further enhance the accuracy of the text recognition. Compared to other advanced algorithms, our text recognition algorithm demonstrates excellent performance on the test dataset, achieving a text line recognition accuracy of 93.4%. However, it is essential to note  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Number** & **Precision/\%** & **Parameters (M)** \\ \hline
0 & 92.6 & 44.2 \\
1 & 92.0 & 46.5 \\
2 & 91.5 & 46.5 \\
3 & 91.4 & 46.5 \\
4 & 92.7 & 46.5 \\
5 & **93.4** & 46.5 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Ablation study on the number of CA modules.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Precision/\%** & **Parameters (M)** \\ \hline A & 91.6 & 49.5 \\ B & 92.0 & 46.5 \\ C & 92.7 & 46.5 \\ D & 92.3 & 75.4 \\ E & 91.7 & 54.7 \\ F & 92.1 & 80.5 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Ablation study of other backbone networks and attention modules.  
that challenges exist in weld seam images, and our recognition algorithm may encounter issues in accurately recognizing characters with tightly connected text lines, as shown in Table 3. Therefore, further research on accurately recognizing densely arranged characters remains a crucial direction for future studies.  
Conceptualization, Y.Z. and Q.Z.; methodology, Y.Z. and Q.Z.; software, Q.Z.; validation, Q.Z.; investigation, Y.Z.; resources, Y.Z. and Q.Z.; data curation, Q.Z.; writing--original draft preparation, Y.Z. and Q.Z.; writing--review and editing, Y.Z. and Q.Z.; visualization, Y.Z. and Q.Z.; supervision, Y.Z.; funding acquisition, Y.Z. All authors have read and agreed to the published version of the manuscript.  
This research was supported by the Yunnan Provincial Agricultural Basic Research Joint Special Project (Grant No. 202101 BD070001-042), and the Yunnan Ten-Thousand Talents Program.  
Not applicable.  
The public dataset is available at: [[https://www.dropbox.com/sh/i39](https://www.dropbox.com/sh/i39) abvnefllx2 si/AAAAbAYRvvx2 Rp3 cIE5 HzqUw3 ra2 dl=0]([https://www.dropbox.com/sh/i39](https://www.dropbox.com/sh/i39) abvnefllx2 si/AAAAbAYRvvx2 Rp3 cIE5 HzqUw3 ra2 dl=0) (accessed on 17 February 2024). Weld seam images dataset is available at: [[https://zenodo.org/records/10618962](https://zenodo.org/records/10618962)]([https://zenodo.org/records/10618962](https://zenodo.org/records/10618962)) (accessed on 17 February 2024).  
The authors declare no conflict of interest.