Text automatic identification area detection optimization method

By dynamically adjusting the loss weight and adaptive negative sample enhancement strategy, the DBNet model is optimized, which solves the robustness and false detection rate problems of text detection in complex scenarios and achieves higher detection accuracy and efficiency.

CN120599622APending Publication Date: 2025-09-05NANJING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510691829.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing text detection models are not robust enough to lighting changes, occlusions, and background interference in complex scenes. In addition, traditional methods lack targeted suppression of misdetected areas during training, resulting in a high false detection rate.

Method used

By introducing learnable parameters to dynamically adjust the loss weight and adaptive negative sample enhancement strategy, combining model prediction confidence and IoU threshold to screen difficult negative samples, a joint optimization goal of loss weight optimization and false positive rate minimization is constructed to optimize the DBNet model.

Benefits of technology

The model's robustness to complex backgrounds is improved, the false detection rate is reduced, and the accuracy and efficiency of text area detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599622A_ABST
    Figure CN120599622A_ABST
Patent Text Reader

Abstract

The invention provides a text automatic identification area detection optimization method. The method comprises the following steps: automatically balancing the contribution of each loss item by introducing learnable parameters, dynamically adjusting the weight of a DBNet loss function, reducing the cost of manual parameter adjustment, and improving the model training effect. By adding an adaptive negative sample enhancement method, targeted suppression is performed on a false detection region, response of a non-text region is suppressed, and the false detection rate of text region detection is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of computer vision and image processing technology, text area detection, deep learning, DBNet, and character recognition, and in particular relates to an optimization method for automatic text recognition area detection. Background Art

[0002] Detecting text regions in natural scenes is a crucial task in computer vision, widely used in scenarios such as optical character recognition (OCR), autonomous driving road sign recognition, and industrial document analysis. However, text detection in complex scenes faces numerous challenges: text regions can have blurred boundaries due to lighting variations, occlusions, font diversity, or background interference. Non-text regions such as fences and decorative patterns can be easily misidentified as text regions, and traditional detection models are not robust enough to address these challenges.

[0003] DBNet (Differentiable Binarization Network), a mainstream text detection model, achieves a balance between real-time performance and high-precision detection through differentiable binarization. However, the weight coefficients in its loss function use fixed values, which limits the model's adaptability to different datasets and requires manual parameter optimization. Furthermore, the fixed weight distribution makes it difficult to dynamically balance the contributions of different loss terms, potentially leading to insufficient model convergence or overfitting. Furthermore, existing methods lack targeted suppression of false positives during training. Traditional negative sample augmentation often uses random sampling or fixed rule screening, making it difficult to dynamically capture high-confidence false positives in model predictions, resulting in a high false positive rate.

[0004] After searching, the Chinese invention patent with publication number CN117496527A discloses a text detection model training method, a text detection method, and related equipment for improving the generalization and detection accuracy of the text detection model. The text detection model training method includes: obtaining a sample image set, wherein the sample images in the sample image set are annotated with multiple sample text regions, and the multiple sample text regions include a first sample text region obtained by manual annotation and a second sample text region obtained by non-manual annotation; performing text detection on the sample images using the text detection model to be trained to obtain at least one predicted text region of the sample image; determining the detection loss value of the text detection model to be trained based on the at least one predicted text region, the multiple sample text regions, and the loss weights corresponding to the various sample text regions; and updating the model parameters of the text detection model to be trained based on the detection loss value to obtain a trained text detection model.

[0005] The technical comparison between this application and the above-mentioned reference documents is as follows:

[0006] 1. Model elements and constraints

[0007] In patent CN117496527A, by integrating multi-source data with manual annotation and non-manual annotation as training samples and assigning fixed loss weights based on the data source, the main purpose is to solve the problem of insufficient generalization caused by a single source of annotation data.

[0008] This invention does not change the original data source, but focuses on two technical dimensions: dynamic loss weight adjustment and adaptive negative sample generation. It dynamically adjusts the multi-task loss weight through learnable parameters, and screens difficult negative samples based on model prediction confidence and IoU threshold, constructing a dual optimization goal of loss weight optimization + false positive rate minimization.

[0009] 2. Sample enhancement strategy

[0010] Patent CN117496527A improves generalization capabilities by expanding the diversity of labeled data, but does not involve active mining and enhancement strategies for negative samples.

[0011] This paper proposes an adaptive negative sample enhancement method: based on pre-training, the IoU threshold θ is used to screen the false positive areas, the confidence threshold τ is combined with the TopK strategy to select high-confidence difficult negative samples, and an exponential penalty term is added to the probability graph loss to force the model to reduce its response to false positive areas.

[0012] After searching, the Chinese invention patent with publication number CN113516114A discloses an efficient and accurate natural scene text detection method, device and medium, including constructing a natural scene text detection training data set; constructing a natural scene text detection network based on the U-Net structure composed of the first 13 layers of VGG16 to obtain a text prediction feature map F; constructing a loss function, calculating the loss of the prediction feature map F to obtain a natural scene text detection model, wherein the loss function includes a text area loss function. The present invention constructs a text area loss function through true positive text and false positive text and false negative text with different weights, and uses the text area loss function to balance the distribution description of different types of text in the training process, strengthen the difference between background and text in natural scenes, greatly enhance the natural scene text detection network's perception of text areas, accelerate the convergence of the natural scene text detection network, and improve the text detection performance in natural scene images.

[0013] The technical comparison between this application and the above-mentioned reference documents is as follows:

[0014] 1. Model architecture and feature extraction

[0015] Patent CN113516114A uses a U-Net structure based on the first 13 layers of VGG16 to generate a text prediction feature map F through an encoder-decoder architecture. This model primarily relies on the multi-scale feature fusion capability of U-Net but does not introduce a dynamic weight adjustment module.

[0016] This paper is based on the DBNet framework and uses ResNet-50 as the backbone network. It optimizes multi-task losses through a dynamic weight adjustment mechanism and introduces an adaptive negative sample enhancement strategy to improve the model's robustness to complex backgrounds.

[0017] 2. Sample enhancement and training strategy

[0018] CN113516114A enhances the diversity of training sets through data preprocessing, but does not involve active mining of negative samples or dynamic adjustment strategies.

[0019] The present invention adopts phased training, dynamic negative sample iterative enhancement, and actively optimizes the training set in combination with model prediction results, which is more targeted.

[0020] A search revealed a Chinese invention patent with publication number CN113516126A, which discloses an adaptive threshold scene text detection method based on attention feature fusion. The method includes capturing scene images through a device and inputting them into a constructed neural network. The neural network includes three processing modules: a feature extraction module for extracting features from the image, wherein a channel attention module added to the convolutional layer dynamically modulates the weights of each channel in the image, improving the network's representational capabilities by enhancing the weights of text features. Feature fusion uses a pyramid-like method to fuse features of different scales obtained by downsampling in the feature extraction module, integrating the high resolution of low-level features with the semantic information of high-level features, thereby improving the robustness of segmentation. The image segmentation module predicts the features obtained by the feature fusion module to obtain a probability map and a threshold map. The network then learns the optimal threshold for the pixels in the probability map. Finally, the optimal threshold is used to generate an optimal binary map on the probability map to obtain the detected text area.

[0021] The technical comparison between this application and the above-mentioned reference documents is as follows:

[0022] 1. Model elements and core optimization directions

[0023] The core optimization direction of CN113516126A is feature fusion and channel attention mechanism. By embedding the channel attention module in the convolutional layer, it enhances text features and suppresses background information, and combines multi-scale feature pyramid fusion to improve segmentation robustness.

[0024] This paper focuses on two technical dimensions: dynamic weight adjustment and adaptive negative sample enhancement. By introducing learnable parameters to dynamically adjust the loss weights of probability maps, binary maps, and threshold maps, and filtering difficult negative samples based on the false positive areas predicted by the model, a joint optimization objective is constructed.

[0025] 2. Loss function adjustment mechanism

[0026] CN113516126A uses a static loss weight distribution, where α and β are fixed coefficients and are not dynamically adjusted based on training. Its optimization focuses on feature fusion and threshold generation rather than loss weight adaptability.

[0027] The present invention uses the logarithmic space parameter As a trainable variable, dynamic weights are generated through exponential mapping, and L2 regularization constraints are imposed to achieve adaptive adjustment of weights during the training process.

[0028] After searching, the Chinese invention patent with publication number CN111062258A discloses a method, apparatus, terminal device, and readable storage medium applicable to the field of terminal artificial intelligence and the corresponding field of computer vision technology. The method includes: obtaining an image to be detected, wherein the image to be detected includes at least one text line; inputting the image to be detected into a trained text recognition model for processing to obtain a text area consisting of the text line beginning and text line end of the at least one text line. Since the text recognition model is obtained by training the head and tail feature point regression branch, the weights of the text line beginning and text line end of the text recognition model are adjusted, so that the text recognition model can accurately identify the line beginning and line end of each text line, avoiding the problem of inaccurate text area recognition due to inaccurate recognition of the text line beginning and text line end, improving the accuracy of identifying the text line beginning and text line end, and improving the accuracy of identifying the text area.

[0029] The technical comparison between this application and the above-mentioned reference documents is as follows:

[0030] 1. Loss function design

[0031] Patent CN111062258A uses a static loss combination: the regional error is directly added to the error at the beginning and end of the row. No dynamic weights or regularization mechanism is introduced, and the weight distribution is fixed.

[0032] The total loss function of the present invention includes a dynamic weight term and a regularization term, and the learning parameters The weights are adaptively adjusted through gradient updates. In addition, a new negative sample penalty term is added to the probability map loss to strengthen the suppression of false positives.

[0033] 2. Sample processing strategy

[0034] Patent CN111062258A does not involve negative sample processing, but only generates the target image by annotating the first and last coordinates of the row to optimize the weight distribution of positive samples.

[0035] Based on pre-training, the present invention filters out false detection areas through the IoU threshold θ, combines the confidence threshold τ with the TopK strategy to select high-confidence difficult negative samples, and adds an exponential penalty term to the probability graph loss to force the model to reduce its response to false detection areas.

[0036] After searching, the Chinese invention patent with publication number CN111444919A discloses a method for detecting text of arbitrary shapes in natural scenes, including the following steps: Step 1, preprocessing the training images in the text image dataset; Step 2, building a segmentation network, using the network to complete feature extraction and segmentation prediction of the training images, and obtain predictions of the text area and the text center area; Step 3, using a weight that gradually decays with the training process to control the calculation of the loss function, and supervised training the network to obtain a detector model; Step 4, detecting the image to be detected; Step 5, obtaining a prediction map of the text center kernel through a post-processing algorithm, filtering some erroneous prediction areas, and then directly expanding the predicted text center kernel to obtain the final detection result.

[0037] The technical comparison between this application and the above-mentioned reference documents is as follows:

[0038] 1. Model structure and feature extraction mechanism

[0039] Patent CN111444919A uses a TIKD network, which includes a feature pyramid network module, a feature fusion module, and two prediction branch modules. Feature fusion is achieved through upsampling and dimensionality reduction of multi-scale feature maps, and a dynamically attenuated loss weight coefficient is introduced.

[0040] This paper improves on DBNet, uses ResNet-50 as the backbone network, optimizes the multi-task loss weights through a dynamic weight adjustment mechanism, and introduces regularization constraints to prevent weight shift.

[0041] 2. Training Process

[0042] Patent CN111444919A uses an end-to-end training process to optimize model parameters using stochastic gradient descent. The loss weight decays dynamically with the number of training rounds, but the optimization is not staged.

[0043] The present invention adopts phased training, dynamic negative sample iterative enhancement, actively optimizes the training set in combination with model prediction results, and dynamically adjusts loss weights and model parameters, which is more targeted. Summary of the Invention

[0044] To solve the above technical problems, the present invention proposes a method for optimizing region detection for automatic text recognition. Based on the dynamic changing characteristics of probability map loss, binary map loss, and threshold map loss during model training, combined with the confidence level of the model's predicted false positive regions, the intersection-over-union (IoU) threshold, and negative sample screening rules, an adaptive training framework is established with the joint optimization goals of minimizing the false positive rate and improving detection accuracy, to solve the optimal text region detection model parameters.

[0045] To achieve the above object, the technical solution adopted by the present invention is:

[0046] A method for optimizing detection of text automatic recognition regions, characterized by comprising the following steps:

[0047] S1. Build a dynamic weight adjustment mechanism;

[0048] S2, adaptive negative sample enhancement method;

[0049] S3, training process;

[0050] S34, algorithm effect;

[0051] Compare the text region detection effects before and after improvement.

[0052] As a preferred technical solution of the present invention: Step S1 is specifically as follows:

[0053] S11, definition of learnable parameters;

[0054] The optimization objective of DBNet includes three core loss terms:

[0055] (1)

[0056] in, For the total loss, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and are weight coefficients, which are set to 1 and 10 by default.

[0057] Introducing logarithmic space trainable parameters , , dynamically generate loss weights through exponential mapping:

[0058] (2)

[0059] in, , It is a trainable logarithmic space parameter and dynamically generates loss weights through exponential mapping , ,

[0060] S12, regularization constraints;

[0061] Apply L2 regularization constraints on learnable parameters:

[0062] (3)

[0063] in, is the regularization coefficient, which controls the regularization strength and balances the flexibility and stability of dynamic weight adjustment.

[0064] S13, total loss function design;

[0065] The total loss function is the joint optimization objective of the dynamic weight and the regularization term:

[0066] (4)

[0067] in, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and is the dynamic weight, is the regularization constraint,

[0068] S14, update of learnable parameters;

[0069] and The update mechanism is as follows:

[0070] (5)

[0071] (6)

[0072] in, , For the The learnable parameters at iterations, , For the The learnable parameters at iterations, Specifically for The learning rate of the parameters, , is the gradient component of the loss term, , is the gradient component of the regularization term.

[0073] As a preferred technical solution of the present invention: Step S2 is specifically as follows:

[0074] S21, false detection area generation rules;

[0075] Define the concept of false positive regions: non-text regions that are mistakenly detected as text regions by the model, that is, regions where the IoU between the model-predicted text regions and the true annotated text regions is lower than a threshold. False positive regions are screened as negative samples by comparing the model predictions with the annotations. That is, initial text region prediction capabilities are acquired in the pre-training phase before false positive regions are screened.

[0076] (7)

[0077] in, For the The set of candidate false detection regions of the image, For the model image The set of predicted text regions, A collection of labeled text boxes. is a single predicted text region, For a single real-world labeled text box, is the intersection and union ratio, is the IoU threshold, which is used to determine whether it is a false detection.

[0078] S22, enhanced screening strategy;

[0079] Perform confidence filtering on the false positive areas and retain those with prediction probability higher than The area is then sorted in descending order of probability value. Examples are difficult negative samples:

[0080] (8)

[0081] in, is the final set of difficult negative samples, For the The set of candidate false detection regions for the image, Forecast area The average probability value of

[0082] S23. Improved Probabilistic Graph Loss

[0083] Add a negative sample penalty term to the original two-class cross entropy loss function:

[0084] (9)

[0085] in, is the improved probability graph loss function, is the set of positive sample pixels, is the set of negative sample pixels, is the model’s predicted probability for the positive sample pixel p, Negative sample pixels for the model The predicted probability of is the balance coefficient.

[0086] As a preferred technical solution of the present invention: Step S3 is specifically as follows:

[0087] S31, initialization and pre-training;

[0088] Load the pre-trained backbone network ResNet-50 and initialize =0, = The first K=3 rounds of training only use the original labeled data, without enabling negative sample enhancement, to establish basic text region detection capabilities and provide a basis for subsequent dynamic adjustment and negative sample screening.

[0089] S32, main training loop;

[0090] During the main training phase, the negative sample library is updated every T=3 epochs, and mixed data of positive and negative samples is input. The total loss is dynamically calculated, and the gradient is calculated and the learnable parameters are updated through the Adam or SGD optimizer. 、 ,

[0091] S33, convergence judgment and termination;

[0092] If the F-score of the validation set does not improve for 5 consecutive epochs or the total number of training epochs exceeds 100, the training is terminated and the 5 models with the lowest false positive rate are saved.

[0093] As a preferred technical solution of the present invention: in step S21, the initial text region prediction capability is obtained by using existing methods in the pre-training stage.

[0094] Compared with the prior art, the present invention has the following beneficial effects:

[0095] This paper introduces learnable parameters to automatically balance the contributions of various loss terms and dynamically adjusts the weights of the DBNet loss function, reducing the cost of manual parameter adjustment and improving model training results. By adding an adaptive negative sample enhancement method, it specifically suppresses false positives in non-text areas and reduces the false positive rate of text area detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Figure 1 is the image to be detected;

[0097] Figure 2 This is the test result diagram before improvement;

[0098] Figure 3 This is the improved detection result diagram. DETAILED DESCRIPTION

[0099] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0100] The present invention proposes a method for optimizing detection of text automatic recognition regions, comprising the following steps:

[0101] S1. Build a dynamic weight adjustment mechanism

[0102] S11. Definition of learnable parameters

[0103] The optimization objective of traditional DBNet includes three core loss terms:

[0104] (1)

[0105] in, For the total loss, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and are weight coefficients, which are set to 1 and 10 by default.

[0106] It should be noted that the weight coefficients of traditional DBNet functions are fixed and require manual adjustment, which may lead to insufficient optimization. To this end, the logarithmic space trainable parameters are introduced. , , dynamically generate loss weights through exponential mapping:

[0107] (2)

[0108] in, , It is a trainable logarithmic space parameter and dynamically generates loss weights through exponential mapping , ,

[0109] S12, Regularization Constraints

[0110] Apply L2 regularization constraints to learnable parameters:

[0111] (3)

[0112] in, is the regularization coefficient, which controls the regularization strength and balances the flexibility and stability of dynamic weight adjustment.

[0113] S13. Total loss function design

[0114] The total loss function is the joint optimization objective of the dynamic weight and the regularization term:

[0115] (4)

[0116] in, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and is the dynamic weight, is the regularization constraint,

[0117] S14. Update of learnable parameters

[0118] and The update mechanism is as follows:

[0119] (5)

[0120] (6)

[0121] in, , For the The learnable parameters at iterations, , For the The learnable parameters at iterations, Specifically for The learning rate of the parameters, , is the gradient component of the loss term, , is the gradient component of the regularization term;

[0122] S2. Adaptive negative sample enhancement method

[0123] S21. False detection area generation rules

[0124] Define the concept of misdetected areas: non-text areas that are mistakenly detected as text areas by the model, that is, areas where the IoU between the model-predicted text area and the true labeled text area is lower than the threshold.

[0125] By comparing the model predictions with the annotations, we filter out the false positive areas as negative samples. That is, we first use existing methods in the pre-training phase to obtain the initial text region prediction capability, and then filter out the false positive areas:

[0126] (7)

[0127] in, For the The set of candidate false detection regions of the image, For the model image The set of predicted text regions, A collection of labeled text boxes. is a single predicted text region, For a single real-world text box, is the intersection and union ratio, is the IoU threshold, which is used to determine whether it is a false detection.

[0128] S22. Enhanced screening strategy

[0129] Perform confidence filtering on the false positive areas and retain those with prediction probability higher than The area is then sorted in descending order of probability value. Examples are difficult negative samples:

[0130] (8)

[0131] in, is the final set of difficult negative samples, For the The set of candidate false detection regions for each image, Forecast area The average probability value of

[0132] S23. Improved Probabilistic Graph Loss

[0133] Add a negative sample penalty term to the original two-class cross entropy loss function:

[0134] (9)

[0135] in, is the improved probability graph loss function, is the set of positive sample pixels, is the set of negative sample pixels, is the model’s predicted probability for the positive sample pixel p, Negative sample pixels for the model The predicted probability of is the balance coefficient;

[0136] S3. Training process

[0137] S31. Initialization and pre-training

[0138] Load the pre-trained backbone network ResNet-50 and initialize =0, = The first K=3 rounds of training only use the original labeled data, without enabling negative sample enhancement, to establish basic text region detection capabilities and provide a basis for subsequent dynamic adjustment and negative sample screening.

[0139] S32, main training loop

[0140] During the main training phase, the negative sample library is updated every T=3 epochs, and mixed data of positive and negative samples is input. The total loss is dynamically calculated, and the gradient is calculated and the learnable parameters are updated through the Adam or SGD optimizer. 、 ,

[0141] S33. Convergence judgment and termination

[0142] If the F-score of the validation set does not improve for 5 consecutive epochs or the total number of training epochs exceeds 100, the training is terminated and the 5 models with the lowest false positive rate are saved.

[0143] S34, Algorithm Effect

[0144] Figure 1 is the image to be tested, Figure 2 This is the text area detection effect diagram after the algorithm is improved. Figure 3 This is a diagram of the text area detection effect after the algorithm is improved. The text area detection effects before and after the improvement are compared. The comparison results show that through the optimization of the method of this application, especially the negative sample enhancement method of the false detection area, the effect of text area detection can be effectively improved, and the probability of non-text areas being mistakenly detected as text areas can be reduced.

[0145] This paper introduces learnable spatial parameters to generate dynamic loss weights, and combines them with regularized constraint weight offsets to achieve adaptive balancing of loss terms. Furthermore, it designs false positive region screening rules based on model predictions, dynamically extracts difficult negative samples from the prediction results, and adds a penalty term to the probability map loss to specifically suppress high-confidence false positives.

[0146] This application introduces learnable parameters to automatically balance the contributions of various loss terms and dynamically adjust the weights of the DBNet loss function, reducing the cost of manual parameter adjustment and improving model training results. By adding an adaptive negative sample enhancement method, targeted suppression of false positives is achieved, suppressing responses in non-text areas and reducing the false positive rate of text area detection.

[0147] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent variation based on the technical essence of the present invention shall still fall within the scope of protection claimed by the present invention.

Claims

1. A method for optimizing detection of text automatic recognition regions, characterized in that: The steps include: S1. Build a dynamic weight adjustment mechanism; S2, adaptive negative sample enhancement method; S3, training process; S34, algorithm effect; Compare the text region detection effects before and after improvement.

2. A text automatic recognition area detection optimization method according to claim 1, characterized in that: The step S1 is specifically as follows: S11. Definition of learnable parameters The optimization objective of DBNet includes three core loss terms: (1) in, For the total loss, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and are weight coefficients, which are set to 1 and 10 by default. Introducing logarithmic space trainable parameters , , dynamically generate loss weights through exponential mapping: (2) in, , It is a trainable logarithmic space parameter and dynamically generates loss weights through exponential mapping , , S12, Regularization Constraints Apply L2 regularization constraints to learnable parameters: (3) in, is the regularization coefficient, which controls the regularization strength and balances the flexibility and stability of dynamic weight adjustment. S13. Total loss function design The total loss function is the joint optimization objective of the dynamic weight and the regularization term: (4) in, is the probability map loss, is the loss of the approximate binary image, is the threshold map loss, and is the dynamic weight, is the regularization constraint, S14. Update of learnable parameters and The update mechanism is as follows: (5) (6) in, , For the The learnable parameters at iterations, , For the The learnable parameters at iterations, Specifically for The learning rate of the parameters, , is the gradient component of the loss term, , is the gradient component of the regularization term.

3. The text automatic recognition area detection optimization method according to claim 1, characterized in that: The step S2 is specifically as follows: S21. False detection area generation rules Define the concept of misdetected areas: non-text areas that are mistakenly detected as text areas by the model, that is, areas where the IoU between the model-predicted text area and the true labeled text area is lower than the threshold. By comparing the model predictions with the annotations, we filter out the false positive areas as negative samples. That is, we first obtain the initial text area prediction capability in the pre-training phase, and then filter out the false positive areas: (7) in, For the The set of candidate false detection regions of the image, For the model image The set of predicted text regions, A collection of labeled text boxes. is a single predicted text region, For a single real-world text box, is the intersection and union ratio, is the IoU threshold, which is used to determine whether it is a false detection. S22. Enhanced screening strategy Perform confidence filtering on the false positive areas and retain those with prediction probability higher than The area is then sorted in descending order of probability value. Examples are difficult negative samples: (8) in, is the final set of difficult negative samples, For the The set of candidate false detection regions for each image, For the prediction area The average probability value of S23. Improved Probabilistic Graph Loss Add a negative sample penalty term to the original two-class cross entropy loss function: (9) in, is the improved probability graph loss function, is the set of positive sample pixels, is the set of negative sample pixels, is the model’s predicted probability for the positive sample pixel p, Negative sample pixels for the model The predicted probability of is the balance coefficient.

4. The text automatic recognition area detection optimization method according to claim 1, characterized in that: The step S3 is specifically as follows: S31. Initialization and pre-training Load the pre-trained backbone network ResNet-50 and initialize =0, = The first K=3 rounds of training only use the original labeled data, without enabling negative sample enhancement, to establish basic text region detection capabilities and provide a basis for subsequent dynamic adjustment and negative sample screening. S32, main training loop During the main training phase, the negative sample library is updated every T=3 epochs, and mixed data of positive and negative samples is input. The total loss is dynamically calculated, and the gradient is calculated and the learnable parameters are updated through the Adam or SGD optimizer. 、 , S33. Convergence judgment and termination If the F-score of the validation set does not improve for five consecutive epochs or the total number of training epochs exceeds 100, the training is terminated and the five models with the lowest false positive rates are saved.

5. The method for optimizing text automatic recognition region detection according to claim 3, characterized in that: In step S21, initial text region prediction capability is acquired by existing methods in the pre-training stage.

Citation Information

Patent Citations

  • Text area recognition method and device, terminal equipment and readable storage medium

    CN111062258A

  • Method for detecting texts in any shape in natural scene

    CN111444919A

  • Efficient and accurate natural scene text detection method and device and medium

    CN113516114A

  • Adaptive threshold scene text detection method based on attention feature fusion

    CN113516126A

  • Text detection model training method, text detection method and related equipment

    CN117496527A