DetZero icon indicating copy to clipboard operation
DetZero copied to clipboard

KeyError: 'Cyclist'

Open reynerliu opened this issue 2 years ago • 3 comments

here is the error when I use the detection module to train. Traceback (most recent call last): File "train.py", line 215, in main() File "train.py", line 112, in main train_set, train_loader, train_sampler = build_dataloader( File "/home/lzc/DetZero/detection/detzero_det/datasets/init.py", line 44, in build_dataloader dataset = all[dataset_cfg.DATASET]( File "/home/lzc/DetZero/detection/detzero_det/datasets/waymo/waymo_dataset.py", line 21, in init super().init(dataset_cfg, class_names, training, root_path, logger) File "/home/lzc/DetZero/detection/detzero_det/datasets/dataset.py", line 40, in init self.data_augmentor = self.init_data_augmentor() File "/home/lzc/DetZero/detection/detzero_det/datasets/waymo/waymo_dataset.py", line 42, in init_data_augmentor data_augmentor = DataAugmentor( File "/home/lzc/DetZero/detection/detzero_det/datasets/augmentor/data_augmentor.py", line 24, in init cur_augmentor = getattr(self, cur_cfg.NAME)(config=cur_cfg) File "/home/lzc/DetZero/detection/detzero_det/datasets/augmentor/data_augmentor.py", line 28, in gt_sampling db_sampler = database_sampler.DataBaseSampler( File "/home/lzc/DetZero/detection/detzero_det/datasets/augmentor/database_sampler.py", line 27, in init [self.db_infos[cur_class].extend(infos[cur_class]) for cur_class in class_names] File "/home/lzc/DetZero/detection/detzero_det/datasets/augmentor/database_sampler.py", line 27, in [self.db_infos[cur_class].extend(infos[cur_class]) for cur_class in class_names] KeyError: 'Cyclist'

What should I do?

reynerliu avatar Mar 22 '24 03:03 reynerliu

Here is my command: python train.py --cfg_file cfgs/det_model_cfgs/centerpoint_1sweep.yaml

reynerliu avatar Mar 22 '24 03:03 reynerliu

Have you finished the ground-truth sampling data creation before?

superkoma avatar Mar 26 '24 09:03 superkoma

Yes,I use the command to create gt-data---‘python -m detzero_det.datasets.waymo.waymo_preprocess --cfg_file tools/cfgs/det_dataset_cfgs/waymo_one_sweep.yaml --func create_waymo_database’,and generate the file <gt_database_train_sampled_1_sweep_1>,I tried to delete the class_name 'Cyclist' in centerpoint_1sweep.yaml,the keyError disappeared,but new error broke.

reynerliu avatar Mar 26 '24 11:03 reynerliu