Updated category allowlist and denylist names

This commit is contained in:
Prianka Liz Kariat 2022-12-22 01:59:38 +05:30
parent c185dc9ad7
commit 20c3388ab6
3 changed files with 6 additions and 6 deletions

View File

@ -36,10 +36,10 @@ NS_SWIFT_NAME(ClassifierOptions)
@property(nonatomic) float scoreThreshold;
/** If set, all classes not in this list will be filtered out from the results. */
@property(nonatomic, copy) NSArray<NSString *> *categoryAllowList;
@property(nonatomic, copy) NSArray<NSString *> *categoryAllowlist;
/** If set, all classes in this list will be filtered out from the results. */
@property(nonatomic, copy) NSArray<NSString *> *categoryDenyList;
@property(nonatomic, copy) NSArray<NSString *> *categoryDenylist;
@end

View File

@ -30,8 +30,8 @@
classifierOptions.scoreThreshold = self.scoreThreshold;
classifierOptions.maxResults = self.maxResults;
classifierOptions.categoryDenyList = self.categoryDenyList;
classifierOptions.categoryAllowList = self.categoryAllowList;
classifierOptions.categoryDenylist = self.categoryDenylist;
classifierOptions.categoryAllowlist = self.categoryAllowlist;
classifierOptions.displayNamesLocale = self.displayNamesLocale;
return classifierOptions;

View File

@ -30,11 +30,11 @@ using ClassifierOptionsProto = ::mediapipe::tasks::components::processors::proto
classifierOptionsProto->set_score_threshold(self.scoreThreshold);
for (NSString *category in self.categoryAllowList) {
for (NSString *category in self.categoryAllowlist) {
classifierOptionsProto->add_category_allowlist(category.cppString);
}
for (NSString *category in self.categoryDenyList) {
for (NSString *category in self.categoryDenylist) {
classifierOptionsProto->add_category_denylist(category.cppString);
}
}