DVLP-CMATERJU / RectiNet

A Gated and Bifurcated Stacked U-Net Module for Document Image Dewarping
GNU General Public License v3.0
100 stars 10 forks source link

About data loading #4

Closed ARnnn closed 3 years ago

ARnnn commented 3 years ago

I I have downloaded the data you provided, but in the dataset.py In, label is. Npz format, but I didn't find this format in the data you provided. Can you tell me how to apply the downloaded data to the code you provided?

hmrishavbandy commented 3 years ago

Please note: You have to generate your own dataset. The data generation code can be found here. Use this code to generate your own data. The ground truth of this data would be of .npz format.

ARnnn commented 3 years ago

Does the ground truth correspond to an image without distortion

hmrishavbandy commented 3 years ago

No, the ground truth does not correspond to the scanned image. The ground truth is a dense-grid containing x and y co-ordinates for mapping the warped image to a dewarped image. For dewarping with the ground truth, we make use of torch.nn.functional.grid_sample()

ARnnn commented 3 years ago

In the data generation code provided by you, we finally get the data in .pkl format. Each .pkl contains a distorted image, a ground truth grid and a ground truth image. Whether the ground truth grid is the .npz data that needs to be generated

不,地面真相与扫描的图像不符。地面真相是一个密集的网格,包含 x 和 y 坐标,用于将扭曲的图像映射到去扭曲的图像。对于与地面真理的解战,我们利用torch.nn.functional.grid_sample()

In the data generation code provided by you, we finally get the data in .pkl format. Each .pkl contains a distorted image, a ground truth grid and a ground truth image. Whether the ground truth grid is the .npz data that needs to be generated

hmrishavbandy commented 3 years ago

Yes the ground truth would be in an NPZ format