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"
from mmdet.apis import init_detector, inference_detector, show_result_pyplot
import mmcv
# Load model
config_file = 'CascadeTabNet/Config/cascade_mask_rcnn_hrnetv2p_w32_20e.py'
checkpoint_file = 'epoch_36.pth'
model = init_detector(config_file, checkpoint_file, device='cuda:0')
# Test a single image
img = "CascadeTabNet/Demo/demo.png"
# Run Inference
result = inference_detector(model, img)
# Visualization results
show_result_pyplot(img, result,('Bordered', 'cell', 'Borderless'), score_thr=0.85)
This piece of code written in your colab notebook runs well and gives the desired result.
But when run in azure gives the following errors
OSError: epoch_36.pth is not a checkpoint file
I had downloaded the epoch_36.pth file from google drive link used in the colab notebook.
This piece of code written in your colab notebook runs well and gives the desired result. But when run in azure gives the following errors
OSError: epoch_36.pth is not a checkpoint file
I had downloaded the epoch_36.pth file from google drive link used in the colab notebook.Could you please clarify this. Thanks