Skip to content

Using mmseg for secondary classification can only predict the background #2713

Open
@iakRulan

Description

@iakRulan

I can use mmseg to detect my own dataset, the JPG format used in the original image, and the binary PNG format used in the mask. I can train and predict, but the training process and reasoning process cannot split the target area. I can't detect it using the cross entropy loss function and Dice Loss,

``2023-03-07 14:30:11,324 - mmseg - INFO - workflow: [('train', 1)], max: 1600 iters
2023-03-07 14:30:11,324 - mmseg - INFO - Checkpoints will be saved to /root/mmsegmentation/work_dirs/segformer_mit-b5_8x1_1024x1024_160k_cityscapes by HardDiskBackend.
2023-03-07 14:31:24,458 - mmseg - INFO - Iter [50/1600] lr: 1.900e-06, eta: 0:37:44, time: 1.461, data_time: 0.018, memory: 20549, decode.loss_dice: 0.5979, decode.acc_seg: 73.8272, loss: 0.5979
2023-03-07 14:32:32,725 - mmseg - INFO - Iter [100/1600] lr: 3.715e-06, eta: 0:35:19, time: 1.365, data_time: 0.010, memory: 20549, decode.loss_dice: 0.5748, decode.acc_seg: 88.4181, loss: 0.5748
2023-03-07 14:33:41,799 - mmseg - INFO - Iter [150/1600] lr: 5.405e-06, eta: 0:33:53, time: 1.381, data_time: 0.010, memory: 20549, decode.loss_dice: 0.5558, decode.acc_seg: 97.9252, loss: 0.5558
2023-03-07 14:33:55,382 - mmseg - INFO - Saving checkpoint at 160 iterations
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 411/411, 0.9 task/s, elapsed: 456s, ETA: 0s2023-03-07 14:41:34,486 - mmseg - INFO - per class results:
2023-03-07 14:41:34,487 - mmseg - INFO -
+-------------+-------+-------+
| Class | IoU | Acc |
+-------------+-------+-------+
| background | 99.58 | 99.97 |
| Tamper_area | 0.0 | 0.0 |
+-------------+-------+-------+
2023-03-07 14:41:34,487 - mmseg - INFO - Summary:
2023-03-07 14:41:34,487 - mmseg - INFO -
+-------+-------+-------+
| aAcc | mIoU | mAcc |
+-------+-------+-------+
| 99.58 | 49.79 | 49.99 |
+-------+-------+-------+
2023-03-07 14:41:34,488 - mmseg - INFO - Iter(val) [411] aAcc: 0.9958, mIoU: 0.4979, mAcc: 0.4999, IoU.background: 0.9958, IoU.Tamper_area: 0.0000, Acc.background: 0.9997, Acc.Tamper_area: 0.0000

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions