Updated category allowlist and denylist names
This commit is contained in:
parent
c185dc9ad7
commit
20c3388ab6
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user