SPCSim.postproc package

Submodules

SPCSim.postproc.edh_postproc module

class SPCSim.postproc.edh_postproc.PostProcEDH(Nr, Nc, N_tbins, tmax, device)[source]

Bases: object

Class for post processing the EDH data for distance estimation.

edh2depth_t(eqbins_t, mode=0)[source]

This is the latest depth estimation method that includes three different depth estimation methods.

mode = 0: Rho_0 distance estimation after resampling to N_tbins number of equally spaced EDH values obtained using nearest neighbor interpolation. mode = 1: Rho_1 distance estimation after resampling to N_tbins number of equally spaced EDH values obtained using linear interpolation. mode = 2: Naive distance estimation using narrowest bin of the EDH without any interpolation

interp_nonuni_t(x1_, y1_, N, mode=1)[source]

This function takes the x and y data values as 3D tensors and interpolates the y values along N equally spaced x values

Parameters:
  • x1 (torch.tensor) – Location of the mid-points of ED histogram bins. Tensor shape (Nr, Nc, <Num EDH bins>)

  • y1 (torch.tensor) – Photon density estimate for each ED histogram bins (Inverse values of the ED histogram bin widths). Tensor shape (Nr, Nc, <Num EDH bins>)

  • N (int) – Number of equally spaced time bins to interpolate the photon density estimates

  • mode (int, optional) – Choose mode=0 for NN interpolation and mode = 1 for linear interpolation. Defaults to 1.

Returns:

Location of the equally spaced interpolated mid-points of ED histogram bins. Tensor shape (Nr, Nc, N) y2 (torch.tensor): Value of the the interpolated photon density estimates of ED histogram bins. Tensor shape (Nr, Nc, N)

Return type:

x2 (torch.tensor)

SPCSim.postproc.ewh_postproc module

class SPCSim.postproc.ewh_postproc.PostProcEWH(Nr, Nc, N_tbins, tmax, device)[source]

Bases: object

Class for post processing the EWH data for distance estimation.

ewh2depth_t(ewh)[source]

Method to compute distance from equi-width histograms

SPCSim.postproc.metric module

SPCSim.postproc.metric.ame(pred, gt)[source]
SPCSim.postproc.metric.median_ae(pred, gt)[source]
SPCSim.postproc.metric.p_inlier(pred, gt, alpha)[source]

alpha is in % of gt NOTE: It is in % so in the code we multiply 0.01 to the final value

SPCSim.postproc.metric.p_inlier2(pred, gt, alpha)[source]

alpha is in mm

SPCSim.postproc.metric.rmse(pred, gt)[source]

Module contents