FCN in a single file: the Caffe detox for semantic segmentation
A self-contained TensorFlow port of Fully Convolutional Networks that ditches Caffe dependencies entirely.

What it does
Implements FCN32, FCN16, and FCN8 for semantic segmentation in one TensorFlow file. Loads pretrained VGG16 weights via NumPy—no Caffe, no Caffe-TensorFlow converter, no dependency archaeology. You get a ready-to-finetune network, not a pretrained model that actually works out of the box.
The interesting bit
The deconvolution layers initialize as bilinear upsampling, and TensorFlow’s built-in shape handling eliminates the original Caffe crop layer entirely. It’s a small portability win that quietly removes a common headache in porting FCN implementations.
Key highlights
- Single-file implementation (
vgg16.py) with FCN32/16/8 variants - VGG16 weights loaded directly from
.npyvia NumPy—no Caffe toolchain - Deconv layers use bilinear upsampling initialization
- Supports arbitrary input dimensions:
[None, h, w, 3] - Finetuning helper:
random_init_fc8=Truereinitializes the classifier head for your class count
Caveats
- Requires TensorFlow ≥ 1.0rc (the README includes a nostalgic GPU wheel URL from 2017)
- No Pascal VOC finetuned weights included; out-of-box results are “rather coarse”
- No general training code provided—author points to KittiSeg and TensorVision for that
Verdict
Grab this if you need a clean, hackable FCN baseline in pure TensorFlow and don’t mind doing your own training. Skip it if you want pretrained weights that actually segment things well today, or if you’re allergic to legacy TF 1.x code.