yu20103983 / FOTS

FOTS tensorflow implementation, Include train and test, EAST+Rotate+CRNN. FOTS: Fast Oriented Text Spotting with a Unified Network
89 stars 35 forks source link

IndexError: too many indices for array #3

Closed kei6 closed 5 years ago

kei6 commented 5 years ago

Hi @yu20103983 , I run detectRecg in fots_testModel.py and faced with this error:

 File "/home/FOTS/multigpu_train.py", line 230, in main
    fots_testModel.detectRecg(d_images, sess=sess)
  File "/home/FOTS/FOTS/fots_testModel.py", line 222, in detectRecg
    para = restore_roiRotatePara(rbox)
  File "/home/FOTS/FOTS/dataset/dataReader.py", line 561, in restore_roiRotatePara
    rectange, rotate_angle = sort_rectangle(box)
  File "/home/FOTS/FOTS/dataset/dataReader.py", line 405, in sort_rectangle
    p_lowest = np.argmax(poly[:, 1])
IndexError: too many indices for array

It seems to have some problem with value-dimension, then it cannot use np.argmax(poly[:, 1])

Can you have any way to fix this? thanks in advance

kei6 commented 5 years ago

I've fix this error by: At detect function in fots_testModel.py, find result.append(box), replace box by box_