3
$\begingroup$

I have some documents containing some text (machine writing text) that I intend to apply OCR on them in order to extract the text. The problem is that these documents contain a lot of noise but in different ways (some documents have noise in the middle, others in the top...); which means that I can't apply simple thresholding in order to remove the noise (i.e applying simple threshold does not only remove the noise, but it removes some parts of the text). For these reasons, I thought about using AI to do de-noise the documents.
Does anyone know if it is possible to do that with AI or any alternative way?

$\endgroup$
4
$\begingroup$

It is possible remove noise from signal if what is considered noise is distinguishable from what is considered signal. This is true of documents, images, audio, or any other type of information.

If dirty means wrong content, then probably not. If dirty means mispellings, then probably yes. If dirty means tilted by a few degrees and containing edge artifacts around the border from scanning, then definitely yes.

Most OCR software, such as the open source program Tesseract, can produce fairly accurate text even with some of the above issues in the document.

If the documents have noise gradients, they may be difficult to OCR. That is different than a value or intensity gradient, which can be normalized. Using AI to remove noise gradients from documents is a reasonable plan, but there is a limit to any kind of intelligence. A scrambled egg cannot be reconstituted.

A simple test of feasibility is whether a human that has no domain knowledge about the subject of the document can make out the text. If they cannot, then a computer will not be able to either, unless the vocabulary is labeled with the probability of each word appearing in that subject matter and the OCR system is trained that way.

However, if the noise is on a gray scale so that the darkness of the type is greater than one or two standard deviations of the noise distribution, then the document can be divided by a parameterizable grid with parameterizable brightness and contrast. This can become the model used in conjunction with a basic feed forward network (mini-batched multilayer perceptron) and the OCR software. The idea in this architecture would be to converge on a network behavior that, for the documents in the example set that have been hand adjusted so that the OCR produces good output, could then be used for many more documents with similar noise gradients.

The inputs for the artificial network would be statistics about the value distribution for specific sections on a specific page of the document and the labels will be the manually created instructions for gradient based contract and value correction of the document so the OCR proceeds with few errors. Once the network is trained, its output could ideally drive the gradient based corrections. It would probably work if three things are in order.

  • The noise doesn't completely destroy the availability of the text so that an average human could not make out the words.
  • The training of the network converges to a degree that the OCR software works across the pages for most of the documents.
  • The characteristics of the noise gradients remain consistent, meaning that the training examples are representative of the documents that will be processed later.
$\endgroup$
3
$\begingroup$

This is also the topic of Image Processing (which has analytical solutions instead of learning) mostly through predesigned filters. The filter depends on the type of noise, (salt & pepper, Gaussian, etc.) i.e., for salt & pepper choosing the median in a window. There are a lot of denoising research in literature. There are also more recent learning based denoising applications, but it requires data so that you can train.

$\endgroup$
  • 1
    $\begingroup$ thank you for you clarification, Do you recall any articles or links to start with? It is OK for the data, I can provide data for training and testing. $\endgroup$ – singrium Jan 24 '19 at 8:38
  • 1
    $\begingroup$ This seems as a good article: papers.nips.cc/paper/… . Also, inpainting might be needed if occlusions are too much. If you want analytic solutions, you can also look up sparse representations/dictionary learning methods for denoising/inpainting. $\endgroup$ – user Jan 24 '19 at 9:58
  • $\begingroup$ Thank you, I'll start from what you mentioned! $\endgroup$ – singrium Jan 24 '19 at 10:11
  • 1
    $\begingroup$ Also, I forgot to mention, but if you specifically target documents, then you can narrow down your research. Some lookup returned these that look promising: Kaggle competition on what you ask. kaggle.com/c/denoising-dirty-documents , A paper on removing corruption in scanned documents. unitec.researchbank.ac.nz/handle/10652/2730 $\endgroup$ – user Jan 24 '19 at 11:25
  • $\begingroup$ The Kaggle competion sounds promising, thank you for the sources! $\endgroup$ – singrium Jan 24 '19 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.