DayBreak-u / chineseocr_lite

超轻量级中文ocr,支持竖排文字识别, 支持ncnn、mnn、tnn推理 ( dbnet(1.8M) + crnn(2.5M) + anglenet(378KB)) 总模型仅4.7M
GNU General Public License v2.0
11.84k stars 2.26k forks source link

请问大佬,你编译的exe为啥8M不到 #386

Open wingerboy opened 3 years ago

wingerboy commented 3 years ago

我自己编译NCNN/opencv大小在20M左右,求问你编译的为啥这么小。是opencv版本不对吗?跪求大佬赐教

benjaminwan commented 3 years ago

opencv可以定制,去掉不需要的模块。 有2个现成的仓库可以参考

nihui大佬定制的更彻底,并且替换了模块代码 https://github.com/nihui/opencv-mobile

我自己的就是用于Ocr的,没有改动代码,只是精简模块 https://github.com/RapidAI/OpenCVBuilder

wingerboy commented 3 years ago

opencv可以定制,去掉不需要的模块。 有2个现成的仓库可以参考

nihui大佬定制的更彻底,并且替换了模块代码 https://github.com/nihui/opencv-mobile

我自己的就是用于Ocr的,没有改动代码,只是精简模块 https://github.com/RapidAI/OpenCVBuilder

谢谢大佬!

wingerboy commented 3 years ago

opencv可以定制,去掉不需要的模块。 有2个现成的仓库可以参考

nihui大佬定制的更彻底,并且替换了模块代码 https://github.com/nihui/opencv-mobile

我自己的就是用于Ocr的,没有改动代码,只是精简模块 https://github.com/RapidAI/OpenCVBuilder

继续问下,看起来你编译的是MT的,能出个编译教程吗?

benjaminwan commented 3 years ago

https://github.com/nihui/opencv-mobile#how-to-build-your-custom-package

https://github.com/RapidAI/OpenCVBuilder#手动编译说明

最详细的还是看github workflow 脚本,编译过程都在里面了:

https://github.com/nihui/opencv-mobile/blob/master/.github/workflows/release.yml

https://github.com/RapidAI/OpenCVBuilder/blob/main/.github/workflows/builder.yml

wingerboy commented 3 years ago

https://github.com/nihui/opencv-mobile#how-to-build-your-custom-package

https://github.com/RapidAI/OpenCVBuilder#手动编译说明

最详细的还是看github workflow 脚本,编译过程都在里面了:

https://github.com/nihui/opencv-mobile/blob/master/.github/workflows/release.yml

https://github.com/RapidAI/OpenCVBuilder/blob/main/.github/workflows/builder.yml

感谢大佬的指点。

wingerboy commented 3 years ago

https://github.com/nihui/opencv-mobile#how-to-build-your-custom-package

https://github.com/RapidAI/OpenCVBuilder#手动编译说明

最详细的还是看github workflow 脚本,编译过程都在里面了:

https://github.com/nihui/opencv-mobile/blob/master/.github/workflows/release.yml

https://github.com/RapidAI/OpenCVBuilder/blob/main/.github/workflows/builder.yml

我按照你给的链接https://github.com/RapidAI/OpenCVBuilder#手动编译说明进行编译,编译成功后尝试MT编译报编译opencv编译的是MD版本错误,如下图示。查了一些资料,要编MT版本,把DBUILD_SHARED_LIBS=OFF就行,我看了你的opencv4_cmake_options.txt文件,看着没问题,但还是会报错。为啥子呢?我哪里的操作姿势不对嘛? image