The invention relates to a text-oriented
line segment detection method based on a UNet
algorithm. The specific process is as follows: obtaining text image data with line segments; performing size normalization
processing on the acquired image, performing
manual annotation on the image by using an
annotation tool
label, obtaining a
line segment position, expanding the
line segment position into a rectangle with the width of two pixel points, obtaining coordinates of four points of the rectangle, performing binarization
processing on the image, generating a binarization
label image, and obtaining a target detection
data set; positions of all line segments in the original image are marked in the binarized
label image; constructing a line segment detection
network model based on a UNet
algorithm, training the line segment detection
network model by using the target detection
data set, predicting line segments in the text image by using the trained line segment detection
network model, and outputting a
model prediction map; and post-
processing the
model prediction map, extracting the positions of the transverse line segments, the longitudinal line segments and the
oblique line segments in the text image, realizing detection of the line segments in the text image, and improving the detection precision of the text line segments.