Thanks for your work and open source,
When I read the code following, I'm wondering why set a assert here for z index must be 0? since Voxelization is 3D, z should not be 0?
|
def forward_single(self, before_pseudoimage: torch.Tensor, |
|
after_pseudoimage: torch.Tensor, |
|
point_offsets: torch.Tensor, |
|
voxel_coords: torch.Tensor) -> torch.Tensor: |
|
voxel_coords = voxel_coords.long() |
|
assert (voxel_coords[:, 0] == 0).all(), "Z index must be 0" |
|
|
|
# Voxel coords are Z, Y, X, and the pseudoimage is Channel, Y, X |
|
# I have confirmed via visualization that these coordinates are correct. |
|
after_voxel_vectors = after_pseudoimage[:, voxel_coords[:, 1], |
|
voxel_coords[:, 2]].T |
|
before_voxel_vectors = before_pseudoimage[:, voxel_coords[:, 1], |
|
voxel_coords[:, 2]].T |
|
concatenated_vectors = torch.cat( |
|
[before_voxel_vectors, after_voxel_vectors, point_offsets], dim=1) |
|
|
|
flow = self.decoder(concatenated_vectors) |
|
return flow |
Thanks for your work and open source,
When I read the code following, I'm wondering why set a assert here for z index must be 0? since Voxelization is 3D, z should not be 0?
zeroflow/models/heads/fast_flow_decoder.py
Lines 15 to 32 in 58a93f7