Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about data normalization #6

Open
Soongja opened this issue Jan 10, 2023 · 1 comment
Open

Questions about data normalization #6

Soongja opened this issue Jan 10, 2023 · 1 comment

Comments

@Soongja
Copy link

Soongja commented Jan 10, 2023

  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?
    bm = (2 * (bm / 255.) - 1) * 0.99
@fh2019ustc
Copy link
Owner

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~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants