Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The label of output by the discriminator is inconsistent with the label of the dataset #34

Open
Wzj-zju opened this issue Aug 31, 2022 · 1 comment

Comments

@Wzj-zju
Copy link

Wzj-zju commented Aug 31, 2022

Hi, I'm trying to use OASIS discriminator with my own dataset's semantic segmantation. In short, my ground truth onehot segmantation has 3 channels, and it is shaped like: channel 0: background, channel 1: human, and channel 2 for the fake pixel label as paper said. But when calculate cross entropy loss, the target label seems to have been processed into an one channel label like: 1:background, 2:human whenis_real=Trueor 0: fake when is_real=False. The model still works properly, but the predicted semantic segmentation display order is not quite correct when visualizing.
Can you please tell me if my process is correct, any suggestions would be very helpful, thanks.

@SushkoVadim
Copy link
Contributor

Hi,

The fake class should not exist in your dataset. Fake class is used for generated images, but not for real images from the dataset. Thus, your dataset is likely to have channels: 0 - background, 1 - human. (N=2)
The output of the discriminator has N+1=3 channels (as paper said). The fake class is assigned id=0 for simplicity in our implementation.
Thus it becomes 0 - fake, 1 - background, 2 - human.

If the model works properly, then it is probably fine, and no fix is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants