NilsB98 / Diffusion-Based-AD

Diffusion Based Anomaly Detection.
1 stars 1 forks source link

Image Patching #12

Closed NilsB98 closed 10 months ago

NilsB98 commented 10 months ago

Instead of downsamling the original image split it into multiple patches which can be passed through the model in parallel within a batch.

E.g. having an image of size of 1024x1024:

  1. Train a model on image size 128x128 1.1 On random crops 1.2 On grid based crops 1.3 Try to add positional embedding (similar to timestamp embedding, but for image patch location ) (not necessary for uniform textures instead of objects, e.g. leather vs hazelnut)
  2. During anomaly detection split 1024x1024 image into 64 128x128 patches
  3. Run the image patches as a batch through the model
  4. Join patches and resume with high-res input and reconstruction
NilsB98 commented 10 months ago

Done