yijingru / BBAVectors-Oriented-Object-Detection

[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
MIT License
466 stars 87 forks source link

KeyError: 'container-crane' #132

Open luckgzy opened 2 years ago

luckgzy commented 2 years ago

Traceback (most recent call last): File "main.py", line 58, in ctrbox_obj.train_network(args) File "/home/BBAVectors/train.py", line 133, in train_network criterion=criterion) File "/home/BBAVectors/train.py", line 161, in run_epoch for data_dict in data_loader: File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in next data = self._next_data() File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/BBAVectors/datasets/base.py", line 267, in getitem annotation = self.load_annotation(index) File "/home/BBAVectors/datasets/dataset_dota.py", line 93, in load_annotation valid_cat.append(self.cat_ids[obj[8]]) KeyError: 'container-crane'

I hope you can help me,thank very much.

gzyluck commented 2 years ago

I dont know

yijingru commented 1 year ago

looks like data problem

gzyluck commented 1 year ago

looks like data problem

Thank you for your reply. I have solved the problem。

forestlei commented 1 year ago

how to deal?

ztiedad commented 1 year ago

添加 'container-crane': 路径:/datasets/dataset_dota.py self.category = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court', 'basketball-court', 'storage-tank', 'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter'] 然后将main.py中 num_classes中的15改成16