Skip to content

rjchern/DIQA_CNN

Repository files navigation

DIQA_CNN

PyTorch 0.4.1 implementation of the following paper: Le Kang, et al. "A DEEP LEARNING APPROACH TO DOCUMENT IMAGE QUALITY ASSESSMENT." 2014 ICIP.

The SOC dataset can be downloaded in DIQA: Document Image Quality Assesment Datasets

Note

Download the dataset and put all images in a directory and set this directory as root in 'config.yaml'

The ground truth for the dataset has been pre-processed and saved as a excel file SOC_gt.xlsx stored in ./data/gt_files/SOC_gt.xlsx

The ground truth file contains:

  • img_name: the image name
  • img_set: the index of reference image from which the current degraded image generated.
  • acc_f: OCR accuracy by ABBYY Finereader
  • acc_t: OCR accuracy by Tesseract
  • acc_o: OCR accuracy by Omnipage
  • acc_avg: average accuracy of the three OCR engines above

The creating details about this dataset:

Training and validating

python main.py --batch_size=128 --epochs=500 --lr=0.001

Before training, the root in config.yaml must be specified.

demo_DIQA

python demo_DIQA.py

When a DIQA model has been trained, demo_DIQA.py can be used to predict the quality of a document image directly.

Before running demo_DIQA.py, the model_path and img_path must be specified.

Requirements

About

Document Image Quality Assessment via Convolutional Neural Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages