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)
|
@interface MPPBaseOptions (Helpers)
|
||||||
|
|
||||||
- (void)copyToProto:(mediapipe::tasks::core::proto::BaseOptions *)baseOptionsProto;
|
- (void)copyToProto:(mediapipe::tasks::core::proto::BaseOptions *)baseOptionsProto;
|
||||||
|
- (void)copyToProto:(mediapipe::tasks::core::proto::BaseOptions *)baseOptionsProto withUseStreamMode:(BOOL)useStreamMode;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,11 @@ using BaseOptionsProto = ::mediapipe::tasks::core::proto::BaseOptions;
|
||||||
|
|
||||||
@implementation MPPBaseOptions (Helpers)
|
@implementation MPPBaseOptions (Helpers)
|
||||||
|
|
||||||
|
- (void)copyToProto:(BaseOptionsProto *)baseOptionsProto withUseStreamMode:(BOOL)useStreamMode {
|
||||||
|
[self copyToProto:baseOptionsProto];
|
||||||
|
baseOptionsProto->set_use_stream_mode(useStreamMode);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)copyToProto:(BaseOptionsProto *)baseOptionsProto {
|
- (void)copyToProto:(BaseOptionsProto *)baseOptionsProto {
|
||||||
baseOptionsProto->Clear();
|
baseOptionsProto->Clear();
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,9 @@ using ClassifierOptionsProto = ::mediapipe::tasks::components::processors::proto
|
||||||
- (void)copyToProto:(CalculatorOptionsProto *)optionsProto {
|
- (void)copyToProto:(CalculatorOptionsProto *)optionsProto {
|
||||||
ImageClassifierGraphOptionsProto *graphOptions =
|
ImageClassifierGraphOptionsProto *graphOptions =
|
||||||
optionsProto->MutableExtension(ImageClassifierGraphOptionsProto::ext);
|
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 *classifierOptionsProto = graphOptions->mutable_classifier_options();
|
||||||
classifierOptionsProto->Clear();
|
classifierOptionsProto->Clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user