NilanE/ParallelFiction-Ja_En-100k
Viewer • Updated • 106k • 261 • 81
How to use bluolightning/manga-ocr-mobile with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="bluolightning/manga-ocr-mobile") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("bluolightning/manga-ocr-mobile", dtype="auto")How to use bluolightning/manga-ocr-mobile with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "bluolightning/manga-ocr-mobile"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bluolightning/manga-ocr-mobile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/bluolightning/manga-ocr-mobile
How to use bluolightning/manga-ocr-mobile with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "bluolightning/manga-ocr-mobile" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bluolightning/manga-ocr-mobile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "bluolightning/manga-ocr-mobile" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bluolightning/manga-ocr-mobile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use bluolightning/manga-ocr-mobile with Docker Model Runner:
docker model run hf.co/bluolightning/manga-ocr-mobile
This model is a lightweight OCR model build for speed and optimized for mobile/edge devices.
It achives high-accuracy text recognition while maintaining a footprint much smaller than standard models.
Check out the technical docs for more details. Source code will soon be available at the GitHub repo
PaddleOCR-VL-For-Manga, which has a ~10% CER and ~70% exact-match accuracyThis project was done with the usage of:
The model builds upon kha-white/manga-ocr, with a significant divergence in deployment focus and data generation.
@inproceedings{wang2024repvit,
title={Repvit: Revisiting mobile cnn from vit perspective},
author={Wang, Ao and Chen, Hui and Lin, Zijia and Han, Jungong and Ding, Guiguang},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={15909--15920},
year={2024}
}
@misc{wang2023repvitsam,
title={RepViT-SAM: Towards Real-Time Segmenting Anything},
author={Ao Wang and Hui Chen and Zijia Lin and Jungong Han and Guiguang Ding},
year={2023},
eprint={2312.05760},
archivePrefix={arXiv},
primaryClass={cs.CV}
}