YOLOv5_NCNN
YOLOv5_NCNN copied to clipboard
platform.h and vulkan.h not found(安卓与iOS vulkan集成的大概版本信息与配置)
I need some help getting this to work please. As adviced, I downloaded ncnn.framework and opencv2.framework and replaced the files.
Unfortunately I am still getting errors:

Do I need to download any other files to make it work? Help would be much appreciated.
You can try the 20201208 version. The 20201218 version has not been tried, and the structure of the new version has changed. The library used by the iOS project does not include vulkan and bitcode

Thank you for the response. Is there also a recommended version of opencv2?
I downloaded opencv2.framework from opencv.org but get a few errors with that now:
Semantic Issue opencv2.framework/Headers/flann/any.h:60:63: Use of typeid requires -frtti opencv2.framework/Headers/flann/any.h:276:31: Use of typeid requires -frtti opencv2.framework/Headers/flann/any.h:285:31: Use of typeid requires -frtti opencv2.framework/Headers/flann/any.h:293:34: Use of typeid requires -frtti opencv2.framework/Headers/flann/any.h:313:34: Use of typeid requires -frtti
Parse Issue opencv2.framework/Headers/stitching/detail/exposure_compensate.hpp:66:12: Expected identifier opencv2.framework/Headers/stitching/detail/seam_finders.hpp:62:12: Expected identifier opencv2.framework/Headers/stitching/detail/blenders.hpp:68:12: Expected identifier
Try: Build Settings >>> Apple Clang - Language - C++ >>> Enable C++ Runtime Types >>> NO
If not, you may need to compile ncnn. Because the default configuration of ncnn conflicts with opencv. To compile ncnn, you only need to add these two parameters: -DNCNN_DISABLE_RTTI=OFF -DNCNN_DISABLE_EXCEPTION=OFF
Or send you the opencv that I use.
Forgot where opencv came from. But the version number is 2.4.13

Try: Build Settings >>> Apple Clang - Language - C++ >>> Enable C++ Runtime Types >>> NO
If not, you may need to compile ncnn. Because the default configuration of ncnn conflicts with opencv. To compile ncnn, you only need to add these two parameters: -DNCNN_DISABLE_RTTI=OFF -DNCNN_DISABLE_EXCEPTION=OFF
Or send you the opencv that I use.
If these two parameters are turned on, GPU acceleration cannot be used,

To run the GPU, you need to use the vulkan library.
https://github.com/Tencent/ncnn/wiki/FAQ-ncnn-vulkan#how-to-use-ncnn-vulkan-on-ios
iOS recommends using cpu library, iOS GPU optimization is not good.

Thank you so much, it works now!
In summary:
iOS:
- Download the required files from https://github.com/Tencent/ncnn using the 20201208 version.
- Download opencv2.framework from version 2.4.13: https://github.com/opencv/opencv/releases/tag/2.4.13
Android:
Install the correct version of NDK. In Android Studio:
- Preferences
- Appearance & Behavior
- System Settings
- Android SDK
- SDK Tools
- Show Package Details to see all versions
- NDK: Tick 21.0.6113669.