Closed Senwang98 closed 2 years ago
segmentor
or segmenter
? I can't get it.
@MengzhangLI It's my fault, it is Segmenter! I found segmenter seems do not supprt DRIVE dataset.
Ok. It is wired because I just changed num_classes
in segmenter unit test and it passed.
You could keep other settings like learning rate same with original unet drive config and try again.
@MengzhangLI
Segmenter can train and test successfully, but it seems that the training's result is strange. vessel
item is always 0 when evaluation. I have changed num_class in config.
I think I should check it twice and thanks for your reply again!
I will report my results again later.
@MengzhangLI
I am back, I find an interesting thing, when using drive dataset as transet for segmenter.
dict(type='LoadAnnotations', reduce_zero_label=True),
is default setting.
In this way, the deocder's num_class = 2 will fail, but num_class=3 is ok which is intuitively reasonable.
I expect I can train segmenter with num_class = 2
will be ok when I set dict(type='LoadAnnotations', reduce_zero_label=False)
. But in this way, num_class=2 still fail to train segmenter, but num_class=3 is still ok.
@Senwang98
Hello, I met the same problem when I train binary segmentation on segmenter. I want to know whether you change the lable from 0-1 to 1-2 when you change the num_classes
.
Thanks!
@shuaikangma No matter my own dataset or DRIVE dataset, I change the pixel value to 0-1 rather 1-2. I think my mask processing is right, because the DRIVE dataset is processed by MMseg official script!!!
@Senwang98 thank you for your reply. I'll try it
Excuse me. I have a similar problem. Do you use use_sigmoid=True or False? Thank you in advance
False
I meet the same issue when I use segmenter to do binary segmentation task,and after I set the
cfg.model.decode_head.num_classes = 3
the background class is not keeped as zero. So what the reason cause that? I must set the decode num_classes for segmenter specially as below,lol
cfg.model.decode_head.num_classes = 3 if 'segmenter' in model_name else 2
False
want know how did you fix it? I meet the simular problem. I have two classes and i set the num_classes as 3. with pixel label from 0 to 2. It worked well on segformer(ended with a really good performence). But when I try to use segmenter to train, the training looks strange. The decode.acc and loss seems normal, but the val result is nearly always zero.
Checklist
Background I am doing binary seg task. So I tried some SOTA methods such as
segformer
andsegmentor
.segformer
works well butsegmentor
failed.Describe the bug
Segmentor
does not support binary seg task! And the class except background is always 0!Reproduction
Did you make any modifications on the code or config? Did you understand what you have modified? I give the config above. As you can see, I only mofidy the dataset's config path and comment the original segmentor's dataset pipeline. Finally, I modify the decode-head's output class number = 2 instead of 150 in ADE20K.
What dataset did you use? Drive