Updated method name in iOS gesture recognizer testu utils
This commit is contained in:
parent
885148f50f
commit
4438606f3f
|
@ -74,7 +74,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
|||
#define AssertGestureRecognizerResultIsEmpty(gestureRecognizerResult) \
|
||||
XCTAssertTrue(gestureRecognizerResult.gestures.count == 0); \
|
||||
XCTAssertTrue(gestureRecognizerResult.handedness.count == 0); \
|
||||
XCTAssertTrue(gestureRecognizerResult.landmarks.count == 0); \
|
||||
XCTAssertTrue(gestureRecognizerResult.landmarks.count == 0); \
|
||||
XCTAssertTrue(gestureRecognizerResult.worldLandmarks.count == 0);
|
||||
|
||||
@interface MPPGestureRecognizerTests : XCTestCase
|
||||
|
@ -97,15 +97,16 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
|||
[MPPGestureRecognizerTests filePathWithFileInfo:kExpectedThumbUpLandmarksFile];
|
||||
|
||||
return [MPPGestureRecognizerResult
|
||||
gestureRecognizerResultsFromProtobufFileWithName:filePath
|
||||
gestureLabel:kExpectedThumbUpLabel];
|
||||
gestureRecognizerResultsFromTextEncodedProtobufFileWithName:filePath
|
||||
gestureLabel:kExpectedThumbUpLabel];
|
||||
}
|
||||
|
||||
+ (MPPGestureRecognizerResult *)fistGestureRecognizerResultWithLabel:(NSString *)gestureLabel {
|
||||
NSString *filePath = [MPPGestureRecognizerTests filePathWithFileInfo:kExpectedFistLandmarksFile];
|
||||
|
||||
return [MPPGestureRecognizerResult gestureRecognizerResultsFromProtobufFileWithName:filePath
|
||||
gestureLabel:gestureLabel];
|
||||
return [MPPGestureRecognizerResult
|
||||
gestureRecognizerResultsFromTextEncodedProtobufFileWithName:filePath
|
||||
gestureLabel:gestureLabel];
|
||||
}
|
||||
|
||||
- (void)assertMultiHandLandmarks:(NSArray<NSArray<MPPNormalizedLandmark *> *> *)multiHandLandmarks
|
||||
|
|
|
@ -19,8 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
@interface MPPGestureRecognizerResult (ProtoHelpers)
|
||||
|
||||
+ (MPPGestureRecognizerResult *)
|
||||
gestureRecognizerResultsFromProtobufFileWithName:(NSString *)fileName
|
||||
gestureLabel:(NSString *)gestureLabel;
|
||||
gestureRecognizerResultsFromTextEncodedProtobufFileWithName:(NSString *)fileName
|
||||
gestureLabel:(NSString *)gestureLabel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -32,8 +32,8 @@ using ::mediapipe::tasks::ios::test::vision::utils::get_proto_from_pbtxt;
|
|||
@implementation MPPGestureRecognizerResult (ProtoHelpers)
|
||||
|
||||
+ (MPPGestureRecognizerResult *)
|
||||
gestureRecognizerResultsFromProtobufFileWithName:(NSString *)fileName
|
||||
gestureLabel:(NSString *)gestureLabel {
|
||||
gestureRecognizerResultsFromTextEncodedProtobufFileWithName:(NSString *)fileName
|
||||
gestureLabel:(NSString *)gestureLabel {
|
||||
LandmarksDetectionResultProto landmarkDetectionResultProto;
|
||||
|
||||
if (!get_proto_from_pbtxt(fileName.cppString, landmarkDetectionResultProto).ok()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user