JiaquanYe / TableMASTER-mmocr

2nd solution of ICDAR 2021 Competition on Scientific Literature Parsing, Task B.
Apache License 2.0
410 stars 100 forks source link

model_inference return_loss = True #45

Open yuumiin opened 2 years ago

yuumiin commented 2 years ago

TableMASTER-mmocr/mmocr/apis/inference.py

I want to change the parameter in the model_inference function my code `# forward the model with torch.no_grad(): results = model(return_loss=True, **data)

but, no "text" in img_metas keys !!

img_metas result: [[{'filename': None, 'ori_shape': (857, 1501, 3), 'img_shape': (274, 480, 3), 'scale_factor': (0.31971995332555425, 0.31978680879413723), 'img_norm_cfg': {'mean': [0.5, 0.5, 0.5], 'std': [0.5, 0.5, 0.5]}, 'ori_filename': None, 'pad_shape': (480, 480, 3)}]]

help me~!!