Denoising diffusion models for out-of-distribution detection