MCPcopy
hub / github.com/tensorflow/tfjs-models / getLabels

Function getLabels

deeplab/src/utils.ts:109–121  ·  view source on GitHub ↗
(base: ModelArchitecture)

Source from the content-addressed store, hash-verified

107 * The list with verbal descriptions of labels
108 */
109export 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 ::

Callers 2

segmentMethod · 0.90
utils_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected