diff --git a/mediapipe/tasks/ios/test/vision/image_classifier/MPPImageClassifierTests.m b/mediapipe/tasks/ios/test/vision/image_classifier/MPPImageClassifierTests.m index f7b26837e..36a62d990 100644 --- a/mediapipe/tasks/ios/test/vision/image_classifier/MPPImageClassifierTests.m +++ b/mediapipe/tasks/ios/test/vision/image_classifier/MPPImageClassifierTests.m @@ -387,16 +387,16 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; NSArray *expectedCategories = @[ [[MPPCategory alloc] initWithIndex:934 - score:0.622074f + score:0.753852f categoryName:@"cheeseburger" displayName:nil], - [[MPPCategory alloc] initWithIndex:963 - score:0.051214f - categoryName:@"meat loaf" - displayName:nil], [[MPPCategory alloc] initWithIndex:925 - score:0.048719f + score:0.028609f categoryName:@"guacamole" + displayName:nil], + [[MPPCategory alloc] initWithIndex:932 + score:0.027782f + categoryName:@"bagel" displayName:nil] ]; @@ -420,7 +420,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; NSArray *expectedCategories = @[ [[MPPCategory alloc] initWithIndex:560 - score:0.682305f + score:0.604605f categoryName:@"folding chair" displayName:nil] ]; diff --git a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifier.mm b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifier.mm index 8051fbf3d..b9bde841c 100644 --- a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifier.mm +++ b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifier.mm @@ -120,6 +120,7 @@ static NSString *const kTaskGraphName = error:(NSError **)error { std::optional rect = [_visionTaskRunner normalizedRectFromRegionOfInterest:roi + imageSize:image.size imageOrientation:image.orientation ROIAllowed:YES error:error]; @@ -154,6 +155,7 @@ static NSString *const kTaskGraphName = error:(NSError **)error { std::optional rect = [_visionTaskRunner normalizedRectFromRegionOfInterest:roi + imageSize:image.size imageOrientation:image.orientation ROIAllowed:YES error:error];