Skip to content

Commit 03f0bc9

Browse files
authored
Update README.md
1 parent e3be831 commit 03f0bc9

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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-
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/
4+
This model was tested 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/
55

66

77
### Visualizations
@@ -15,31 +15,35 @@ Note that the gifs may be out of sync if the network doesn't load them together.
1515

1616

1717
### Contents
18+
- **enet.py**: The ENet model definition, including the argument scope.
1819

20+
- **train_enet.py**: The file for training. Includes saving of images for visualization and tunable hyperparameters.
1921

22+
- **test_enet.py**: The file for evaluating on the test dataset. Includes option to visualize images as well.
2023

24+
- **preprocessing.py**: The preprocessing does just image resizing, just in case anyone wants to use a smaller image size due to memory issues or for other datasets.
2125

26+
- **predict_segmentation.py**: Obtains the segmentation output for visualization purposes. You can create your own gif with these outputs.
2227

28+
- **get_class_weights.py**: The file to obtain either the median frequency balancing class weights, or the custom ENet function class weights.
2329

2430

25-
**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.
2631

2732

28-
### Training Arguments
2933

34+
**Note:** To use the checkpoint model, please set the argument `--stage_two_repeat=3` in both `train_enet.py` and `test_enet.py` as the checkpoint was trained on a slightly deeper version of ENet using 3 stage_two bottleneck series instead of the default 2.
3035

3136

32-
### Evaluation Arguments
33-
3437
### Important Notes
3538
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).
3639

3740
2. Batch normalization and 2D Spatial Dropout are still retained during testing for good performance.
3841

3942
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.
4043

41-
4. The residual
44+
4. On the labels and colouring scheme: The dataset consists of only 12 labels, with the road-marking class merged with the road class. The last class is the unlabelled class.
4245

46+
5. No preprocessing is done to the images for ENet. (see references below on clarifications with author),
4347

4448
### Implementation and Architectural Changes
4549
1. By default, skip connections are added to connect the corresponding encoder and decoder portions for better performance.
@@ -48,8 +52,7 @@ Note that the gifs may be out of sync if the network doesn't load them together.
4852

4953
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).
5054

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.
52-
55+
4. To obtain the class weights for computing the weighted loss, Median Frequency Balancing (MFB) is used by default 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.
5356

5457
### References
5558
1. [ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation](https://arxiv.org/pdf/1606.02147.pdf)
@@ -58,3 +61,4 @@ Note that the gifs may be out of sync if the network doesn't load them together.
5861
4. [Clarifications from ENet author](https://github.com/e-lab/ENet-training/issues/56)
5962
5. [Original Torch implementation of ENet](https://github.com/e-lab/ENet-training)
6063
6. [ResNet paper for clarification on residual bottlenecks](https://arxiv.org/pdf/1512.03385.pdf)
64+
7. [Colouring scheme](https://github.com/alexgkendall/SegNet-Tutorial/blob/c922cc4a4fcc7ce279dd998fb2d4a8703f34ebd7/Scripts/test_segmentation_camvid.py)

0 commit comments

Comments
 (0)