This invention relates to the field of vision and
image processing technology, and discloses a text compliance detection method based on image semantic segmentation. The method acquires and grayscales a text image, obtains an initial
mask through semantic segmentation, calculates the local pixel mean
drift coefficient, and determines the dynamic edge search bandwidth accordingly. Within the bandwidth, it statistically analyzes the magnitude and distribution characteristics of the first-order spatial gradient, calculates the rectified edge probability
score of the target pixel, constructs a topological
gravitational potential energy using the probability
score as the gravity source, calculates the adhesion blocking coefficient by solving the Hessian matrix
determinant and combining it with the global drift variance, then extracts the
potential energy maximum point as the
stroke center, extracts the cross-section along the potential surface normal, performs weighted integration, and calculates the equivalent
stroke width. Finally, it calculates the width dispersion and combines it with the global drift mean to calculate the compliance discrimination coefficient, outputting the detection result. This technical solution effectively overcomes semantic drift and false edge traps, and accurately decouples local ink topological adhesion.