A processor implemented method of obtaining a data model for text detection from an input image, comprising: obtaining, via one or more hardware processors, a) a training dataset comprising images, b) a test dataset comprising images, 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, characterized in that: pruning, via the one or more hardware processors, the pre-trained base model using a Lottery Ticket Hypothesis 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 the text detection. pruning, via the one or more hardware processors, the pre-trained base model using a Lottery Ticket Hypothesis 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 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 the text detection.