Closed Shiming94 closed 3 years ago
Hi @Shiming94 What is your ignore value? And you may provide your config file for more information.
HI @xvjiarui, I usually set the last class as the ignore class, num - 1. And the default ignore value of the code is 255, right? Every time when I change the ignore value to num-1, the error will occur.
The default is 255. You may check if all your data segmentation labels are within range.
The default is 255. You may check if all your data segmentation labels are within range.
HI @xvjiarui For example, if I define 8 classes, the max value of the pixel should be 7. It seems that after some process a lot of pixels will become value 255. That is why ignore_index 255 can be accepted, but other values cannot. (when 255 is not ignored, it is definitely beyond the range.) So one solution is just to mask all the 255 to the ignore value we defined, say 7.
But I don't exactly know which process will generate a lot of pixels with value 255. Can you explain this to me?
Thanks a lot.
@Shiming94
the augmentation procedure in the config file will add pixels with value 255, such as
dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255)
.
@Shiming94 the augmentation procedure in the config file will add pixels with value 255, such as
dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255)
.
I have some questions about the usage of this package, I want to communicate with you. I have emailed to you, I truly want to get your reply. Thanks a lot!
form the ' log_vars[loss_name] = loss_value.item()'
,i think it might happen for the wrong index labels in the dataset enhancing process.
checking you labels:
as for custom dataset, and not ignoring the background, for padding process, adding another index for the padding elements in case conflicting with the ids would be calculated in you loss function.
for example: for custom dataset, an very common reason for this error is setting the wrong value for padding elements, and solving by : the dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255) -> dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=-100),
Hi,
did someone meet the problem: the error
RuntimeError: CUDA error: an illegal memory access was encountered
will occur when an ignore_index for the model is set.Without the ignore_index the code runs very well.
The error reports are as follows:
Best regards Shiming