Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Add different downsampling methods to PatchGAN discriminator #475

Description

@StijnvWijn

Dear Monai Team,

I have been working on generating synthetic images using a SPADE GAN similar to this paper using the monai library and I noticed that your implementation of the PatchGAN discriminator differs slightly from theirs and the official implementation. The main difference is that instead of using a pooling kernel to change the receptive field, you seem to use an increasing amount of layers. I have done some experiments and for my use case, it seems that having a pooling operation improves my results. So my question is the following:

  • Do you want me to create a PR to add the option for including a pooling operation or was there a reason for the current implementation?

Activity

  1. marksgraham commented on Mar 19, 2024

    @marksgraham
    Collaborator

    Hi,

    I think your proposed change would be good, as long as default behaviour doesn't change with the update, please go ahead with the PR :)

    Tagging @virginiafdez in case she has any comments too

  2. virginiafdez commented on Mar 19, 2024

    @virginiafdez
    Contributor

    Hi! If I remember correctly, we changed the official implementation to make it compatible with other works that were part of the initial set of models that drove the start of this repo. These models used Patch-GAN, but not the pix2pixHD version, hence the difference. However, as long as the defaults don't change, it is great to have alternatives, especially if there's evidence that a certain combination of parameters leads to better results. Thanks!

  3. StijnvWijn commented on Mar 25, 2024

    @StijnvWijn
    ContributorAuthor

    Implemented in pull request #479 I was just unsure about whether to make the kernel size for the pooling operations another parameter or whether to stick with the same kernel size as the convolutions. For now I did the latter, let me know if you think another approach is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions