fh2019ustc / DocTr

The official code for “DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction”, ACM MM, Oral Paper, 2021.
Other
345 stars 48 forks source link

DocTr is introducing distortions. Am I doing anything wrong? #17

Open pavanbvns opened 1 year ago

pavanbvns commented 1 year ago

Hello there,

I am using DocTr to enhance quality of few images in my project and I am finding that DocTr is introducing distortions in the file output. Pls let me know if I am using it incorrectly.

Steps I followed.

  1. Cloned the DocTr project to my google drive.
  2. Copied the 3 .pth files and the image to desired location.
  3. Ran the following command in the colab. %cd /content/drive/MyDrive/MSProject/DocTr-cloned-repo/DocTr/ ! python inference.py --ill_rec True --distorrted_path '/content/drive/MyDrive/MSProject/temp/' --isave_path '/content/drive/MyDrive/MSProject/DocTr_output_images/'

The original file that has been used is this image

The image output from DocTr is this image

Comparison for ease of reference Untitled_1

Please let me know if this is a desired behavior or am I doing anything wrong

Request your immediate response, as I have to conclude my research and submit my project as a part of my MS program.

Thank you in advance

fh2019ustc commented 1 year ago

Hi, I am sorry for the late reply. For our DocTr, we aim to cope with the document images captured by smartphones. In your case, the input image seems to have been binarized, different from the data distribution used in our training. I hope this helps!