cvlab-stonybrook / paperedge Goto Github PK
View Code? Open in Web Editor NEWThe code and the DIW dataset for "Learning From Documents in the Wild to Improve Document Unwarping" (SIGGRAPH 2022)
License: MIT License
The code and the DIW dataset for "Learning From Documents in the Wild to Improve Document Unwarping" (SIGGRAPH 2022)
License: MIT License
i'm new to deep learning and recently i become recently interested in paper dewarping. i've read some papers from your lab. i'm eager to test your amazing work on my pc. but i really don't know how to run the code.... so could you please offer me more guidance or write something down in the readme
hi ke,
I try to train your model, but I found here the following seems amiss:
I can not found where is the module tsdeform
PaperEdge/networks/tps_warp.py
Line 182 in 8c73826
Sorry for asking this question, where is the source of the dataset in bgtex.txt.
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0103.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0089.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0015.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0069.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0144.jpg
Hello, thank you for contributing such an excellent work. Excuse me, I have already applied for a username and password of doc3d dataset. I tried to download the doc3d dataset, but it kept reporting 403 forbidden when downloading it. Is there a problem with the server? When will the server be repaired? thanks
Have you ever tried to train Tnet only using real data(using unsupervised training)? I am curious if it is possible to converge. Thanks
Thank you for open source your research code. I find your PRESENTATION page here but didn't find a paper download link. Where can I find the paper? Thanks
before this, i've asked you about how to run the eval.py . now i want to run the training script with only DIW dataset, but there us something wrong.
here i followed the notice ——training step with a "_w" postfix is for weakly supervised training with both doc3d and diw data.
so i used this function——trainer = Engine(train_G_step_w)
and this is what happened
File "PaperEdge-main\train.py", line 183, in train_G_step_w
x, xm, bg = batch[1]
ValueError: too many values to unpack (expected 3)
i don't know whether or not i make myself clear cuz i don't know how to attach a picture to the issue
anyway, i just wanna know how to train the model....
thank you for reading
In the function train_L_step_w
, line 192, in train.py
, we the gradients of loss are firstly propagated to NetL with Doc3D data set. Then in the gradients are propagated to NetL with DIW. People update the NetL twice in one step (optimizer_L.step()
x2).
I have a question. We compute the spvLoss.lloss
and warp_diff_loss
with the corresponding data set and a supervision mask (using the torch.where
function to remove unrelative gradients) , so that we can update the NetL in one step.
I read your paper, did not read the issues, and train the NetL with my idea. It does not converge.
According to the optimization theory, these two training tricks will lead to different NetLs. Therefore, I want to know the result of my training trick. Or let us check the reason.
During the training, there is a data set list in bgtex.txt. where to get those data? Thx.
I'm trying to train Tnet on my own real data and doc3d data, would you mind sharing the data in data/bgtex.txt?
I found through the path that part of the data comes from dtd, but the other part of texmix I did not find the source.
Hello ke,
in eval directory in your repo, I have seen a parameter as follow:
PaperEdge/eval/run_benchmark.m
Line 10 in 8f91738
Based on my understanding, it's a parameter to control the resize ratio, but I don't know why to use 598400
, can you help me?
Best wishes,
Weiguang Zhang
Hi, May I ask how do you implement the Enet (Doc3D + DIW) + Tnet (Doc3D + DIW) pipeline with the training functions? I already run through the training model with the Enet (Doc3D + DIW) based on the pretrained model , but when it comes to Tnet, I don't know how can I transfer the Enet result(netG) to Tnet, take the code as example:
def train_L_step_w(engine, batch):
#doc3d data
.......
# pass the global warp net
netG.eval()
dg = netG(x)
how do you make sure the netG here is the trained result, should I simplely replace the pretrained pt model in /models with my Enet trained result(.pt)? and should I use the 'trainer = Engine(train_G_step_w)' and 'trainer = Engine(train_L_step_w)' at the same time?
sry that some of my questions may be dumb, looking forward to hear from u
您好,能问一下文档bgtex.txt中的图片对应的是什么数据集吗?
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0103.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0089.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0015.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0069.jpg
/nfs/bigretina/kema/data/dtd/images/perforated/perforated_0144.jpg
有关于这部分数据的链接吗?
I'm trying to implement joint training of PaperEdge. Although PaperEdge's Supplementary Material mentions joint training did get further improvement, in my opinion, end-to-end training is more practical from a practical application point of view.
I would appreciate it if the author could share more about joint training(e.g., advantages/disadvantages/changes to the training process).
One disadvantages I can think of(still implementing code to verify my idea) is: In the joint training netG has not yet converged and the prediction(dg) is incorrect, resulting in a complete failure of netL to converge
x, y = doc3d_aug(im, fm, bm, bg)
dg = netG(x) # netG is training mode
dg = warpUtil.global_post_warp(dg, 64)
gs = F.interpolate(dg, 256, mode='bilinear', align_corners=True)
xg = F.grid_sample(x, gs.permute(0, 2, 3, 1), align_corners=True)
xd = netL(xg)
loss, _ = spvLoss.lloss(xd, y, dg)
usage: train.py [-h] --config CONFIG
train.py: error: the following arguments are required: --config
Hello, I am a student who has just started self-study. This problem has troubled me for a long time. I don't know how to solve it.Can I ask for your help. Thank you!
I've downloaded the doc3d dataset and diw dataset and tried to train. But I find that the train list (doc3d_trn.txt in the code) doesn't match the doc3d dataset, most of the data can't be found in the doc3d dataset.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.