<commit_before># Examples of DeepLab

## Performance
DeepLab V3+

| Network backborn | Training | Evaluation | Eval scales | Reference | ChainerCV (weight conversion) |
|:-:|:-:|:-:|:-:|:-:|:-:|
| Xception65 | VOC2012 trainaug | VOC2012 val | (1.0,) |  82.36 % * |  82.36 % |
| Xception65 | Cityscapes train fine | Cityscapes val fine | (1.0,) | 79.12 % * | 79.14 % |

Scores are measured by mean Intersection over Union (mIoU).  
\*: Although the official repository reports a score of multi-scale prediciton, public pretrained graph is for single-scale prediction.
So we evaluated the pretrained graph using `eval_semantic_segmentation` in ChainerCV.

## Demo
This demo downloads Citåyscapes pretrained model automatically if a pretrained model path is not given.
```
$ python demo.py [--gpu <gpu>] [--pretrained-model <model_path>] [--input-size <size>] <image>.jpg
```


## Convert Tensorflow Frozen Graph
Convert `frozen_inference_graph.pb` distributed in official repository to `*.npz`. Some layers are renamed to fit ChainerCV.
Official repository is [here](https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md).

```
$ python tf2npz.py <task: {voc, cityscapes, ade20k}> path/to/frozen_inference_graph.pb <target>.npz
```


## Evaluation
The evaluation can be conducted using [`chainercv/examples/semantic_segmentation/eval_cityscapes.py`](https://github.com/chainer/chainercv/blob/master/examples/semantic_segmentation).


## References
1. <NAME> et al. "Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation" ECCV, 2018.
2. [official repository](https://github.com/tensorflow/models/tree/master/research/deeplab)<commit_msg>fix typo<commit_after># Examples of DeepLab

## Performance
DeepLab V3+

| Network backborn | Training | Evaluation | Eval scales | Reference | ChainerCV (weight conversion) |
|:-:|:-:|:-:|:-:|:-:|:-:|
| Xception65 | VOC2012 trainaug | VOC2012 val | (1.0,) |  82.36 % * |  82.36 % |
| Xception65 | Cityscapes train fine | Cityscapes val fine | (1.0,) | 79.12 % * | 79.14 % |

Scores are measured by mean Intersection over Union (mIoU).  
\*: Although the official repository reports a score of multi-scale prediciton, public pretrained graph is for single-scale prediction.
So we evaluated the pretrained graph using `eval_semantic_segmentation` in ChainerCV.

## Demo
This demo downloads Cityscapes pretrained model automatically if a pretrained model path is not given.
```
$ python demo.py [--gpu <gpu>] [--pretrained-model <model_path>] [--input-size <size>] <image>.jpg
```


## Convert Tensorflow Frozen Graph
Convert `frozen_inference_graph.pb` distributed in official repository to `*.npz`. Some layers are renamed to fit ChainerCV.
Official repository is [here](https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md).

```
$ python tf2npz.py <task: {voc, cityscapes, ade20k}> path/to/frozen_inference_graph.pb <target>.npz
```


## Evaluation
The evaluation can be conducted using [`chainercv/examples/semantic_segmentation/eval_cityscapes.py`](https://github.com/chainer/chainercv/blob/master/examples/semantic_segmentation).


## References
1. <NAME> et al. "Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation" ECCV, 2018.
2. [official repository](https://github.com/tensorflow/models/tree/master/research/deeplab)
{'fraction_non_alphanumeric': 0.12958579881656804, 'fraction_numerical': 0.02544378698224852, 'mean_word_length': 4.869791666666667, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481160', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1059, 'n_words': 308}