DocGeoNet icon indicating copy to clipboard operation
DocGeoNet copied to clipboard

Questions about data normalization

Open Soongja opened this issue 2 years ago • 1 comments

  1. For training, is wc(3D coordinate map) normalized in the same way as wc in DewarpNet?(reference)
  2. After network inference, why is bm being multiplied by 0.99 as below? https://github.com/fh2019ustc/DocGeoNet/blob/5a56ab427af6748f96908ce089c5ceea0b6dfeed/inference.py#L29

Soongja avatar Jan 10 '23 11:01 Soongja

I am sorry for the late reply.

  1. Yes
    msk = ((wc[:, :, 0] != 0) & (wc[:, :, 1] != 0) & (wc[:, :, 2] != 0)).astype(np.uint8)

    xmx, xmn, ymx, ymn, zmx, zmn = 1.2485291, -1.2410645, 1.2387834, -1.2280148, 0.63452387, -0.67187124
    wc[:, :, 0] = (wc[:, :, 0] - zmn) / (zmx - zmn)
    wc[:, :, 1] = (wc[:, :, 1] - ymn) / (ymx - ymn)
    wc[:, :, 2] = (wc[:, :, 2] - xmn) / (xmx - xmn)
    wc = cv2.bitwise_and(wc, wc, mask=msk)
  1. Please refer to this issue in DocTr.

Hope this helps! Good luck~

fh2019ustc avatar Jan 30 '23 15:01 fh2019ustc