在执行python finetune_autoencoder.py命令时报错,checkpoints文件夹为空
Closed this issue · 7 comments
Possibly you need to download the kl-f8.zip for the checkpoint. And you should create a path 'data/mvtecad/' where the directory is the same as the original MVTec-AD setting. Or you could change your dataset path in the finetune_autoencoder.py file. Or you could download our Pretrained Model.
|-- root
|-- data
|-- mvtecad
|-- bottle
|-- ground_truth
|-- broken_large
|-- 000_mask.png
|-- broken_small
|-- 000_mask.png
|-- contamination
|-- 000_mask.png
|-- test
|-- broken_large
|-- 000.png
|-- broken_small
|-- 000.png
|-- contamination
|-- 000.png
|-- good
|-- 000.png
|-- train
|-- good
|-- 000.png
|-- train.json
|-- test.json
It seems that your network cannot download the pretrained resnet50 model from timm, where in File "/root/DiAD-main/ldm/models/diffusion/ddpm.py", line 484, in on_validation_epoch_start
pretrained_model = timm.create_model("resnet50", pretrained=True, features_only=True).
One solution is that you could download the pretrained model first and put it in your path and revise the code:
pretrained_model = timm.create_model("resnet50", pretrained=False, checkpoint_path=your_path, features_only=True).
try: pretrained_model = timm.create_model("resnet50", pretrained=False, checkpoint_path='/root/autodl-tmp/models/resnet50_a1_0-14fe96d1.pth', strict=False, features_only=True)
Or you could try to keep the original code and move the rresnet50_a1_0-14fe96d1.pth pretrained model to the path: "....../.cache/torch/hub/checkpoints"