qcf-568 / DocTamper

[CVPR2023] Towards Robust Tampered Text Detection in Document Image: New Dataset and New Solution
128 stars 11 forks source link

RuntimeError: DataLoader worker (pid(s) 556) exited unexpectedly #59

Closed stormcoral closed 5 months ago

stormcoral commented 5 months ago

After training for two epochs, an error as described in the question occurs. How can this be resolved? @qcf-568

stormcoral commented 5 months ago

RuntimeError: DataLoader worker (pid 556) exited unexpectedly with exit code 1. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.

qcf-568 commented 5 months ago

please see #32 replace jpegio with jpeg2dct:

from jpeg2dct.numpy import load dct = load(tmp.name,False)[0] h,w = dct.shape[:2] dct = dct.reshape(h,w,8,8).transpose(0,2,1,3).reshape(h8,w8).astype(np.int64)

stormcoral commented 5 months ago

please see #32 replace jpegio with jpeg2dct:

from jpeg2dct.numpy import load dct = load(tmp.name,False)[0] h,w = dct.shape[:2] dct = dct.reshape(h,w,8,8).transpose(0,2,1,3).reshape(h_8,w_8).astype(np.int64)

If I switch to this library, how do I calculate the image's quantization tables, which is referred to as use_qtb2 in the code?

stormcoral commented 5 months ago

@qcf-568

qcf-568 commented 4 months ago

@stormcoral for quantization tables, the same as the original code.