Added stream info for some modes in MPPImageClassifier
This commit is contained in:
parent
aa760855ee
commit
59e0b1ba74
|
@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
@interface MPPBaseOptions (Helpers)
|
||||
|
||||
- (void)copyToProto:(mediapipe::tasks::core::proto::BaseOptions *)baseOptionsProto;
|
||||
- (void)copyToProto:(mediapipe::tasks::core::proto::BaseOptions *)baseOptionsProto withUseStreamMode:(BOOL)useStreamMode;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@ using BaseOptionsProto = ::mediapipe::tasks::core::proto::BaseOptions;
|
|||
|
||||
@implementation MPPBaseOptions (Helpers)
|
||||
|
||||
- (void)copyToProto:(BaseOptionsProto *)baseOptionsProto withUseStreamMode:(BOOL)useStreamMode {
|
||||
[self copyToProto:baseOptionsProto];
|
||||
baseOptionsProto->set_use_stream_mode(useStreamMode);
|
||||
}
|
||||
|
||||
- (void)copyToProto:(BaseOptionsProto *)baseOptionsProto {
|
||||
baseOptionsProto->Clear();
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ using ClassifierOptionsProto = ::mediapipe::tasks::components::processors::proto
|
|||
- (void)copyToProto:(CalculatorOptionsProto *)optionsProto {
|
||||
ImageClassifierGraphOptionsProto *graphOptions =
|
||||
optionsProto->MutableExtension(ImageClassifierGraphOptionsProto::ext);
|
||||
[self.baseOptions copyToProto:graphOptions->mutable_base_options()];
|
||||
|
||||
[self.baseOptions copyToProto:graphOptions->mutable_base_options() withUseStreamMode:self.runningMode != MPPRunningModeImage];
|
||||
|
||||
ClassifierOptionsProto *classifierOptionsProto = graphOptions->mutable_classifier_options();
|
||||
classifierOptionsProto->Clear();
|
||||
|
|
Loading…
Reference in New Issue
Block a user