wgcban / ddpm-cd

Remote Sensing Change Detection using Denoising Diffusion Probabilistic Models
https://www.wgcban.com/research#h.ar24vwqlm021
MIT License
247 stars 29 forks source link

A question about multi-scale feature representations #16

Closed yanzhiHu996 closed 1 year ago

yanzhiHu996 commented 1 year ago

Thank you for your great work! What part of the code did you get Multi-scale feature representations from the diffusion decoder?

wgcban commented 1 year ago

Hi @yanzhiHu996 Thank you for your interest in our work. We obtain the multi-scale feature representations from the diffusion model here: https://github.com/wgcban/ddpm-cd/blob/b0213c0049bab215e470326d97499ae69416a843/ddpm_cd.py#L123

which uses following function: https://github.com/wgcban/ddpm-cd/blob/b0213c0049bab215e470326d97499ae69416a843/model/model.py#L80-L92

where we save features during the forward pass here: https://github.com/wgcban/ddpm-cd/blob/b0213c0049bab215e470326d97499ae69416a843/model/ddpm_modules/unet.py#L220-L243