open-mmlab / mmsegmentation

OpenMMLab Semantic Segmentation Toolbox and Benchmark.
https://mmsegmentation.readthedocs.io/en/main/
Apache License 2.0
8.27k stars 2.62k forks source link

KeyError: 'ConcreteDamageCityScapes is not in the dataset registry' #1665

Open tanveer6715 opened 2 years ago

tanveer6715 commented 2 years ago

Hi. I have create my own dataset and train the SegFormer successfully but when I check the inference speed of SegFormer using benchmark.py script it shows the following error as attached. I guess mmsegmentation do not support custom dataset or models to find inference speed or model parameters. error

MengzhangLI commented 2 years ago

Hi, could you train and test normally with your checkpoints trained from ConcreteDamageCityScapes datasets?

tanveer6715 commented 2 years ago

Hi, could you train and test normally with your checkpoints trained from ConcreteDamageCityScapes datasets?

Yes it works well with dist_test.sh but shows same error when testing with single GPU. But I need to find the inference speed. Could you explain how can I do it?

MengzhangLI commented 2 years ago

Could you use dist_test.sh with 1 GPU to inference?

I think it should be unrelated with single or multiple GPU, and you can checkout your training log to see whether ConcreteDamageCityScapes is registered in MMCV, theoretically it should be registered like below:

https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/datasets/isprs.py#L6-L7

tanveer6715 commented 2 years ago

Could you use dist_test.sh with 1 GPU to inference?

I think it should be unrelated with single or multiple GPU, and you can checkout your training log to see whether ConcreteDamageCityScapes is registered in MMCV, theoretically it should be registered like below:

https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/datasets/isprs.py#L6-L7

Yes dist_test.sh with 1 GPU also works. The ConcreteDamageCityScapes is already registered that's why it get successfully trained. But I experienced using custom data show an error with benchmark.py script and also mmsegmentation do not support custom model to find flops or parameters of model.

MengzhangLI commented 2 years ago

The dataset in benchmark.py is built here, which would use here, when I check out the registry, they are all registered like below:

image

So could you debug what's your situation here? I think this bug is not related with single/multiple GPUs, let alone benchmark.py.

Best,

tanveer6715 commented 2 years ago

I dont know what causes this problem. It seems to be very old bug or issue when using any custom module. Please check this issue. It is same like mine but I couldnt find any proper solution. https://github.com/open-mmlab/mmdetection/issues/3751

MengzhangLI commented 2 years ago

I dont know what causes this problem. It seems to be very old bug or issue when using any custom module. Please check this issue. It is same like mine but I couldnt find any proper solution. open-mmlab/mmdetection#3751

I opened this link and found it has been fixed. You could try to take solutions mentioned in this link.

tanveer6715 commented 2 years ago

I dont know what causes this problem. It seems to be very old bug or issue when using any custom module. Please check this issue. It is same like mine but I couldnt find any proper solution. open-mmlab/mmdetection#3751

I opened this link and found it has been fixed. You could try to take solutions mentioned in this link.

Yes I tried the proposed solutions but it still create problem when testing the custom data.

zwbx commented 1 year ago

I also encounter the same bug using single gpu testing, while multiple GPU testing works works well. I am sure that I have checked the link, and the customer dataset have been registered.

WonderNoot commented 1 year ago

I am experiencing the same problem, the dataset configs are correctly imported in the mmdet.datasets module but are somehow not available in the registry when firing up training. I am using an extension of the CocoDataset and even that one is not available. Creating a custom dataset cfg on top of the CocoDataset type results in the same problem. Did you guys find a solution? @zwbx @tanveer6715