sjtuplayer / anomalydiffusion

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

mask generation #40

Open TerryMelody opened 3 months ago

TerryMelody commented 3 months ago

In generate_mask.py, can I use "logs/anomaly-checkpoints/checkpoints/embeddings.pt"(the results of main.py) instead of “logs/mask-checkpoints/cable-bent_wire/checkpoints/embeddings.pt”(the results of train_mask.py)? I don't know the functions of train_mask.py. It seems that only main.py can learn the mask generation.

DonghoonPark12 commented 2 months ago

In generate_mask.py It use “logs/mask-checkpoints/cable-bent_wire/checkpoints/embeddings.pt” which is made by train_mask.py.

train_mask.py generate embedding.pt <-- ('sample'=True, 'inpaint'=False) main.py genereate embedding.pt <-- ('sample'=False, 'inpaint'=True)

Notice me any question.