sjtuplayer / anomalydiffusion

[AAAI 2024] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model
MIT License
160 stars 25 forks source link

Questions about the anomaly embedding #71

Open Jaeihk opened 2 months ago

Jaeihk commented 2 months ago

In this paper, it says k=8 tokens for random embedding, but when I actually checked embeddings.pt , it's [4,1280], is k=4 correct?

image

embedding_dict = torch.load("./embeddings_gs-299999.pt") Shape: torch.Size([4, 1280])

sjtuplayer commented 1 month ago

In this paper, it says k=8 tokens for random embedding, but when I actually checked embeddings.pt , it's [4,1280], is k=4 correct?

image

embedding_dict = torch.load("./embeddings_gs-299999.pt") Shape: torch.Size([4, 1280])

The provided embedding.pt is correct, since the length only has a very tiny influence on results. You can just use it.

Jaeihk commented 1 month ago

Thank you for your answer. Can you upload the code for calculating IS score? Thank you.