CascadeTabNet icon indicating copy to clipboard operation
CascadeTabNet copied to clipboard

Error when run main.py in Table Structure Recognition

Open Enzoni opened this issue 4 years ago • 5 comments

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

Enzoni avatar Nov 29 '20 17:11 Enzoni

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?

Ahmad-AlShalabi avatar Dec 06 '20 08:12 Ahmad-AlShalabi

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.

Enzoni avatar Dec 07 '20 02:12 Enzoni

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.

Ahmad-AlShalabi avatar Dec 07 '20 11:12 Ahmad-AlShalabi

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.

Enzoni avatar Dec 07 '20 11:12 Enzoni

Try to comment imshow and waitKey functions

Ahmad-AlShalabi avatar Dec 07 '20 12:12 Ahmad-AlShalabi