Hi, I meet this question when I tried to train a new model with personal defined dataset class, I found some one fixed it with using @DATASETS.register_module when he define the class MyDataset(CocoDataset), but it doesn't useful for me, do you have any suggestions? Thank you!
Please follow the Error report issue template.
Please also edit the __init__ file to make your custom dataset correctly imported by package, also confirm that if you mmdet is in development mode.
Please also edit the init file to make your custom dataset correctly imported by package, also confirm that if you mmdet is in development mode.
Thank you for your reply, I did edited the init file but I forgot to recompile the source code, now it works.
add the following words in your own dataset.py
from .registry import DATASETS
@DATASETS.register_module
how to recompile the source code? @kingwpf
how to recompile the source code? @kingwpf
My be reinstall according to https://github.com/open-mmlab/mmdetection/blob/master/docs/install.md, it's been long time.
I tried to add the info according to @Youggie , which caused an error (I thought I need to recompile the code). And I found that for the newest version, the “DATASETS” is not imported from .registry. So adding @DATASETS.register_module only is enough.
Also, for the newest version, I build the mmdetection through pip install -v -e .. So there is no need to reinstall after I add the new dataset
Most helpful comment
Thank you for your reply, I did edited the init file but I forgot to recompile the source code, now it works.