Spaces:
Runtime error
Runtime error
Commit
·
470ac18
1
Parent(s):
f86fb58
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .DS_Store +0 -0
- .gitattributes +16 -0
- ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl +3 -0
- ICDAR2021/2021-02-03 16:15:55/143/model_parameter +5 -0
- README.md +50 -6
- __pycache__/dataloader.cpython-39.pyc +0 -0
- __pycache__/network.cpython-39.pyc +0 -0
- __pycache__/test.cpython-39.pyc +0 -0
- __pycache__/tpsV2.cpython-39.pyc +0 -0
- __pycache__/utilsV4.cpython-39.pyc +0 -0
- background.jpg +3 -0
- css.css +3 -0
- dataloader.py +189 -0
- dataset/.DS_Store +0 -0
- dataset/fiducial1024/README.md +11 -0
- demo.py +65 -0
- flagged/image/5ad4b2887a6e21ed21ad368cb12b06241a8c06b4/tmpir4uhzvh.jpg +3 -0
- flagged/image/c60b52ea5b844eb28fc764fc77bee9bd47ce39a9/tmp_dno9712.jpg +3 -0
- flagged/image/fc61756a7b0971534c5b49be71caf17d819f35ad/tmpv0t201p6.jpg +3 -0
- flagged/log.csv +6 -0
- flagged/output/020e114a87a9ea1d41251128026eaf06751a1803/tmpa50oe7qi.png +0 -0
- flagged/output/68a659c360681de00197f50432d89fbd98efdefc/tmp_cajstfi.png +3 -0
- flagged/output/870c2f8157465905417c545291ec216d6c9e9d1e/tmpgkg2h7fc.png +0 -0
- flat/2023-07-11/2023-07-11 15:21:45 @2021-02-03_Document-Dewarping-with-Control-Points.log +1 -0
- flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/mark_new_image_1.png +0 -0
- flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/new_image_1.png +0 -0
- flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/mark_new_image_1.png +0 -0
- flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/new_image_1.png +0 -0
- flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/test1.jpg +0 -0
- flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03_Document-Dewarping-with-Control-Points.log +2 -0
- flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/mark_new_image_1.png +3 -0
- flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/mark_test1.jpg +0 -0
- flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/new_image_1.png +3 -0
- flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/test1.jpg +0 -0
.DS_Store
ADDED
|
Binary file (8.2 kB). View file
|
|
|
.gitattributes
CHANGED
|
@@ -33,3 +33,19 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
background.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
flagged/image/5ad4b2887a6e21ed21ad368cb12b06241a8c06b4/tmpir4uhzvh.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
flagged/image/c60b52ea5b844eb28fc764fc77bee9bd47ce39a9/tmp_dno9712.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
flagged/image/fc61756a7b0971534c5b49be71caf17d819f35ad/tmpv0t201p6.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
flagged/output/68a659c360681de00197f50432d89fbd98efdefc/tmp_cajstfi.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:34:30[[:space:]]@2021-02-03/144/test/mark_new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:34:30[[:space:]]@2021-02-03/144/test/new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:52:58[[:space:]]@2021-02-03/144/test/mark_new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:52:58[[:space:]]@2021-02-03/144/test/new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:55:35[[:space:]]@2021-02-03/144/test/mark_new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:55:35[[:space:]]@2021-02-03/144/test/new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:56:55[[:space:]]@2021-02-03/144/test/mark_new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:56:55[[:space:]]@2021-02-03/144/test/new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:59:53[[:space:]]@2021-02-03/144/test/mark_new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
flat/2023-07-13/2023-07-13[[:space:]]18:59:53[[:space:]]@2021-02-03/144/test/new_image_1.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
testdata/new_image_1.jpg filter=lfs diff=lfs merge=lfs -text
|
ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2afacdaa13ab08049326e835064ecf6ae6873a10ecc3e2b8d4b4aa486e9b3c20
|
| 3 |
+
size 159331175
|
ICDAR2021/2021-02-03 16:15:55/143/model_parameter
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Download the model parameters from the link below:
|
| 2 |
+
|
| 3 |
+
Google: https://drive.google.com/file/d/1rKS03wHMoAXp8uR1h3z7NAVoBY84NZlp/view?usp=sharing
|
| 4 |
+
|
| 5 |
+
Baidu: https://pan.baidu.com/s/1eSoiE3LoSQmTIL-SpbzPRw?pwd=rngi password: rngi
|
README.md
CHANGED
|
@@ -1,12 +1,56 @@
|
|
| 1 |
---
|
| 2 |
title: Source
|
| 3 |
-
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 3.40.1
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
---
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Source
|
| 3 |
+
app_file: demo.py
|
|
|
|
|
|
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 3.40.1
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
+
# Description
|
| 8 |
+
Due to work, more information will be released.
|
| 9 |
|
| 10 |
+
# Performance
|
| 11 |
+
**Execution Time when getting a 1024x960 corrected image.**
|
| 12 |
+
| Method | Time |
|
| 13 |
+
| ---- | ---- |
|
| 14 |
+
| TPS | - |
|
| 15 |
+
| Interpolation | - |
|
| 16 |
+
<!--
|
| 17 |
+
<small>\* TPS:flatByfiducial_TPS,
|
| 18 |
+
|
| 19 |
+
Interpolation:flatByfiducial_interpolation</small> -->
|
| 20 |
+
|
| 21 |
+
# Testing
|
| 22 |
+
1、Download model parameter and source codes
|
| 23 |
+
|
| 24 |
+
2、Resize the input image into 992x992
|
| 25 |
+
|
| 26 |
+
3、Running
|
| 27 |
+
|
| 28 |
+
- In GPU 0:
|
| 29 |
+
`python test.py --data_path_test=./your/test/data/path/ --parallel 0 --schema test --batch_size 1`
|
| 30 |
+
|
| 31 |
+
- In CPU:
|
| 32 |
+
`python test.py --data_path_test=./your/test/data/path/ --parallel None --schema test --batch_size 1`
|
| 33 |
+
|
| 34 |
+
# Training
|
| 35 |
+
a) Download training data in [here](https://github.com/gwxie/Document-Dewarping-with-Control-Points/tree/main/Source/dataset/fiducial1024).
|
| 36 |
+
|
| 37 |
+
b) Run `python train.py --data_path_train=./your/train/data/path/ --data_path_validate=./your/validate/data/path/ --data_path_test=./your/test/data/path/ --batch_size 32 --schema train --parallel 01`
|
| 38 |
+
|
| 39 |
+
# Use your Dataset
|
| 40 |
+
The training dataset can be synthesised using the [scripts](https://github.com/gwxie/Synthesize-Distorted-Image-and-Its-Control-Points).
|
| 41 |
+
|
| 42 |
+
# Q&A
|
| 43 |
+
1. Q:How to adjust the output image resolution?
|
| 44 |
+
A: Adjusting the ‘flat_shap’ or 'output_shape' in utilsV4.py.
|
| 45 |
+
https://github.com/gwxie/Document-Dewarping-with-Control-Points/blob/4c74853b0eb93f7c6006a774c2eb42c64f363531/Source/utilsV4.py#L99
|
| 46 |
+
or
|
| 47 |
+
https://github.com/gwxie/Document-Dewarping-with-Control-Points/blob/4c74853b0eb93f7c6006a774c2eb42c64f363531/Source/utilsV4.py#L162
|
| 48 |
+
|
| 49 |
+
2. Q:How to open '*.gw' files?
|
| 50 |
+
https://github.com/gwxie/Document-Dewarping-with-Control-Points/blob/0f4e9ac577fb001a719fb63b05cfa915fe3c9866/Source/dataloader.py#L146
|
| 51 |
+
'im' is input images; 'lbl' is control points; 'segment' is the intervals of points between the horizontal and vertical directions;
|
| 52 |
+
|
| 53 |
+
3. Q:How to train the model again with 61 points?
|
| 54 |
+
https://github.com/gwxie/Document-Dewarping-with-Control-Points/blob/1ad92be2995ee7f4ecdd04157350f2b44ecbd7e9/Source/dataloader.py#L185-L186
|
| 55 |
+
https://github.com/gwxie/Document-Dewarping-with-Control-Points/blob/1ad92be2995ee7f4ecdd04157350f2b44ecbd7e9/Source/dataloader.py#L74-L75
|
| 56 |
+
set self.col_gap = 0; self.row_gap = 0
|
__pycache__/dataloader.cpython-39.pyc
ADDED
|
Binary file (5.55 kB). View file
|
|
|
__pycache__/network.cpython-39.pyc
ADDED
|
Binary file (7.41 kB). View file
|
|
|
__pycache__/test.cpython-39.pyc
ADDED
|
Binary file (4.97 kB). View file
|
|
|
__pycache__/tpsV2.cpython-39.pyc
ADDED
|
Binary file (4.52 kB). View file
|
|
|
__pycache__/utilsV4.cpython-39.pyc
ADDED
|
Binary file (13.7 kB). View file
|
|
|
background.jpg
ADDED
|
Git LFS Details
|
css.css
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
body {
|
| 2 |
+
background-color: #bd1414 !important;
|
| 3 |
+
}
|
dataloader.py
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import pickle
|
| 3 |
+
from os.path import join as pjoin
|
| 4 |
+
import collections
|
| 5 |
+
import json
|
| 6 |
+
import torch
|
| 7 |
+
import numpy as np
|
| 8 |
+
|
| 9 |
+
import re
|
| 10 |
+
import cv2
|
| 11 |
+
|
| 12 |
+
from torch.utils import data
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def get_data_path(name):
|
| 16 |
+
"""Extract path to data from config file.
|
| 17 |
+
|
| 18 |
+
Args:
|
| 19 |
+
name (str): The name of the dataset.
|
| 20 |
+
|
| 21 |
+
Returns:
|
| 22 |
+
(str): The path to the root directory containing the dataset.
|
| 23 |
+
"""
|
| 24 |
+
with open('../xgw/segmentation/config.json') as f:
|
| 25 |
+
js = f.read()
|
| 26 |
+
# js = open('config.json').read()
|
| 27 |
+
data = json.loads(js)
|
| 28 |
+
return os.path.expanduser(data[name]['data_path'])
|
| 29 |
+
|
| 30 |
+
def getDatasets(dir):
|
| 31 |
+
return os.listdir(dir)
|
| 32 |
+
'''
|
| 33 |
+
Resize the input image into 1024x960 (zooming in or out along the longest side and keeping the aspect ration, then filling zero for padding. )
|
| 34 |
+
'''
|
| 35 |
+
def resize_image(origin_img, long_edge=1024, short_edge=960):
|
| 36 |
+
# long_edge, short_edge = 2048, 1920
|
| 37 |
+
# long_edge, short_edge = 1024, 960
|
| 38 |
+
# long_edge, short_edge = 512, 480
|
| 39 |
+
|
| 40 |
+
im_lr = origin_img.shape[0]
|
| 41 |
+
im_ud = origin_img.shape[1]
|
| 42 |
+
new_img = np.zeros([long_edge, short_edge, 3], dtype=np.uint8)
|
| 43 |
+
new_shape = new_img.shape[:2]
|
| 44 |
+
if im_lr > im_ud:
|
| 45 |
+
img_shrink, base_img_shrink = long_edge, long_edge
|
| 46 |
+
im_ud = int(im_ud / im_lr * base_img_shrink)
|
| 47 |
+
im_ud += 32-im_ud%32
|
| 48 |
+
im_ud = min(im_ud, short_edge)
|
| 49 |
+
im_lr = img_shrink
|
| 50 |
+
origin_img = cv2.resize(origin_img, (im_ud, im_lr), interpolation=cv2.INTER_CUBIC)
|
| 51 |
+
new_img[:, (new_shape[1]-im_ud)//2:new_shape[1]-(new_shape[1]-im_ud)//2] = origin_img
|
| 52 |
+
# mask = np.full(new_shape, 255, dtype='uint8')
|
| 53 |
+
# mask[:, (new_shape[1] - im_ud) // 2:new_shape[1] - (new_shape[1] - im_ud) // 2] = 0
|
| 54 |
+
else:
|
| 55 |
+
img_shrink, base_img_shrink = short_edge, short_edge
|
| 56 |
+
im_lr = int(im_lr / im_ud * base_img_shrink)
|
| 57 |
+
im_lr += 32-im_lr%32
|
| 58 |
+
im_lr = min(im_lr, long_edge)
|
| 59 |
+
im_ud = img_shrink
|
| 60 |
+
origin_img = cv2.resize(origin_img, (im_ud, im_lr), interpolation=cv2.INTER_CUBIC)
|
| 61 |
+
new_img[(new_shape[0] - im_lr) // 2:new_shape[0] - (new_shape[0] - im_lr) // 2, :] = origin_img
|
| 62 |
+
return new_img
|
| 63 |
+
|
| 64 |
+
class PerturbedDatastsForFiducialPoints_pickle_color_v2_v2(data.Dataset):
|
| 65 |
+
def __init__(self, root, split='1-1', img_shrink=None, is_return_img_name=False, preproccess=False):
|
| 66 |
+
self.root = os.path.expanduser(root)
|
| 67 |
+
self.split = split
|
| 68 |
+
self.img_shrink = img_shrink
|
| 69 |
+
self.is_return_img_name = is_return_img_name
|
| 70 |
+
self.preproccess = preproccess
|
| 71 |
+
# self.mean = np.array([104.00699, 116.66877, 122.67892])
|
| 72 |
+
self.images = collections.defaultdict(list)
|
| 73 |
+
self.labels = collections.defaultdict(list)
|
| 74 |
+
self.row_gap = 1 # value:0, 1, 2; POINTS NUM: 61, 31, 21
|
| 75 |
+
self.col_gap = 1
|
| 76 |
+
datasets = ['validate', 'test', 'train']
|
| 77 |
+
|
| 78 |
+
if self.split == 'test' or self.split == 'eval':
|
| 79 |
+
img_file_list = getDatasets(os.path.join(self.root))
|
| 80 |
+
self.images[self.split] = img_file_list
|
| 81 |
+
# self.images[self.split] = sorted(img_file_list, key=lambda num: (
|
| 82 |
+
# int(re.match(r'(\d+)_(\d+)( copy.png)', num, re.IGNORECASE).group(1)), int(re.match(r'(\d+)_(\d+)( copy.png)', num, re.IGNORECASE).group(2))))
|
| 83 |
+
elif self.split in datasets:
|
| 84 |
+
img_file_list = []
|
| 85 |
+
img_file_list_ = getDatasets(os.path.join(self.root, 'color'))
|
| 86 |
+
for id_ in img_file_list_:
|
| 87 |
+
img_file_list.append(id_.rstrip())
|
| 88 |
+
|
| 89 |
+
self.images[self.split] = sorted(img_file_list, key=lambda num: (
|
| 90 |
+
re.match(r'(\w+\d*)_(\d+)_(\d+)_(\w+)', num, re.IGNORECASE).group(1), int(re.match(r'(\w+\d*)_(\d+)_(\d+)_(\w+)', num, re.IGNORECASE).group(2))
|
| 91 |
+
, int(re.match(r'(\w+\d*)_(\d+)_(\d+)_(\w+)', num, re.IGNORECASE).group(3)), re.match(r'(\w+\d*)_(\d+)_(\d+)_(\w+)', num, re.IGNORECASE).group(4)))
|
| 92 |
+
else:
|
| 93 |
+
raise Exception('load data error')
|
| 94 |
+
# self.checkImg()
|
| 95 |
+
|
| 96 |
+
def checkImg(self):
|
| 97 |
+
if self.split == 'validate':
|
| 98 |
+
for im_name in self.images[self.split]:
|
| 99 |
+
# if 'SinglePage' in im_name:
|
| 100 |
+
im_path = pjoin(self.root, self.split, 'color', im_name)
|
| 101 |
+
try:
|
| 102 |
+
with open(im_path, 'rb') as f:
|
| 103 |
+
perturbed_data = pickle.load(f)
|
| 104 |
+
|
| 105 |
+
im_shape = perturbed_data.shape
|
| 106 |
+
except:
|
| 107 |
+
print(im_name)
|
| 108 |
+
# os.remove(im_path)
|
| 109 |
+
|
| 110 |
+
def __len__(self):
|
| 111 |
+
return len(self.images[self.split])
|
| 112 |
+
|
| 113 |
+
def __getitem__(self, item):
|
| 114 |
+
if self.split == 'test':
|
| 115 |
+
im_name = self.images[self.split][item]
|
| 116 |
+
im_path = pjoin(self.root, im_name)
|
| 117 |
+
|
| 118 |
+
im = cv2.imread(im_path, flags=cv2.IMREAD_COLOR)
|
| 119 |
+
|
| 120 |
+
im = self.resize_im(im)
|
| 121 |
+
im = self.transform_im(im)
|
| 122 |
+
|
| 123 |
+
if self.is_return_img_name:
|
| 124 |
+
return im, im_name
|
| 125 |
+
return im
|
| 126 |
+
elif self.split == 'eval':
|
| 127 |
+
im_name = self.images[self.split][item]
|
| 128 |
+
im_path = pjoin(self.root, im_name)
|
| 129 |
+
|
| 130 |
+
img = cv2.imread(im_path, flags=cv2.IMREAD_COLOR)
|
| 131 |
+
|
| 132 |
+
im = self.resize_im(img)
|
| 133 |
+
im = self.transform_im(im)
|
| 134 |
+
|
| 135 |
+
if self.is_return_img_name:
|
| 136 |
+
return im, im_name
|
| 137 |
+
return im, img
|
| 138 |
+
# return im, img, im_name
|
| 139 |
+
|
| 140 |
+
else:
|
| 141 |
+
im_name = self.images[self.split][item]
|
| 142 |
+
|
| 143 |
+
im_path = pjoin(self.root, 'color', im_name)
|
| 144 |
+
|
| 145 |
+
with open(im_path, 'rb') as f:
|
| 146 |
+
perturbed_data = pickle.load(f)
|
| 147 |
+
|
| 148 |
+
im = perturbed_data.get('image')
|
| 149 |
+
lbl = perturbed_data.get('fiducial_points')
|
| 150 |
+
segment = perturbed_data.get('segment')
|
| 151 |
+
|
| 152 |
+
im = self.resize_im(im)
|
| 153 |
+
im = im.transpose(2, 0, 1)
|
| 154 |
+
|
| 155 |
+
lbl = self.resize_lbl(lbl)
|
| 156 |
+
lbl, segment = self.fiducal_points_lbl(lbl, segment)
|
| 157 |
+
lbl = lbl.transpose(2, 0, 1)
|
| 158 |
+
|
| 159 |
+
im = torch.from_numpy(im)
|
| 160 |
+
lbl = torch.from_numpy(lbl).float()
|
| 161 |
+
segment = torch.from_numpy(segment).float()
|
| 162 |
+
|
| 163 |
+
if self.is_return_img_name:
|
| 164 |
+
return im, lbl, segment, im_name
|
| 165 |
+
|
| 166 |
+
return im, lbl, segment
|
| 167 |
+
|
| 168 |
+
def transform_im(self, im):
|
| 169 |
+
im = im.transpose(2, 0, 1)
|
| 170 |
+
im = torch.from_numpy(im).float()
|
| 171 |
+
|
| 172 |
+
return im
|
| 173 |
+
|
| 174 |
+
def resize_im(self, im):
|
| 175 |
+
im = cv2.resize(im, (992, 992), interpolation=cv2.INTER_LINEAR)
|
| 176 |
+
# im = cv2.resize(im, (496, 496), interpolation=cv2.INTER_LINEAR)
|
| 177 |
+
return im
|
| 178 |
+
|
| 179 |
+
def resize_lbl(self, lbl):
|
| 180 |
+
lbl = lbl/[960, 1024]*[992, 992]
|
| 181 |
+
# lbl = lbl/[960, 1024]*[496, 496]
|
| 182 |
+
return lbl
|
| 183 |
+
|
| 184 |
+
def fiducal_points_lbl(self, fiducial_points, segment):
|
| 185 |
+
|
| 186 |
+
fiducial_point_gaps = [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60] # POINTS NUM: 61, 31, 21, 16, 13, 11, 7, 6, 5, 4, 3, 2
|
| 187 |
+
fiducial_points = fiducial_points[::fiducial_point_gaps[self.row_gap], ::fiducial_point_gaps[self.col_gap], :]
|
| 188 |
+
segment = segment * [fiducial_point_gaps[self.col_gap], fiducial_point_gaps[self.row_gap]]
|
| 189 |
+
return fiducial_points, segment
|
dataset/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
dataset/fiducial1024/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Download training Data
|
| 2 |
+
|
| 3 |
+
Link: https://pan.baidu.com/s/1bZ9B7oZuxsMNRDZGz89Mbg?pwd=9fck
|
| 4 |
+
|
| 5 |
+
Password: 9fck
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# unzip
|
| 9 |
+
```bash
|
| 10 |
+
cat fiducial1024.tar.gz_0* > fiducial1024.tar.gz | tar -zxv
|
| 11 |
+
```
|
demo.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from PIL import Image
|
| 3 |
+
import os
|
| 4 |
+
import subprocess
|
| 5 |
+
import glob
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def get_latest_file(directory):
|
| 9 |
+
# 获取所有的文件和文件夹
|
| 10 |
+
all_items = glob.glob(os.path.join(directory, '*'))
|
| 11 |
+
|
| 12 |
+
# 分离文件和文件夹
|
| 13 |
+
folders = [item for item in all_items if os.path.isdir(item)]
|
| 14 |
+
files = [item for item in all_items if os.path.isfile(item)]
|
| 15 |
+
|
| 16 |
+
# 先检查文件夹,如果有文件夹,则返回最新的文件夹
|
| 17 |
+
if folders:
|
| 18 |
+
latest_folder = max(folders, key=os.path.getmtime)
|
| 19 |
+
return latest_folder
|
| 20 |
+
|
| 21 |
+
# 如果没有文件夹,那么检查文件,并返回最新的文件
|
| 22 |
+
elif files:
|
| 23 |
+
latest_file = max(files, key=os.path.getmtime)
|
| 24 |
+
return latest_file
|
| 25 |
+
|
| 26 |
+
# 如果没有文件和文件夹,那么返回None
|
| 27 |
+
else:
|
| 28 |
+
return None
|
| 29 |
+
|
| 30 |
+
def save_image(image):
|
| 31 |
+
# 指定目录
|
| 32 |
+
directory = '/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/testdata'
|
| 33 |
+
|
| 34 |
+
# 检查目录是否存在,不存在则创建
|
| 35 |
+
if not os.path.exists(directory):
|
| 36 |
+
os.makedirs(directory)
|
| 37 |
+
|
| 38 |
+
# 保存图片到指定目录
|
| 39 |
+
image.save(os.path.join(directory, 'new_image_1.jpg'))
|
| 40 |
+
|
| 41 |
+
def process_image(image):
|
| 42 |
+
# 使用PIL.Image将numpy数组转换回图像
|
| 43 |
+
pil_image = Image.fromarray(image)
|
| 44 |
+
|
| 45 |
+
# 将图像保存到指定目录
|
| 46 |
+
save_image(pil_image)
|
| 47 |
+
|
| 48 |
+
program_path = '/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/test.py'
|
| 49 |
+
subprocess.run(['python3', program_path, '--data_path_test=./testdata'])
|
| 50 |
+
|
| 51 |
+
directory_image = '/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat' # 你的目录路径
|
| 52 |
+
latest_file = get_latest_file(get_latest_file(directory_image))
|
| 53 |
+
image_path = f'{latest_file}/144/test/new_image_1.jpg'
|
| 54 |
+
new_image = Image.open(image_path)
|
| 55 |
+
return new_image
|
| 56 |
+
|
| 57 |
+
iface = gr.Interface(fn=process_image,
|
| 58 |
+
inputs="image",
|
| 59 |
+
outputs="image",
|
| 60 |
+
title="Document dewarping platform",
|
| 61 |
+
description="This page recognises wrinkled documents and processes them into flat ones, you can upload your local images and download the processed files.",
|
| 62 |
+
allow_flagging="never"
|
| 63 |
+
)
|
| 64 |
+
iface.launch(share = True)
|
| 65 |
+
|
flagged/image/5ad4b2887a6e21ed21ad368cb12b06241a8c06b4/tmpir4uhzvh.jpg
ADDED
|
Git LFS Details
|
flagged/image/c60b52ea5b844eb28fc764fc77bee9bd47ce39a9/tmp_dno9712.jpg
ADDED
|
Git LFS Details
|
flagged/image/fc61756a7b0971534c5b49be71caf17d819f35ad/tmpv0t201p6.jpg
ADDED
|
Git LFS Details
|
flagged/log.csv
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
image,output,flag,username,timestamp
|
| 2 |
+
,,,,2023-07-12 18:59:12.763581
|
| 3 |
+
/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/image/c60b52ea5b844eb28fc764fc77bee9bd47ce39a9/tmp_dno9712.jpg,/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/output/68a659c360681de00197f50432d89fbd98efdefc/tmp_cajstfi.png,,,2023-07-13 18:34:59.129831
|
| 4 |
+
/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/image/fc61756a7b0971534c5b49be71caf17d819f35ad/tmpv0t201p6.jpg,/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/output/020e114a87a9ea1d41251128026eaf06751a1803/tmpa50oe7qi.png,,,2023-08-23 22:08:00.276130
|
| 5 |
+
/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/image/5ad4b2887a6e21ed21ad368cb12b06241a8c06b4/tmpir4uhzvh.jpg,/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flagged/output/870c2f8157465905417c545291ec216d6c9e9d1e/tmpgkg2h7fc.png,,,2023-08-23 22:08:23.861292
|
| 6 |
+
,,,,2023-08-23 22:09:54.461844
|
flagged/output/020e114a87a9ea1d41251128026eaf06751a1803/tmpa50oe7qi.png
ADDED
|
flagged/output/68a659c360681de00197f50432d89fbd98efdefc/tmp_cajstfi.png
ADDED
|
Git LFS Details
|
flagged/output/870c2f8157465905417c545291ec216d6c9e9d1e/tmpgkg2h7fc.png
ADDED
|
flat/2023-07-11/2023-07-11 15:21:45 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./test1.jpg', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-11/2023-07-11 15:27:11 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 9.533
|
flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-11/2023-07-11 17:10:10 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 8.614
|
flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 14:53:08 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 8.535
|
flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 14:59:01 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 8.410
|
flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/mark_new_image_1.png
ADDED
|
flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/new_image_1.png
ADDED
|
flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-12/2023-07-12 19:01:14 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 9.356
|
flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/mark_new_image_1.png
ADDED
|
flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/new_image_1.png
ADDED
|
flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03/144/test/test1.jpg
ADDED
|
flat/2023-07-13/2023-07-13 17:09:54 @2021-02-03_Document-Dewarping-with-Control-Points.log
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Namespace(arch='Document-Dewarping-with-Control-Points', img_shrink=None, n_epoch=300, optimizer='adam', l_rate=0.0002, print_freq=60, data_path_train=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/color'), data_path_validate=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/dataset/fiducial1024/fiducial1024_v1/validate'), data_path_test='./testdata', output_path=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/flat'), resume=PosixPath('/Users/lixiangfang/Desktop/Surf code/Document-Dewarping-with-Control-Points/Source/ICDAR2021/2021-02-03 16:15:55/143/2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl'), batch_size=1, schema='test', parallel=None)
|
| 2 |
+
test time : 9.125
|
flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/mark_new_image_1.png
ADDED
|
Git LFS Details
|
flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/mark_test1.jpg
ADDED
|
flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/new_image_1.png
ADDED
|
Git LFS Details
|
flat/2023-07-13/2023-07-13 18:34:30 @2021-02-03/144/test/test1.jpg
ADDED
|