text-detection-fots.pytorch icon indicating copy to clipboard operation
text-detection-fots.pytorch copied to clipboard

error when resuming training icdar2015

Open eyebies opened this issue 5 years ago • 5 comments

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!

eyebies avatar Feb 16 '20 07:02 eyebies

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 :)

Wovchena avatar Feb 17 '20 11:02 Wovchena

Thanks for your response! ! I will check that.

eyebies avatar Feb 17 '20 19:02 eyebies

Thanks for your response! ! I will check that.

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

ZenFSheng avatar May 19 '20 14:05 ZenFSheng

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.

Zhang-ze-peng avatar Aug 25 '20 13:08 Zhang-ze-peng

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?

johnnylili avatar Sep 16 '20 09:09 johnnylili