Updated formatting
This commit is contained in:
parent
abf55d3756
commit
5429991986
|
@ -28,17 +28,20 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
+ (MPPCategory *)categoryWithProto:(const ::mediapipe::Classification &)classificationProto;
|
||||
|
||||
/**
|
||||
* Creates an `MPPCategory` with the given MediaPipe `Classification` proto and the given category index.
|
||||
* The resulting `MPPCategory` is created with the given category index instead of the category index specified in the `Classification` proto.
|
||||
* This method is useful for tasks like gesture recognizer which always returns a default index for the recognized gestures.
|
||||
* Creates an `MPPCategory` with the given MediaPipe `Classification` proto and the given category
|
||||
* index. The resulting `MPPCategory` is created with the given category index instead of the
|
||||
* category index specified in the `Classification` proto. This method is useful for tasks like
|
||||
* gesture recognizer which always returns a default index for the recognized gestures.
|
||||
*
|
||||
* @param classificationProto A MediaPipe `Classification` proto.
|
||||
* @param index The index to be used for creating the `MPPCategory` instead of the category index specified in the `Classification` proto.
|
||||
* @param index The index to be used for creating the `MPPCategory` instead of the category index
|
||||
* specified in the `Classification` proto.
|
||||
*
|
||||
* @return An `MPPGestureRecognizerResult` object that contains the hand gesture recognition
|
||||
* results.
|
||||
*/
|
||||
+ (MPPCategory *)categoryWithProto:(const ::mediapipe::Classification &)classificationProto andIndex:(NSInteger)index;
|
||||
+ (MPPCategory *)categoryWithProto:(const ::mediapipe::Classification &)classificationProto
|
||||
andIndex:(NSInteger)index;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@ using ClassificationProto = ::mediapipe::Classification;
|
|||
|
||||
@implementation MPPCategory (Helpers)
|
||||
|
||||
+ (MPPCategory *)categoryWithProto:(const ClassificationProto &)classificationProto andIndex:(NSInteger)index {
|
||||
+ (MPPCategory *)categoryWithProto:(const ClassificationProto &)classificationProto
|
||||
andIndex:(NSInteger)index {
|
||||
NSString *categoryName;
|
||||
NSString *displayName;
|
||||
|
||||
|
@ -39,7 +40,6 @@ using ClassificationProto = ::mediapipe::Classification;
|
|||
displayName:displayName];
|
||||
}
|
||||
|
||||
|
||||
+ (MPPCategory *)categoryWithProto:(const ClassificationProto &)classificationProto {
|
||||
return [MPPCategory categoryWithProto:classificationProto andIndex:classificationProto.index()];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user