DevashishPrasad / CascadeTabNet

This repository contains the code and implementation details of the CascadeTabNet paper "CascadeTabNet: An approach for end to end table detection and structure recognition from image-based documents"
MIT License
1.49k stars 427 forks source link

Index Error #57

Closed Atul997 closed 4 years ago

Atul997 commented 4 years ago

I trained model on custom dataset and used provided post processing scripts. It runs well for some images and after it throws following error -

IndexError                                Traceback (most recent call last)

<ipython-input-55-e7faa605ebe9> in <module>()
 37             for no,res in enumerate(res_bless):
 38                 # borderless(res,cv2.imread(i),res_cell)
 ---> 39                 root.append(borderless(res,cv2.imread(i),res_cell))
 40 
 41     myfile = open(xmlPath+i.split('/')[-1][:-3]+'xml', "w")

1 frames

/content/drive/My Drive/CascadeTabNet/Table Structure Recognition/Functions/blessFunc.py in rowend(val)
339     def rowend(val):
340       r = 0
--> 341       while(val > _row_[r]):
342         r += 1
343       if r-1 == -1:

IndexError: list index out of range`
DevashishPrasad commented 4 years ago

@kshitijkapadni if you can have a look at this issue?

kshitijkapadni commented 4 years ago

I have fixed the bug. Thanks for pointing it out @Atul997 , just a validation was to be added.