Closed fschvart closed 1 year ago
Hi @fschvart,
Could you try to set num_classes=3
in your config? I found that you set reduce_zero_label=True
when loading the annotations, that means the background is ignored and there are only 3 valid annotations. If you need the background
class, you might set reduce_zero_label=False
.
Hi @xiexinch I changed the num_classes to 3 and adjusted the classes in my dataset set up, it seems like what ended up happening is that what now appears in the label as "person" is actually label 0, the background, otherwise, I can't understand how I suddenly got to 99.6% mIoU and accuracy on it, while having a much much lower accuracy score on the others. Could it be that it chose the wrong label as "zero_label" ?
Hi @xiexinch I changed the num_classes to 3 and adjusted the classes in my dataset set up, it seems like what ended up happening is that what now appears in the label as "person" is actually label 0, the background, otherwise, I can't understand how I suddenly got to 99.6% mIoU and accuracy on it, while having a much much lower accuracy score on the others. Could it be that it chose the wrong label as "zero_label" ?
Hope this doc for reduce_zero_label
may help you.
In your case, label 0 is not background, so thats why it performs not what you want.
Hi @xiexinch I changed the num_classes to 3 and adjusted the classes in my dataset set up, it seems like what ended up happening is that what now appears in the label as "person" is actually label 0, the background, otherwise, I can't understand how I suddenly got to 99.6% mIoU and accuracy on it, while having a much much lower accuracy score on the others. Could it be that it chose the wrong label as "zero_label" ?
Hope this doc for
reduce_zero_label
may help you.In your case, label 0 is not background, so thats why it performs not what you want.
Thanks! So if I understand correctly, I should put reduce_zero_label as False, work with 4 classes and reduce the weight of label 0?
Just first try reduce_zero_label as False, work with 4 classes, if it works, then try to set different weight for different classes.
Thanks, it helped. The model is working, but so far it's underperforming models like Segformer and ConvNext. My dataset has roughly 80% background and 20% objects (where the objects are also quite skewed).
Should I change the loss_cts or the mask_cls class weights(or both?) ?
Thanks!
Closing the issue, as there is no activity for a while. We hope your issue has been resolved. If not, please feel free to open a new one.
Hi,
I'm using the mmsegmentation 1.0 RC2 and trying to use Mask2Former to segment a dataset with 3 classes and background. I took the ADE20K SWIN-L model and just changed the number of classes, made the CrossEntropyLoss weight adjusted ,adjusted the location of my dataset and removed the number of points settings.
Here's how I set up the new dataset:
No matter what I do, I get NaN for the 'bird' dataset and even for the other two the mIoU is maybe 10% (as a reference with segformer I get >90% mIoU)
I run the code on WSL with Ubuntu 20.04 in a machine that has two RTX3090.
Here's the environment and full config: