JuliaWolleb / Diffusion-based-Segmentation

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

Custom loss function #49

Open yug125lk opened 1 year ago

yug125lk commented 1 year 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 1 year 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