in storage-label-images/functions/src/util.ts [74:87]
export function formatLabels(labelAnnotations: IEntityAnnotation[]) {
const labels = [];
for (const annotation of labelAnnotations) {
if (annotation.description) {
if (config.mode === 'basic') {
labels.push(annotation.description);
}
if (config.mode === 'full') {
labels.push(annotation);
}
}
}
return labels;
}