Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Questions on supervised traning part code and performance #2

@Kin-Zhang

Description

@Kin-Zhang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions