akhilpm / DroneDetectron2

Pytorch code for our CVPRw 2023 paper "Cascaded Zoom-in Detector for High Resolution Aerial Images"
MIT License
52 stars 7 forks source link

error #37

Closed zuikeaideren closed 8 months ago

zuikeaideren commented 8 months ago

Hello, I haven't solved this error for a long time. I used the json file of the DOTA data set you provided for training, and the following error occurred. What is the cause of this? Thank you ERROR [03/20 19:26:58 d2.engine.train_loop]: Exception during training: Traceback (most recent call last): File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/engine/train_loop.py", line 156, in train self.after_step() File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/engine/train_loop.py", line 190, in after_step h.after_step() File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/engine/hooks.py", line 556, in after_step self._do_eval() File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/engine/hooks.py", line 529, in _do_eval results = self._func() File "/root/siton-data-zhangmingData/YHJ/detectron2/croptrain/engine/trainer.py", line 233, in test_and_save_results self._last_eval_results = self.test_crop(self.cfg, self.model, self.iter) File "/root/siton-data-zhangmingData/YHJ/detectron2/croptrain/engine/trainer.py", line 275, in test_crop results_i = inference_dota(model, data_loader, evaluator, cfg, iter) File "/root/siton-data-zhangmingData/YHJ/detectron2/croptrain/engine/inference_tile.py", line 66, in inference_dota for idx, inputs in enumerate(data_loader): File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1183, in _next_data return self._process_data(data) File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) AttributeError: Caught AttributeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/siton-data-zhangmingData/anaconda3/envs/Yan_detectron2/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/data/common.py", line 95, in getitem data = self._map_func(self._dataset[cur_idx]) File "/root/siton-data-zhangmingData/YHJ/detectron2/detectron2/detectron2/utils/serialize.py", line 26, in call return self._obj(*args, **kwargs) File "/root/siton-data-zhangmingData/YHJ/detectron2/croptrain/data/dataset_mapper.py", line 62, in call image = read_image(dataset_dict)
File "/root/siton-data-zhangmingData/YHJ/detectron2/croptrain/data/detection_utils.py", line 18, in read_image if len(image.shape) == 2: AttributeError: 'NoneType' object has no attribute 'shape'

zuikeaideren commented 8 months ago

I have solved the problem, thank you