BUG in tools/train.py and Confusion about the method of calculating ACC
See original GitHub issueChecklist
- I have searched related issues but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug
Hi, dear authors
I found that when using multiple GPUs for training (dis_train
), no matter how much gpu_nums
I input, the gpu_ids
in the config
is always equal to range (0, 1)
, and only 1 GPU worked, but mmdet’s dis_train
does not have this problem.
Reproduction
-
What command or script did you run?
bash tools/dist_train.sh configs/mine/new_deeplabv3plus.py 2 --work-dir my_work_mmseg
-
Did you make any modifications on the code or config? Did you understand what you have modified? Yes
-
What dataset did you use? VOC format
Bug fix
It should be solved by adding these three lines in the picture after line 96 of the train.py
This is exactly the difference between
train.py
in mmseg
and train.py
in mmdet
.
Confusion about the method of calculating Acc
I have seen the way to calculate acc. I’m curious, isn’t the way of calculating acc in mmseg is calculating recall?(mmsegmentation/mmseg/core/evaluation/metrics.py
)
total_area_label = Ground Truth = TP + FN total_area_intersect = TP total_area_pred_label = TP + FP total_area_union = TP + FN + FP
Recall = TP / (TP + FN), but Precision = TP / (TP + FP)
Should it be changed to acc = total_area_intersect / total_area_pred_label
?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Hi! Is this the intented / correct way to calculate it? In my mind I think accuracy shouldn’t be equal to recall, but I might be wrong. Was this corrected in a subsequent PR, or did I miss it?
thank you