Hi,I encountered an error when running the test.py script. Here are the details:
Command Executed:
python tools/test.py --config configs/APLoss/base_320_fullData_bsds.py --checkpoint checkpoints/iter_200000_BSDS.pth --tmpdir results
Error Traceback:
Traceback (most recent call last):
File "tools/test.py", line 147, in
main()
File "tools/test.py", line 112, in main
dataset = build_dataset(cfg.data.test)
File "/home/haov/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.8/site-packages/mmseg/datasets/builder.py", line 85, in build_dataset
dataset = build_from_cfg(cfg, DATASETS, default_args)
File "/home/haov/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.8/site-packages/mmcv/utils/registry.py", line 61, in build_from_cfg
raise KeyError(
KeyError: 'BSDSDataset is not in the dataset registry'
could you please tell me how to solve the problem?Thanks for your help!
I have encountered the same issue, and here's how I fix it:
Uninstall the original mmsegmentation (to force the usage of customized mmseg in RankED)
Add path if necessary in your test.py: sys.path.append('path/to/RankED')
Then the customized mmseg.datasets.builder.build_dataset will register BSDSDataset. Check if this could help.
Hi,I encountered an error when running the test.py script. Here are the details: Command Executed: python tools/test.py --config configs/APLoss/base_320_fullData_bsds.py --checkpoint checkpoints/iter_200000_BSDS.pth --tmpdir results Error Traceback: Traceback (most recent call last): File "tools/test.py", line 147, in
main()
File "tools/test.py", line 112, in main
dataset = build_dataset(cfg.data.test)
File "/home/haov/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.8/site-packages/mmseg/datasets/builder.py", line 85, in build_dataset
dataset = build_from_cfg(cfg, DATASETS, default_args)
File "/home/haov/miniconda3/envs/pytorch-CycleGAN-and-pix2pix/lib/python3.8/site-packages/mmcv/utils/registry.py", line 61, in build_from_cfg
raise KeyError(
KeyError: 'BSDSDataset is not in the dataset registry'
could you please tell me how to solve the problem?Thanks for your help!