Skip to content

Commit e3be831

Browse files
authored
Update README.md
1 parent 63e07cd commit e3be831

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,60 @@
11
# TensorFlow-ENet
22
TensorFlow implementation of [**ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation**](https://arxiv.org/pdf/1606.02147.pdf).
33

4-
![CamVid Test Dataset Output](https://github.com/kwotsin/TensorFlow-ENet/blob/master/visualizations/original.gif) ![CamVid Test Dataset Output](https://github.com/kwotsin/TensorFlow-ENet/blob/master/visualizations/output.gif)
4+
This model was tested only on the CamVid dataset with street scenes taken from Cambridge, UK. For more information, please visit: http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/
5+
6+
7+
### Visualizations
8+
Note that the gifs may be out of sync if the network doesn't load them together. You can refresh your page to see them in sync.
9+
10+
##### Original Video Input
11+
![CamVid Test Dataset Output](https://github.com/kwotsin/TensorFlow-ENet/blob/master/visualizations/original.gif)
12+
13+
##### Test Dataset Output
14+
![CamVid Test Dataset Output](https://github.com/kwotsin/TensorFlow-ENet/blob/master/visualizations/output.gif)
15+
16+
517
### Contents
618

719

8-
### Important Notes
9-
As the Max Unpooling layer is not officially available from TensorFlow, a manual implementation was used to build the decoder portion of the network. This was based on the implementation suggested in this [TensorFlow github issue](https://github.com/tensorflow/tensorflow/issues/2169).
1020

11-
Batch normalization and 2D Spatial Dropout are still retained during testing for good performance.
21+
22+
23+
1224

1325
**Note:** To use the checkpoint model, please set the `stage_two_repeat=3` as the checkpoint was trained on a slightly deeper version of ENet.
1426

27+
28+
### Training Arguments
29+
30+
31+
32+
### Evaluation Arguments
33+
34+
### Important Notes
35+
1. As the Max Unpooling layer is not officially available from TensorFlow, a manual implementation was used to build the decoder portion of the network. This was based on the implementation suggested in this [TensorFlow github issue](https://github.com/tensorflow/tensorflow/issues/2169).
36+
37+
2. Batch normalization and 2D Spatial Dropout are still retained during testing for good performance.
38+
39+
3. Class weights are used to tackle the problem of imbalanced classes, as certain classes appear more dominantly than others. More notably, the background class has weight of 0.0, in order to not reward the model for predicting background.
40+
41+
4. The residual
42+
43+
1544
### Implementation and Architectural Changes
1645
1. By default, skip connections are added to connect the corresponding encoder and decoder portions for better performance.
46+
1747
2. The number of initial blocks and the depth of stage 2 residual bottlenecks are tunable hyperparameters, to allow you to build a deeper network if required, since ENet is rather lightweight.
48+
1849
3. Fused batch normalization is used over standard batch normalization for faster computations. See [TensorFlow's best practices](https://www.tensorflow.org/performance/performance_guide).
19-
4. To obtain the class weights for computing the weighted loss, Median Frequency Balancing (MFB) is used instead of the custom ENet class weighting function. This is due to an observation that MFB gives a slightly better performance than the custom function, perhaps due to implementation differences. However, the option of obtaining the ENet custom class weights is still possible via the `get_class_weights.py` file.
50+
51+
4. To obtain the class weights for computing the weighted loss, Median Frequency Balancing (MFB) is used instead of the custom ENet class weighting function. This is due to an observation that MFB gives a slightly better performance than the custom function, at least on my machine. However, the option of using the ENet custom class weights is still possible.
2052

2153

2254
### References
2355
1. [ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation](https://arxiv.org/pdf/1606.02147.pdf)
2456
2. [Implementation of Max Unpooling](https://github.com/tensorflow/tensorflow/issues/2169)
2557
3. [Implementation of PReLU](https://stackoverflow.com/questions/39975676/how-to-implement-prelu-activation-in-tensorflow)
2658
4. [Clarifications from ENet author](https://github.com/e-lab/ENet-training/issues/56)
59+
5. [Original Torch implementation of ENet](https://github.com/e-lab/ENet-training)
60+
6. [ResNet paper for clarification on residual bottlenecks](https://arxiv.org/pdf/1512.03385.pdf)

0 commit comments

Comments
 (0)