Paper commentary
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
ENet runs pixel-wise semantic segmentation in real time on low-power hardware
- Problem Earlier encoder-decoder segmentation networks need huge numbers of operations and parameters, so they run too slowly for real-time use on embedded devices. ENet is a compact network built to give low latency at similar accuracy.
- Method ENet uses a small encoder-decoder design with a large encoder, shrinking the input early through bottleneck blocks. The decoder is kept small, and dilated and asymmetric convolutions are used to recover context cheaply.
- Results ENet is up to 18× faster than existing models and needs 79× fewer parameters, with similar or better accuracy. On the NVIDIA TX1 at 640×360 it reaches 14.6 fps, versus 0.8 fps for SegNet.
Why existing segmentation networks are too slow
Pixel-wise segmentation assigns an object class to every pixel, and the applications that need it, such as wearables, home automation and self-driving vehicles, run on low-power hardware. Many of these uses need processing at rates higher than 10 fps, and the networks that existed at the time had huge parameter counts and long inference times.
Classification networks do well on categorization but give coarse spatial output, so segmentation pipelines often add refinement steps on top.
SegNet and fully convolutional networks both build on VGG16, a very large model designed for classification. SegNet-basic introduced the encoder-decoder pattern for this task, and the later SegNet dropped the fully connected layers of VGG16 to cut operations and memory, yet the authors state that none of these encoder-decoder networks can operate in real time.
Conditional random fields used as post-processing add cost, and according to the SegNet analysis they often miss classes that cover few pixels.
Large encoder, small decoder
ENet has an initial block, three encoder stages and two decoder stages, and the authors give the output size of each stage for a 512×512 example input. The decoder is kept small because its job is only to upsample the encoder output and refine details, whereas SegNet mirrors its encoder in the decoder.
The first two blocks shrink the input sharply and keep only a few feature maps, based on the idea that visual input is spatially redundant and that early layers should act as feature extractors rather than classifiers.
Downsampling has a cost: it loses spatial detail such as exact edge shape and forces equally strong upsampling later. The authors follow SegNet in storing max-pooling indices for unpooling because it saves memory, but they still limit downsampling because strong downsampling hurt accuracy. Downsampling also enlarges the receptive field, which gives context for telling apart classes such as rider and pedestrian, so the authors add context through dilated convolutions instead of further downsampling.
Bottleneck blocks and the initial block
A bottleneck module is a residual-style unit: a 1×1 convolution reduces the channels, a main convolution works on the reduced features, and a 1×1 convolution expands them again before the result is added back to the main branch. Batch Normalization and PReLU sit between the convolutions, and a downsampling bottleneck adds a max pooling layer to its main branch.
The initial block runs a 3×3 convolution with stride 2 next to a non-overlapping max pooling and concatenates the two outputs, which yields 16 feature maps. The authors found that pooling in parallel with a stride-2 convolution sped up inference time of the initial block 10 times, compared with the VGG-style order of pooling after a convolution that widens the feature depth.
In the original ResNet design, the first 1×1 projection of a downsampling branch uses stride 2 in both dimensions and so discards 75% of the input. ENet replaces that projection with a 2×2 convolution, which takes the full input into account at about 4× the cost of the layer, a cost the authors call unnoticeable because few such layers exist.
Each n×n convolution is factorized into an n×1 and a 1×n convolution, and ENet uses n = 5, so the pair costs about as much as one 3×3 convolution. The bottleneck itself can be seen as a low-rank approximation of one large convolution, and the non-linearities placed between its layers make the computed functions richer.
Dilated convolutions and regularization
Dilated convolutions replace the main convolution inside several bottleneck modules in the stages that work at the smallest resolutions. The best accuracy came from placing them between regular and asymmetric bottlenecks rather than stacking them in a row as in the cited dilated-convolution work.
Most pixel-wise segmentation datasets are small, with on the order of a thousand images, so the networks overfit them quickly. L2 weight decay gave little benefit, and stochastic depth helped; the authors then found that dropping whole branches is a special case of Spatial Dropout, which they placed at the end of convolutional branches before the addition.
In the authors' experiments this placement worked much better than stochastic depth. The Spatial Dropout probability is 0.01 before bottleneck2.0 and 0.1 after it.
What the learned PReLU weights suggest
Placing ReLU and Batch Normalization before convolutions, as a cited recent paper suggests, reduced ENet's accuracy. Removing most ReLUs in the early layers instead improved the results.
To understand why, the authors replaced every ReLU with a PReLU, which learns a negative slope for each feature map. They expected the slope to approach 1 where identity is preferred and to approach 0 where ReLU is preferred. Early-layer weights vary widely and lean positive; main-branch weights behave nearly like regular ReLUs; and weights inside the bottleneck modules are negative, so those functions invert and scale down negative values.
Decoder PReLU weights become much more positive and approach identity, which the authors read as confirmation that the decoder only fine-tunes the upsampled output. The authors hypothesize that identity does not work well in ENet because the network is shallow, while the original ResNets can be hundreds of layers deep and ENet needs to filter information quickly.
Two-stage training and class weights
ENet is trained with the Adam optimization algorithm in two stages: the encoder first learns to categorize downsampled regions, then the decoder is appended and the network learns upsampling and pixel-wise classification. The authors used a learning rate of 5e−4, an L2 weight decay of 2e−4 and a batch size of 10, which they found gave the best results.
Training on each dataset took 3-6 hours on four Titan X GPUs.
Class weights are defined with a logarithm of the class probability offset by the hyper-parameter c, which differs from inverse class probability weighting because the weights stay bounded as the probability approaches 0. The authors set c to 1.02, which restricts the class weights to the interval [1, 50].
Speed and size on TX1 and Titan X
The paper's headline comparison is up to 18× faster, 75× fewer FLOPs and 79× fewer parameters than existing models, with similar or better accuracy. Speed was measured with batch normalization and dropout merged into the convolution filters for all networks.
On the NVIDIA TX1 at 640×360, ENet takes 69 ms per frame (14.6 fps), while SegNet takes 1251 ms (0.8 fps). At 480×320, ENet reaches 21.1 fps at 47 ms per frame, and the network was designed to exceed 10 fps on TX1 at 640×360. SegNet has no TX1 measurement at 1280×720 because of memory limits.
On the NVIDIA Titan X at 640×360, ENet takes 7 ms (135.4 fps) per frame, against 69 ms (14.6 fps) for SegNet. At 1920×1080 on the same GPU, ENet takes 46 ms (21.6 fps), where SegNet takes 637 ms (1.6 fps).
Stored in fp16, ENet's model is 0.7 MB and SegNet's is 56.2 MB, and the authors describe the gap as about two orders of magnitude.
Accuracy against SegNet on three datasets
On the Cityscapes test set, ENet reaches a class IoU of 58.3 against 56.1 for SegNet and a category IoU of 80.4 against 79.8. Its class iIoU is 34.4 against 34.2 for SegNet, but its category iIoU is 64.0 against 66.4. The authors describe ENet as the fastest model on the Cityscapes benchmark.
CamVid images were downsampled from 960×720 to 480×360 before training, and the set has 367 training images. On the CamVid test set, ENet reaches a class average accuracy of 68.3 against 65.2 for SegNet, while its class IoU is 51.3 against 55.6 for SegNet; SegNet-Basic has a class average of 62.9 and no class IoU reported. The authors state that ENet outperforms the other models in six classes and link these to smaller objects.
The authors argue that the close class average accuracy shows ENet separates smaller objects nearly as well as SegNet, and they state that ENet is nearly 20× faster than SegNet on embedded platforms.
Limitations
Factorizing convolutions cut FLOPs and parameters but increased the number of small kernel calls, and for very cheap operations the kernel launch cost can outweigh the computation. PReLU layers consume more than a quarter of ENet's inference time, which the authors attribute, as a hypothesis, to data movement between kernels. The authors propose kernel fusion and expect GPU library improvements such as cuDNN to help.
Accuracy is reported on three datasets, with Cityscapes trained on 19 classes, CamVid on eleven object classes plus an ignored unlabeled class, and SUN RGB-D on RGB data only. Direct comparisons use only SegNet, and speed and size tables compare only ENet and SegNet. Model compression was not applied, although the authors note it could still be combined with ENet.
Paper info
- Authors
- Adam Paszke, Abhishek Chaurasia, Sangpil Kim, Eugenio Culurciello
- Venue
- arXiv · Preprint
- First published
- 2016-6-7
- Added
- 2026-11-12
- Updated
- 2016-6-7
- Version
- v1
- arXiv
- 1606.02147
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Adam Paszke, Abhishek Chaurasia, Sangpil Kim, Eugenio Culurciello (2016). ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation. arXiv:1606.02147v1. https://arxiv.org/abs/1606.02147v1
BibTeX
@misc{paszke2016enet,
title = {{ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation}},
author = {Adam Paszke and Abhishek Chaurasia and Sangpil Kim and Eugenio Culurciello},
year = {2016},
eprint = {1606.02147},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1606.02147v1}
}