선정목록으로
A novel deep convolutional neural network algorithm for surface defect detection
산업용 섬유 · (8) HDPE 섬유(FORPE)
기본 정보
- 저자
- DOI
- 10.1093/jcde/qwac071
- 저널
- Journal of Computational Design and Engineering
- 발행년도
- 2022
- 발행기관
- Oxford University Press
- 피인용수
- 64
- 라이선스
- cc-by-nc
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1093/jcde/qwac071
- 토픽
- Surface Roughness and Optical Measurements
- OpenAlex ID
- W4288693944
평가 내용
- 관련도
- 사업분야
- 산업용 섬유 · (8) HDPE 섬유(FORPE)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '산업용 섬유 > HDPE 섬유(FORPE)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
Abstract The surface defect detection (SDD) problem is one of the crucial techniques during production process, so it has become a key research area to control the quality of industrial products, which has been increasingly of greater interest to the researchers especially with the rapid development of artificial neural networks technology in recent years. Therefore, this paper proposes a novel deep convolutional neural network algorithm aiming at SDD. Firstly, a dense cross-stage partial Darknet backbone network is designed for feature extraction by optimizing cross-stage partial Darknet through the idea of dense connections, which can, not only enhance feature reuse but also greatly alleviate the overfitting issue. Secondly, a new cross-stage hierarchy module is presented combining the cross-stage feature fusion strategy and depthwise separable convolution technique for each node of the path aggregated feature pyramid network (PAN). Finally, an efficient channel attention (ECA) mechanism is introduced in PAN to construct a novel ECA PAN. The experimental results on three surface defect datasets show that the mean average precision of this network is 2.63, 5.48, and 1.16$\%$ which is higher than that of the baseline network, respectively. The proposed network outperforms not only the classical models but state-of-the-art models, which indicates the proposed algorithm can achieve higher accuracy and speed with fewer calculation parameters. And what is more, the proposed algorithm also has outstanding generalization ability.
본문 61,906자
본문 펼치기
# PLOS ONE
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0301862&domain=pdf&date_stamp=2024-05-16)</u>~~
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0301862&domain=pdf&date_stamp=2024-05-16)</u>~~
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0301862&domain=pdf&date_stamp=2024-05-16)</u>~~
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0301862&domain=pdf&date_stamp=2024-05-16)</u>~~
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0301862&domain=pdf&date_stamp=2024-05-16)</u>~~
OPEN ACCESS
Citation: Huang B, Bai A, Wu Y, Yang C, Sun H
(2024) DB-EAC and LSTR: DBnet based seal text
detection and Lightweight Seal Text Recognition.
[PLoS ONE 19(5): e0301862. https://doi.org/](https://doi.org/10.1371/journal.pone.0301862)
[10.1371/journal.pone.0301862](https://doi.org/10.1371/journal.pone.0301862)
Editor: Nouman Ali, Mirpur University of Science
and Technology, PAKISTAN
Received: October 2, 2023
Accepted: March 23, 2024
Published: May 16, 2024
Peer Review History: PLOS recognizes the
benefits of transparency in the peer review
process; therefore, we enable the publication of
all of the content of peer review and author
responses alongside final, published articles. The
editorial history of this article is available here:
[https://doi.org/10.1371/journal.pone.0301862](https://doi.org/10.1371/journal.pone.0301862)
Copyright: © 2024 Huang et al. This is an open
access article distributed under the terms of the
[Creative Commons Attribution License, which](http://creativecommons.org/licenses/by/4.0/)
permits unrestricted use, distribution, and
reproduction in any medium, provided the original
author and source are credited.
Data Availability Statement: All relevant data are
within the paper and its Supporting Information
files.
Funding: This work was financially supported by
the National Natural Science Foundation of China
RESEARCH ARTICLE
## DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
[Baohua HuangID](https://orcid.org/0000-0003-4717-4625) <sup>1</sup> *, Aokun Bai <sup>1</sup> , Yuqiong Wu <sup>2</sup> , Chanjuan Yang <sup>1</sup> , Han Sun <sup>1</sup>
1 School of Computer and Electronic Information, Guangxi University, Nanning, China, 2 Auditing Bureau of
Xixiangtang, Nanning City, Nanning, China
- bhhuang66@gxu.edu.cn
### Abstract
Recognition of the key text of the Chinese seal can speed up the approval of documents,
and improve the office efficiency of enterprises or government administrative departments.
Due to image blurring and occlusion, the accuracy of Chinese seal recognition is low. In
addition, the real dataset is very limited. In order to solve these problems, we improve the
differentiable binarization detection algorithm (DBnet) to construct a model DB-ECA for text
region detection, and propose a model named LSTR (Lightweight Seal Text Recognition)
for text recognition. The efficient channel attention module is added to the differentiable
binarization network to solve the feature pyramid conflict, and the convolutional layer net
work structure is improved to delay downsampling for reducing semantic feature loss. LSTR
uses a lightweight CNN more suitable for small-sample generalization, and dynamically
fuses positional and visual information through a self-attention-based inference layer to pre
dict the label distribution of feature sequences in parallel. The inference layer not only solves
the weak discriminative power of CNN in the shallow layer, but also facilitates CTC (Connec
tionist Temporal Classification) to accurately align the feature region with the target charac
ter. Experiments on the homemade dataset in this paper, DB-ECA compared with the other
five commonly used detection models, the precision, recall, F-measure are the best effect of
90.29, 85.17, 87.65, respectively. LSTR compared with the other five kinds of recognition
models in the last three years, to achieve the highest effect of accuracy 91.29%, and has
the advantages of a small number of parameters and fast inference. The experimental
results fully prove the innovation and effectiveness of our model.
1. Introduction
Seal is used to print on the document to indicate identification or signed stationery, because of
its production is simple and distinctive signs, widely used in government, enterprises and
other organizations issued documents. Although the production methods and styles are not
uniform in different countries, most of them have legal effect and occupy an important position in the administrative office. Accurate extraction of key information of seals can efficiently
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 1 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
(Grant no. 61962005), but the funder had no role in
study design, data collection and analysis, decision
to publish, or preparation of the manuscript.
Competing interests: The authors declare that they
have no known competing financial interests or
personal relationships that could have appeared to
influence the work reported in this paper.
organize and classify documents, save office time, having great application value. With the
application of deep learning in the field of recognition, character recognition is also ushering
in rapid development [1, 2]. At present, the detection and recognition of regular printing fonts
and horizontal documents have already achieved high accuracy, but text recognition for complex and irregular scenes is still very challenging.
Unlike conventional text recognition, seal text scene recognition has the following problems: 1) the text is curved and arranged, the outer ring style is not uniform, the text on the
background and the seal text tend to form an occlusion interference, coupled with the inclusion of complex patterns, all of which increase the difficulty of seal recognition. 2) Due to the
sensitivity of seal data, the lack of public datasets, there are very few resources of real scene
images that can be used for model training, which leads to poor model detection and recognition effect and low application value.
The detection and recognition of seals generally includes preprocessing, text area detection
and text content recognition steps. Preprocessing includes filtering and denoising, gray scale
processing, edge extraction and other methods to improve the effect of text detection and recognition. Although Chinese seal scene recognition has made great progress in the past few
years, most of the research work focuses on image preprocessing, and little attention has been
paid to the optimization of text detection and recognition models, and the algorithmic models
and datasets are based on scenes with low noise. Due to the existence of blurring and deformation of some seals in practical applications, the above models have low accuracy and weak generalization. The complex operation in preprocessing even increases the workload and
difficulty of landing the model in the real scene. Some seal detection and recognition models
have been proposed to use off-the-shelf end-to-end ABINet [3], PseNet [4] as the detector, outputting both the position of the text and the recognized content. Despite the high efficiency,
the accuracy lacks competitiveness compared to two-stage models.
The current research on Chinese seal scene recognition focuses on the preprocessing operation of color comparison, unfolding and arranging the circular text, i.e., using the seal’s unique
red attribute to highlight the R channel weights, and brightening and reducing the noise of the
text part. Ma et al [5] denoised the seal images through preprocessing and used the RGB
model to eliminate the brightness of the light-colored parts, and repaired the parts of it that
were crippled due to contamination, and highlighted the red color of the seal, the key part of
the seal, for the first time, verified the role of preprocessing in seal recognition; Yao et al. [6]
tested the HSI color model is better than RGB, and extracted the SIFT features of the seal to be
tested, and searched for the matching seal in the seal library to get the coarse matching results,
and then used the RANSAC algorithm to remove the incorrectly matched points in the coarse
matching, and adjusted the size and angle of the matching seal to improve the accuracy of the
recognition; Cai et al. [7] normalize of color seals, extract the color of the clay to simplify the
image and calculate the magnitude spectrum of the FFT changes in the image, and then construct the feature matrix corresponding to the structure of the fitness ring, to improve the
detection rate of dealing with the background complexity and multi-noise images; Zhang et al.
[8] use diffuse filling algorithms to enhance the features of the seal image, and then according
to the differences between the pixel gray values, find the same region to achieve image segmentation to ensure the seal detection accuracy. Xiao et al. [9] use polar coordinate expansion to
unify the direction of the seal text, and use Bessel curves to fit the up and down text region to
improve the accuracy of seal region detection. In addition, by combining cross-stage feature
fusion and attention mechanisms [10, 11], designing lightweight CNN can also improve accuracy for small target detection and recognition.
Seal detection and recognition belongs to the field of natural scene text recognition, which
is generally divided into two parts: text region detection and text content recognition. In text
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 2 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
region detection, DRRG [12] proposes novel unified relational inference network graphs for
detecting arbitrary shapes, which first generates a text proposal model via a convolutional neural network (CNN), and then bridges the deep relational inference network using a graphical
convolutional network (GCN) to divide each text instance into a series of rectangular components. Evaluation with the text proposal model allows the network to be trained end-to-end.
FCENet [13] models text instances in the Fourier domain and uses Fourier contour embedding to generate more accurate detection region boxes for arbitrarily shaped text contours.
TextMountain [14] divides the center and border of the text into the top and bottom of the
mountain, with each pixel detected similar to a path to the top. The model makes full use of
the overabundance of relationships in text information to help text instances better find the
text center. DBNet [15] focuses on improving segmentation results by incorporating the process of differentiable binarization into the training period, and the optimized segmentation
network can adaptively set the binarization. The optimized segmentation network can adaptively set the binarization threshold, which not only simplifies the post-processing process, but
also improves the accuracy and inference speed of text region detection. TCM [16] uses the
CLIP model directly for text detection without a pre-training process. It improves the ability of
existing methods to train with fewer samples and significantly improves the performance of
baseline methods.
Methodologically, scene text recognition can be viewed as a cross-modal mapping from
images to character sequences. Usually the recognition algorithm consists of two modules, a
visual module for feature extraction and a sequence module for text transcription, e.g., the
CRNN [17] model uses CNN to extract visual features, and then feeds into a recurrent layer
BiLSTM to extract sequence features, and finally obtains prediction results by CTC loss modeling, which can handle sequences of arbitrary length. As well as GTC [18] adds an attention
guiding mechanism to CTC to better learn character alignment and feature representation,
and achieves accurate prediction for both regular and irregular scene text while maintaining
fast inference speed. The advantages of this type of algorithm are high accuracy and simple
model, which are still preferred by some commercial recognizers. However, the contextual
semantic relevance is weak, and the performance is poor for fuzzy, curved, and irregular text,
such as deformation, occlusion, and other situations that can limit its effectiveness.
Encoder-decoder based approaches became popular with the introduction of Transformer
into the vision domain by the VIT model [19]. NRTR [20] proposes non-recursive end-to-end
text recognizer that relies solely on the self-attention mechanism for extracting image features
and modeling sequences, dispensing with recursion and convolution, and can be trained with
more parallelization and lower complexity. Since scene images vary greatly in text and background, a modal transformation block is further designed to efficiently convert 2D input
images to 1D sequences and combined with an encoder to extract more discriminative features. SRN [21] proposes mining semantic information to aid text recognition, introducing a
global semantic reasoning module to take into account global semantic contextual information, which is more robust compared to the unidirectional serial semantic transfer approach
and more Efficient. Global semantic context propagation is captured through multiple parallel
paths, which combines visual and semantic information more effectively. MGP-STR [22]
builds a conceptually simple but powerful visual STR model that is constructed based on VIT
and includes both purely visual models and language enhancement methods. And further, a
multi-granularity prediction strategy is proposed to improve the model performance by
implicitly injecting the information of linguistic modalities into the model. SVTR [23] uses a
single visual model to dispense with sequence modeling, firstly decomposing the image text
into small chunks called character components, and designing hybrid global and local chunks
to perceive inter and intra-character coarse-grained features. Enabling characters to be
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 3 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
recognized by simple linear prediction is competitive in terms of inference speed and accuracy.
DeepSolo [24] introduces a text matching criterion to provide more accurate supervised signals, allowing a single decoder with Explicit Points Solo to simultaneously perform text detection and recognition for more efficient training. The encoder-decoder based model will have
better accuracy because of the consideration of contextual information, but slower inference
due to character-by-character transcription. And the model essentially relies on stacked selfattention to learn character-associated features for recognition, lacks the inductive bias of convolution, and requires more data-intensive learning information than the LSTR model. However, due to the confidentiality of seals, there is a lack of a large number of public datasets, so it
is difficult to train an effective recognition model for seal text scene recognition.
To solve the above problems, this paper uses a two-stage model for seal text detection and
recognition. The use of segmentation-based microscopically binarizable text detection algorithm is naturally suitable for curved text, and competitive results can be achieved without
complex preprocessing. And we improve the convolutional recurrent neural network for text
recognition of candidate boxes, introduce an inference layer (Inference block) to improve the
feature fusion of contextual information, and pay more attention to the correlation between
characters. In the real dataset, the high training efficiency and accuracy are still maintained for
the cases of font blurring, distortion, and occlusion. First, the seal image is fed into the backbone network Resnet [25] to extract visual features, and the BottleNeck layer in it is improved
to postpone downsampling to reduce the loss of image feature information. Second, the feature
sequence is fed into the feature pyramid network and added into the Efficient channel attention module [26] (Efficient channel attention), which uses 1*1 convolution cross-channel
interaction to further improve the diversity of the feature sequence. The biplot and threshold
map are inferred by fusing multi-scale visual features through the feature cascade to determine
the detection frame location. Again, the detection frame region is fed into the convolutional
layer, and the visual features are extracted and fed into the self-attention-based inference layer.
The parallel computation with multi-head attention makes the prediction of sequence labels
faster and the learning ability of character granularity features stronger, which can effectively
improve the accuracy of the text recognition model. Finally, using CTC transcription, the
probability sum of all possible paths for each character is calculated, and a ’_’ is inserted
between repeated characters in the text labels, to determine whether consecutive identical
characters are merged. In this way, the label distributions output from the inference layer are
sequentially aligned to obtain the final recognition results.
The main contributions of this paper are as follows:
1. Using a model of text detection + text recognition is easier to optimize module by module
than an end-to-end approach. Improve the convolutional layer of the differentiable binarization detection algorithm by delaying downsampling to obtain richer semantic features.
2. Introduce an efficient channel attention module into the differentiable binarization detection algorithm, which allows the model to interact across channels, enhances the ability to
detect multiscale targets, and speeds up the model convergence rate.
3. A self-attention based inference layer is proposed to construct LSTR to improve the ability
to learn multi-granularity character features and reduce the waste of training resources to
enhance the model generalization on noisier datasets.
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 4 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
2. Text detection and recognition model
2.1 Overall structure
Our proposed method as a whole can be divided into two parts, (1) using segmentation-based
suitable for curved text of the differentiable binarization algorithm to construct the detection
model DB-ECA, and improve it, which can reduce the workload of preprocessing and streamline the model structure (2) Propose a lightweight seal recognition model LSTR, which can
achieve high recognition accuracy for fuzzy, deformed and other irregular Chinese seals without collecting a large number of real seal datasets by using CNN’s inductive bias and self-attention. The overall structure of this paper is shown in Fig 1.
2.2 DB-ECA
Our DB-ECA network structure is shown in Fig 2. First, image visual features are extracted by
ResNet and fed to the main stem of the feature pyramid, which is sequentially downsampled in
multiples of two to generate feature maps of different sizes. Each layer is then upsampled by a
factor of two and fused with the graph of the previous level to merge the deep semantic features
and shallow image features, thus capturing multi-scale visual features. Second, the fused multiscale feature maps are sampled to a quarter of the size of the original image and feature cascading is performed to obtain F. Finally, the probability map P and the threshold map T are predicted using F. The approximate binary mapping B is then computed from P and F.
Supervised training is performed on P, T, and B during the training period, and P and B use
the same supervised signal (label), and only P or B is needed in the inference phase to obtain
the text box.
The backbone of the DB detection algorithm is ResNet, and the original BottleNeck module
in the ResNet network uses 1*1 convolution to adjust the number of channels and accelerate
convergence via batch norm to improve generalization. Then ReLU solves gradient vanishing
and promotes feature information transfer. However, BottleNeck uses 1*1 size convolution
kernel and step size s is 2 for downsampling, which results in partial semantic loss. Due to the
weight sharing of CNN, it will continue to forwardpropagate the residual feature sequence,
which is not conducive to the extraction of richer visual features and leads to the degradation
of DBnet performance. Therefore, the downsampling is postponed to the second step of 3*3
convolutional kernel, replacing the 3*3 convolutional kernel step size from 1 to 2, and using
the average pooling layer instead of the 1*1 convolutional kernel in shortcut for downsampling. Since the width of the convolution kernel is larger than the step size, it is able to fuse all
the information on the feature map during the moving process, and more pixel points can be
extracted for backpropagation. The improved BottleNeck structure is shown in Fig 3(A).
<u>Fig 1.</u> <u>General structure of the paper.</u>
[https://doi.org/10.1371/journal.pone.0301862.g001](https://doi.org/10.1371/journal.pone.0301862.g001)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 5 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
Fig 2. DB-ECA model diagram. Where “pred” consists of a 3×3 convolutional operator and two de-convolutional operators with stride 2. The “1/2”, “1/4”, . . . and “1/32”
<u>indicate the scale ratio compared to the input image.</u>
[https://doi.org/10.1371/journal.pone.0301862.g002](https://doi.org/10.1371/journal.pone.0301862.g002)
After extracting visual features from the input image, we use 1*1 size convolutional kernel
for downsampling, output a feature map scaled by a multiple of 2, and then perform up-sampling feature fusion, and finally unify it into a quarter size of the original image for feature cascading. But suppose a pixel is assigned as a positive value in the downsampling layer, and is
regarded as the background in the upsampling cascade operation, it will cause the conflict
between different levels of features. And occupies the main part of the feature pyramid (FPN),
which interferes with the gradient computation during the training process. To improve the
performance of the FPN, an efficient channel attention module, ECA, is introduced to fuse
multiscale features before feature cascading, learn the weight coefficients of different channels,
and enhance the ability of the feature pyramid to predict multiscale targets. The structure of
the ECA network is shown in Fig 3(B).
The ECA model proposes a local cross-channel interaction strategy without dimensionality
reduction, which effectively avoids the effect of dimensionality reduction on the learning effect
of channel attention, strengthens the correlation of different channels, and automatically
learns multi-scale features. First, a feature map with dimension H*W*C is input and spatial
feature compression is applied to the feature map. Second, global average pooling GAP is used
in the spatial dimension to avoid dimensionality reduction to obtain the aggregated features of
the 1*1*C channel map. Again, for the compressed feature map, 1*1 convolution is used to
learn each channel and its k neighboring features for local cross-channel interaction. Here,
when doing the convolution operation, since the convolution kernel size affects the receptive
field, in order to extract different ranges of features for different input feature maps, ECA uses
dynamic convolution kernels to avoid manually adjusting k through cross-validation to determine how many neighboring feature matrices are involved in the attentional prediction of a
channel. Finally, the aggregated feature map 1*1*C is multiplied with the original input feature
map H*W*C to output the feature map with channel attention.
The dynamic convolutional kernel size is changed adaptively by a function, the convolutional kernel adaptive function is defined in Eq (1):
_k_ ¼ cð _C_ Þ ¼ j <sup><u>log2ð</u></sup> <sup>_<u>C</u>_</sup> <sup><u>Þ</u></sup>
<sup><u>2ð</u></sup> <sup>_<u>C</u>_</sup> <sup><u>Þ</u></sup> þ <sup>_<u>b</u>_</sup>
g g
<sup>_<u>b</u>_</sup> ð1Þ
g <sup>j</sup> <sup>_odd_</sup>
Where _k_ denotes the kernel size, i.e., the coverage of local cross-channel interactions, and
how many "neighbors" are involved in the attentional prediction of a channel. c denotes the
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 6 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
<u>Fig 3.</u> <u>(A) BottleNeck structure diagram (B) ECA structure diagram.</u>
[https://doi.org/10.1371/journal.pone.0301862.g003](https://doi.org/10.1371/journal.pone.0301862.g003)
number of channels, and _odd_ denotes that k can only be taken as an odd number, and γ and _b_
are set to 2 and 1, which are used to change the ratio of the number of channels, C, to the size
of the convolution kernel and the sum of the kernels. The DB feature pyramid structure with
efficient channel attention is shown in Fig 4.
The ECA module is added before feature cascading (CONCAT) is performed. The range of
local cross-channel interaction is determined by the kernel size k and efficiently implemented
by 1D convolution. So that the model effectively extracts the key character features in the
image and reduces the waste of training resources. The experimental results demonstrate that
the ECA module captures the cross-channel attention interaction in a lightweight manner,
which effectively improves the accuracy and robustness of the detection model.
<u>Fig 4.</u> <u>LSTR structure diagram.</u>
[https://doi.org/10.1371/journal.pone.0301862.g004](https://doi.org/10.1371/journal.pone.0301862.g004)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 7 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
In computing the approximate biplot by P and F, the standard binarization cannot be backpropagated, much less used directly for training, because it is not differentiable. DBnet proposes to use a differentiable approximate binarization function. The calculation is shown as
1
_B_ c _l;j_ ¼ ð2Þ
1 þ _e_ <sup>�</sup> <sup>_k_</sup> ð <sup>_Pi;j_</sup> <sup>�</sup> <sup>_Ti;j_</sup> Þ
_B_ <sup>b</sup> represents the approximate biplot, and T represents the adaptive threshold map learned
from the network. k is the expansion factor, which is empirically set to 50 for the purpose of
increasing the gradient and speeding up the convergence. i, j denote the coordinates of the
pixel points. The loss function for positive and negative samples is defined as:
<u>1</u>
_l_ þ ¼ � _log_ ð3Þ
1 þ _e_ <sup>�</sup> <sup>_kx_</sup>
-
<u>1</u>
_l_ - ¼ � _log_ 1 � ð4Þ
1 þ _e_ <sup>�</sup> <sup>_kx_</sup>
Find the partial derivative for the input _x_ :
_@l_ <u>þ</u>
_@x_ <sup>¼ �</sup> <sup>_kf_</sup> <sup>ð</sup> <sup>_x_</sup> <sup>Þ</sup> <sup>_e_</sup> <sup>�</sup> <sup>_kx_</sup> ð5Þ
_<u>@l</u>_ <u>�</u>
_@x_ <sup>¼</sup> <sup>_kf_</sup> <sup>ð</sup> <sup>_x_</sup> <sup>Þ</sup> ð6Þ
_k_ is the gradient gain factor, through the parameter k can achieve the effect of increasing
the gradient magnitude and speeding up the convergence, more favorable optimization, and
the final segmentation results will be more superior. The total Loss function is defined as
shown in Eq (7)
_L_ ¼ _Ls_ þ a � _Lb_ þ b � _Lt_ ð7Þ
_Ls_ is the Loss of the probability map P and _Lb_ is the Loss of the binary graph B using the
binary cross entropy (BCE) operation. _Lt_ represents the threshold graph los, the _α_ and _β_ are
taken as 1 and 10, respectively. The formula for calculating cross-entropy is given in equation:
X
-
i2Si <sup>yilog xi þ</sup> <sup>1 �</sup> <sup>yi</sup> logð1 � xiÞ ð8Þ
_Ls_ ¼ _Lb_ ¼
where, S _i_ is the filtered dataset where positive and ne-gative samples are sampled in a ratio of
1:3.The formula used for _Lt_ is shown in Eq (9):
X
_i_ <sup>∗</sup> <sup>�</sup> <sup>_x_</sup> _i_ <sup>∗</sup>
_Lt_ ¼
_i_ 2 _Rd_ <sup>j</sup> <sup>_y_</sup> _i_ <sup>∗</sup>
_i_ <sup>∗j</sup> ð9Þ
_Rd_ refers to all pixels in the region G obtained by expanding the labeling frame by the D offset, and _y_ <sup>∗</sup> _i_ <sup>denotesthe labeling of the computed threshold map.</sup>
2.3 Lightweight Seal Text Recognition model
Lightweight Seal Text Recognition (LSTR) model consists of three parts. Firstly, image visual
features are extracted using CNN convolutional layer. Secondly, sequence modeling prediction
is performed by inference block. Finally, the recognition results are translated by CTC to transform the feature sequence frames output from the inference layer into labeled sequences. After
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 8 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
experiments, it is proved that LSTR has a smaller number of parameters and faster inference
than VIT-based recognition model, and also has advantages in accuracy. The LSTR flow is
shown in Fig 4.
VIT as backbone is larger compared to CNN with many parameters model, which will lead
to more memory occupation and waste of training resources. And Vit is difficult to obtain the
underlying information on small sample datasets, and the number of stacked layers is limited.
Therefore, ResNet is used instead as a convolutional layer for visual feature extraction of
stamp images.
When the input inference layer image sequence is very long, it will bring a lot of computational time and burden. CRNN solves the problem of RNN gradient explosion or disappearance by introducing LSTM, but the running memory is small, it will limit the cross-sample
batch processing, and it will still be tricky to deal with 10N or longer sequences. Transformerbased methods often lack positional encoding, making it difficult to accurately align feature
regions with the target object, and are computationally expensive.
In this paper, inspired by the application of Bifomer [27] in vision, a two-layer routing
attention mechanism is utilized to filter out most of the irrelevant K-V pairs in the coarsegrained region, followed by applying token-to-token attention to focus on a small portion of
the relevant tokens, which provides good performance and computational efficiency since it
does not distract the attention of irrelevant tokens. We propose to use stacked multi-head selfattention to construct an inference layer. The number of operations to compute the association
between two long-distance text positions does not increase with the distance length, and intercharacter visual and positional features are processed in parallel. And the self- Attention [28]
mechanism continuously learns intra- and inter-character multi-granularity features to produce a more explanatory model with stronger generalization for irregular text. The inference
layer network structure is shown in Fig 5.
Firstly, the visual features are fed into the Multi-Head Attention Multi-Head Attention
module to find the association between characters, different weights will be assigned to different strokes and feature extraction will be performed on different scales, which can perceive
multi-granularity character features. Secondly, the Dropout function is used to randomly deactivate some neurons to prevent overfitting, and the Layer norm normalization ensures the stability of the data feature distribution and accelerates the convergence speed of the model to
solve the gradient vanishing problem. Again, the nonlinear transformation of the input
sequence is performed by MLP block to enhance the expression ability of the model, so as to
better capture the relationship between the character vectors and improve the performance of
the model. Finally, the output results of MLP block are normalized to improve the prediction
accuracy of CTC sequence modelling.
The essence of multi-head attention is to unite the learned information from different single-head attention head parts, which can more effectively obtain the correlation between distant characters and filter the character features. The single-head attention formula is shown in
Eq (10):
!
_Attention_ ð _Q; K; V_ Þ ¼ _Softmax_ ~~p~~ <sup>_<u>QK</u>_</sup> ~~f~~ f i ~~f~~ <sup>T</sup> f
_dk_
_V_ ð10Þ
_Q_ represents the query matrix what is about to be queried, _K_ represents the key matrix i.e.
the information being queried and _V_ represents the value matrix i.e. the queried content. First,
use the transposed dot product of _Q_ and K to get the degree of correlation of the two matrices,
pf f i f f
i.e., the degree of similarity of the two feature sequences. Second, divide by _dk_ (square root
pf f i f f
_dk_
f f
i.e., the degree of similarity of the two feature sequences. Second, divide by _dk_ (square root
of K dimensions) to keep the gradient stable during training and normalize with Softmax to
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 9 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
<u>Fig 5.</u> <u>Inference layer model diagram.</u>
[https://doi.org/10.1371/journal.pone.0301862.g005](https://doi.org/10.1371/journal.pone.0301862.g005)
get a weight matrix. Again, weighting with the content V to make the value matrix more
focused on the stroke characteristics of the character, and finally get the feature vector of
attention.
Single-head attention has difficulty learning global feature weights and can only establish a
Q and K dependency. To capture various ranges of dependencies within the sequence, different stroke features are learned from different subspaces. Multi-head Attention computation is
required, where Attention computation is repeated through multiple parallel heads, with different heads processing different information. The multi-head Attention formulas are shown
in Eqs (11) and (12):
-
_QWi_ <sup>_Q; KW_</sup> _i_ <sup>_K; VW_</sup> _i_ <sup>_V_</sup> _W_ ð11Þ
head _i_ ¼ _Attention_ _QWi_ <sup>_Q_</sup>
_i_ <sup>_Q; KW_</sup> _i_ <sup>_K_</sup>
_i_ <sup>_K; VW_</sup> _i_ <sup>_V_</sup>
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 10 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
_MulHead_ ð _Q; K; V_ Þ ¼ _Cancat_ ðhead1 _;_ ��� _;_ head _h_ Þ _W_ <sup>_O_</sup> ð12Þ
_Wi_ denotes the corresponding weight matrix of _Q_, _K_, and _V_ . Attention denotes the attention computation, and head _i_ represents the computation result of the ith head of attention. _W_ <sup>_o_</sup>
denotes the result splicing matrix resulting from the computation of the h heads of attention.
In the calculation process, the attention calculation results head _i_ of each head are first
obtained, and the results are spliced and dot-multiplied with the corresponding weight matrix
_W_ <sup>_o_</sup> to obtain the result of multi-head attention.
Finally, the predictions made by the Inference block for each feature vector are converted
into a sequence of labels through the CTC loss function. A blank mechanism is introduced to
insert a "-" between repeated characters in a text label to solve the problem of whether consecutive identical characters are merged or not, and the CTC loss function is defined as shown in
Eq (13):
X
_P_ ð _l_ j _x_ Þ ¼
_P_ ðp j _x_ Þ ð13Þ
p2 _B_ <sup>�</sup> <sup>1</sup> ð _l_ Þ
where _B_ <sup>-1</sup> ( _l_ ) represents the set of all possible paths that can be merged successfully, and _π_ is
one of those paths. The probability of each path is the product of the individual time steps and
the corresponding character scores. This way of adding up the probabilities of all paths for the
matching transformation makes CTC solve the problem of indeterminate-length sequence
alignment without the need for an accurate cut of the original character sequence. A maximum
likelihood estimation operation on the loss function allows back propagation of the previous
neural network, updating the optimizer parameters used to find the most probable character
corresponding to the pixel region.
3. Experiment
3.1 Dataset
The dataset used in this paper includes Chinese seal location detection and text recognition
dataset, the text location detection dataset is obtained by the authors of this paper through
filming and data enhancement, and the text recognition dataset is constructed by cutting the
detected text area box in Python language. The dataset contains 2351 seals, including 676 real
seals and 1675 electronic seals (S1 Appendix). Adding analog simulation effects such as rotation and transparency in the production of electronic seals to enhance the training effect and
generalization ability of the model for seals with different text orientations. Each sample was
uniformly scaled to 420×420 pixels and saved in JPG format. The testing process was divided
into training and testing groups with a ratio of 8:2.
3.2 Evaluation indicators
ICDAR [29] categorizes text localization into three challenges, challenge 1, 2, and 4, according
to the source of the dataset, and each challenge evaluates different methods of detection. In
this paper, the data comes from real scene collection and computer generation, and the methods of challenge 1 and 2 are applied, and the accuracy P, recall R, and F measure are used as
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 11 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
the evaluation criteria. The definitions are shown in Eqs (14), (15) and (16):
_<u>TP</u>_
_P_ ¼ ð14Þ
_TP_ þ _FP_
_<u>TP</u>_
_R_ ¼ ð15Þ
_TP_ þ _FN_
_F_ ¼ <sup><u>2 �</u></sup> <sup>_<u>P</u>_</sup> <sup><u>�</u></sup> <sup>_<u>R</u>_</sup> ð16Þ
_P_ þ _R_
_TP_ represents the case where the positive sample is predicted to be true, _FP_ represents the
case where the negative sample is predicted to be true, and _FN_ represents the casewhere the
true sample is predicted to be false.
3.3 Experimental platform
The experiments were done under Windows OS based on Python 3.7, CUDA11.6 Cudnn
8.4.0, CPU i7-9700, GPU Tesla V100 32GB.
3.4 Ablation experiments
In the training of the text detection model DBNet-ECA, the iteration number epoch is set to
50, the batch data volume batch-size is 8, the sub-process num_workers is 8, and the initial
learning rate is set to 0.001 to reach the minimum value of loss faster. The preprocessing stage
applies basic data enhancement techniques such as plus or minus ten degree rotation, cropping, partial flipping and color change, and the processed image is resized to 420*420 to
improve the training efficiency. balance_loss is set to true, so that the DBLoss is balanced by
default for positive and negative samples in the ratio of 1:3. The threshold of thresh binarization is 0.3, which helps to reduce the situation of misjudging the background region as text.
box_thresh text box threshold is set to 0.7, which makes the generation of bounding box more
stable and improves the performance of subsequent text recognition. The optimizer is chosen
to be Adam. The results for test Precision, recall, and F- Measure are shown in Table 1.
Table 1 compares the precision, recall, and reconciliation averages of ResNet34-DB with
ResNet34-DB-ECA and ResNet50-DB-ECA for the three models with or without ResNet
improvement, where ResNet50-DB-ECA is the optimal test result, but the number of parameters is also relatively large. The precision rate, recall rate, and reconciliation mean are 90.29%,
85.17%, and 87.65%, respectively. Improving ResNet improves the precision of the three models by 0.85%, 1.08%, and 0.87%, respectively. Without improving ResNet, adding the ECA
module makes ResNet34-DB-ECA 2.74%, 4.93%, and 3.92% higher than ResNet34-DB
Table 1. Detection model comparison.
<u>Improving ResNet</u> <u>Model</u> <u>Precision%</u> <u>Recall%</u> <u>F-Measure</u>
<u>ResNet34-DB</u> <u>81.43</u> <u>74.52</u> <u>77.82</u>
~~p~~
<u>ResNet34-DB</u> <u>82.28</u> <u>77.43</u> <u>79.78</u>
<u>ResNet34-DB-ECA</u> <u>84.17</u> <u>79.45</u> <u>81.74</u>
~~p~~
<u>ResNet34-DB-ECA</u> <u>85.25</u> <u>81.79</u> <u>83.48</u>
<u>ResNet50-DB-ECA</u> <u>89.42</u> <u>82.75</u> <u>85.95</u>
~~p~~
<u>ResNet50-DB-ECA</u> <u>90.29</u> <u>85.17</u> <u>87.65</u>
[https://doi.org/10.1371/journal.pone.0301862.t001](https://doi.org/10.1371/journal.pone.0301862.t001)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 12 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
precision, recall, and reconciliation mean, respectively, and the model size is moderate, and
the number of detected frames per second differs from that of ResNet34-DB only by 2.
Since recognizing characters requires a large number of real datasets more, we pre-train
LSTR on the public dataset CTW (Chinese Text in the wild) for 100 epochs by transfer learning, and then train it on the homemade dataset. The parameter is set to 200epoch, batch data
size of 64, and maximum predicted character length of 40. the recognized character type is set
to ch (Chinese) to attenuate numeric or alphabetic interference. The inference layer allows
image features to be processed using a cross-attention mechanism, with the number of hidden
units being 1024, and the input features are divided into 8 attention heads to capture different
positional dependencies. And the dropout deactivation rate is set to 0.1 due to the small real
scene dataset. Shuffle is defaulted to true, which ensures that the training images are returned
in a different order for each epoch, reducing the overfitting of the model to the training data.
fc_decay in CTC is 0.004, allowing the model to learn more detailed features. The Adam optimizer with a weight decay coefficient of 0.05 is used, which requires less memory compared to
other optimizers, can adaptively adjust the learning rate of each parameter, and is more suitable for models with large gradient noise in this paper. Data enhancement operations such as
rotation, perspective distortion, motion blur, etc. are randomly performed during training.
As can be seen from Table 2. The ResNet34 results are generally better than ResNet18, but
the deeper network structure model is also larger. Using ResNet34 as a backbone, the accuracy
of the test set is significantly improved by 5.41% and 1.68% compared to VIT and Swin-T. VIT
and Swin-T inductive bias is weaker than CNN on small samples, and is poor at reasoning
about pixels such as fuzzy irregularities that are not encountered in the model. More data is
needed to learn these assumptions automatically, so the accuracy is slightly lower than
ResNet34, and the proposed LSTR recognition model combined with the self-attention mechanism has better results for small sample Chinese seal recognition.
Table 3 shows the comparison of the number of parameters and inference speed between
Swin-T, VIT-S, ResNet34 and Inference block. The Speed(ms) is the inference time averaged
over 100 Chinese seal image text. In order to better highlight the advantages of our model, we
use cpu to test inference time (ms). The residual network used in ResNet consists of two 1*1
and one 3*3 convolutions, whereas the token and the hidden size of VIT remain unchanged
during the computation process, and the computational complexity is proportional to the
token’s square, so ResNet has fewer parameters and faster inference speed. Inference block
contains only two fully connected layers, the model in this paper not only has the advantage in
accuracy, but also has less number of parameters and faster inference speed, which proves the
applicability of this method in this study.
3.5 Comparison experiments
To further verify the superiority of the detection model DB-ECA and recognition model LSTR
in this paper among the existing methods, the comparison experiments of different
Table 2. Comparison results of different backbone networks.
<u>Model</u> <u>Train accuracy%</u> <u>Test accuracy%</u>
<u>ResNet18+BiLSTM</u> <u>77.54</u> <u>75.63</u>
<u>ResNet18+inference block</u> <u>81.88</u> <u>80.12</u>
<u>VIT+inference block</u> <u>85.08</u> <u>84.21</u>
<u>Swin-T+inference block</u> <u>88.71</u> <u>87.94</u>
<u>ResNet34+inference block</u> <u>91.29</u> <u>89.32</u>
[https://doi.org/10.1371/journal.pone.0301862.t002](https://doi.org/10.1371/journal.pone.0301862.t002)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 13 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
Table 3. Backbone network performance comparison.
<u>Model</u> <u>Params(M)</u> <u>Speed(ms)</u>
<u>VIT-S+inference</u> <u>55.35</u> <u>25.13</u>
<u>Swin-T+inference</u> <u>58.21</u> <u>17.27</u>
<u>ResNet34+inference</u> <u>24.5</u> <u>13.36</u>
[https://doi.org/10.1371/journal.pone.0301862.t003](https://doi.org/10.1371/journal.pone.0301862.t003)
recognition models are conducted on the homemade real scene dataset in this paper, as shown
in Fig 6 and Table 4.
In Fig 6, we can see that TextBoxes++ [30] requires a large number of datasets for model
pre-training due to the complex network structure, and the low-level feature expression is
weak, CTPN [31] joins the LSTM in the training phase which easily leads to gradient explosion, and it cannot process multi-directional text, so they are not suitable for small-scale target
detection such as the seal in this paper, and their precision are respectively lower than those of
DB-ECA by 6.71% and 7.63%.Although DRRG can realize the detection of arbitrary shaped
text, the detection results are overly dependent on the individual word detection frames suggested by the text component. PRPN [32] proposes a two-dimensional asymptotic kernel to
satisfy the requirements of the curved text detection task, but there are difficulties in dealing
with text embeddings like seals and other rare training data, and thus the Precision is lower
than that of DB-ECA by 4.96%, respectively, 3.48%. The experimental results demonstrate that
DB-ECA achieves the highest Precision and F-Measure while maintaining a high FPS.
The transformer-based models NRTR, SRN have larger complexity and parameter counts
and require a large number of datasets for gradient updating and optimization, especially for
some specific data, so they are not suitable for small-sample studies of real stamp scenes, and
their accuracies are lower than that of LSTR by 6.07% and 3.89%, respectively. SVTR unites
the extraction of visual and sequence features into a single module, and it is more accurate at
the speed is more advantageous, but the accuracy is slightly worse than LSTR 1.81% for stamp
images with high noise such as blurring and bending etc. MGP improves the encoder part but
lacks a ’localizer’ like CTC, and the accuracy is lower than LSTR 1.73%. This proves that LSTR,
Fig 6. Detection results of different models. The number in the center of the bubble indicates Precision, and the area
<u>of the bubble is proportional to F-Measure.</u>
[https://doi.org/10.1371/journal.pone.0301862.g006](https://doi.org/10.1371/journal.pone.0301862.g006)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 14 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
Table 4. Comparison of different recognition models.
<u>Model</u> <u>Accuracy%</u> <u>Speed(ms)</u> <u>Params(M)</u>
<u>NRTR</u> <u>83.25</u> <u>54.0</u> <u>31.7</u>
<u>SRN</u> <u>85.43</u> <u>24.74</u> <u>54.7</u>
<u>SVTR-S</u> <u>87.51</u> <u>8.51</u> <u>10.3</u>
<u>ABINet</u> <u>86.62</u> <u>15.47</u> <u>36.7</u>
<u>MGP-T</u> <u>87.59</u> <u>20.52</u> <u>26.4</u>
<u>LSTR</u> <u>89.32</u> <u>13.36</u> <u>24.5</u>
[https://doi.org/10.1371/journal.pone.0301862.t004](https://doi.org/10.1371/journal.pone.0301862.t004)
which adapts to a small sample dataset by CNN and combines CTC to align feature regions
with the target object, has advantages in both accuracy and inference speed.
3.6 Parameter analysis
In this section, the impact of improving ResNet and adding efficient channel attention on
DBnet-based detection models is analyzed experimentally. As shown in Table 1, using average
pooling instead of 1*1 convolutional kernel and postponing downsampling can extract richer
character semantic features, which all improve the performance of the detection model. The
introduction of efficient channel attention and cross-channel interaction before feature cascading significantly improves the accuracy of the detection model and effectively solves the
problem of mismatch of weights of the same pixel point on feature maps of different scales.
Table 5 calculates the detection frame rate per second of the detection model, which shows
that ResNet50 has the largest number of parameters and slower inference speed, while the
addition of ECA has less impact on the model speed and the number of parameters. Table 2
compares the recognition models by ablation experiments, due to the introduction of residual
network and Batch Normalization in ResNet, the convergence is faster and the number of
parameters is smaller, and the interference block outperforms BiLSTM in models with deeper
networks. LSTR Compared to the transformer-based recognition model [20, 21], the detection
accuracy and inference speed are improved, verifying that the combination of CNN and inference layer can capture long-range dependencies, improve accuracy by making predictions on
irregular seal text such as occlusion and blurring based on contextual semantic features, eliminate loops and recursion with parallel computing, and have an advantage in inference speed.
The recognition model training accuracy is slightly lower than that of the training set in the
test set, indicating that the LSTR recognition model does not suffer from overfitting phenomenon during the migration learning process after the Adam optimizer weight attenuation. It is
demonstrated that using the inductive bias of CNN can help the inference layer to speed up
the convergence speed and have good global modeling ability on small samples.
4. Conclusion
In this paper, DB-ECA seal text location detection model and Lightweight Seal Text Recognition model are proposed. The ECA channel attention is added to solve the DBNet feature
Table 5. Model performance comparison.
<u>Model</u> <u>Params (M)</u> <u>FPS</u>
<u>ResNet34-DB</u> <u>20.1</u> <u>34</u>
<u>ResNet34-DB-ECA</u> <u>21.9</u> <u>32</u>
<u>ResNet50-DB-ECA</u> <u>25.6</u> <u>21</u>
[https://doi.org/10.1371/journal.pone.0301862.t005](https://doi.org/10.1371/journal.pone.0301862.t005)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 15 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
pyramid conflict problem, and the inference block is constructed instead of the loop layer. The
inference layer utilizes the self-attention mechanism, which can perform global character feature modeling, fusion of contextual semantic features, and parallel prediction of visual features
to improve recognition efficiency and accuracy. Experimental evaluation on a self-made real
Chinese seal dataset fully verifies that the DB-ECA and LSTR models outperform other models
in terms of performance and recognition accuracy, and are able to accurately extract the key
information of the seal faster and more accurately. It solves the problem of inefficiency in the
traditional administrative office, saves material and financial resources, and is of great help to
the government, enterprises and other administrative departments in the intelligent office.
Although the recognition method in this paper achieved 91.29% accuracy in the test set, the
Chinese seal text recognition has achieved good results. However, the method of CTC loss
function decoding has a certain degree of randomness, which will affect the alignment effect of
features and labels. Therefore, in the future, we consider adding GCN graph convolutional
neural network to the CTC branch of the recognition model to establish the connection
between the label and local features, and improve the model expression ability, in order to
improve the accuracy of the Chinese seal text recognition model.
Supporting information
[S1 Appendix. Dataset sources.](http://www.plosone.org/article/fetchSingleRepresentation.action?uri=info:doi/10.1371/journal.pone.0301862.s001)
(DOCX)
Author Contributions
Conceptualization: Aokun Bai.
Data curation: Yuqiong Wu.
Funding acquisition: Baohua Huang.
Methodology: Aokun Bai.
Resources: Baohua Huang, Yuqiong Wu.
Supervision: Baohua Huang.
Validation: Aokun Bai, Chanjuan Yang.
Visualization: Aokun Bai, Han Sun.
Writing – original draft: Aokun Bai.
Writing – review & editing: Baohua Huang.
References
1. Mandavia, K. Badelia, P. Ghosh, S. Chaudhuri, A. Optical Character Recognition Systems for Different
Languages with Soft Computing; Springer: Cham, Switzerland, 2017; Volume 352, pp.9–41.
2. Nagy G. Twenty years of document image analysis in PAMI. IEEE Trans. Pattern Anal. Mach. Intell.
2000, 22,38–62.
3. Shan F, Hong X, Zhen M, et al. Autonomous, Bidirectional and Iterative Language Modeling for Scene
Text Recognition. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,.2021:7098–7107.
4. Wang W, Xie E, Li X, et al. Shape robust text detection with progressive scale expansion network. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition.2019:9336–9345.
5. Ma Lixia, Zhu Qiuping. The application of image processing application. Journal of Wuhan University,
(2004), 48(08): 691–693.
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 16 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
6. YaoMin, Mou Xueer, Chen Peng, et al. Research on detection, positioning and recognition of seals in
images. Information Technology and Informatization, 2018, 43(12):148–150.
7. Cai Liang, Mei Li. Color stamp detection and alignment method based on wedge ring structure. Journal
of Zhejiang University, 2006, 51(10):1696–1700.
8. Zhang Xiang, Qin Yi, Dong Zhicheng, et al. Chinese seal recognition method based on flood filling algorithm Electronic technology application, 2022, 48(11):2–6,12.
9. Xiao Jinsheng, Zhao Tao, Xiong Wenxin, et al. Stamp Text Detection and Recognition Algorithm Based
on Angle Optimization Network. Journal of Electronics and Information Technology, 2021, 43
(11):3327–3334.
10. Dehua Zhang, Xinyuan Hao, Linlin Liang, Wei Liu, Chunbin Qin, A novel deep convolutional neural network algorithm for surface defect detection, Journal of Computational Design and Engineering, Volume
[9,Issue 5,October 2022,Pages1616–1632, https://doi.org/10.1093/jcde/qwac071](https://doi.org/10.1093/jcde/qwac071)
11. Zhang D, Hao X, Wang D, et al. An efficient lightweight convolutional neural network for industrial sur[face defect detection[J].Artificial Intelligence Review,2023:1–27. https://doi.org/10.1007/s10462-023-](https://doi.org/10.1007/s10462-023-10438-y)
[10438-y](https://doi.org/10.1007/s10462-023-10438-y)
12. Shi Xue Z, Xiaobin Z, Jie-Bo H. Deep Relational Reasoning Graph Network for Arbitrary Shape Text
Detect-ion Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2021:9699–9708.
13. Zhu Y, Chen J, Liang L, et al. Fourier contour embedding for arbitrary-shaped text detection. Proceed[ings of the IEEE/CVF conference on computer vision and pattern recognition.2021:3123–3131. https://](https://arxiv.org/abs/2104.10442v2)
[arxiv.org/abs/2104.10442v2.](https://arxiv.org/abs/2104.10442v2)
14. Zhu Y, Du J. Text mountain: Accurate scene text detection via instance segmentation. Pattern Recognition, 2021, 110:107336.
15. Liao M, Wan Z, Yao C, et al. Real-time scene text detection with differentiable binarization. Proceedings
of the AAAI conference on artificial intelligence, 2020, 34(07): 11474–11481.
16. Yu W., Liu Y., Hua W., et al., Turning a CLIP Model into a Scene Text Detector. Proceedings of the
[IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:6978–6988. https://doi.org/](https://doi.org/10.48550/arXiv.2302.14338)
[10.48550/arXiv.2302.14338.](https://doi.org/10.48550/arXiv.2302.14338)
17. Shi B, Bai X, Yao C. An end-to-end trainable neural network for image-based sequence recognition and
its application to scene text recognition. IEEE transactions on pattern analysis and machine intelligence,
2016, [39(11):2298–2304. https://doi.org/10.1109/TPAMI.2016.2646371 PMID: 28055850](https://doi.org/10.1109/TPAMI.2016.2646371)
18. Hu W, Cai X, Hou J, et al. Gtc: Guided training of ctc towards efficient and accurate scene text recognition Proceedings of the AAAI conference on artificial intelligence.2020:1005–11012.
19. Dosovitskiy A, Beyer L, Kolesnikov A, et al. An image is worth 16x16 words: Transformers for image
recognition at scale. Proceedings of International Conference on Learning Representations.2020:1–9.
20. Sheng F, Chen Z, Xu B. NRTR: A no-recurrence sequence-to-sequence model for scene text recognition. 2019 International conference on document analysis andrecognition (ICDAR) IEEE.2019:781–786.
21. Yu D, Li X, Zhang C, et al. Towards accurate scene text recognition with semantic reasoning networks.
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2020:12113–
12122.
22. Wang P, Da C, Yao C. Multi-granularity Prediction for Scene Text Recognition. Computer Vision–ECCV
2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXVIII,
2022: 339–355.
23. Yongkun Du, Zhineng Chen, Caiyan Jia, et al. Scene Text Recognition with a Single Visual Mode.Inter[national Joint Conference on Artificial Intelligence.2022: 978–990. https://doi.org/10.48550/arXiv.2205.](https://doi.org/10.48550/arXiv.2205.00159)
[00159.](https://doi.org/10.48550/arXiv.2205.00159)
24. Ye M, Zhang J, Zhao S, et al. Deepsolo: Let transformer decoder with explicit points solo for text spotting. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
2023:19348–19357.
25. Kai He, Zhang X, Ren S, et al. Deep Residual Learning for Image Recognition. Proceedings of the IEEE
Conference on Computer Vision and Pattern Recognition. 2016:770–778.
26. Qilong Wang, Banggu W, Pengfei Z, et al. Efficient Channel Attention for Deep Convolutional Neural
Networks. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2020:11534–11542.
27. Zhu L, Wang X, Ke Z, et al. BiFormer: Vision Transformer with Bi-Level Routing Attention. Proceedings
[of the IEEE/CVF Conference on Computer Visionand Pattern Recognition.2023:10323–10333. https://](https://doi.org/10.48550/arXiv.2303.08810)
[doi.org/10.48550/arXiv.2303.08810.](https://doi.org/10.48550/arXiv.2303.08810)
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 17 / 18
PLOS ONE DB-EAC and LSTR: DBnet based seal text detection and Lightweight Seal Text Recognition
28. Ashish Vaswani, Noam Shazeer, Niki Parmar, et al. Attention is All you Need. Conference and Work[shop on Neural Information Processing Systems.2017:2150–2164. https://doi.org/10.48550/arXiv.](https://doi.org/10.48550/arXiv.1706.03762)
[1706.03762.](https://doi.org/10.48550/arXiv.1706.03762)
29. Karatzas D, Shafait F, Uchida S, et al. ICDAR 2013 robust reading competition.2013 12th international
conference ondocument analysis and recognition. IEEE, 2013:484–1493.
30. Liao M, Shi B, Bai X. Textboxes++: A single-shot oriented scene text detector[J]. IEEE transactions on
image processing, 2018, 27(8): 3676–3690.
31. Tian Z, Huang W, He T, et al. Detecting text in natural image with connectionist text proposal network
[C]//Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October
11–14, 2016, Proceedings, Part VIII 14. Springer International Publishing, 2016: 56–72.
32. Zhong Y, Cheng X, Chen T, et al. PRPN: Progressive region prediction network for natural scene text
detection[J]. Knowledge-Based Systems, 2022, 236: 107767.
[PLOS ONE | https://doi org/10 1371/journal pone 0301862](https://doi.org/10.1371/journal.pone.0301862) May 16 2024 18 / 18
섹션 본문
섹션 본문이 없습니다.
참고문헌 28건
- A comparative study of texture measures with classification based on featured distributions Pattern Recognition · Elsevier BV · 1996 10.1016/0031-3203(95)00067-4
- Automatic Defect Detection on Hot-Rolled Flat Steel Products IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2012 10.1109/tim.2012.2218677
- Defect detection of steel surface using entropy segmentation 2014 10.1109/indicon.2014.7030439
- Learning long-term dependencies with gradient descent is difficult IEEE Transactions on Neural Networks · Institute of Electrical and Electronics Engineers · 1994 10.1109/72.279181
- A Real-Time Automated Visual Inspection System for Hot Steel Slabs IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 1983 10.1109/tpami.1983.4767445
- Surface defects inspection of cold rolled strips based on neural network International Conference on Machine Learning and Cybernetics · 2005 10.1109/icmlc.2005.1527830
- Automatic Classification for Pathological Prostate Images Based on Fractal Analysis IEEE Transactions on Medical Imaging · Institute of Electrical and Electronics Engineers · 2009 10.1109/tmi.2009.2012704
- Invariant Feature Extraction Method Based on Smoothed Local Binary Pattern for Strip Steel Surface Defect ISIJ International · The Iron and Steel Institute of Japan · 2015 10.2355/isijinternational.isijint-2015-201
- Median Robust Extended Local Binary Pattern for Texture Classification IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2016 10.1109/tip.2016.2522378
- Steel-surface defect detection using a switching-lighting scheme Applied Optics · Optica Publishing Group · 2015 10.1364/ao.55.000047
- Deep Learning‐Based Crack Damage Detection Using Convolutional Neural Networks Computer-Aided Civil and Infrastructure Engineering · Wiley · 2017 10.1111/mice.12263
- Autonomous Structural Visual Inspection Using Region‐Based Deep Learning for Detecting Multiple Damage Types Computer-Aided Civil and Infrastructure Engineering · Wiley · 2017 10.1111/mice.12334
- Surface Defects Classification of Hot-Rolled Steel Strips Using Multi-directional Shearlet Features Arabian Journal for Science and Engineering · Springer Science+Business Media · 2018 10.1007/s13369-018-3329-5
- Focal Loss for Dense Object Detection IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2018 10.1109/tpami.2018.2858826
- CBAM: Convolutional Block Attention Module Lecture notes in computer science · Springer Science+Business Media · 2018 10.1007/978-3-030-01234-2_1
- Proceedings of the 16th IEEE international conference on Image processing 2009
- Slighter Faster R-CNN for real-time detection of steel strip surface defects 2018 10.1109/cac.2018.8623407
- Weak Micro-Scratch Detection Based on Deep Convolutional Neural Network IEEE Access · Institute of Electrical and Electronics Engineers · 2019 10.1109/access.2019.2894863
- Squeeze-and-Excitation Networks IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2019 10.1109/tpami.2019.2913372
- Automated Visual Defect Detection for Flat Steel Surface: A Survey IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2020 10.1109/tim.2019.2963555
- Deep Metallic Surface Defect Detection: The New Benchmark and Detection Network Sensors · Multidisciplinary Digital Publishing Institute · 2020 10.3390/s20061562
- ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks 2020 10.1109/cvpr42600.2020.01155
- CSPNet: A New Backbone that can Enhance Learning Capability of CNN 2020 10.1109/cvprw50498.2020.00203
- Detecting the shuttlecock for a badminton robot: A YOLO based approach Expert Systems with Applications · Elsevier BV · 2020 10.1016/j.eswa.2020.113833
- Research on Detecting Bearing-Cover Defects Based on Improved YOLOv3 IEEE Access · Institute of Electrical and Electronics Engineers · 2021 10.1109/access.2021.3050484
- Triplet-Graph Reasoning Network for Few-Shot Metal Generic Surface Defect Segmentation IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2021 10.1109/tim.2021.3083561
- YOLOX: Exceeding YOLO Series in 2021 arXiv (Cornell University) · Cornell University · 2021 10.48550/arxiv.2107.08430
- Surface Defect Detection Methods for Industrial Products: A Review Applied Sciences · Multidisciplinary Digital Publishing Institute · 2021 10.3390/app11167657