Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'Cyclist' #48

Open
reynerliu opened this issue Mar 22, 2024 · 3 comments
Open

KeyError: 'Cyclist' #48

reynerliu opened this issue Mar 22, 2024 · 3 comments

Comments

@reynerliu
Copy link

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
Copy link
Author

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

@superkoma
Copy link
Contributor

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

@reynerliu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants