mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

Evaluating a model requires knowledge of the training set

Open InakiRaba91 opened this issue 1 year ago • 0 comments

Thanks for your error report and we appreciate it a lot.

Describe the bug I'm running into an issue when evaluatinga model on a test set, i.e.: calling runner.test(). If visualization is active, SegVisualizationHook tries to access the runner.iter property. This in turn tries to eventually instantiate the train_dataloader.

The only way to avoid that is making sure every training arg in the config is None. I think the code should be able to infer that in test mode, there's no need whatsoever to instantiate the training dataset.

Bug fix

It seems MMDet was able to handle this case by having mode-specific methods, as opposed to a general one, as is the case in MMSeg. Would it be alright to extend this implementation to this repo as well? I'm more than happy to submit a PR, just wanted to double check first.

InakiRaba91 avatar Dec 11 '23 11:12 InakiRaba91