You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In blessFunc.py borderless,Icame across this error:
MergedBoxes = []
for cellrow in cellBoxes2BeMerged:
cellrow = sorted(cellrow,key=lambda x: x[0])
cur_cell = -1
for c,cell in enumerate(cellrow):
if(cur_cell == -1):
cur_cell = cell
continue
if(len(cellrow)==1):
MergedBoxes.append(cell)
break
if(abs((cur_cell[0]+cur_cell[2])-cell[0]) < 10):
cur_cell[2] = cur_cell[2] + cell[2] + (cell[0]- (cur_cell[0]+cur_cell[2]))
if(cur_cell[3]<cell[3]):
cur_cell[3]=cell[3]
else:
cur_cell[2] = cur_cell[0]+cur_cell[2]
cur_cell[3] = cur_cell[1]+cur_cell[3]
MergedBoxes.append(cur_cell)
cur_cell = cell
cur_cell[2] = cur_cell[0]+cur_cell[2]
发生异常: TypeError
'int' object is not subscriptable
File "/home/mdisk1/tanjunwen/CascadeTabNet/Table_Structure_Recognition/Functions/blessFunc.py", line 260, in borderless
cur_cell[2] = cur_cell[0]+cur_cell[2]
File "/home/mdisk1/tanjunwen/CascadeTabNet/Table_Structure_Recognition/myown_infer.py", line 104, in
root.append(borderless(res,cv2.imread(filepath),res_cell))
TypeError: 'int' object is not subscriptable
what do it mean when cur_cell=-1? While I train and infer on my own dataset iFLYTAB,about 10% samples will raise this error,I just ignore these samples now.Could you please tell me how to fix this error??
The text was updated successfully, but these errors were encountered:
In blessFunc.py borderless,Icame across this error:
MergedBoxes = []
for cellrow in cellBoxes2BeMerged:
cellrow = sorted(cellrow,key=lambda x: x[0])
cur_cell = -1
for c,cell in enumerate(cellrow):
if(cur_cell == -1):
cur_cell = cell
continue
if(len(cellrow)==1):
MergedBoxes.append(cell)
break
if(abs((cur_cell[0]+cur_cell[2])-cell[0]) < 10):
cur_cell[2] = cur_cell[2] + cell[2] + (cell[0]- (cur_cell[0]+cur_cell[2]))
if(cur_cell[3]<cell[3]):
cur_cell[3]=cell[3]
else:
cur_cell[2] = cur_cell[0]+cur_cell[2]
cur_cell[3] = cur_cell[1]+cur_cell[3]
MergedBoxes.append(cur_cell)
cur_cell = cell
cur_cell[2] = cur_cell[0]+cur_cell[2]
发生异常: TypeError
'int' object is not subscriptable
File "/home/mdisk1/tanjunwen/CascadeTabNet/Table_Structure_Recognition/Functions/blessFunc.py", line 260, in borderless
cur_cell[2] = cur_cell[0]+cur_cell[2]
File "/home/mdisk1/tanjunwen/CascadeTabNet/Table_Structure_Recognition/myown_infer.py", line 104, in
root.append(borderless(res,cv2.imread(filepath),res_cell))
TypeError: 'int' object is not subscriptable
what do it mean when cur_cell=-1? While I train and infer on my own dataset iFLYTAB,about 10% samples will raise this error,I just ignore these samples now.Could you please tell me how to fix this error??
The text was updated successfully, but these errors were encountered: