Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -570,11 +570,25 @@ def rectify_image(distorted_image):
|
|
| 570 |
# --- Gradio Interface ---
|
| 571 |
|
| 572 |
DESCRIPTION = """
|
| 573 |
-
#
|
| 574 |
-
This
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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__":
|