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

Eval Error #8

Open
tm1412 opened this issue Nov 4, 2023 · 1 comment
Open

Eval Error #8

tm1412 opened this issue Nov 4, 2023 · 1 comment

Comments

@tm1412
Copy link

tm1412 commented Nov 4, 2023

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

D641593 commented Nov 4, 2023

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.

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