AdvancedLiterateMachinery icon indicating copy to clipboard operation
AdvancedLiterateMachinery copied to clipboard

VGT模型配置中,VOCAB_SIZE也许应该为30522而不是30552

Open likenxy opened this issue 1 year ago • 0 comments

下载Readme中D4LA对应模型,并执行inference.py

python inference.py \ --image_root 'xxx' \ --grid_root 'xxx' \ --image_name 'budget_0000022278' \ --dataset D4LA \ --output_root output/ \ --config Configs/cascade/D4LA_VGT_cascade_PTM.yaml \ --opts MODEL.WEIGHTS model/D4LA_VGT_model.pth \ MODEL.WORDGRID.USE_PRETRAIN_WEIGHT False

产生一条警告,且输出的图片中没有任何检测结果:

Skip loading parameter 'Wordgrid_embedding.embedding.weight' to the model due to incompatible shapes: (30522, 768) in the checkpoint but (30552, 768) in the model! You might want to double check if this is expected.

修改yaml文件中的VOCAB_SIZE为30522后,不再产生警告,并且输出图片有了检测结果框。

likenxy avatar Dec 13 '23 09:12 likenxy