Open zcs110 opened 11 months ago
同问,iOS编译好framework之后,如何使用呢?参照linux代码去使用要初始化,model_path怎么配置?
我配置好了,把models/r2_mobile里面的文件拷贝到项目目录,models_path设置为项目根目录就行了,但是有一个问题,我编译好的framework直接在项目中使用是可以的,但是打包成一个podsepc给Flutter用就编译失败,提示/chinese_license_plate_recognition/example/ios/Pods/Headers/Public/chinese_license_plate_recognition/chinese_license_plate_recognition-umbrella.h:14:9 'hyper_lpr_sdk.h' file not found 以下是我的podspec文件
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint chinese_license_plate_recognition.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'chinese_license_plate_recognition'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin project.'
s.description = <<-DESC
A new Flutter plugin project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
# 添加 CoreML.framework 作为依赖项
s.frameworks = 'CoreML'
# 指定 framework 目录
s.vendored_frameworks = 'Classes/Frameworks/*.framework'
s.exclude_files = "Classes/Frameworks/*.framework/*.plist"
# 指定 models 目录
s.resource_bundles = {
'chinese_license_plate_recognition' => ['Classes/models/*.mnn']
}
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
end
项目目录为:
- ios
- chinese_license_plate_recognition.podspec
- Classes
- Frameworks
- hyperlpr3.framework
- MNN.framework
- opencv2.framework
- models
- b320_backbone_h.mnn
- b320_header_h.mnn
- b640x_backbone_h.mnn
- b640x_head_h.mnn
- litemodel_cls_96xh.mnn
- rpv3_mdict_160h.mnn
- ChineseLicensePlateRecognitionPlugin.h
- ChineseLicensePlateRecognitionPlugin.m
我配置好了,把models/r2_mobile里面的文件拷贝到项目目录,models_path设置为项目根目录就行了 我配置好了环境 但是检测的时候报错 det_arch.cpp cv::resize(bgr, resized_img, cv::Size(w, h)); [InferenceHelperMnn][180] ios use cpu backend.Reshape error: 480 -> 0 你可以发一个demo给我吗zwsyiyibubu@gmail.com
我配置好了,把models/r2_mobile里面的文件拷贝到项目目录,models_path设置为项目根目录就行了 我配置好了环境 但是检测的时候报错 det_arch.cpp cv::resize(bgr, resized_img, cv::Size(w, h)); [InferenceHelperMnn][180] ios use cpu backend.Reshape error: 480 -> 0 你可以发一个demo给我吗zwsyiyibubu@gmail.com
双层车牌识别请问怎么配置?
哈罗,邮件收到了,我会尽快查看,回复,谢谢!
// 配置车牌识别参数 configuration.models_path = model_path; // 模型文件夹路径 这个model_path在iOS Frameworks中如何配置呢。