feat: 切换后端至PaddleOCR-NCNN,切换工程为CMake

1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试
2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程
3.重整权利声明文件,重整代码工程,确保最小化侵权风险

Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake
Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
This commit is contained in:
wangzhengyang
2022-05-10 09:54:44 +08:00
parent ecdd171c6f
commit 718c41634f
10018 changed files with 3593797 additions and 186748 deletions

View File

@ -0,0 +1,118 @@
caffe-android-lib https://github.com/sh1r0/caffe-android-lib
mini-caffe https://github.com/luoyetx/mini-caffe
openblas-0.2.20 https://github.com/xianyi/OpenBLAS
ncnn https://github.com/Tencent/ncnn
***
squeezenet_v1.1 https://github.com/DeepScale/SqueezeNet/tree/master/SqueezeNet_v1.1
mobilenet_v1 https://github.com/shicai/MobileNet-Caffe
vgg16 https://gist.github.com/ksimonyan/211839e770f7b538e2d8
***
Host platform and compiler configuration:
fedora 27, android-ndk-r15c, target arch = arm64-v8a
we manually update openblas package to version 0.2.20 in caffe-android-lib for better performance
***
Device: Nexus 6p
OS: LineageOS 15.1(Android 8.1.0), ROM newly flashed without any third-party APP installed
CPU: Snapdragon 810 (Cortex-A57 2.0GHz x 4 + Cortex-A53 1.55GHz x 4)
RAM: 3G
***
Benchmark method:
Run squeezenet, mobilenet inference 23 times in a loop, discard the first three warmup records, and then calculate the average inference time
Run vgg169 times in a loop, discard the first warmup record, and then calculate the average inference time
Since the system may force SOC lowering its frequency when temperature goes high, sleep over 1 minute before each benchmark to prevent this issue.
fps performance: fps = 1000 / avgtime(ms)
cpu usage: take the CPU value in top utility output
memory usage: take the RES value in top utility output
the overall power consumption and performance per watt:
Disable usb charging: adb shell echo 0 > /sys/class/power_supply/battery/charging_enabled
current(μA) = adb shell cat /sys/class/power_supply/battery/current_now (multiply -1 for 810 chip)
voltage(μV) = adb shell cat /sys/class/power_supply/battery/voltage_now
power consumption(mW) = current / 1000 * voltage / 1000 / 1000
performance per watt(1000fps/W) = fps / power consumption * 1000
***
The binary size after debug stripping
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/1.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/2.jpg)
***
squeezenet
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/3.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/4.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/5.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/6.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/7.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/8.jpg)
***
mobilnet
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/9.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/10.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/11.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/12.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/13.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/14.jpg)
***
vgg16
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/15.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/16.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/17.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/18.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/19.jpg)
![](https://github.com/nihui/ncnn-assets/raw/master/20180413/20.jpg)

View File

@ -0,0 +1,46 @@
|device|gpu|api version|driver version|squeezenet|mobilenetssd|yolov3|
|---|---|---|---|---|---|---|
|intel-i7-7700|Intel(R) HD Graphics 630 (Kaby Lake GT2)|1.1.90|18.3.4|y|y|y|
|GTX-1060|GeForce GTX 1060 3GB|1.1.95|418.172.0|y|y|y|
|AMD-Radeon R9 M290X|AMD RADV PITCAIRN (LLVM 7.0.1)|1.1.70|18.3.4|y|y|y|
|iphone-5s|Apple A7 GPU|1.0.82|0.2.1825|y|y|y|
|huawei-nexus6p|Adreno (TM) 430|1.0.49|35.601.2388|y|y|y
|vivo-y1731ca|Adreno (TM) 505|1.0.61|37.845.1429|y|n|n|
|vivo-y85a|Adreno (TM) 506|1.0.61|2.944.3349|y|n|n|
|vivo-x9s|Adreno (TM) 510|1.0.61|42.917.1172|y|y|y|
|meizu-15|Adreno (TM) 512|1.0.38|29.189.223|n|n|n|
|chuizi-jianguo-pro2|Adreno (TM) 512|1.0.38|21.219.2615|n|n|n|
|xiaomi-note3|Adreno (TM) 512|1.0.38|39.369.2305|n|n|n|
|oppo-r11|Adreno (TM) 512|1.0.38|42.977.756|n|n|n|
|xiaomi-6x|Adreno (TM) 512|1.0.61|14.322.3739|y|y|y|
|oppo-r11s+|Adreno (TM) 512|1.0.61|35.1004.3936|y|y|y|
|vivo-x20a|Adreno (TM) 512|1.0.61|43.10.3141|y|y|y|
|vivo-v1816a|Adreno (TM) 512|1.0.61|43.10.3141|y|y|y|
|vivo-z1|Adreno (TM) 512|1.0.61|43.10.3141|y|y|y|
|xiaomi-redmi-note5|Adreno (TM) 512|1.0.61|63.219.2354|y|y|y|
|google-pixel|Adreno (TM) 530|1.1.87|512.354.0|y|y|y|
|nubia-z17|Adreno (TM) 540|1.0.38|1.28.32|n|n|n|
|samsung-galaxys8+|Adreno (TM) 540|1.0.61|29.896.3583|y|y|y|
|oneplus-5t|Adreno (TM) 540|1.0.61|18.1023.2233|y|y|y|
|google-pixel2|Adreno (TM) 540|1.1.66|512.313.0|y|y|y|
|essential-ph-1|Adreno (TM) 540|1.1.66|512.319.0|y|y|y|
|vivo-x23|Adreno (TM) 615|1.0.66|33.870.3328|y|y|y|
|vivo-v1813ba|Adreno (TM) 615|1.0.66|33.870.3328|y|y|y|
|xiaomi-8se|Adreno (TM) 616|1.0.66|30.913.18|y|y|y|
|vivo-nex-a|Adreno (TM) 616|1.0.66|33.870.3328|y|y|y|
|xiaomi-mix2s|Adreno (TM) 630|1.0.61|4.91.2976|y|y|y|
|heisha-SKR-A0|Adreno (TM) 630|1.0.61|36.173.3586|y|y|y|
|heisha-SKR-A0|Adreno (TM) 630|1.0.66|47.448.1532|y|y|y|
|oneplus-6|Adreno (TM) 630|1.1.66|512.324.0|y|y|y|
|vivo-iQOO|Adreno (TM) 640|1.1.87|512.361.0|y|y|y|
|meitu-m8s|Mali-T880|1.0.14|500.910.1017|n|n|n|
|huawei-p10|Mali-G71|1.0.53|151.949.2145|n|n|n|
|huawei-mate9|Mali-G71|1.0.53|151.949.2145|n|n|n|
|oppo-a73|Mali-G71|1.0.47|575.795.1934|n|n|n|
|vivo-y97|Mali-G72|1.0.58|240.537.3580|n|n|n|
|huawei-mate10|Mali-G72|1.0.66|14.0.0|y|y|y|
|huawei-v10|Mali-G72|1.0.66|14.0.0|y|y|y|
|huawei-vce-al00|Mali-G72|1.0.66|14.0.0|y|y|y|
|huawei-mate20|Mali-G76|1.0.66|14.0.0|y|y|y|
|huawei-pct-al10|Mali-G76|1.0.66|14.0.0|y|y|y|