DNN - Segmentation
Semantic segmentation will create a color coded mask for each recognized class, the classes and colors are defined in separate files with correlating indices.
Colors are defined as RGB with values separated by spaces.
Example classes file:
Unlabeled
Road
Sidewalk
Building
Example color file:
0 0 0
128 64 128
244 35 232
70 70 70
See Deep Learning in OpenCV for information about supported frameworks and supported layers.
Some tested models with parameters:
| Model | Config | Classes | Colors | Size (W x H) | Mean | Scale | RGB |
|---|---|---|---|---|---|---|---|
| ENet model | no config file | enet classes | enet colors | 512 x 256 | 0, 0, 0 | 0.00392 | true |
| FCN8s model | FCN8s config | pascal classes | pascal colos | 500 x 500 | 0, 0, 0 | 1.0 | false |