argman / EAST

A tensorflow implementation of EAST text detector
GNU General Public License v3.0
3.02k stars 1.05k forks source link

Training errors 'Cross point does not exist' #21

Closed rolai closed 7 years ago

rolai commented 7 years ago

When I train the model with dataset ICDAR2015, I meet the error:

Cross point does not exist
Traceback (most recent call last):
  File "/home/lairf/EAST/icdar.py", line 657, in generator
    score_map, geo_map, training_mask = generate_rbox((new_h, new_w), text_polys, text_tags)
  File "/home/lairf/EAST/icdar.py", line 520, in generate_rbox
    if point_dist_to_line(p1, new_p2, p0) > point_dist_to_line(p1, new_p2, p3):
  File "/home/lairf/EAST/icdar.py", line 248, in point_dist_to_line
    return np.linalg.norm(np.cross(p2 - p1, p1 - p3)) / np.linalg.norm(p2 - p1)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'

Why it happens? Does it influence the training result?

argman commented 7 years ago

@rolai , i think its cause by some unusual polygons(maybe concave), it does not influence the traning result.