Fix iOS forward bug
This commit is contained in:
@@ -679,10 +679,15 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"INFERENCE_HELPER_ENABLE_MNN=1",
|
||||
"IOS_CPU_FORWARD=1",
|
||||
);
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cpp/src";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -713,10 +718,15 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"INFERENCE_HELPER_ENABLE_MNN=1",
|
||||
"IOS_CPU_FORWARD=1",
|
||||
);
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cpp/src";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
||||
BIN
Binary file not shown.
@@ -43,9 +43,9 @@ void CameraBuffer::SetDataFormat(DATA_FORMAT data_format) {
|
||||
if (data_format == BGRA) {
|
||||
config_.sourceFormat = MNN::CV::BGRA;
|
||||
}
|
||||
if (data_format == YCrCb) {
|
||||
config_.sourceFormat = MNN::CV::YCrCb;
|
||||
}
|
||||
// if (data_format == YCrCb) {
|
||||
// config_.sourceFormat = MNN::CV::YCrCb;
|
||||
// }
|
||||
}
|
||||
|
||||
cv::Mat CameraBuffer::GetAffineRGBImage(const cv::Mat &affine_matrix, const int width_out, const int height_out) const {
|
||||
@@ -233,4 +233,4 @@ int CameraBuffer::GetRotationMode() const{
|
||||
return rotation_mode_;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,12 @@ int32_t InferenceHelperMnn::Initialize(const std::string& model_filename, std::v
|
||||
}
|
||||
|
||||
MNN::ScheduleConfig scheduleConfig;
|
||||
#ifdef IOS_CPU_FORWARD
|
||||
PRINT("ios use cpu backend.");
|
||||
scheduleConfig.type = MNN_FORWARD_CPU;
|
||||
#else
|
||||
scheduleConfig.type = MNN_FORWARD_AUTO;
|
||||
#endif
|
||||
scheduleConfig.numThread = num_threads_; // it seems, setting 1 has better performance on Android
|
||||
// MNN::BackendConfig bnconfig;
|
||||
// bnconfig.power = MNN::BackendConfig::Power_High;
|
||||
|
||||
Reference in New Issue
Block a user