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

Error when run main.py in Table Structure Recognition #100

Open Enzoni opened 3 years ago

Enzoni commented 3 years ago

environment: ubuntu 18.04 python==3.6 pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 Config: cascade_mask_rcnn_hrnetv2p_w32_20e.py checkpoint: epoch_24.pth

When I run 'python main.py', folloing error pops up.

/home/vesper/anaconda3/envs/py36/lib/python3.6/site-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))

Ahmad-AlShalabi commented 3 years ago

I have a similar issue:

/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))

Did you get a chance to solve it?

Enzoni commented 3 years ago

I have a similar issue:

/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))

Did you get a chance to solve it?

No :( Please let me know if you figured out how to fix it.

Ahmad-AlShalabi commented 3 years ago

Replace all cv2.imshow with cv2_imshow but with only one arg which is the image, don't forget to import "from google.colab.patches import cv2_imshow" .

delete all cv2.waitKey(0).

Hopefully, it will work.

But unfortunately, the results don't match what represented in the repo.

Enzoni commented 3 years ago

Replace all cv2.imshow with cv2_imshow but with only one arg which is the image, don't forget to import "from google.colab.patches import cv2_imshow" .

delete all cv2.waitKey(0).

Hopefully, it will work.

But unfortunately, the results don't match what represented in the repo.

But I'm not using colab. I'm using PC.

Ahmad-AlShalabi commented 3 years ago

Try to comment imshow and waitKey functions