Image-to-Text
Transformers
ONNX
Safetensors
Japanese
English
vision-encoder-decoder
feature-extraction
ocr
kuzushiji
japanese
historical-documents
custom_code
Instructions to use yuta1984/honkoku-ocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuta1984/honkoku-ocr with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="yuta1984/honkoku-ocr", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("yuta1984/honkoku-ocr", trust_remote_code=True) model = AutoModel.from_pretrained("yuta1984/honkoku-ocr", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download preprocessor_config.json from yuta1984/honkoku-ocr: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/yuta1984/honkoku-ocr/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://yuta1984/honkoku-ocr/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/yuta1984/honkoku-ocr/resolve/main/preprocessor_config.json
328 Bytes
| { | |
| "image_processor_type": "KuzushijiImageProcessor", | |
| "auto_map": { | |
| "AutoImageProcessor": "image_processing_kuzushiji.KuzushijiImageProcessor" | |
| }, | |
| "size": { | |
| "height": 256, | |
| "width": 2048 | |
| }, | |
| "image_mean": [ | |
| 0.485, | |
| 0.456, | |
| 0.406 | |
| ], | |
| "image_std": [ | |
| 0.229, | |
| 0.224, | |
| 0.225 | |
| ], | |
| "do_rotate": true, | |
| "do_pad": true | |
| } |