Code Monkey home page Code Monkey logo

paddleocr's Introduction

Crate paddleocr

A simple wrapper for hiroi-sora/PaddleOCR-json.

Usage

let mut p = paddleocr::Ppocr::new(
    PathBuf::from(".../PaddleOCR-json.exe"), // path to binary
    Default::default(), // language config_path, default `zh_CN`
)
.unwrap(); // initialize

let now = std::time::Instant::now(); // benchmark
{
    // OCR files
    println!("{}", p.ocr(Path::new(".../test1.png").into()).unwrap());
    println!("{}", p.ocr(Path::new(".../test2.png").into()).unwrap());
    println!("{}", p.ocr(Path::new(".../test3.png").into()).unwrap());

    // OCR clipboard
    println!("{}", p.ocr_clipboard().unwrap());    
}
println!("Elapsed: {:.2?}", now.elapsed());

Use ocr_and_parse to get structured results.

By enabling the bytes feature, you can pass image data as a byte array (AsRef<[u8]>).

paddleocr's People

Contributors

overflowcat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

paddleocr's Issues

提醒:1.4版本更新忘记更新说明文档了

我发现1.4中的初始化方法new增加了一个参数,但是使用文档中并没有加上,后来在测试用例中才发现。
提醒修正下吧。

感谢你的代码的付出,对我很有帮助。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.