MediaBrain-SJTU / RegAD

[ECCV2022 Oral] Registration based Few-Shot Anomaly Detection
MIT License
277 stars 40 forks source link

不能运行python test.py --obj bottle --shot 2 --stn_mode rotation_scale #4

Closed xqyd closed 2 years ago

xqyd commented 2 years ago

win11编程环境。

按照要求下载了所有tar文件,想办法将其解压(添加.gz后缀),所有的checkpoints预训练权重都是pca字样的(如bottle_2_pca_rotation_scale_model.pt),但是代码中是不带pca字样的,CKPT_name = f'./save_checkpoints/rotationscale/{args.shot}/{args.obj}/{args.obj}{args.shot}_rotation_scale_model.pt',

故将其改为CKPT_name = f'./savecheckpoints/{args.shot}/{args.obj}/{args.obj}{args.shot}_pca_rotation_scale_model.pt'之后,运行到STN.load_state_dict(model_CKPT['STN'])报错: KeyError: 'STN'

请问如何解决,谢谢!

chaoqinhuang commented 2 years ago

Sorry but please use the updated links to download the correct checkpoints: https://drive.google.com/file/d/1guZBh40btPRmxcnY_lud88V1NoT-eWWX/view?usp=sharing

xqyd commented 2 years ago

Thx! It works!