Closed antoniosilva9116 closed 2 years ago
@antoniosilva9116 The error seems to be inside 3rd party package spconv
. You can try to do following to trace the problem.
x = self.middle_encoder_3d(...)
, and try to create a very small example which reproduce this issue. You may find that there is some problem with the data itself. Hi @sanskar107. Thank you for your answer. I'm trying to compare the input data of both sides (PCDet and yours) but I figured out that your code does not split the KITTI dataset based on the KITTI protocol (like the files attached). Am I wrong?
So, answering your questions:
It seems that most spconv code is optimised to GPU. I got an error using CPU (passed --device cpu in run_pipeline.py):
assert indices.is_cuda, "implicit gemm only support cuda"
AssertionError: implicit gemm only supports cuda
It happens in the first frame_id: 000000
I Attached the data passed to the middle extractor. I made the following changes: in parta2_kitti.yml
log_train_2022-06-23_18:57:31.txt
voxelize:
max_num_points: 5
voxel_size: &vsize
[ 0.05, 0.05, 0.1 ]
max_voxels: {
'train': 16000,
'test': 40000
}
Then, I used your voxelized function as implemented in PointPillars.py.
In conclusion, I to understand if the error is related to the data passed to the Middle Extractor, I implemented Second with MeanVoxelFeatureNet and the SECONDVoxelization.py and voxelized function that you use in PointPillars. I implemented the Sparse Middle Extractor as defined in their traveller repo that uses the same code that in the case of SparseConvUNet provide to me with the error mentioned in this issue, the code of Second Sparse Middle Extractor is as follows:
def __init__(self,
grid_size,
in_channels=4,
name='SparseMiddleExtractor'):
(...)
self.middle_conv = spconv.SparseSequential(
# Block 1
SubMConv3d(in_channels, 16, 3, indice_key="subm0"),
nn.BatchNorm1d(16, eps=1e-3, momentum=0.01),
nn.ReLU(),
SubMConv3d(16, 16, 3, indice_key="subm0"),
nn.BatchNorm1d(16, eps=1e-3, momentum=0.01),
nn.ReLU(),
SparseConv3d(16, 32, 3, 2,
padding=1), # [1600, 1200, 41] -> [800, 600, 21]
nn.BatchNorm1d(32, eps=1e-3, momentum=0.01),
nn.ReLU(),
(...)
)
def forward(self, voxel_features, coors, batch_size)
coors = coors.int()
ret = spconv.SparseConvTensor(
features=voxel_features,
indices=coors,
spatial_shape=self.sparse_shape,
batch_size=batch_size
)
ret = self.middle_conv(ret)
Sorry but in this issue, I misplaced the line where the error happens. It happens in SparseConvUnet class in this line:
x = self.conv_input(input_sp_tensor) # ERROR HERE
Checklist
master
branch).Describe the issue
I'm trying to implement SparseConvUNet for the PartA2 model similar or practically the same code as can be found in https://github.com/open-mmlab/OpenPCDet/blob/master/pcdet/models/backbones_3d/spconv_unet.py. For some reason I'm getting an error in this line:
Running on the original OpenPCDet it works fine in my implementation I'm getting the following error:
The shape of voxel coords, voxel features and input sparse tensor are the following:
I'm using batch size 1 to test if this value causes this. The shape of before mentioned parameters is the same as OpenPCDet. Can you help me solve this problem? I made the same question in spconv repo but no answer until now (2/3 weeks)!
Steps to reproduce the bug
SECONDVoxelization:
MeanVoxelFeatureNet:
SparseConvUnet class as follows:
PartA2 class is as follows:
Expected behavior
No response
Open3D, Python and System information
Additional information
No response