From 27ffd644a9825addcd00286729509fa01ff3a546 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Sat, 10 Feb 2024 15:49:38 +0100 Subject: [PATCH] Mention TrOCR in the readmes. (#1691) --- README.md | 4 +++- candle-examples/examples/trocr/readme.md | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63f05ba30a..90344b34d2 100644 --- a/README.md +++ b/README.md @@ -112,9 +112,10 @@ We also provide a some command line based examples using state of the art models evaluation, segmentation). - [VGG](./candle-examples/examples/vgg/), [RepVGG](./candle-examples/examples/repvgg): computer vision models. -- [BLIP](./candle-examples/examples/blip/): image to text model, can be used to - [BLIP](./candle-examples/examples/blip/): image to text model, can be used to generate captions for an image. +- [TrOCR](./candle-examples/examples/trocr/): a transformer OCR model, with + dedicated submodels for hand-writing and printed recognition. - [Marian-MT](./candle-examples/examples/marian-mt/): neural machine translation model, generates the translated text from the input text. @@ -207,6 +208,7 @@ If you have an addition to this list, please submit a pull request. - Wurstchen v2. - Image to text. - BLIP. + - TrOCR. - Computer Vision Models. - DINOv2, ConvMixer, EfficientNet, ResNet, ViT, VGG, RepVGG, ConvNeXT. - yolo-v3, yolo-v8. diff --git a/candle-examples/examples/trocr/readme.md b/candle-examples/examples/trocr/readme.md index b02050a0a2..f869c65aff 100644 --- a/candle-examples/examples/trocr/readme.md +++ b/candle-examples/examples/trocr/readme.md @@ -5,10 +5,16 @@ transcribe image text. See the associated [model card](https://huggingface.co/microsoft/trocr-base-printed) for details on the model itself. +Supported models include: +- `--which base`: small handwritten OCR model. +- `--which large`: large handwritten OCR model. +- `--which base-printed`: small printed OCR model. +- `--which large-printed`: large printed OCR model. + ## Running an example ```bash -cargo run --example trocr --release -- --which base --cpu --image candle-examples/examples/trocr/assets/trocr.png +cargo run --example trocr --release -- --image candle-examples/examples/trocr/assets/trocr.png ``` ```