sachinraja13 / TabStructNet

Other
127 stars 31 forks source link

Getting error loading pretrained models #11

Open sureshreddy-puthireddy opened 3 years ago

sureshreddy-puthireddy commented 3 years ago

Hi sir, I cloned the repository latest one, I have downloaded the latest models and annotation files from the drive links. I created a new virtual environment with python version 3.6, installed python setup.py install, and also installed requirements here attaching the requiremnets.txt file. requirements.txt

the issue I'm getting while loading the model model = modellib.MaskRCNN(mode="inference", config=config, model_dir='/TabStructNet/trained_model/tab/logs/') model.load_weights('/mask_rcnn_tab_0120.h5',by_name=True) (or) model.load_weights('/mask_rcnn_tab_0120.h5',by_name=False) result = model.detect([image],verbose=1)

Layer #385 (named "mrcnn_class_logits"), weight <tf.Variable 'mrcnn_class_logits/kernel:0' shape=(1024, 1) dtype=float32_ref> has shape (1024, 1), but the saved weight has shape (1024, 2)

Can you please suggest the right approach.....

sureshreddy-puthireddy commented 3 years ago

@sachinraja13 Can you suggest right approach