Replies: 6 comments
-
测试电脑,笔记本,windows系统,cpu 8845h,gpu 4060 使用多线程,无论是把ocr = PaddleOCR(use_angle_cls=True, lang="ch", show_log=True, use_gpu=True)设成1个还是多个,速度变化不大,都大概是比默认情况快2倍。并且提升线程数量无法占用满全部cpu核,大概只能占用30%-50%,大概是因为GIL。 参考#10433 使用多进程,4进程,比默认情况快大概3倍,6进程快大概5倍,只要cpu、内存、显存,没占满,速度应该可以不断增加 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
看起来multiprocessing和PaddleOCR在linux上有一些问题,不过我自测在windows上是没问题的。 |
Beta Was this translation helpful? Give feedback.
-
关于use_mp这个参数,经过我一番搜索发现,似乎对于常规python代码调用完全没用。代码里都搜不到对它的处理 |
Beta Was this translation helpful? Give feedback.
-
multiprocessing.Pool
ThreadPoolExecutor
Beta Was this translation helpful? Give feedback.
All reactions