---
title: oar-ocr
canonical_url: "https://www.modelscope.cn/models/greatv/oar-ocr"
md_url: "https://www.modelscope.cn/models/greatv/oar-ocr.md"
repository: greatv/oar-ocr
chinese_name: "OAR OCR Models"
last_updated: 2026-06-12
license: "Apache License 2.0"
pipeline_tag: ocr-detection
tasks:
  - ocr-detection
  - ocr-recognition
  - table-recognition
  - lineless-table-recognition
library_name:
  - onnx
  - other
frameworks:
  - other
language:
  - en
downloads: 43
stars: 2
---

# oar-ocr

> oar-ocr - greatv 在 ModelScope 开源的模型。OAR-OCR provides Paddle-based OCR and document parsing model assets for the Rust oar-ocr library. This ModelScope repository hosts ONNX models, dictionaries, tokenizers, and structure-analysis files used by the runtime…

greatv/oar-ocr 是 ModelScope 魔搭社区上的ocr-detection、ocr-recognition、table-recognition模型，采用 Apache License 2.0 许可。

- **Repository**: greatv/oar-ocr
- **License**: Apache License 2.0
- **Tasks**: ocr-detection, ocr-recognition, table-recognition, lineless-table-recognition
- **Downloads**: 43
- **Stars**: 2
- **Last updated**: 2026-06-12

Source: https://www.modelscope.cn/models/greatv/oar-ocr

---

# OAR-OCR

OAR-OCR provides Paddle-based OCR and document parsing model assets for the Rust [`oar-ocr`](https://github.com/GreatV/oar-ocr) library. This ModelScope repository hosts ONNX models, dictionaries, tokenizers, and structure-analysis files used by the runtime auto-download feature.

## Included Assets

- Text detection, recognition, orientation, and seal models from the PaddleOCR family.
- Document layout and block layout models for page structure analysis.
- Table classification, cell detection, and table structure recognition models.
- Formula recognition models and tokenizer files.
- Shared dictionaries and configuration files required by the OCR pipeline.

## Quick Use

Add the Rust crate:

```bash
cargo add oar-ocr --features auto-download
```

When `auto-download` is enabled, registered bare file names are fetched from [`greatv/oar-ocr` on ModelScope](https://www.modelscope.cn/models/greatv/oar-ocr) into `$OAR_HOME` (default `~/.oar`) and verified before use.

```rust
use oar_ocr::prelude::*;
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ocr = OAROCRBuilder::new(
        "pp-ocrv5_mobile_det.onnx",
        "pp-ocrv5_mobile_rec.onnx",
        "ppocrv5_dict.txt",
    )
    .build()?;

    let image = load_image(Path::new("document.jpg"))?;
    let results = ocr.predict(vec![image])?;

    for region in &results[0].text_regions {
        if let Some((text, score)) = region.text_with_confidence() {
            println!("{text} ({score:.2})");
        }
    }

    Ok(())
}
```

## Document Structure

The structure pipeline combines Paddle layout detection, OCR, table recognition, formula recognition, and seal detection to produce Markdown-like document output.

```rust
use oar_ocr::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let structure = OARStructureBuilder::new("pp-doclayout_plus-l.onnx")
        .with_ocr(
            "pp-ocrv5_mobile_det.onnx",
            "pp-ocrv5_mobile_rec.onnx",
            "ppocrv5_dict.txt",
        )
        .with_table_classification("pp-lcnet_x1_0_table_cls.onnx")
        .with_table_structure_recognition("slanet_plus.onnx", "wireless")
        .table_structure_dict_path("table_structure_dict_ch.txt")
        .build()?;

    let result = structure.predict("document.jpg")?;
    println!("{}", result.to_markdown());

    Ok(())
}
```

## Notes

The model files in this repository are served as Paddle-framework assets and are consumed through ONNX Runtime by the Rust implementation. For detailed model lists, hashes, and advanced usage, see the project documentation in the GitHub repository.
