high-speed, high-accuracy, local ocr for japanese video games
Python
100
22 commits
updated Sep 25, 2026
high-speed, high-accuracy, local ocr for japanese video games.
meikiocr is a python-based ocr pipeline that combines state-of-the-art detection and recognition models to provide an unparalleled open-source solution for extracting japanese text from video games and similar rendered content.
| original image | ocr result |
|---|---|
ナルホド
こ、こんなにドキドキするの、
小学校の学級裁判のとき以来です。
the easiest way to see meikiocr in action is to try the live demo hosted on hugging face spaces. no installation required!
try the meikiocr live demo here
meikiocr significantly outperforms general-purpose ocr tools like paddleocr or easyocr on this specific domain.meikiocr runs entirely on your machine, ensuring privacy and eliminating api costs or rate limits.meikiocr is built from two highly efficient models that establish a new pareto front for japanese text recognition. this means they offer a better accuracy/latency tradeoff than any other known open-weight model.
| detection (cpu) | detection (gpu) |
|---|---|
![]() | ![]() |
| recognition (cpu) | recognition (gpu) |
|---|---|
![]() | ![]() |
pip install meikiocr
for a massive performance boost, you can install the gpu-enabled version of the onnx runtime. this will be detected automatically by the script.
pip install meikiocr
pip uninstall onnxruntime
pip install onnxruntime-gpu
after installation, you can use the meikiocr tool directly from your terminal.
meikiocr image.png
meikiocr image.png --output result.jpg
meikiocr image.png --json
meikiocr image.png --det-threshold 0.6 --rec-threshold 0.2
run meikiocr --help for a full list of available options.
this is how meikiocr can be called. you can also run demo.py for additional visual output.
import cv2
import numpy as np
from urllib.request import urlopen
from meikiocr import MeikiOCR
IMAGE_URL = "https://huggingface.co/spaces/rtr46/meikiocr/resolve/main/example.jpg"
with urlopen(IMAGE_URL) as resp:
image = cv2.imdecode(np.asarray(bytearray(resp.read()), dtype="uint8"), cv2.IMREAD_COLOR)
ocr = MeikiOCR() # Initialize the OCR pipeline
results = ocr.run_ocr(image) # Run the full OCR pipeline
print('\n'.join([line['text'] for line in results if line['text']]))
you can adjust the confidence thresholds for both the text line detection and the character recognition models. lowering the thresholds results in more detected text lines and characters, while higher values prevent false positives.
MeikiOCR().run_ocr(self, image, det_threshold=0.8, rec_threshold=0.2) # less, but more confident text boxes and characters returned
if you only care about the position of the text and not the content you can run the detection by itself, which is faster than running the whole ocr pipeline:
MeikiOCR().run_detection(self, image, det_threshold=0.8, rec_threshold=0.2) # only returns text line coordinates
in the same way you can also run_recognition by itself on images of precropped text lines.
meikiocr is a two-stage pipeline:
while meikiocr is state-of-the-art for its niche, it's important to understand its design constraints:
the meiki_ocr.py script provides a straightforward implementation of a post-processing pipeline that selects the most confident prediction for each character. however, the raw output from the recognition model is richer and can be used for more advanced applications. for example, one could build a language-aware post-processing step using n-grams to correct ocr mistakes by considering alternative character predictions.
this opens the door for meikiocr to be integrated into a variety of projects.
this project is licensed under the apache 2.0 license. see the license file for details.
high-speed, high-accuracy, local ocr for japanese video games
Python
100
22 commits
updated Sep 25, 2026
high-speed, high-accuracy, local ocr for japanese video games.
meikiocr is a python-based ocr pipeline that combines state-of-the-art detection and recognition models to provide an unparalleled open-source solution for extracting japanese text from video games and similar rendered content.
| original image | ocr result |
|---|---|
ナルホド
こ、こんなにドキドキするの、
小学校の学級裁判のとき以来です。
the easiest way to see meikiocr in action is to try the live demo hosted on hugging face spaces. no installation required!
try the meikiocr live demo here
meikiocr significantly outperforms general-purpose ocr tools like paddleocr or easyocr on this specific domain.meikiocr runs entirely on your machine, ensuring privacy and eliminating api costs or rate limits.meikiocr is built from two highly efficient models that establish a new pareto front for japanese text recognition. this means they offer a better accuracy/latency tradeoff than any other known open-weight model.
| detection (cpu) | detection (gpu) |
|---|---|
![]() | ![]() |
| recognition (cpu) | recognition (gpu) |
|---|---|
![]() | ![]() |
pip install meikiocr
for a massive performance boost, you can install the gpu-enabled version of the onnx runtime. this will be detected automatically by the script.
pip install meikiocr
pip uninstall onnxruntime
pip install onnxruntime-gpu
after installation, you can use the meikiocr tool directly from your terminal.
meikiocr image.png
meikiocr image.png --output result.jpg
meikiocr image.png --json
meikiocr image.png --det-threshold 0.6 --rec-threshold 0.2
run meikiocr --help for a full list of available options.
this is how meikiocr can be called. you can also run demo.py for additional visual output.
import cv2
import numpy as np
from urllib.request import urlopen
from meikiocr import MeikiOCR
IMAGE_URL = "https://huggingface.co/spaces/rtr46/meikiocr/resolve/main/example.jpg"
with urlopen(IMAGE_URL) as resp:
image = cv2.imdecode(np.asarray(bytearray(resp.read()), dtype="uint8"), cv2.IMREAD_COLOR)
ocr = MeikiOCR() # Initialize the OCR pipeline
results = ocr.run_ocr(image) # Run the full OCR pipeline
print('\n'.join([line['text'] for line in results if line['text']]))
you can adjust the confidence thresholds for both the text line detection and the character recognition models. lowering the thresholds results in more detected text lines and characters, while higher values prevent false positives.
MeikiOCR().run_ocr(self, image, det_threshold=0.8, rec_threshold=0.2) # less, but more confident text boxes and characters returned
if you only care about the position of the text and not the content you can run the detection by itself, which is faster than running the whole ocr pipeline:
MeikiOCR().run_detection(self, image, det_threshold=0.8, rec_threshold=0.2) # only returns text line coordinates
in the same way you can also run_recognition by itself on images of precropped text lines.
meikiocr is a two-stage pipeline:
while meikiocr is state-of-the-art for its niche, it's important to understand its design constraints:
the meiki_ocr.py script provides a straightforward implementation of a post-processing pipeline that selects the most confident prediction for each character. however, the raw output from the recognition model is richer and can be used for more advanced applications. for example, one could build a language-aware post-processing step using n-grams to correct ocr mistakes by considering alternative character predictions.
this opens the door for meikiocr to be integrated into a variety of projects.
this project is licensed under the apache 2.0 license. see the license file for details.
2,288 followers · starred Nov 2025