US 12,367,697 B2
Method and system for generating a data model for text extraction from documents
Nupur Sumeet, Thane West (IN); Manoj Karunakaran Nambiar, Thane West (IN); and Karan Rawat, New Delhi (IN)
Assigned to TATA CONSULTANCY SERVICES LIMITED, Mumbai (IN)
Filed by Tata Consultancy Services Limited, Mumbai (IN)
Filed on Mar. 31, 2023, as Appl. No. 18/129,155.
Claims priority of application No. 202221028692 (IN), filed on May 18, 2022.
Prior Publication US 2024/0005686 A1, Jan. 4, 2024
Int. Cl. G06V 30/19 (2022.01); G06N 3/082 (2023.01); G06V 10/82 (2022.01); G06V 10/94 (2022.01)
CPC G06V 30/1916 (2022.01) [G06N 3/082 (2013.01); G06V 10/82 (2022.01); G06V 10/94 (2022.01); G06V 30/19147 (2022.01)] 9 Claims
OG exemplary drawing
 
1. A processor implemented method of obtaining a data model for text detection, comprising:
obtaining, via one or more hardware processors, a) a training dataset, b) a test dataset, c) a pre-trained base model, d) a plurality of pre-trained weights, and e) an acceptable drop in accuracy with respect to the baseline model, as input;
pruning, via the one or more hardware processors, the pre-trained base model using a Lottery Ticket Hypothesis (LTH) algorithm to generate a LTH pruned data model;
trimming, via the one or more hardware processors, the LTH pruned data model to obtain a structured pruned data model, comprising iteratively performing till an accuracy drop of the structured pruned data model is below the acceptable drop in accuracy:
determining a filter sparsity of every filter of each of a plurality of layers of the LTH pruned data model;
comparing the determined filter sparsity with a threshold of filter sparsity;
discarding all filters for which the determined filter sparsity exceeds the threshold of filter sparsity, wherein discarding the filters causes structured pruning and a resulting data model after discarding the filters form the structured pruned data model;
fine-tuning the plurality of pre-trained weights by training the structured pruned data model for a pre-defined number of iterations;
determining the accuracy drop of the structured pruned data model based on the fine-tuned plurality of pre-trained weights; and
increasing a pruning rate affecting rate of the preliminary pruning of the LTH pruned data model, by a pre-defined percentage; and
training, via the one or more hardware processors, the structured pruned data model from a teacher model in a Knowledge Distillation algorithm, wherein a resultant data model obtained after training the structured pruned data model forms the data model for text detection.