open-mmlab / mmsegmentation

OpenMMLab Semantic Segmentation Toolbox and Benchmark.

Home Page:https://mmsegmentation.readthedocs.io/en/main/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Constant IoU after every validation

cspearl opened this issue · comments

Hi, I was a bit late to reply to my issue(assigned to @MengzhangLI ) that I was having so it probably got skipped. Please find the details of the issue and the log file here : #1988
Appreciate any help!

Hi @cspearl @MengzhangLI,
Faced the same issue when trained using latest codebase commit for binary class segmentation (roads class).
mIOU, aACC, mACC is the same through out training.
Attaching log file below.
20220907_152411.log

Thanks

Hi, @sainivedh19pt, try to set your dataset annotation 0 and 1 and set reduce_zero_label=False in your config file.

You can check out what does reduce_zero_label work from here.

Hi, @cspearl, could you try to set reduce_zero_label = False, and num_classes = 1 and ensure your annotation files only have label 0 and label 1?

Hi, @cspearl, could you try to set reduce_zero_label = False, and num_classes = 1 and ensure your annotation files only have label 0 and label 1?

Yes I tried but it gives the same result. My annotation files only have 0 - background and 1 - foreground labels.

Hi @cspearl,
Could you try to set the different thresholds to the decode_head?

Hi @cspearl, Could you try to set the different thresholds to the decode_head?

Can you elaborate a bit on what to add? In the decode head dict

Hi @cspearl, Could you try to set the different thresholds to the decode_head?

Can you elaborate a bit on what to add? In the decode head dict

https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/models/decode_heads/decode_head.py#L23-L24

Hi, @MengzhangLI
same problem..
in decode_head and auxiliary_head num_classes=2

2022-09-22 00:22:24,627 - mmseg - INFO - 
+------------+-------+-------+--------+-----------+--------+
|   Class    |  IoU  |  Acc  | Fscore | Precision | Recall |
+------------+-------+-------+--------+-----------+--------+
| background | 44.56 | 45.68 | 61.65  |   94.78   | 45.68  |
|   class   |  0.01 |  0.31 |  0.03  |    0.01   |  0.31  |
+------------+-------+-------+--------+-----------+--------+

custom dataset:


from mmseg.datasets.builder import DATASETS
from mmseg.datasets.custom import CustomDataset

CLASSES = ['background', 'class']
PALETTE = [[0, 0, 0], [244, 35, 232]]

@DATASETS.register_module()
class MylDataset(CustomDataset):
  CLASSES = CLASSES
  PALETTE = PALETTE
  def __init__(self, **kwargs):
    super().__init__(
        img_suffix='.png', seg_map_suffix='.png',
        **kwargs
        )
    assert osp.exists(self.img_dir) #and self.split is not None```

Hi, sorry for late reply. Did you solve your problem?

You can have a look at #2201 by setting num_classes=1 and use_sigmoid=True in CrossEntropyLoss.

Hi @cspearl @MengzhangLI, Faced the same issue when trained using latest codebase commit for binary class segmentation (roads class). mIOU, aACC, mACC is the same through out training. Attaching log file below. 20220907_152411.log

Thanks

From your log could you keep every parameter in config except setting reduce_zero_label=False? Thx.

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.