PuristanLabs1 commited on
Commit
6275321
·
verified ·
1 Parent(s): 9342e05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -5
app.py CHANGED
@@ -570,11 +570,25 @@ def rectify_image(distorted_image):
570
  # --- Gradio Interface ---
571
 
572
  DESCRIPTION = """
573
- # DocScanner: Robust Document Image Rectification with Progressive Learning
574
- This is a Gradio demo for the DocScanner model.
575
- 1. Upload a distorted document image.
576
- 2. The model will process it and display the rectified (unwarped) image.
577
- This demo uses the **DocScanner-L** model as described in the paper. Make sure the pretrained models (`seg.pth`, `DocScanner-L.pth`) are located in the `./model_pretrained/` directory.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  """
579
 
580
  if __name__ == "__main__":
 
570
  # --- Gradio Interface ---
571
 
572
  DESCRIPTION = """
573
+ # DocScanner: Document Image Rectification
574
+ This Space demonstrates DocScanner, a deep learning model that automatically corrects geometric distortions in document images.
575
+ If you have a photo of a document that is warped, skewed, or has curled edges, this tool can transform it into a flat,
576
+ top-down, scanner-like image.
577
+
578
+ This application is an implementation of the research paper: DocScanner: Robust Document Image Rectification with Progressive Learning
579
+ (https://arxiv.org/abs/2110.14968).
580
+
581
+ # How to Use
582
+
583
+ 1. Upload an Image: Drag and drop a distorted document image into the input box, or click to browse your files.
584
+ 2. Submit: Click the "Submit" button to begin the rectification process.
585
+ 3. View the Result: The corrected, flattened document will appear in the output box on the right.
586
+
587
+ #Technical Details
588
+
589
+ * Model: This demo uses the DocScanner-L model, as described in the paper.
590
+ * Technology: The application is built with Python, PyTorch, and the Gradio library.
591
+
592
  """
593
 
594
  if __name__ == "__main__":