pytorch-segmentation-detection icon indicating copy to clipboard operation
pytorch-segmentation-detection copied to clipboard

Difference Between Semantic Segmentation and Image Classification

Open mugdhapolimera opened this issue 7 years ago • 0 comments

I'm new to implementing CNNs and I'm trying to understand how a model knows whether to perform semantic classification (pixelwise) or image classification (one class per image). As far as I can see, the only difference is in the models/resnet_dilated.py file in the lines resnet34_8s.fc = nn.Conv2d(resnet34_8s.inplanes, num_classes, 1)

whereas most other codes have it as resnet34_8s.fc = nn.Conv2d(resnet34_8s.fc.in_features, num_classes)

Is this the difference between returning a logits of shape [batch x num_classes x H x W] and [batch x num_classes]?

mugdhapolimera avatar Jul 19 '18 18:07 mugdhapolimera