PHPackages                             meshell/ffi-ocr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. meshell/ffi-ocr

ActiveLibrary

meshell/ffi-ocr
===============

description

1.3.1(1y ago)09proprietaryC++PHP &gt;=7.4

Since Jul 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TianLiangZhou/ffi-ocr)[ Packagist](https://packagist.org/packages/meshell/ffi-ocr)[ RSS](/packages/meshell-ffi-ocr/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (9)Used By (0)

ffi-ocr
-------

[](#ffi-ocr)

`ffi-ocr`是一个`PHP FFI`图片取词库，基于百度开源的[paddleOCR](https://github.com/PaddlePaddle/PaddleOCR) 项目，使用`C++`导出`C`函数构建动态链接库来给`php`调用。 项目中大部分源码都可以从 `https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.1/deploy/cpp_infer` 找到。

### 环境

[](#环境)

需要`php >= 7.4` 以上的版本并且开启了`FFI`扩展。

还需要设置`php.ini` 中的`ffi.enable`为`On`。

### paddlepaddle

[](#paddlepaddle)

推理预测库版本: [2.5](https://www.paddlepaddle.org.cn/inference/v2.5/guides/introduction/index_intro.html)

项目依赖: **paddle推理预测库**([点击去下载](https://www.paddlepaddle.org.cn/inference/v2.5/guides/install/download_lib.html) )，**预测模型库**([点击去下载](https://github.com/baidu/lac/releases/tag/v2.1.0) )。

### Linux

[](#linux)

将下载的推理预测库存放到: `/opt/paddle_inference`目录。

可以通过`ldd lib/libocrffi.so`显示库的依赖, 再根据情况建立软链。

```
[meshell@/] cd /lib64
[meshell@/lib64] ln -s paddle_inference/paddle/lib/libpaddle_inference.so libpaddle_inference.so
[meshell@/lib64] ln -s paddle_inference/third_party/install/mklml/lib/libmklml_intel.so libmklml_intel.so
[meshell@/lib64] ln -s paddle_inference/third_party/install/mklml/lib/libiomp5.so libiomp5.so
[meshell@/lib64] ln -s paddle_inference/third_party/install/mkldnn/lib/libmkldnn.so.0 libdnnl.so.2
```

> 该库不支持`window`环境，如果你需要请自行编译。

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Recently: every ~233 days

Total

8

Last Release

693d ago

PHP version history (2 changes)v1.0.5PHP ^7.4

v1.2.3PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e2c43e0e3b8fa7a494596ed91e3bca44f63079e61196a01288535c326185383?d=identicon)[TianLiangZhou](/maintainers/TianLiangZhou)

---

Top Contributors

[![TianLiangZhou](https://avatars.githubusercontent.com/u/7042876?v=4)](https://github.com/TianLiangZhou "TianLiangZhou (4 commits)")

### Embed Badge

![Health badge](/badges/meshell-ffi-ocr/health.svg)

```
[![Health](https://phpackages.com/badges/meshell-ffi-ocr/health.svg)](https://phpackages.com/packages/meshell-ffi-ocr)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
