Computer Vision Lab Models FCN ResNet-50
FCN ResNet-50
Fully convolutional network
Knowledge card: the first fully convolutional network for semantic segmentation.
| Architecture | Fully convolutional network |
|---|---|
| Task | Segmentation |
| Training data | COCO 2017 (subset, VOC categories) |
| the number of parameters | 35,322,218 |
| Framework | PyTorch |
| File size | ≈135 MB |
| Licence | BSD-3-Clause (torchvision code) |
| Where it runs | Knowledge card only |
| Official source | pytorch.org |
| Official weights | download.pytorch.org |
Published metrics (from the official source, not measured by this site)
| Metric | Value | Evaluation data | Source |
|---|---|---|---|
| mIoU | 60.5 | COCO val2017 subset (VOC categories) | Source |
Architecture diagram
- Input / output
- Convolutional layer
- Pooling / resolution change
- Composite block
- Memory / intermediate features
- Output head
- Loss / training only
Detailed model explanation
Idea and intuition
Classification networks used to end with fully connected layers that lose the spatial structure. Long and colleagues observed that a fully connected layer is equivalent to a convolution with a kernel the size of the input map, so they replaced them with 1×1 convolutions, and the network became “fully convolutional” (FCN), accepting an image of any size and outputting a score map for each class, which is then upsampled to the image resolution. This made it possible to turn any pre-trained classifier into a semantic segmentation model trained end to end.
Architecture
- A ResNet-50 backbone; in the torchvision release the strides in the last two stages are replaced by dilated convolution, so the resolution stays at 1/8 instead of 1/32.
- The FCN head: a 3×3 convolution, then Dropout, then a 1×1 convolution to the number of classes.
- Bilinear upsampling to the input resolution.
- In the original paper (on VGG), skip connections from higher-resolution layers (FCN-16s and FCN-8s) were added to improve the edges.
Mathematical formulation
The per-pixel cross-entropy loss:
\mathcal L = -\frac{1}{|\Omega|}\sum_{p\in\Omega}\log \frac{e^{z_{p,y_p}}}{\sum_{c}e^{z_{p,c}}}where \Omega the set of pixels andz_{p,c} the score of class c at pixel p.
Performance
In torchvision: mIoU = 60.5 on a subset of COCO val2017 with the twenty VOC classes.
Strengths and limitations
- Strength: the founding idea of all modern segmentation models (U-Net, DeepLab and others).
- Strength: it accepts any input size.
- Limitation: coarse edges, because the final map is low-resolution and then upsampled.
- Limitation: limited global context; PSPNet and DeepLab addressed it with multi-scale pooling modules.
Uses
Teaching.
Runtime requirements
—
How to load
Not loaded.
References
- J. Long, E. Shelhamer, T. Darrell (2015).Fully convolutional networks for semantic segmentation. CVPR 2015. doi:10.1109/CVPR.2015.7298965
