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

error when resuming training icdar2015 #12

Open
eyebies opened this issue Feb 16, 2020 · 5 comments
Open

error when resuming training icdar2015 #12

eyebies opened this issue Feb 16, 2020 · 5 comments

Comments

@eyebies
Copy link

eyebies commented Feb 16, 2020

Firstly, Thanks for sharing the code.
2. Train with ICDAR15
I am trying to resume training on icdar2015 and I run into the following issue
text-detection-fots.pytorch/datasets.py", line 93, in transform
intersected_quad -= crop_point
ValueError: operands could not be broadcast together with shapes (0,) (2,) (0,)
Some of the quads seem to be empty. Could I ignore those and continue. May I ask if how you fixed it? Or am I missing anything
I modified the dataset to icdar, and followed your other instructions!
thanks!

@Wovchena
Copy link
Owner

Hi, @eyebies.
intersected_quad is not supposed to be empty because of for quad_id, quad in enumerate(quads). The loop iterates over the first dimension of quads array, so quad must have something, it can't be an empty array.

I think there are two possible reasons:

  1. shapely.geometry.Polygon.intersection() does something that corrupts intersected_polygon, but leaves it of type Polygon. I tried running training, and it works (Shapely==1.6.4.post2).
  2. You have modified datasets.py. Originally intersected_quad -= crop_point is at line 92, but for you the line is 93. May be the change is lethal for the script :)

@eyebies
Copy link
Author

eyebies commented Feb 17, 2020

Thanks for your response! ! I will check that.

@ZenFSheng
Copy link

Thanks for your response! ! I will check that.

Excuse me,have you fix it?I got the same error.

@Zhang-ze-peng
Copy link

Zhang-ze-peng commented Aug 25, 2020

Thanks for your response! ! I will check that.

Excuse me,have you fix it?I got the same error.

Hi,I got the same error, too. And I try to change the version of Shapely to Shapely==1.6.4.post2, which is same as the author's. Then it works.

@johnnylili
Copy link

Thanks for your response! ! I will check that.

Excuse me,have you fix it?I got the same error.

Hello, I also encountered the same problem, how did you solve it?

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

5 participants