This is an implementation of ICNet in TensorFlow for semantic segmentation on the cityscapes dataset. We first convert weight from Original Code by using caffe-tensorflow framework.
Get restore checkpoint from Google Drive and put into model directory.
To get result on your own images, use the following command:
python inference.py --img-path=./input/test.png
List of Args:
--model=train - To select train_30k model (Default)
--model=trainval - To select trainval_90k model
Inference time: ~0.02s, I have no idea why it's faster than caffe implementation
Perform in single-scaled model on the cityscapes validation datase.
| Model | Accuracy | Missing accuracy |
|---|---|---|
| train_30k | 65.3/67.7 | 2.4% |
| trainval_90k | 78.06% | None |
To get evaluation result, you need to download Cityscape dataset from Official website first. Then change DATA_DIRECTORY to your dataset path in evaluate.py:
DATA_DIRECTORY = /Path/to/dataset
Then run the following command:
python evaluate.py
List of Args:
--model=train - To select train_30k model (Default)
--model=trainval - To select trainval_90k model
--measure-time - Calculate inference time (e.q subtract preprocessing time)
| Input image | Output image |
|---|---|
![]() |
![]() |
![]() |
![]() |
@article{zhao2017icnet,
author = {Hengshuang Zhao and
Xiaojuan Qi and
Xiaoyong Shen and
Jianping Shi and
Jiaya Jia},
title = {ICNet for Real-Time Semantic Segmentation on High-Resolution Images},
journal={arXiv preprint arXiv:1704.08545},
year = {2017}
}



