How do i train custom data?
Traceback (most recent call last):
File "train.py", line 207, in num_classes ({module.num_classes}) in '
AssertionError: The num_classes (80) in BEiTAdapter of MMDataParallel does not matches the length of CLASSES 5) in CocoDataset
this is my log.
I have 5 class in my custom data, but it seems to need to have 80 classes to use pretrained weight. Can you give solution?
Traceback (most recent call last): File "train.py", line 207, in main() File "train.py", line 203, in main meta=meta) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/apis/train.py", line 208, in train_detector runner.run(data_loaders, cfg.workflow) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 45, in train self.call_hook('before_train_epoch') File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 309, in call_hook getattr(hook, fn_name)(self) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/datasets/utils.py", line 158, in before_train_epoch self._check_head(runner) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/datasets/utils.py", line 145, in _check_head (f'The
num_classes({module.num_classes}) in ' AssertionError: Thenum_classes(80) in BEiTAdapter of MMDataParallel does not matches the length ofCLASSES5) in CocoDatasetthis is my log.
I have 5 class in my custom data, but it seems to need to have 80 classes to use pretrained weight. Can you give solution?
Hi! Can you share your config file? Maybe you can edit the num_classes here: https://github.com/czczup/ViT-Adapter/detection/mmdet_custom/models/backbones/beit_adapter.py#L27