I encountered an issue while trying to run the demo script. It failed with an error related to incompatible architecture. I’m not sure if I’ve missed some specific setup steps.
My command: python3 demo.py --fd_model spf_models/MN3_antispoof.xml --spf_model spf_models/MN3_antispoof.pth.tar --cam_id 0 --config configs/config.py
Models in google drive link. I tried every models/ pretrain model and every config. I got fault:
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MobileNetV3:
size mismatch for spoof_type.3.weight: copying a param with shape torch.Size([11, 1280]) from checkpoint, the shape in current model is torch.Size([10, 1280]).
size mismatch for spoof_type.3.bias: copying a param with shape torch.Size([11]) from checkpoint, the shape in current model is torch.Size([10]).
Would you be able to kindly share the correct commands or instructions to properly run the demo?
I encountered an issue while trying to run the demo script. It failed with an error related to incompatible architecture. I’m not sure if I’ve missed some specific setup steps.
My command: python3 demo.py --fd_model spf_models/MN3_antispoof.xml --spf_model spf_models/MN3_antispoof.pth.tar --cam_id 0 --config configs/config.py
Models in google drive link. I tried every models/ pretrain model and every config. I got fault:
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MobileNetV3:
size mismatch for spoof_type.3.weight: copying a param with shape torch.Size([11, 1280]) from checkpoint, the shape in current model is torch.Size([10, 1280]).
size mismatch for spoof_type.3.bias: copying a param with shape torch.Size([11]) from checkpoint, the shape in current model is torch.Size([10]).
Would you be able to kindly share the correct commands or instructions to properly run the demo?