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.47k stars 422 forks source link

max() arg is an empty sequence #43

Closed Etisti closed 4 years ago

Etisti commented 4 years ago

Hi, I encountered this problem on testing the model epoch_13 pbepoch13borje3 on this image borjje_2001_3_HD

AyanGadpal commented 4 years ago

Hey @Etisti , I am assuming that by epoch 13 you mean "Table Bank Both table detection". You are getting this error because the model had predicted nothing. (found 0 tables) As for your test image with epoch 13. and 85% threshold, this is the result. result Another thing I want to point out is "Table Bank Both table detection" is only trained for table detection and will only output 1 class

show_result_pyplot(img, result,('Table'), score_thr=0.85)

Hope this resolves your issue, :)

PurveshChhajed commented 3 years ago

Hey @Etisti , I am assuming that by epoch 13 you mean "Table Bank Both table detection". You are getting this error because the model had predicted nothing. (found 0 tables) As for your test image with epoch 13. and 85% threshold, this is the result. result Another thing I want to point out is "Table Bank Both table detection" is only trained for table detection and will only output 1 class

show_result_pyplot(img, result,('Table'), score_thr=0.85)

Hope this resolves your issue, :)

using show_result_pyplot(img, result,('Table'), score_thr=0.85) for epoch_13

giving me this.

/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:2506: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode))

AssertionError Traceback (most recent call last)

in () 11 print("*****************************************************************") 12 result = inference_detector(model, img) ---> 13 show_result_pyplot(img, result,('Table'), score_thr=0.85) 1 frames /content/mmdetection/mmdet/apis/inference.py in show_result_pyplot(img, result, class_names, score_thr, fig_size) 203 """ 204 img = show_result( --> 205 img, result, class_names, score_thr=score_thr, show=False) 206 plt.figure(figsize=fig_size) 207 plt.imshow(mmcv.bgr2rgb(img)) /content/mmdetection/mmdet/apis/inference.py in show_result(img, result, class_names, score_thr, wait_time, show, out_file) 141 visualized image is returned, otherwise None is returned. 142 """ --> 143 assert isinstance(class_names, (tuple, list)) 144 img = mmcv.imread(img) 145 img = img.copy() AssertionError: I only want to detect tables Thanks,