CascadeTabNet icon indicating copy to clipboard operation
CascadeTabNet copied to clipboard

TypeError: CascadeRCNN: __init__() got an unexpected keyword argument 'num_stages'

Open ajay311517104001 opened this issue 4 years ago • 9 comments

getting this TypeError

ajay311517104001 avatar May 20 '21 05:05 ajay311517104001

I have the same problem

birdzzzz avatar May 27 '21 06:05 birdzzzz

I am also getting the same problem.

ZafarShadman09 avatar Jun 02 '21 09:06 ZafarShadman09

In the collab where inference is made, use that dependencies, this solved my issue. !pip install torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html !pip install -q mmcv terminaltables !git clone --branch v1.2.0 'https://github.com/open-mmlab/mmdetection.git' %cd "mmdetection" !pip install -r "/content/mmdetection/requirements/optional.txt" !python setup.py install !python setup.py develop !pip install -r {"requirements.txt"} !pip install pillow==6.2.1 [SOLVED]

ZafarShadman09 avatar Jun 03 '21 05:06 ZafarShadman09

I assume you are using MMDetection Version 2.*, if yes then change the config file i.e from cascade_mask_rcnn_hrnetv2p_w32_20e.py to cascade_mask_rcnn_hrnetv2p_w32_20e**_v2**.py You can find the config files in the below link https://github.com/DevashishPrasad/CascadeTabNet/tree/master/Config

I hope this will resolve your issue.

kmanojkkmr avatar Jun 11 '21 09:06 kmanojkkmr

Just use config file: cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py. and then update checkpoints file with Tools/upgrade_model_version.py. done!

Alex-lubo avatar Nov 09 '21 10:11 Alex-lubo

fixed by updating config_file to cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py. and then upgrading the version of the model by running !python /content/CascadeTabNet/Tools/upgrade_model_version.py /content/epoch_36.pth /content/new_epoch_36.pth, and set checkpoint_file to /content/new_epoch_36.pth.

np-n avatar Nov 17 '22 08:11 np-n

oh its useful for me! I have try many version of torch, cuda, mmdet, mmcv

Jsooooooo avatar Dec 12 '22 03:12 Jsooooooo

@np-n

fixed by updating config_file to cascade_mask_rcnn_hrnetv2p_w32_20e_v2.py. and then upgrading the version of the model by running !python /content/CascadeTabNet/Tools/upgrade_model_version.py /content/epoch_36.pth /content/new_epoch_36.pth, and set checkpoint_file to /content/new_epoch_36.pth.

Based on the above method, the issue got fixed. But while plotting its throwing the below error

image

How can I fix this??

Pravin770 avatar Aug 08 '23 12:08 Pravin770

@Pravin770 , you have to change the argument of the show_result_pyplot() from show_result_pyplot(img, result,('Bordered', 'cell', 'Borderless'), score_thr=0.85) to show_result_pyplot(model, img, result, score_thr=0.85).

np-n avatar Aug 08 '23 14:08 np-n