VinAIResearch / ISBNet

ISBNet: a 3D Point Cloud Instance Segmentation Network with Instance-aware Sampling and Box-aware Dynamic Convolution (CVPR 2023)
Apache License 2.0
104 stars 22 forks source link

RuntimeError: stack expects a non-empty TensorList #16

Open xiaotiancai899 opened 1 year ago

xiaotiancai899 commented 1 year ago

Due to the version of GPU, I have to set the batch_size=1, However, it cause an error when training at the epoch 48 out of 120. 'RuntimeError: stack expects a non-empty TensorList' I am training the ScanNet200 dataset using this network. Any ideas about this? Thanks in advance!!!!

ngoductuanlhp commented 1 year ago

Please give me more details: which line of code and which file, or the full traceback of this error?

xiaotiancai899 commented 1 year ago

Please give me more details: which line of code and which file, or the full traceback of this error?

Traceback (most recent call last): File "tools/train.py", line 307, in main() File "tools/train.py", line 298, in main train(epoch, model, optimizer, scheduler, scaler, train_loader, cfg, logger, writer) File "tools/train.py", line 73, in train loss, log_vars = model(batch, return_loss=True, epoch=epoch - 1) File "/home/clinton/anaconda3/envs/isbnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/isbnet.py", line 219, in forward return self.forward_train(batch, epoch=epoch) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/util/utils.py", line 172, in wrapper return func(new_args, **new_kwargs) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/isbnet.py", line 251, in forward_train voxel_coords_float, voxel_instance_labels, voxel_semantic_labels, label_shift=self.label_shift File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/model_utils.py", line 552, in get_instance_info instance_box = torch.stack(instance_box, dim=0) # N, 6 RuntimeError: stack expects a non-empty TensorList

Any ideas? Thanks very much!!!!

ngoductuanlhp commented 1 year ago

It means that your input point cloud does not contain any foreground instance, leading to an empty list. You may have cropped too many points in the preprocessing step. One solution is that you can check these ambiguous cases and excl;lude them during training.

xiaotiancai899 commented 1 year ago

It means that your input point cloud does not contain any foreground instance, leading to an empty list. You may have cropped too many points in the preprocessing step. One solution is that you can check these ambiguous cases and excl;lude them during training.

I was following the steps shown as data preprocessing, so I have not cropped points.