JuliaWolleb / Diffusion-based-Segmentation

This is the official Pytorch implementation of the paper "Diffusion Models for Implicit Image Segmentation Ensembles".
MIT License
271 stars 35 forks source link

Custom loss function #49

Open yug125lk opened 9 months ago

yug125lk commented 9 months ago

Hi, thank you for sharing this impressive work! I have a question: how can I train the model using a custom loss function that compares the generated image with the ground truth? Thank you in advance.

JuliaWolleb commented 8 months ago

Hi

We based our diffusion model on this work Diffusion Models beat GANs. There the loss function is defined as an MSE loss between added and predicted noise. It has shown to be stable. If you still want to change it, you can change it here