tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.29k stars 608 forks source link

Fix an error in calculating SIFID #156

Closed DonghweeYoon closed 2 years ago

DonghweeYoon commented 2 years ago

I got the same issue with #155.

In the current code, the SIFID is calculated from the activation before the first pooling layer. To calculate the SIFID as described in the paper, the following modifications are required.

https://github.com/tamarott/SinGAN/blob/286d3cd51cc327381737844d330348ec97577e60/SIFID/inception.py#L53 If 'dims' is set to 64, 'self.last_needed_block' is set to 0.

https://github.com/tamarott/SinGAN/blob/286d3cd51cc327381737844d330348ec97577e60/SIFID/inception.py#L62-L79 Then the input feature map only passed through 'block0'. It doesn't go through the first max-pooling layer.