cvlab-stonybrook / PaperEdge

The code and the DIW dataset for "Learning From Documents in the Wild to Improve Document Unwarping" (SIGGRAPH 2022)
MIT License
115 stars 24 forks source link

could you please tell us something about the training? #13

Open 1benwu1 opened 1 year ago

1benwu1 commented 1 year ago

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

wkema commented 1 year ago

could you please debug to see if the data was loaded properly? the error message is not that informative. pic or screenshot is not necessary tho...

one of my hypotheses is:

training step with a "_w" postfix is for weakly supervised training with both doc3d and diw data.

however what you wanna do is

now i want to run the training script with only DIW dataset, but there us something wrong.

so wot u wanna do is beyond wot the repo provided...it is more like a pure weakly or semi-supervised learning.

sry the trn is more complicated than eval...it involves at least 4 steps and u need to comment and uncomment multi parts of the code alternatively...due to my poor program design... :(

wkema commented 1 year ago

headsup: u may use this mixloader to load two datasets https://github.com/cvlab-stonybrook/PaperEdge/blob/main/train.py#L80

1benwu1 commented 1 year ago

thank you so much for your timely reply. i really appreciate it