mohitzsh / adversarial-semisupervised-semantic-segmentation Goto Github PK
View Code? Open in Web Editor NEWPytorch Implementation of "Adversarial Learning For Semi-Supervised Semantic Segmentation" for ICLR 2018 Reproducibility Challenge
Pytorch Implementation of "Adversarial Learning For Semi-Supervised Semantic Segmentation" for ICLR 2018 Reproducibility Challenge
This is not an issue, i just fail to understand how is the dicsriminator loss calculated. In traditional GAN you'd label the fake image( segmentation output) as 0 and the groundtruth as 1, this is the vector you use as a "label" for the discriminator. What do we use in this case since the classification of fake or real is done pixel-wise? Do we create label maps of H×W×C full of ones for the groundtruth and full of zeros for the segmentation masks? I dont see how this would work..
This is not an issue. Just discussion about some key idea of the paper that you are implementing.
As the traditional GAN, the discriminator tries to distinguish the input as real or fake value. It works as the classification problem with two labels: fake and real, thus the last layer will be a connected layer. Meanwhile, the proposed method replace the last layer by 1x1 convolution that provides spatial maps (likes FCN)- they called fully convolutional layer.
The key difference as I think that is the input of proposed discriminator. With inputs are ground-truth and score map (provides by generator), the proposed discriminator results in a confidence maps-which indicates how much different between ground-truth and score map. But I did not understand how can they obtain confidence maps? Can I obtain confidence map if I feed two inputs ground-truth and score map to FCN network (normal case of FCN are ground-truth and raw image->output is score map)? Thanks so much
In that paper mentioned, "After obtaining the initial segmentation prediction of the unlabeled image from the segmentation network, we obtain a confidence map by passing the segmentation prediction through the discriminator network.". It means confidence map only provided when we use the unlabeled image. Could we obtain confidence map using images that have labels?
File "eval2.py", line 109, in
main()
File "eval2.py", line 80, in main
generator.load_state_dict(saved_net)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ResNet:
Missing key(s) in state_dict: "conv1.weight", "bn1.running_var", "bn1.bias", "bn1.weight", "bn1.running_mean", "layer1.0.conv1.weight", "layer1.0.bn1.running_var", "layer1.0.bn1.bias", "layer1.0.bn1.weight", "layer1.0.bn1.running_mean", "layer1.0.conv2.weight", "layer1.0.bn2.running_var", "layer1.0.bn2.bias", "layer1.0.bn2.weight", "layer1.0.bn2.running_mean", "layer1.0.conv3.weight", "layer1.0.bn3.running_var", "layer1.0.bn3.bias", "layer1.0.bn3.weight", "layer1.0.bn3.running_mean", "layer1.0.downsample.0.weight", "layer1.0.downsample.1.running_var", "layer1.0.downsample.1.bias", "layer1.0.downsample.1.weight", "layer1.0.downsample.1.running_mean", "layer1.1.conv1.weight", "layer1.1.bn1.running_var", "layer1.1.bn1.bias", "layer1.1.bn1.weight", "layer1.1.bn1.running_mean", "layer1.1.conv2.weight", "layer1.1.bn2.running_var", "layer1.1.bn2.bias", "layer1.1.bn2.weight", "layer1.1.bn2.running_mean", "layer1.1.conv3.weight", "layer1.1.bn3.running_var", "layer1.1.bn3.bias", "layer1.1.bn3.weight", "layer1.1.bn3.running_mean", "layer1.2.conv1.weight", "layer1.2.bn1.running_var", "layer1.2.bn1.bias", "layer1.2.bn1.weight", "layer1.2.bn1.running_mean", "layer1.2.conv2.weight", "layer1.2.bn2.running_var", "layer1.2.bn2.bias", "layer1.2.bn2.weight", "layer1.2.bn2.running_mean", "layer1.2.conv3.weight", "layer1.2.bn3.running_var", "layer1.2.bn3.bias", "layer1.2.bn3.weight", "layer1.2.bn3.running_mean", "layer2.0.conv1.weight", "layer2.0.bn1.running_var", "layer2.0.bn1.bias", "layer2.0.bn1.weight", "layer2.0.bn1.running_mean", "layer2.0.conv2.weight", "layer2.0.bn2.running_var", "layer2.0.bn2.bias", "layer2.0.bn2.weight", "layer2.0.bn2.running_mean", "layer2.0.conv3.weight", "layer2.0.bn3.running_var", "layer2.0.bn3.bias", "layer2.0.bn3.weight", "layer2.0.bn3.running_mean", "layer2.0.downsample.0.weight", "layer2.0.downsample.1.running_var", "layer2.0.downsample.1.bias", "layer2.0.downsample.1.weight", "layer2.0.downsample.1.running_mean", "layer2.1.conv1.weight", "layer2.1.bn1.running_var", "layer2.1.bn1.bias", "layer2.1.bn1.weight", "layer2.1.bn1.running_mean", "layer2.1.conv2.weight", "layer2.1.bn2.running_var", "layer2.1.bn2.bias", "layer2.1.bn2.weight", "layer2.1.bn2.running_mean", "layer2.1.conv3.weight", "layer2.1.bn3.running_var", "layer2.1.bn3.bias", "layer2.1.bn3.weight", "layer2.1.bn3.running_mean", "layer2.2.conv1.weight", "layer2.2.bn1.running_var", "layer2.2.bn1.bias", "layer2.2.bn1.weight", "layer2.2.bn1.running_mean", "layer2.2.conv2.weight", "layer2.2.bn2.running_var", "layer2.2.bn2.bias", "layer2.2.bn2.weight", "layer2.2.bn2.running_mean", "layer2.2.conv3.weight", "layer2.2.bn3.running_var", "layer2.2.bn3.bias", "layer2.2.bn3.weight", "layer2.2.bn3.running_mean", "layer2.3.conv1.weight", "layer2.3.bn1.running_var", "layer2.3.bn1.bias", "layer2.3.bn1.weight", "layer2.3.bn1.running_mean", "layer2.3.conv2.weight", "layer2.3.bn2.running_var", "layer2.3.bn2.bias", "layer2.3.bn2.weight", "layer2.3.bn2.running_mean", "layer2.3.conv3.weight", "layer2.3.bn3.running_var", "layer2.3.bn3.bias", "layer2.3.bn3.weight", "layer2.3.bn3.running_mean", "layer3.0.conv1.weight", "layer3.0.bn1.running_var", "layer3.0.bn1.bias", "layer3.0.bn1.weight", "layer3.0.bn1.running_mean", "layer3.0.conv2.weight", "layer3.0.bn2.running_var", "layer3.0.bn2.bias", "layer3.0.bn2.weight", "layer3.0.bn2.running_mean", "layer3.0.conv3.weight", "layer3.0.bn3.running_var", "layer3.0.bn3.bias", "layer3.0.bn3.weight", "layer3.0.bn3.running_mean", "layer3.0.downsample.0.weight", "layer3.0.downsample.1.running_var", "layer3.0.downsample.1.bias", "layer3.0.downsample.1.weight", "layer3.0.downsample.1.running_mean", "layer3.1.conv1.weight", "layer3.1.bn1.running_var", "layer3.1.bn1.bias", "layer3.1.bn1.weight", "layer3.1.bn1.running_mean", "layer3.1.conv2.weight", "layer3.1.bn2.running_var", "layer3.1.bn2.bias", "layer3.1.bn2.weight", "layer3.1.bn2.running_mean", "layer3.1.conv3.weight", "layer3.1.bn3.running_var", "layer3.1.bn3.bias", "layer3.1.bn3.weight", "layer3.1.bn3.running_mean", "layer3.2.conv1.weight", "layer3.2.bn1.running_var", "layer3.2.bn1.bias", "layer3.2.bn1.weight", "layer3.2.bn1.running_mean", "layer3.2.conv2.weight", "layer3.2.bn2.running_var", "layer3.2.bn2.bias", "layer3.2.bn2.weight", "layer3.2.bn2.running_mean", "layer3.2.conv3.weight", "layer3.2.bn3.running_var", "layer3.2.bn3.bias", "layer3.2.bn3.weight", "layer3.2.bn3.running_mean", "layer3.3.conv1.weight", "layer3.3.bn1.running_var", "layer3.3.bn1.bias", "layer3.3.bn1.weight", "layer3.3.bn1.running_mean", "layer3.3.conv2.weight", "layer3.3.bn2.running_var", "layer3.3.bn2.bias", "layer3.3.bn2.weight", "layer3.3.bn2.running_mean", "layer3.3.conv3.weight", "layer3.3.bn3.running_var", "layer3.3.bn3.bias", "layer3.3.bn3.weight", "layer3.3.bn3.running_mean", "layer3.4.conv1.weight", "layer3.4.bn1.running_var", "layer3.4.bn1.bias", "layer3.4.bn1.weight", "layer3.4.bn1.running_mean", "layer3.4.conv2.weight", "layer3.4.bn2.running_var", "layer3.4.bn2.bias", "layer3.4.bn2.weight", "layer3.4.bn2.running_mean", "layer3.4.conv3.weight", "layer3.4.bn3.running_var", "layer3.4.bn3.bias", "layer3.4.bn3.weight", "layer3.4.bn3.running_mean", "layer3.5.conv1.weight", "layer3.5.bn1.running_var", "layer3.5.bn1.bias", "layer3.5.bn1.weight", "layer3.5.bn1.running_mean", "layer3.5.conv2.weight", "layer3.5.bn2.running_var", "layer3.5.bn2.bias", "layer3.5.bn2.weight", "layer3.5.bn2.running_mean", "layer3.5.conv3.weight", "layer3.5.bn3.running_var", "layer3.5.bn3.bias", "layer3.5.bn3.weight", "layer3.5.bn3.running_mean", "layer3.6.conv1.weight", "layer3.6.bn1.running_var", "layer3.6.bn1.bias", "layer3.6.bn1.weight", "layer3.6.bn1.running_mean", "layer3.6.conv2.weight", "layer3.6.bn2.running_var", "layer3.6.bn2.bias", "layer3.6.bn2.weight", "layer3.6.bn2.running_mean", "layer3.6.conv3.weight", "layer3.6.bn3.running_var", "layer3.6.bn3.bias", "layer3.6.bn3.weight", "layer3.6.bn3.running_mean", "layer3.7.conv1.weight", "layer3.7.bn1.running_var", "layer3.7.bn1.bias", "layer3.7.bn1.weight", "layer3.7.bn1.running_mean", "layer3.7.conv2.weight", "layer3.7.bn2.running_var", "layer3.7.bn2.bias", "layer3.7.bn2.weight", "layer3.7.bn2.running_mean", "layer3.7.conv3.weight", "layer3.7.bn3.running_var", "layer3.7.bn3.bias", "layer3.7.bn3.weight", "layer3.7.bn3.running_mean", "layer3.8.conv1.weight", "layer3.8.bn1.running_var", "layer3.8.bn1.bias", "layer3.8.bn1.weight", "layer3.8.bn1.running_mean", "layer3.8.conv2.weight", "layer3.8.bn2.running_var", "layer3.8.bn2.bias", "layer3.8.bn2.weight", "layer3.8.bn2.running_mean", "layer3.8.conv3.weight", "layer3.8.bn3.running_var", "layer3.8.bn3.bias", "layer3.8.bn3.weight", "layer3.8.bn3.running_mean", "layer3.9.conv1.weight", "layer3.9.bn1.running_var", "layer3.9.bn1.bias", "layer3.9.bn1.weight", "layer3.9.bn1.running_mean", "layer3.9.conv2.weight", "layer3.9.bn2.running_var", "layer3.9.bn2.bias", "layer3.9.bn2.weight", "layer3.9.bn2.running_mean", "layer3.9.conv3.weight", "layer3.9.bn3.running_var", "layer3.9.bn3.bias", "layer3.9.bn3.weight", "layer3.9.bn3.running_mean", "layer3.10.conv1.weight", "layer3.10.bn1.running_var", "layer3.10.bn1.bias", "layer3.10.bn1.weight", "layer3.10.bn1.running_mean", "layer3.10.conv2.weight", "layer3.10.bn2.running_var", "layer3.10.bn2.bias", "layer3.10.bn2.weight", "layer3.10.bn2.running_mean", "layer3.10.conv3.weight", "layer3.10.bn3.running_var", "layer3.10.bn3.bias", "layer3.10.bn3.weight", "layer3.10.bn3.running_mean", "layer3.11.conv1.weight", "layer3.11.bn1.running_var", "layer3.11.bn1.bias", "layer3.11.bn1.weight", "layer3.11.bn1.running_mean", "layer3.11.conv2.weight", "layer3.11.bn2.running_var", "layer3.11.bn2.bias", "layer3.11.bn2.weight", "layer3.11.bn2.running_mean", "layer3.11.conv3.weight", "layer3.11.bn3.running_var", "layer3.11.bn3.bias", "layer3.11.bn3.weight", "layer3.11.bn3.running_mean", "layer3.12.conv1.weight", "layer3.12.bn1.running_var", "layer3.12.bn1.bias", "layer3.12.bn1.weight", "layer3.12.bn1.running_mean", "layer3.12.conv2.weight", "layer3.12.bn2.running_var", "layer3.12.bn2.bias", "layer3.12.bn2.weight", "layer3.12.bn2.running_mean", "layer3.12.conv3.weight", "layer3.12.bn3.running_var", "layer3.12.bn3.bias", "layer3.12.bn3.weight", "layer3.12.bn3.running_mean", "layer3.13.conv1.weight", "layer3.13.bn1.running_var", "layer3.13.bn1.bias", "layer3.13.bn1.weight", "layer3.13.bn1.running_mean", "layer3.13.conv2.weight", "layer3.13.bn2.running_var", "layer3.13.bn2.bias", "layer3.13.bn2.weight", "layer3.13.bn2.running_mean", "layer3.13.conv3.weight", "layer3.13.bn3.running_var", "layer3.13.bn3.bias", "layer3.13.bn3.weight", "layer3.13.bn3.running_mean", "layer3.14.conv1.weight", "layer3.14.bn1.running_var", "layer3.14.bn1.bias", "layer3.14.bn1.weight", "layer3.14.bn1.running_mean", "layer3.14.conv2.weight", "layer3.14.bn2.running_var", "layer3.14.bn2.bias", "layer3.14.bn2.weight", "layer3.14.bn2.running_mean", "layer3.14.conv3.weight", "layer3.14.bn3.running_var", "layer3.14.bn3.bias", "layer3.14.bn3.weight", "layer3.14.bn3.running_mean", "layer3.15.conv1.weight", "layer3.15.bn1.running_var", "layer3.15.bn1.bias", "layer3.15.bn1.weight", "layer3.15.bn1.running_mean", "layer3.15.conv2.weight", "layer3.15.bn2.running_var", "layer3.15.bn2.bias", "layer3.15.bn2.weight", "layer3.15.bn2.running_mean", "layer3.15.conv3.weight", "layer3.15.bn3.running_var", "layer3.15.bn3.bias", "layer3.15.bn3.weight", "layer3.15.bn3.running_mean", "layer3.16.conv1.weight", "layer3.16.bn1.running_var", "layer3.16.bn1.bias", "layer3.16.bn1.weight", "layer3.16.bn1.running_mean", "layer3.16.conv2.weight", "layer3.16.bn2.running_var", "layer3.16.bn2.bias", "layer3.16.bn2.weight", "layer3.16.bn2.running_mean", "layer3.16.conv3.weight", "layer3.16.bn3.running_var", "layer3.16.bn3.bias", "layer3.16.bn3.weight", "layer3.16.bn3.running_mean", "layer3.17.conv1.weight", "layer3.17.bn1.running_var", "layer3.17.bn1.bias", "layer3.17.bn1.weight", "layer3.17.bn1.running_mean", "layer3.17.conv2.weight", "layer3.17.bn2.running_var", "layer3.17.bn2.bias", "layer3.17.bn2.weight", "layer3.17.bn2.running_mean", "layer3.17.conv3.weight", "layer3.17.bn3.running_var", "layer3.17.bn3.bias", "layer3.17.bn3.weight", "layer3.17.bn3.running_mean", "layer3.18.conv1.weight", "layer3.18.bn1.running_var", "layer3.18.bn1.bias", "layer3.18.bn1.weight", "layer3.18.bn1.running_mean", "layer3.18.conv2.weight", "layer3.18.bn2.running_var", "layer3.18.bn2.bias", "layer3.18.bn2.weight", "layer3.18.bn2.running_mean", "layer3.18.conv3.weight", "layer3.18.bn3.running_var", "layer3.18.bn3.bias", "layer3.18.bn3.weight", "layer3.18.bn3.running_mean", "layer3.19.conv1.weight", "layer3.19.bn1.running_var", "layer3.19.bn1.bias", "layer3.19.bn1.weight", "layer3.19.bn1.running_mean", "layer3.19.conv2.weight", "layer3.19.bn2.running_var", "layer3.19.bn2.bias", "layer3.19.bn2.weight", "layer3.19.bn2.running_mean", "layer3.19.conv3.weight", "layer3.19.bn3.running_var", "layer3.19.bn3.bias", "layer3.19.bn3.weight", "layer3.19.bn3.running_mean", "layer3.20.conv1.weight", "layer3.20.bn1.running_var", "layer3.20.bn1.bias", "layer3.20.bn1.weight", "layer3.20.bn1.running_mean", "layer3.20.conv2.weight", "layer3.20.bn2.running_var", "layer3.20.bn2.bias", "layer3.20.bn2.weight", "layer3.20.bn2.running_mean", "layer3.20.conv3.weight", "layer3.20.bn3.running_var", "layer3.20.bn3.bias", "layer3.20.bn3.weight", "layer3.20.bn3.running_mean", "layer3.21.conv1.weight", "layer3.21.bn1.running_var", "layer3.21.bn1.bias", "layer3.21.bn1.weight", "layer3.21.bn1.running_mean", "layer3.21.conv2.weight", "layer3.21.bn2.running_var", "layer3.21.bn2.bias", "layer3.21.bn2.weight", "layer3.21.bn2.running_mean", "layer3.21.conv3.weight", "layer3.21.bn3.running_var", "layer3.21.bn3.bias", "layer3.21.bn3.weight", "layer3.21.bn3.running_mean", "layer3.22.conv1.weight", "layer3.22.bn1.running_var", "layer3.22.bn1.bias", "layer3.22.bn1.weight", "layer3.22.bn1.running_mean", "layer3.22.conv2.weight", "layer3.22.bn2.running_var", "layer3.22.bn2.bias", "layer3.22.bn2.weight", "layer3.22.bn2.running_mean", "layer3.22.conv3.weight", "layer3.22.bn3.running_var", "layer3.22.bn3.bias", "layer3.22.bn3.weight", "layer3.22.bn3.running_mean", "layer4.0.conv1.weight", "layer4.0.bn1.running_var", "layer4.0.bn1.bias", "layer4.0.bn1.weight", "layer4.0.bn1.running_mean", "layer4.0.conv2.weight", "layer4.0.bn2.running_var", "layer4.0.bn2.bias", "layer4.0.bn2.weight", "layer4.0.bn2.running_mean", "layer4.0.conv3.weight", "layer4.0.bn3.running_var", "layer4.0.bn3.bias", "layer4.0.bn3.weight", "layer4.0.bn3.running_mean", "layer4.0.downsample.0.weight", "layer4.0.downsample.1.running_var", "layer4.0.downsample.1.bias", "layer4.0.downsample.1.weight", "layer4.0.downsample.1.running_mean", "layer4.1.conv1.weight", "layer4.1.bn1.running_var", "layer4.1.bn1.bias", "layer4.1.bn1.weight", "layer4.1.bn1.running_mean", "layer4.1.conv2.weight", "layer4.1.bn2.running_var", "layer4.1.bn2.bias", "layer4.1.bn2.weight", "layer4.1.bn2.running_mean", "layer4.1.conv3.weight", "layer4.1.bn3.running_var", "layer4.1.bn3.bias", "layer4.1.bn3.weight", "layer4.1.bn3.running_mean", "layer4.2.conv1.weight", "layer4.2.bn1.running_var", "layer4.2.bn1.bias", "layer4.2.bn1.weight", "layer4.2.bn1.running_mean", "layer4.2.conv2.weight", "layer4.2.bn2.running_var", "layer4.2.bn2.bias", "layer4.2.bn2.weight", "layer4.2.bn2.running_mean", "layer4.2.conv3.weight", "layer4.2.bn3.running_var", "layer4.2.bn3.bias", "layer4.2.bn3.weight", "layer4.2.bn3.running_mean", "layer5.conv2d_list.0.bias", "layer5.conv2d_list.0.weight", "layer5.conv2d_list.1.bias", "layer5.conv2d_list.1.weight", "layer5.conv2d_list.2.bias", "layer5.conv2d_list.2.weight", "layer5.conv2d_list.3.bias", "layer5.conv2d_list.3.weight".
Unexpected key(s) in state_dict: "".
It's a interesting work.
Could you provide any pre-trained model so that i can reproduce the result in the paper?
As you mentioned, you just focusing on Pascal VOC dataset. However, I hope you can also provide cityscape implementation. It is very useful for me who works on the self-driving. Good job
I am trying to run the train file. In the code there is a line,-
parser.add_argument("prefix",
help="Prefix to identify current experiment")
What should be the argument "prefix", we need to provide?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.