US11605210B2ActiveUtilityA1
Method for optical character recognition in document subject to shadows, and device employing method
Est. expiryJan 21, 2040(~13.5 yrs left)· nominal 20-yr term from priority
Inventors:Yun-Hsuan LinYung-Yu ChuangTzu-Kuei HuangTing-Hao ChungNai-Sheng SyuYu WangChun-Hsiang Huang
G06N 3/09G06N 3/0464G06N 3/045G06V 30/19173G06F 18/214G06V 30/40G06V 30/19147G06N 3/084G06N 3/08G06V 30/153G06V 30/10G06N 3/044G06T 7/507G06V 10/225G06K 9/6256
54
PatentIndex Score
0
Cited by
23
References
17
Claims
Abstract
A method for recognition of characters by optical means in an unclear or non-optimal image of an object document, the image carrying shadows or other impediments inputs the document into a shadow prediction model to obtain a shadow mask. A determination is made as to whether the shadow mask of the document affect an optical character recognition (OCR) performance. The method further inputs the document into a shadow removing model for removal of shadows to obtain an intermediate document if the shadow mask are deemed to affect the OCR performance, then OCR can then be performed on the final object document.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A character recognizing method operated in an electronic device, comprising:
inputting an object document into a shadow prediction model to obtain a shadow mask of the object document, wherein the shadow mask comprises a shadow region and a shadow intensity;
determining whether the shadow mask of the object document affect an optical character recognition (OCR) performance of the object document;
inputting the object document into a shadow removing model for removing shadows to obtain an intermediate document when the shadow mask of the object document affect the OCR performance of the object document;
performing OCR on the intermediate document; and
performing OCR on the object document when the shadow mask of the object document do not affect the OCR performance of the object document.
2. The character recognizing method of claim 1 , wherein the shadow prediction model is trained based on sample documents of a sample library.
3. The character recognizing method of claim 2 , wherein the sample library comprises a plurality of first sample documents with shadows and a plurality of second sample documents without shadows, the shadows of the plurality of first sample documents are added by a predetermined shadow adding software.
4. The character recognizing method of claim 2 , wherein training the shadow prediction model comprises:
training a predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model;
wherein training features of each of the sample documents comprises a background color of each of the sample documents and a shadow mask of each of the sample documents.
5. The character recognizing method of claim 4 , wherein training the predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model comprises:
dividing the sample documents of the sample library into a training set and a test set;
training the predetermined deep learning network through the training set to obtain a first intermediate model, and testing the first intermediate model through the test set; and
defining the first intermediate model as the shadow prediction model if a testing of the first intermediate model meets a predetermined standard.
6. The character recognizing method of claim 5 , wherein training the predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model further comprises:
adjusting training parameters of the predetermined deep learning network if the testing of the intermediate model does not meet the predetermined standard;
retraining the predetermined deep learning network with the adjusted training parameters through the training set to obtain a second intermediate model and testing the second intermediate model through the test set;
defining the second intermediate model as the shadow prediction model if a testing of the second intermediate model meets the predetermined standard; and
repeating the adjusting step of the training parameters and the retraining step if the testing of the second intermediate model does not meet the predetermined standard.
7. The character recognizing method of claim 4 , wherein training the shadow removing model comprises:
inputting the background color, the shadow mask of each of the sample documents obtained by the shadow prediction model into a predetermined shadow removing network for training to obtain a first intermediate removing model;
removing shadows of multiple test documents of a predetermined test set through the first intermediate removing model, and calculating an average recognition rate of the multiple test documents when the OCR is performed on each of multiple removed test documents, wherein the multiple test documents of the predetermined test set are documents with shadows;
determining whether the average recognition rate is greater than a predetermined recognition rate; and
defining the first intermediate removing model as the shadow removing model if the average recognition rate is greater than the predetermined recognition rate.
8. The character recognizing method of claim 7 , wherein training the shadow removing model further comprising:
adjusting training parameters of the predetermined shadow removing network if the average recognition rate is not greater than the predetermined recognition rate;
inputting the background color, the shadow mask of each of the sample documents obtained by the shadow prediction model into the predetermined shadow removing network with the adjusted training parameters for training to obtain a second intermediate removing model; and
testing the second intermediate removing model based on the multiple test documents of the predetermined test set.
9. A character recognizing device comprising:
at least one processor; and
a data storage storing one or more programs which when executed by the at least one processor, cause the at least one processor to:
input an object document into a shadow prediction model to obtain a shadow mask, wherein the shadow mask comprises a shadow region and a shadow intensity;
determine whether the shadow mask of the object document affect an optical character recognition (OCR) performance of the object document;
input the object document into a shadow removing model for removing shadows to obtain an intermediate document when the shadow mask of the object document affect the OCR performance of the object document;
perform OCR on the intermediate document; and
perform OCR on the object document when the shadow mask of the object document do not affect the OCR performance of the object document.
10. The character recognizing device of claim 9 , wherein the shadow prediction model is trained based on sample documents of a sample library.
11. The character recognizing device of claim 10 , wherein the sample library comprises a plurality of first sample documents with shadows and a plurality of second sample documents without shadows, the shadows of the plurality of first sample documents are added by a predetermined shadow adding software.
12. The character recognizing device of claim 10 , wherein training the shadow prediction model comprises:
training a predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model;
wherein training features of each of the sample documents comprises a background color of each of the sample documents and a shadow mask of each of the sample documents.
13. The character recognizing device of claim 12 , wherein training the predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model comprises:
dividing the sample documents of the sample library into a training set and a test set;
training the predetermined deep learning network through the training set to obtain a first intermediate model, and testing the first intermediate model through the test set; and
defining the first intermediate model as the shadow prediction model if a testing of the first intermediate model meets a predetermined standard.
14. The character recognizing device of claim 13 , wherein training the predetermined deep learning network based on the sample documents of the sample library to obtain the shadow prediction model further comprises:
adjusting training parameters of the predetermined deep learning network if the testing of the intermediate model does not meet the predetermined standard;
retraining the predetermined deep learning network with the adjusted training parameters through the training set to obtain a second intermediate model and testing the second intermediate model through the test set;
defining the second intermediate model as the shadow prediction model if a testing of the second intermediate model meets the predetermined standard; and
repeating the adjusting step of the training parameters and the retraining step if the testing of the second intermediate model does not meet the predetermined standard.
15. The character recognizing device of claim 12 , wherein training the shadow removing model comprises:
inputting the background color and the shadow mask of each of the sample documents obtained by the shadow prediction model into a predetermined shadow removing network for training to obtain a first intermediate removing model;
removing shadows of multiple test documents of a predetermined test set through the first intermediate removing model, and calculating an average recognition rate of the multiple test documents when the OCR is performed on each of multiple removed test documents, wherein the multiple test documents of the predetermined test set are documents with shadows;
determining whether the average recognition rate is greater than a predetermined recognition rate; and
defining the first intermediate removing model as the shadow removing model if the average recognition rate is greater than the predetermined recognition rate.
16. The character recognizing device of claim 15 , wherein training the shadow removing model further comprises:
adjusting training parameters of the predetermined shadow removing network if the average recognition rate is not greater than the predetermined recognition rate;
inputting the background color and the shadow mask of each of the sample documents obtained by the shadow prediction model into the predetermined shadow removing network with the adjusted training parameters for training to obtain a second intermediate removing model; and
testing the second intermediate removing model based on the multiple test documents of the predetermined test set.
17. A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, causes the electronic device to perform a character recognizing method, the character recognizing method comprising:
inputting an object document into a shadow prediction model to obtain a shadow mask of the object document, wherein the shadow mask comprises a shadow region and a shadow intensity;
determining whether the shadow mask of the object document affect an optical character recognition (OCR) performance of the object document;
inputting the object document into a shadow removing model for removing shadows to obtain an intermediate document when the shadow mask of the object document affect the OCR performance of the object document;
performing OCR on the intermediate document; and
performing OCR on the object document when the shadow mask of the object document do not affect the OCR performance of the object document.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.