Category is a util class that contains a label, its display name, a float value as score, and the
index of the label in the corresponding label file. Typically it’s used as the result of
classification tasks.
The display name of the label, which may be translated for different locales. For example, a
label, “apple”, may be translated into Spanish for display purpose, so that the display name is
“manzana”.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-08 UTC."],[],[],null,["# MediaPipeTasksVision Framework Reference\n\nMPPCategory\n===========\n\n\n @interface MPPCategory : NSObject\n\nCategory is a util class that contains a label, its display name, a float value as score, and the\nindex of the label in the corresponding label file. Typically it's used as the result of\nclassification tasks.\n- `\n ``\n ``\n `\n\n ### [index](#/c:objc(cs)MPPCategory(py)index)\n\n `\n ` \n The index of the label in the corresponding label file. Set to -1 if the index is\n not set. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) NSInteger index;\n\n- `\n ``\n ``\n `\n\n ### [score](#/c:objc(cs)MPPCategory(py)score)\n\n `\n ` \n Confidence score for this class. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) float score;\n\n- `\n ``\n ``\n `\n\n ### [categoryName](#/c:objc(cs)MPPCategory(py)categoryName)\n\n `\n ` \n The label of this category object. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSString *categoryName;\n\n- `\n ``\n ``\n `\n\n ### [displayName](#/c:objc(cs)MPPCategory(py)displayName)\n\n `\n ` \n The display name of the label, which may be translated for different locales. For example, a\n label, \"apple\", may be translated into Spanish for display purpose, so that the display name is\n \"manzana\". \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSString *displayName;\n\n- `\n ``\n ``\n `\n\n ### [-initWithIndex:score:categoryName:displayName:](#/c:objc(cs)MPPCategory(im)initWithIndex:score:categoryName:displayName:)\n\n `\n ` \n Initializes a new `ResultCategory` with the given index, score, category name and display name. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithIndex:(NSInteger)index\n score:(float)score\n categoryName:(nullable NSString *)categoryName\n displayName:(nullable NSString *)displayName;\n\n #### Parameters\n\n |----------------------|---------------------------------------------------------|\n | ` `*index*` ` | The index of the label in the corresponding label file. |\n | ` `*score*` ` | The probability score of this label category. |\n | ` `*categoryName*` ` | The label of this category object. |\n | ` `*displayName*` ` | The display name of the label. |\n\n #### Return Value\n\n An instance of `ResultCategory` initialized with the given index, score, category name\n and display name.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)MPPCategory(im)init)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (instancetype)init NS_UNAVAILABLE;\n\n- `\n ``\n ``\n `\n\n ### [+new](#/c:objc(cs)MPPCategory(cm)new)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n + (instancetype)new NS_UNAVAILABLE;"]]