ADer (https://arxiv.org/abs/2406.03262) is an open source visual anomaly detection toolbox based on PyTorch, which supports multiple popular AD datasets and approaches.
It seems that the model saves the weights in the format net_xxx.pth during training. However, during testing, I made the following modifications according to your method:
`self.model_t = Namespace()
self.model_t.name = 'vit_small_patch16_224_dino'
self.model_t.kwargs = dict(pretrained=False, checkpoint_path= 'model/pretrain/net_100.pth', pretrained_strict=False, strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12])
But an error occurred during execution:
RuntimeError: Error(s) in loading state_dict for ViT_Encoder:`,"Clearly, the weight file does not match the model input."。
"Could you please advise me on how to resolve this? Thank you in advance for your response."
It seems that the model saves the weights in the format net_xxx.pth during training. However, during testing, I made the following modifications according to your method: `self.model_t = Namespace() self.model_t.name = 'vit_small_patch16_224_dino' self.model_t.kwargs = dict(pretrained=False, checkpoint_path= 'model/pretrain/net_100.pth', pretrained_strict=False, strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12])
self.model_t.kwargs = dict(pretrained=True, checkpoint_path='', strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12])
But an error occurred during execution:
RuntimeError:
Error(s) in loading state_dict for ViT_Encoder:`,"Clearly, the weight file does not match the model input."。 "Could you please advise me on how to resolve this? Thank you in advance for your response."