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

Polygon reshaping error from eval.py with ic15_resnet18_deform_thre.yaml #261

Closed
mattroos opened this issue Jun 1, 2021 · 5 comments
Closed

Comments

@mattroos
Copy link

mattroos commented Jun 1, 2021

I'm trying to replicate the evaluation of the ResNet18 model on ICDAR 2015.

CUDA_VISIBLE_DEVICES=0 python eval.py experiments/seg_detector/ic15_resnet18_deform_thre.yaml \
--resume ./ic15_resnet18 \
--box_thresh 0.55

I get this error from the DataLoader:

ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/mroos/python_envs/env_torch/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/mroos/python_envs/env_torch/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/mroos/python_envs/env_torch/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/mroos/Code/DB/data/image_dataset.py", line 100, in __getitem__
    data = data_process(data)
  File "/home/mroos/Code/DB/data/processes/data_process.py", line 9, in __call__
    return self.process(data)
  File "/home/mroos/Code/DB/data/processes/augment_data.py", line 46, in process
    self.may_augment_annotation(aug, data, shape)
  File "/home/mroos/Code/DB/data/processes/augment_data.py", line 72, in may_augment_annotation
    new_polys = np.array([p.x, p.y] for p in keypoints).reshape([-1, 4, 2])
ValueError: cannot reshape array of size 1 into shape (4,2)

Any suggestions?

@mattroos
Copy link
Author

mattroos commented Jun 1, 2021

@jiangxiluning I believe your commit from yesterday is causing this, FYI.
I reverted to the older version of augment_data.py and then it ran as expected (and gave the proper evaluation scores).

@jiangxiluning
Copy link
Contributor

sorry about it, i wiil fix it as soon as possible.

@jiangxiluning
Copy link
Contributor

@mattroos hi brother, just check this #263 .

@mattroos
Copy link
Author

mattroos commented Jun 2, 2021

No problem. It happens. Thanks!

@mattroos mattroos closed this as completed Jun 2, 2021
@gioipv
Copy link

gioipv commented Jun 28, 2021

Hello, Thank you @jiangxiluning , but i see that.
This commit https://github.com/MhLiao/DB/pull/263/commits not updated yet on master branch.

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

3 participants