decodeClassifications function
Decodes one classification head and its categories.
Implementation
Classifications decodeClassifications(Map<Object?, Object?> json) =>
Classifications(
categories: [
for (final category in (json['categories'] as List).cast<Map>())
decodeCategory(category),
],
headIndex: (json['headIndex'] as num?)?.toInt() ?? 0,
headName: decodeLabel(json['headName']),
);