Closed Aptaorean closed 9 months ago
Hi, I checked the code and it is running fine. Please add some more details on the issue. When does it happen and how to reproduce it?
Please make sure your configuration file is correct, datasets and model weights are at right directories. Here is the result from my last run on MCubeS dataset.
<All keys matched successfully>
Evaluating...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 51/51 [01:32<00:00, 1.82s/it]
mIoU : 53.11
Results saved in checkpoints/MCubeS/MiT-B4-B1-RGBNAD-MCubeS-53.11.pth
Hi there is still the following error
File "E:\work\Segment\MMSFormer-main\tools\val_mm.py", line 196, in <module> main(cfg) File "E:\work\Segment\MMSFormer-main\tools\val_mm.py", line 166, in main acc, macc, f1, mf1, ious, miou, _ = evaluate(model, dataloader, device) File "D:\application\anaconda\envs\pytorch13\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "E:\work\Segment\MMSFormer-main\tools\val_mm.py", line 83, in evaluate metrics.update(preds.softmax(dim=1), labels) File "E:\work\Segment\MMSFormer-main\semseg\metrics.py", line 15, in update self.hist += torch.bincount(target[keep] * self.num_classes + pred[keep], minlength=self.num_classes**2).view(self.num_classes, self.num_classes) RuntimeError: shape '[14, 14]' is invalid for input of size 3556
May be the following code is not original