facebookresearch/pytorch3d

Why is only ind[0] appended here?

Closed this issue · 1 comments

When using the Co3D dataset, if a batch loads two frames from the same sequence, they use the same point cloud, resulting in two identical pointcloud_ids

sequence_point_cloud.append(batch[ind[0]].sequence_point_cloud)
.
When it reaches
sequence_point_cloud.append(batch[ind[0]].sequence_point_cloud)
, the length of ind is greater than 1. If sequence_point_cloud only appends the point cloud from ind[0], it will cause the batch_size of sequence_point_cloud in the final FrameData to be inconsistent with other data. Is this a bug?

I think this is deliberate, to avoid wasting memory on multiple copies of the same data.