SoftGroup
SoftGroup copied to clipboard
Ignore_label
Hi,
Im training SoftGroup on my own dataset. I wondered whether ignore_label regards semantic labels or instance labels or both? I have labelled all points in my dataset that don't belong to any instance with -1 instance label. I therefore set ignore_label to -1.
Training the backbone on semantic segmentation worked fine, however, training the instance segmentation fails because of dimension errors:
/aten/src/ATen/native/cuda/Loss.cu:257: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [8,0,0] Assertion t >= 0 && t < n_classes
failed
and
CUDA error: device-side assert triggered
The error happens in instance_loss() calculation, more specifically line 232, in instance_loss cls_loss = F.cross_entropy(cls_scores, labels).
Could it be that the model does not ignore the -1 instances and therefore there is a dimension error?
Thank you in advance for any answers!
Had the same issue, in the ScanNet dataset class the instance label is changed from x to x-2 to remove the wall and floor classes. Keeping the instance class as-is fixed it.
F.cross_entropy()
assume the ignore_label to be -100 by default (https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html). you can either pass ignore_index to cross_entropy or change your ignored label to -100.