Open laster-lee opened 7 months ago
i have the same question have you solved it?
i have the same question have you solved it?我有同样的问题,你解决了吗?
没解决,后面我自己训练模型了,用自己的数据集
you need execuate with --checkpoint pretrained=
example:
python read.py --checkpoint pretrained=vitstr --images ./demo_images/art-01107.jpg ./demo_images/coco-1166773.jpg
meanwhile ,you need update read.py args with --checkpoints , such as :
additionally , utils.py has urls of model you could update url with the local dir.
Traceback (most recent call last): File "e:\kc_infer\kc_test.py", line 7, in
parseq = load_from_checkpoint("./parseq_tiny.pt").eval()
File "e:\kc_infer\strhub\models\utils.py", line 92, in load_from_checkpoint
model = ModelClass.load_from_checkpoint(checkpoint_path, *kwargs)
File "D:\anaconda3\envs\kc_infer\lib\site-packages\pytorch_lightning\utilities\model_helpers.py", line 125, in wrapper
return self.method(cls, args, **kwargs)
File "D:\anaconda3\envs\kc_infer\lib\site-packages\pytorch_lightning\core\module.py", line 1581, in load_from_checkpoint
loaded = _load_from_checkpoint(
File "D:\anaconda3\envs\kc_infer\lib\site-packages\pytorch_lightning\core\saving.py", line 66, in _load_from_checkpoint
checkpoint = _pl_migrate_checkpoint(
File "D:\anaconda3\envs\kc_infer\lib\site-packages\pytorch_lightning\utilities\migration\utils.py", line 143, in _pl_migrate_checkpoint
old_version = _get_version(checkpoint)
File "D:\anaconda3\envs\kc_infer\lib\site-packages\pytorch_lightning\utilities\migration\utils.py", line 164, in _get_version
return checkpoint["pytorch-lightning_version"]
KeyError: 'pytorch-lightning_version'