Closed engineer1109 closed 6 years ago
Cityscapes data contains 0-18 classes + 1 more class to ignore with pixel value of 255. So, we have a total of 20 classes. To have class labels continuous, we mapped 255 to 19.
@sacmehta
Traceback (most recent call last):
File "main.py", line 406, in
Use PyTorch version 0.3.1
PyTorch version 0.4 onwards, does not support Variables. See PyTorch documentation for changes and make necessary changes to the code if you are using PyTorch 0.4 or above
@sacmehta
/pytorch/torch/lib/THCUNN/SpatialClassNLLCriterion.cu:99: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T , T , T , long , T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [9,0,0], thread: [960,0,0] Assertion t >= 0 && t < n_classes
failed.
Traceback (most recent call last):
File "main.py", line 406, in
Still exists
Seems like you still have 255 as a label. Did you change that in Transforms file?
@sacmehta Thank you for your helping. It works
@engineer1109 Could you tell me the detail about how to pre-processing the labels? thanks
@engineer1109 Hi. did you solve your problem well?
i encountered the same problem
i did already change the code
if 255 in unique_values: label_img[label_img == 255] = 19 unique_values = np.unique(label_img) like this in loadData.py
but it's not worked..
@sacmehta told me that i should change the Transforms.py's code too. but i dont know how to i change the code. plz let me know how to i change the code of Transforms.py
Labels can take value between 0 and number of classes. Some problem with labels. Please check. unique_values=[ 0 1 2 4 5 7 8 10 11 13 14 255]
Is it important?