(base: ModelArchitecture)
| 107 | * The list with verbal descriptions of labels |
| 108 | */ |
| 109 | export function getLabels(base: ModelArchitecture) { |
| 110 | if (base === 'pascal') { |
| 111 | return config['LABELS']['PASCAL']; |
| 112 | } else if (base === 'ade20k') { |
| 113 | return config['LABELS']['ADE20K']; |
| 114 | } else if (base === 'cityscapes') { |
| 115 | return config['LABELS']['CITYSCAPES']; |
| 116 | } |
| 117 | throw new Error( |
| 118 | `SemanticSegmentation cannot be constructed ` + |
| 119 | `with an invalid base model ${base}. ` + |
| 120 | `Try one of 'pascal', 'cityscapes' and 'ade20k'.`); |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * @param input :: |
no outgoing calls
no test coverage detected