CascadeTabNet icon indicating copy to clipboard operation
CascadeTabNet copied to clipboard

Results are not accurate when using MMdet 2.x version

Open Renat2001 opened this issue 3 years ago • 6 comments

Hi everyone! There is a problem with performance when using MMdet 2.x version. I used cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py config file. Also I updated checkpoint file epoch_36.pth with upgrade_model_version.py script. But anyways I am getting not accurate results. Table box is kind of shifted from its actual position. Steps to reproduce:

!pip install -U openmim
!mim install mmcv-full
!pip install mmdet
!pip uninstall opencv-python-headless==4.5.5.62
!pip install opencv-python-headless==4.1.2.30
import cv2 as cv
import numpy as np
from mmdet.apis import init_detector, inference_detector, show_result_pyplot
import mmcv
# Load model
config_file = '/content/drive/MyDrive/CascadeTabNet/cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py'
checkpoint_file = '/content/drive/MyDrive/CascadeTabNet/epoch_36_updated.pth'
model = init_detector(config_file, checkpoint_file, device='cuda:0')

# Test a single image 
img = "/content/drive/MyDrive/table_detection/data/handwritten/handwritten_image_9.png"

# Run Inference
result = inference_detector(model, img)

# Visualization results
show_result_pyplot(model, img, result, score_thr=0.50)

image

Renat2001 avatar Jul 05 '22 04:07 Renat2001

same issue here

Kivin1 avatar Jul 28 '22 06:07 Kivin1

Is there any resolution to this issue. I am also facing the same issue with MMdet 2.1 version

sid321axn avatar Nov 01 '22 05:11 sid321axn

Same issue here! cascadetabnet_output

np-n avatar Nov 21 '22 07:11 np-n

I also run the image in Example/ using mmdet 2.26, the output xml is different from the example xml. There are also no cells, only table coord points image

Jsooooooo avatar Dec 12 '22 06:12 Jsooooooo

Maybe because some weights are truncated when model migration is processed?

marculera avatar Jan 30 '23 15:01 marculera

This guide helps dealing with this issue: https://github.com/open-mmlab/mmdetection/tree/master/configs/legacy_1.x

marculera avatar Feb 14 '23 12:02 marculera