D641593 / MixNet

MIT License
74 stars 10 forks source link

Eval Error #8

Open tm1412 opened 1 year ago

tm1412 commented 1 year ago

Hello, during the evaluation on my dataset, it encounters this error. It stops and reports an error after processing a few images, and it only continues when I remove those images. This process repeats itself. Can you help me with this?

Traceback (most recent call last): File "eval_mixNet.py", line 259, in main(vis_dir) File "eval_mixNet.py", line 231, in main inference(model, test_loader, output_dir) File "eval_mixNet.py", line 65, in inference for i, (image, meta) in enumerate(test_loader): File "D:\anaconda\envs\mixnet\lib\site-packages\torch\utils\data\dataloader.py", line 633, in next data = self._next_data() File "D:\anaconda\envs\mixnet\lib\site-packages\torch\utils\data\dataloader.py", line 677, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\anaconda\envs\mixnet\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\anaconda\envs\mixnet\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\OCR_AICS\MixNet\dataset\Total_Text.py", line 134, in getitem data = self.load_img_gt(item) File "D:\OCR_AICS\MixNet\dataset\Total_Text.py", line 108, in load_img_gt polygons = self.parse_mat(annotation_path) File "D:\OCR_AICS\MixNet\dataset\Total_Text.py", line 61, in parse_mat pts = np.stack([x, y]).T.astype(np.int32) File "<__array_function__ internals>", line 200, in stack File "D:\anaconda\envs\mixnet\lib\site-packages\numpy\core\shape_base.py", line 464, in stack raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape

D641593 commented 1 year ago

Hello, there seems to be an error while reading the annotation. Maybe the annonation of these images doesn't match the format. I guess it could start by checking the annotations for these images or try removing the part of the code that reads the annotations.