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:

ModelConfigClassesColorsSize (W x H)MeanScaleRGB
ENet modelno config fileenet classesenet colors512 x 2560, 0, 00.00392true
FCN8s modelFCN8s configpascal classespascal colos500 x 5000, 0, 01.0false