Updated iOS Image Classifier to reflect new calculation for normalized rect
This commit is contained in:
parent
114a11dc4e
commit
0fcf92d7d5
|
@ -387,16 +387,16 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks";
|
||||||
|
|
||||||
NSArray<MPPCategory *> *expectedCategories = @[
|
NSArray<MPPCategory *> *expectedCategories = @[
|
||||||
[[MPPCategory alloc] initWithIndex:934
|
[[MPPCategory alloc] initWithIndex:934
|
||||||
score:0.622074f
|
score:0.753852f
|
||||||
categoryName:@"cheeseburger"
|
categoryName:@"cheeseburger"
|
||||||
displayName:nil],
|
displayName:nil],
|
||||||
[[MPPCategory alloc] initWithIndex:963
|
|
||||||
score:0.051214f
|
|
||||||
categoryName:@"meat loaf"
|
|
||||||
displayName:nil],
|
|
||||||
[[MPPCategory alloc] initWithIndex:925
|
[[MPPCategory alloc] initWithIndex:925
|
||||||
score:0.048719f
|
score:0.028609f
|
||||||
categoryName:@"guacamole"
|
categoryName:@"guacamole"
|
||||||
|
displayName:nil],
|
||||||
|
[[MPPCategory alloc] initWithIndex:932
|
||||||
|
score:0.027782f
|
||||||
|
categoryName:@"bagel"
|
||||||
displayName:nil]
|
displayName:nil]
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -420,7 +420,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks";
|
||||||
|
|
||||||
NSArray<MPPCategory *> *expectedCategories =
|
NSArray<MPPCategory *> *expectedCategories =
|
||||||
@[ [[MPPCategory alloc] initWithIndex:560
|
@[ [[MPPCategory alloc] initWithIndex:560
|
||||||
score:0.682305f
|
score:0.604605f
|
||||||
categoryName:@"folding chair"
|
categoryName:@"folding chair"
|
||||||
displayName:nil] ];
|
displayName:nil] ];
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ static NSString *const kTaskGraphName =
|
||||||
error:(NSError **)error {
|
error:(NSError **)error {
|
||||||
std::optional<NormalizedRect> rect =
|
std::optional<NormalizedRect> rect =
|
||||||
[_visionTaskRunner normalizedRectFromRegionOfInterest:roi
|
[_visionTaskRunner normalizedRectFromRegionOfInterest:roi
|
||||||
|
imageSize:image.size
|
||||||
imageOrientation:image.orientation
|
imageOrientation:image.orientation
|
||||||
ROIAllowed:YES
|
ROIAllowed:YES
|
||||||
error:error];
|
error:error];
|
||||||
|
@ -154,6 +155,7 @@ static NSString *const kTaskGraphName =
|
||||||
error:(NSError **)error {
|
error:(NSError **)error {
|
||||||
std::optional<NormalizedRect> rect =
|
std::optional<NormalizedRect> rect =
|
||||||
[_visionTaskRunner normalizedRectFromRegionOfInterest:roi
|
[_visionTaskRunner normalizedRectFromRegionOfInterest:roi
|
||||||
|
imageSize:image.size
|
||||||
imageOrientation:image.orientation
|
imageOrientation:image.orientation
|
||||||
ROIAllowed:YES
|
ROIAllowed:YES
|
||||||
error:error];
|
error:error];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user