Text recognition (OCR)
PP-OCRv5 Mobile
Finds and reads text in photos in about 100 languages: one small text detector and twelve recognizers covering Latin, Chinese, Japanese, Korean, Arabic, Cyrillic, Devanagari, Thai, Greek, Tamil and Telugu scripts.
About this model
PP-OCRv5 Mobile is PaddleOCR's on-device text reader. It works in two steps: the detector finds every line of text in a photo (signs, menus, labels, documents, screens) and returns its four corners; a recognizer then reads one line at a time.
The detector is the same for every language. Recognizers are per script: pick the one for the text you expect. Each also reads digits, punctuation and, for most scripts, Latin letters. chinese-japanese: Simplified and Traditional Chinese, Japanese, English, pinyin; english: English; latin: French, German, Spanish, Portuguese, Italian, Dutch, Polish, Turkish, Vietnamese, Indonesian, Swahili and 37 more Latin-script languages; eslav: Russian, Ukrainian, Belarusian; cyrillic: Russian, Ukrainian, Bulgarian, Serbian, Macedonian, Kazakh, Kyrgyz, Mongolian, Tajik, Tatar and 23 more Cyrillic-script languages; arabic: Arabic, Persian, Urdu, Pashto, Uyghur, Kurdish, Sindhi, Balochi; devanagari: Hindi, Marathi, Nepali, Sanskrit, Bhojpuri, Maithili, Konkani and 6 more; korean: Korean; thai: Thai; greek: Greek; tamil: Tamil; telugu: Telugu.
Slab does the steps between the models as PaddleOCR does: the detector's map becomes line quads (DB post-processing), each line is cut out and straightened from its quad, and the recognizer's output is decoded to text with a confidence (CTC). Arabic-script text is reordered for display as PaddleOCR does.
What you can build
- Read signs, menus and labels for translation or search
- Read receipts, business cards and product labels into an app
- Read text aloud for accessibility
- Find photos that contain a given word
Paris street sign (French)
f16Benoît Prieur, CC0, https://commons.wikimedia.org/wiki/File:Rue_Cont%C3%A9_(Paris)_en_juin_2019_-_panneau_de_rue.jpg
The detector and the latin recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out): 1. 3º Arr! (0.80) 2. RUE (1.00) 3. CONTÉ (1.00) 4. 1755-1805 (1.00) 5. CHIMISTE ET INGÉNIEUR (0.98) 6. CO-FONDATEUR DU CONSERVATOIRE NATIONAL (1.00) 7. DES ARTS ET MÉTIERS (0.98)
Shop signs in Taipei (Traditional Chinese)
f16Brian Hioe, CC0, https://commons.wikimedia.org/wiki/File:Taipei_street_signs.jpg
The detector and the chinese-japanese recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out, 9 here): 1. こ一号の店 (0.66) 2. 高の店 (0.83) 3. 三 (0.90) 4. 優質餐盒 (0.88) 5. 建 (0.99) 6. 律60元 (1.00) 7. 8985-5448 (1.00) 8. Z (0.51) 9. 小火锅 (0.91) 10. 全館便国 (0.68) 11. 996 (0.99) 12. 孕器:2986-6996 (0.84) 13. 本店已投保1000萬產品責任險,敬請安 (0.92) 14. 聞香下 (0.71) 15. 口幸留香口相 (0.86) 16. 馬肩满堂 (0.68) 17. 原煮·小吃·费·衛生 (0.71) 18. A善 (0.67) 19. 福维米至 (0.71) 20. 歡迎大 (0.82) 21. 家 (0.60) 22. AKP-0798 (0.93) 23. NLQ-1597 (0.88) 24. 208-EGX (0.98)
Station sign and poster in Tokyo (Japanese)
f16ウィキ太郎 (Wiki Taro), Public domain, https://commons.wikimedia.org/wiki/File:A_station_sign_at_Nakano_Station_Tokyo.jpg
The detector and the chinese-japanese recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out, 2 here): 1. 損して (0.94) 2. JB (1.00) 3. いませんか。 (0.96) 4. 07 (1.00) 5. アキメンバーズなら (0.75) 6. 貯まつたポントで (0.75) 7. ステキな賞品や飲料を (0.79) 8. GETできるのに。 (0.96) 9. アキメバーズ (0.66) 10. 検索 (0.92) 11. T (0.98) 12. 01 (1.00) 13. 3らに! (0.58) 14. 乃木饭46の (0.78) 15. Nakano (1.00) 16. 方リジナル融話が (0.68) 17. もれなくもらる (0.90) 18. 中野 (1.00) 19. acure (0.98) 20. 每日の“飲む”が、 (0.76) 21. もつとしくなる (0.88) 22. memhers (0.85) 23. アキアメンバーズ (0.65)
Korean street sign
f16Bernard Gagnon, CC0, https://commons.wikimedia.org/wiki/File:Street_sign_in_Daejeon.jpg
The detector and the korean recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out): 1. 대덕대로577번길 (1.00) 2. 68←1 (0.93) 3. 577beon-gil (0.93) 4. Daedeok-daero (0.99)
Restaurant sign (Arabic and English)
f16ديفيد عادل وهبة خليل 2, CC0, https://commons.wikimedia.org/wiki/File:%D9%85%D8%B7%D8%B9%D9%85_%D8%A7%D9%84%D9%85%D8%B1%D8%AC%D8%A7%D9%86_1.jpg
The detector and the arabic recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out): 1. المشويات (0.91) 2. للأسماك وا (0.84) 3. Almigan (0.90) 4. Fish (1.00) 5. Restaurant (1.00) 6. And (0.96) 7. Grill (0.92)
Park rules in Moscow (Russian)
f16Юрий Д.К., Public domain, https://commons.wikimedia.org/wiki/File:Moscow_-_2026_-_Warning_sign_in_Voskresensky_Park.jpg
The detector and the cyrillic recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out, 1 here): 1. BНИМАНИЕ! (0.69) 2. ВЕДЕТСЯ (0.94) 3. ВИДЕОНАБЛЮДЕНИЕ (0.99) 4. В ПАРКЕ ЗАПРЕЩАЕТСЯ: (0.97) 5. Порча муниципального имущества. ШТРАФ от 40 000 руб. (ст. 167, 214 (0.98) 6. Уголовного Кодекса Российской Федерации) (0.99) 7. Повреждение или уничтожение зеленых насаждений, в том числе с (0.96) 8. применением механизмов, автомототранспортных средств, самоходных (0.97) 9. машин и друтих видов техники (велосипеды, мопеды, скутеры). Штраф (0.93) 10. 3500 руб. (ст. 4.18 Кодекса города Москвы об административных (0.98) 11. правонарушениях) (0.98) 12. Выброс мусора в неположенном месте. ШТРАФ от 1000 руб. (ст. 8.2 (0.97) 13. Кодекса города Москвы об административных правонарушениях). (0.97) 14. Если Вы не можете обойтись без семечек при прогулках с детьми, пожалуйста, (0.97) 15. при лузгании, воспользуйтесь урной. (0.96) 16. Не кидайте шкурки себе под ноги! Здесь гуляют дети, не только чужие, но и (0.96) 17. прежде всего, Ваши! (0.92) 18. По незаплеванной площадке ходить гораздо приятней! (0.97) 19. Уважайте себя и окружающих! (0.99)
Museum sign (Thai and English)
f16TeslaMs, CC0, https://commons.wikimedia.org/wiki/File:Thai_Labour_Museum_Sign.jpg
The detector and the thai recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out): 1. พิพิธภัณฑ์แรงงานไทย (0.96) 2. THAI LABOUR MUSEUM (0.98) 3. เป็นพิพิธภัณต์ที่ร่วบรวมและจัดแสดงเรื่องราวและวิวัฒนาการของผูไช้แรองานไหย ตั้งแต่สมัยเป็นแรงงาน (0.94) 4. บัอพับยุดไพร่หาสจนถึงยุดบัจจุบัน อาคารพิศิกภัณท์ในอตีตเป็นที่หาการของดำรวจรถไฟ จากนั้นสหภาพแรงงานรถไฟไต้ใช้ (0.91) 5. เป็นที่ทาการก่อนที่จะเปลี่ยนเป็นพิพิธภัณฑ์ ด้านหน้าอาคาวมีอนุสาวรียศักติศรีแรขขาน เป็นรูปปูนปั้นคนงานชายหญิงกำลัง (0.94) 6. ผลักกงล้อประวัติศาสตรให้เคลื่อนที่ไปข้างหน้า (0.97) 7. ภายในอาคารมีห้องโดงใหญ่ใช้เป็นห้องเอนกประสงค์จัดประชุม สัมมนา นิหววศการและขายชองที่ระลึก (0.95) 8. ผนังห้องด้านบนมีภาหจิตรกวรมไหยเรื่อง วิวัฒนาการูไซ้แระงานไหย กลางห้องมี ระเจก ซึ่งเป็นพาหนะสาคัญในอดีตของ (0.93) 9. สังคมไหยกับผู้ใช้แรงงาน ส่วนห้องชังที่ยังคงมีลูกกรงเหล็กได้ตัดแปลงเป็น ห้องสมุดแรงงาน ศ. มิดศม จันหรวิมูร (0.90) 10. การจัดแสดงแบ่งเป็น 6 ห้อง โดยเริ่มจาก แระงานบังคับไพรหาสศือฐานของสังคมโบราณ แรงงานใน (0.92) 11. กระบวนการปฏิรูปประเหศ ทุกชของกรรมกรใควจะช่าย แรขงานพินักษ์ประชาชิปไดตย จากยุคมิตถึงยุศหองแรขานไหย และ (0.92) 12. ห้องสุดห้ายคือ วันนี้ยอดแระชานไหย (0.90) 13. เปิดบริการให้เข้าชมโดยไม่ต้องเสียค่าใช้จายในวันพุอ - วันอาทิตย์ ตั้งแต่เวลา 10.00 - 1๑9:00 น. (0.93) 14. IT IS A MUSEUM THAT HAS A COLLECTION ABOUT DISPLAY'S STORIES AND THE EVOLUTIOHN OF THAI LABOUR FROM THE TIME THAT SLAVERY STIL EXOSTEO (0.90) 15. A WOMAN WHO ARE PUISHING A HSTORIC WHEEL THAT IS MOVING FORINARDS OH A TANK (0.92) 16. INSIDE THE BUILDING IS THE ALL-PUIRPOSE HAL USED FOR MEETING, SEMNAR, EXHBITIONS AS WELL AS A SCUVENIR SHOP. ON THE WAL CISPLAYS THAI (0.89) 17. THAI LABOUR (0.92) 18. THE EXHIBITIOIN IS OIVIDED INTO S ROOMS STARTING FROM:- FORCE SLAVERY, TNAT WAS THE FOUNDATION GF THE ANCIENT SOCIETY, LABCUR OURING (0.89) 19. THE TIME OF REFORMI OF THE COUINTRY, THE SORROW OF THE LABCURER-WNO WILL MELP, LABCUIR PROTECT DEMOCRACY, FROMI THE DARK AGE TO THE GOLDEN AGE GF THAI (0.92) 20. LABOUIR, AND THE LAST ROOM IS THA/ LABOUR TODAY. (0.92) 21. THE MUSEUM IS OPENED TO THE PUBLIC WHICH NO ENTRANCE FEE, FROM WEDNESDAY'S TO SUNDAYS FROIM 1O.DO AML.- DS.BO P.M (0.89)
Athens street sign (Greek)
f16Syced, CC0, https://commons.wikimedia.org/wiki/File:2006_July_24,_Harbor_near_Athens_2.jpg
The detector and the greek recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out): 1. ΛΕΩΦΟΡΟΣ (1.00) 2. ΠΑΝΑΓ ΚΑΝΕΛΛΟΠΟΥΛΟΥ (0.95) 3. ANAG KANELOPOULOU (0.94)
Airport sign (Hindi and English)
f16Haoreima, CC0, https://commons.wikimedia.org/wiki/File:Trilingual_signboard(s)_in_the_Imphal_International_Airport_showing_information_in_Meitei_(Manipuri),_Hindi_and_English_languages_03.jpg
The detector and the devanagari recognizer on Metal (FP16 packs). Lines read, with text_score (lines under 0.5 left out, 3 here): 1. ARRIVAL (0.99) 2. आगमन (1.00)
Variants & downloads
Choose the build for your appModel files are hosted on Google Drive. Large files may open a confirmation page before downloading.
Small
SlabWeights stored as int8 in blocks of 64, decoded to float when loading, so it runs at the same speed. About 20% smaller; reads slightly fewer lines exactly (see Accuracy).
Platforms: macos · android
pp-ocrv5-mobile-det-int8.slab
5.7 MB · Hosted download
SHA-256 checksum
9789197a30cae2f6f68d050e7eb7c0996b20f8bd2df6f646a2113d71ee6f9a0epp-ocrv5-mobile-rec-chinese-japanese-int8.slab
8.3 MB · Hosted download
SHA-256 checksum
878cfbc847d58684e61547a5e1a0e30f0a2fce8535c0dbb2ab254d616db6381fpp-ocrv5-mobile-rec-english-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
86cab9733f7c4e279ac9c9ef2d43fa64c4a80aad052ff00e38a2e5f80fd2b985pp-ocrv5-mobile-rec-latin-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
3b03ccfd601247dec81ce9ace7de958f0872286d17b79f3c4a07cddf7096bf1cpp-ocrv5-mobile-rec-eslav-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
1e2ec953f41c037e383e479644066f3f82e0f71c0ca308badf611880d2d75cb4pp-ocrv5-mobile-rec-cyrillic-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
7d489851b062e16a79ee1ea74216abf448c2aadbe2b471bfc1f316dc2f5fe62app-ocrv5-mobile-rec-arabic-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
bae2e0f29a5404f2345ab3565aa21bcdf53848ef075f8881cb10422498f125a9pp-ocrv5-mobile-rec-devanagari-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
e4a1c2c42863cfcb2cde86e3722c0e39c62f1d4de25ee084c418a55b2a99ba18pp-ocrv5-mobile-rec-korean-int8.slab
7.5 MB · Hosted download
SHA-256 checksum
2545e4f6fd269cb793a21ce8e91f6dc9a15348b3a936b64ed478a896dbbde58epp-ocrv5-mobile-rec-thai-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
6fd8c5af3d4df8a9f5964a7b6d4b5a687d7ce3bac5a57d3a5d3c7069c03d881epp-ocrv5-mobile-rec-greek-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
547987ab9da9bf94e68f7807db8bf7d64e2796430989780a669182c80c2408b6pp-ocrv5-mobile-rec-tamil-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
39590771c470d0f9d6795f11039ce5a552a633cda1e0d2f68de269af070d9565pp-ocrv5-mobile-rec-telugu-int8.slab
6.0 MB · Hosted download
SHA-256 checksum
b044a2db201e1eca146d9fd1d8dd01565d642794bfd7e3636940f9b0bdcbc1caLICENSE-PaddleOCR.txt
11 KB
SHA-256 checksum
3840c5c0c61c294264d2dd77b8777be6ddd90121ef4e0e64abcd22edea581d6eConversion details
- command
- hf download PaddlePaddle/PP-OCRv5_mobile_det --revision 0d63e78e2b680928f6b1747d76a08db6e645efb7 --local-dir PP-OCRv5_mobile_det hf download PaddlePaddle/PP-OCRv5_mobile_rec --revision 682f20538d8c086cb2128e5cfac775e6c4904e85 --local-dir PP-OCRv5_mobile_rec hf download PaddlePaddle/en_PP-OCRv5_mobile_rec --revision 267c36e24c331595590fe7bd72bde2436fd286f2 --local-dir en_PP-OCRv5_mobile_rec hf download PaddlePaddle/latin_PP-OCRv5_mobile_rec --revision ab2cd5cc5fa6309be2e5acdfe66eca2c2c127d57 --local-dir latin_PP-OCRv5_mobile_rec hf download PaddlePaddle/eslav_PP-OCRv5_mobile_rec --revision 7553801264d3379d8d2e854971989e5e26c22e03 --local-dir eslav_PP-OCRv5_mobile_rec hf download PaddlePaddle/cyrillic_PP-OCRv5_mobile_rec --revision 712d2d65556ccc1ea7b5d2bb232b018838b6a3ab --local-dir cyrillic_PP-OCRv5_mobile_rec hf download PaddlePaddle/arabic_PP-OCRv5_mobile_rec --revision 33d91636a65dca87f5562cc48860332ae367ee1b --local-dir arabic_PP-OCRv5_mobile_rec hf download PaddlePaddle/devanagari_PP-OCRv5_mobile_rec --revision 99dcce6d196bd4aaf268c7a5c72c3cc9f3ea4932 --local-dir devanagari_PP-OCRv5_mobile_rec hf download PaddlePaddle/korean_PP-OCRv5_mobile_rec --revision c02ecaf1f22bfd1c618cce154fd19185b47e663a --local-dir korean_PP-OCRv5_mobile_rec hf download PaddlePaddle/th_PP-OCRv5_mobile_rec --revision 9e25080455925d3943f5db885fddc79db6a07ca3 --local-dir th_PP-OCRv5_mobile_rec hf download PaddlePaddle/el_PP-OCRv5_mobile_rec --revision b15bcf2467a03a0c079baa4b0347da51e89aaaba --local-dir el_PP-OCRv5_mobile_rec hf download PaddlePaddle/ta_PP-OCRv5_mobile_rec --revision 1bb164dad1d8eb23c7f7a382827e5305b37868d4 --local-dir ta_PP-OCRv5_mobile_rec hf download PaddlePaddle/te_PP-OCRv5_mobile_rec --revision 151ab3b1c2f2a058f07a944416b92e9eaec6bf36 --local-dir te_PP-OCRv5_mobile_rec for m in PP-OCRv5_mobile_det PP-OCRv5_mobile_rec en_PP-OCRv5_mobile_rec latin_PP-OCRv5_mobile_rec eslav_PP-OCRv5_mobile_rec cyrillic_PP-OCRv5_mobile_rec arabic_PP-OCRv5_mobile_rec devanagari_PP-OCRv5_mobile_rec korean_PP-OCRv5_mobile_rec th_PP-OCRv5_mobile_rec el_PP-OCRv5_mobile_rec ta_PP-OCRv5_mobile_rec te_PP-OCRv5_mobile_rec; do paddle2onnx --model_dir $m --model_filename inference.json --params_filename inference.pdiparams --save_file $m/model.onnx --opset_version 17; done slab-load convert PP-OCRv5_mobile_det/model.onnx det-640x640.slab --input x=1x3x640x640 --meta task=text_detect --meta color=bgr --meta normalize=imagenet --meta tile_pad:i64=64 && slab-load quantize det-640x640.slab pp-ocrv5-mobile-det-int8.slab for s in 960x736 736x960 1280x736 736x1280 1440x1088 1088x1440 1920x1088 1088x1920; do w=${s%x*}; h=${s#*x}; slab-load convert PP-OCRv5_mobile_det/model.onnx det-$s.slab --input x=1x3x${h}x${w} --meta task=text_detect --meta color=bgr --meta normalize=imagenet --meta tile_pad:i64=64 && slab-load quantize det-$s.slab det-$s-int8.slab; done slab-load buckets pp-ocrv5-mobile-det-int8.slab det-960x736-int8.slab det-736x960-int8.slab det-1280x736-int8.slab det-736x1280-int8.slab det-1440x1088-int8.slab det-1088x1440-int8.slab det-1920x1088-int8.slab det-1088x1920-int8.slab slab-load meta set pp-ocrv5-mobile-det-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-chinese-japanese.txt for w in 320 640 960 1280 1920; do slab-load convert PP-OCRv5_mobile_rec/model.onnx rec-chinese-japanese-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-chinese-japanese.txt && slab-load quantize rec-chinese-japanese-$w.slab rec-chinese-japanese-$w-int8.slab; done cp rec-chinese-japanese-320-int8.slab pp-ocrv5-mobile-rec-chinese-japanese-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-chinese-japanese-int8.slab rec-chinese-japanese-640-int8.slab rec-chinese-japanese-960-int8.slab rec-chinese-japanese-1280-int8.slab rec-chinese-japanese-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-chinese-japanese-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('en_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-english.txt for w in 320 640 960 1280 1920; do slab-load convert en_PP-OCRv5_mobile_rec/model.onnx rec-english-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-english.txt && slab-load quantize rec-english-$w.slab rec-english-$w-int8.slab; done cp rec-english-320-int8.slab pp-ocrv5-mobile-rec-english-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-english-int8.slab rec-english-640-int8.slab rec-english-960-int8.slab rec-english-1280-int8.slab rec-english-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-english-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('latin_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-latin.txt for w in 320 640 960 1280 1920; do slab-load convert latin_PP-OCRv5_mobile_rec/model.onnx rec-latin-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-latin.txt && slab-load quantize rec-latin-$w.slab rec-latin-$w-int8.slab; done cp rec-latin-320-int8.slab pp-ocrv5-mobile-rec-latin-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-latin-int8.slab rec-latin-640-int8.slab rec-latin-960-int8.slab rec-latin-1280-int8.slab rec-latin-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-latin-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('eslav_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-eslav.txt for w in 320 640 960 1280 1920; do slab-load convert eslav_PP-OCRv5_mobile_rec/model.onnx rec-eslav-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-eslav.txt && slab-load quantize rec-eslav-$w.slab rec-eslav-$w-int8.slab; done cp rec-eslav-320-int8.slab pp-ocrv5-mobile-rec-eslav-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-eslav-int8.slab rec-eslav-640-int8.slab rec-eslav-960-int8.slab rec-eslav-1280-int8.slab rec-eslav-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-eslav-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('cyrillic_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-cyrillic.txt for w in 320 640 960 1280 1920; do slab-load convert cyrillic_PP-OCRv5_mobile_rec/model.onnx rec-cyrillic-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-cyrillic.txt && slab-load quantize rec-cyrillic-$w.slab rec-cyrillic-$w-int8.slab; done cp rec-cyrillic-320-int8.slab pp-ocrv5-mobile-rec-cyrillic-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-cyrillic-int8.slab rec-cyrillic-640-int8.slab rec-cyrillic-960-int8.slab rec-cyrillic-1280-int8.slab rec-cyrillic-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-cyrillic-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('arabic_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-arabic.txt for w in 320 640 960 1280 1920; do slab-load convert arabic_PP-OCRv5_mobile_rec/model.onnx rec-arabic-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-arabic.txt && slab-load quantize rec-arabic-$w.slab rec-arabic-$w-int8.slab; done cp rec-arabic-320-int8.slab pp-ocrv5-mobile-rec-arabic-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-arabic-int8.slab rec-arabic-640-int8.slab rec-arabic-960-int8.slab rec-arabic-1280-int8.slab rec-arabic-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-arabic-int8.slab default_backend.macos=gpu && slab-load meta set pp-ocrv5-mobile-rec-arabic-int8.slab text_order=bidi python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('devanagari_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-devanagari.txt for w in 320 640 960 1280 1920; do slab-load convert devanagari_PP-OCRv5_mobile_rec/model.onnx rec-devanagari-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-devanagari.txt && slab-load quantize rec-devanagari-$w.slab rec-devanagari-$w-int8.slab; done cp rec-devanagari-320-int8.slab pp-ocrv5-mobile-rec-devanagari-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-devanagari-int8.slab rec-devanagari-640-int8.slab rec-devanagari-960-int8.slab rec-devanagari-1280-int8.slab rec-devanagari-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-devanagari-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('korean_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-korean.txt for w in 320 640 960 1280 1920; do slab-load convert korean_PP-OCRv5_mobile_rec/model.onnx rec-korean-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-korean.txt && slab-load quantize rec-korean-$w.slab rec-korean-$w-int8.slab; done cp rec-korean-320-int8.slab pp-ocrv5-mobile-rec-korean-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-korean-int8.slab rec-korean-640-int8.slab rec-korean-960-int8.slab rec-korean-1280-int8.slab rec-korean-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-korean-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('th_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-thai.txt for w in 320 640 960 1280 1920; do slab-load convert th_PP-OCRv5_mobile_rec/model.onnx rec-thai-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-thai.txt && slab-load quantize rec-thai-$w.slab rec-thai-$w-int8.slab; done cp rec-thai-320-int8.slab pp-ocrv5-mobile-rec-thai-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-thai-int8.slab rec-thai-640-int8.slab rec-thai-960-int8.slab rec-thai-1280-int8.slab rec-thai-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-thai-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('el_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-greek.txt for w in 320 640 960 1280 1920; do slab-load convert el_PP-OCRv5_mobile_rec/model.onnx rec-greek-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-greek.txt && slab-load quantize rec-greek-$w.slab rec-greek-$w-int8.slab; done cp rec-greek-320-int8.slab pp-ocrv5-mobile-rec-greek-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-greek-int8.slab rec-greek-640-int8.slab rec-greek-960-int8.slab rec-greek-1280-int8.slab rec-greek-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-greek-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('ta_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-tamil.txt for w in 320 640 960 1280 1920; do slab-load convert ta_PP-OCRv5_mobile_rec/model.onnx rec-tamil-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-tamil.txt && slab-load quantize rec-tamil-$w.slab rec-tamil-$w-int8.slab; done cp rec-tamil-320-int8.slab pp-ocrv5-mobile-rec-tamil-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-tamil-int8.slab rec-tamil-640-int8.slab rec-tamil-960-int8.slab rec-tamil-1280-int8.slab rec-tamil-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-tamil-int8.slab default_backend.macos=gpu python -c "import yaml; print('\n'.join(['blank'] + yaml.safe_load(open('te_PP-OCRv5_mobile_rec/inference.yml'))['PostProcess']['character_dict'] + [' ']))" > labels-telugu.txt for w in 320 640 960 1280 1920; do slab-load convert te_PP-OCRv5_mobile_rec/model.onnx rec-telugu-$w.slab --input x=1x3x48x$w --meta task=text_recognize --meta crop=quad --meta decode=ctc --meta color=bgr --meta normalize=neg_one_to_one --meta labels:labels=@labels-telugu.txt && slab-load quantize rec-telugu-$w.slab rec-telugu-$w-int8.slab; done cp rec-telugu-320-int8.slab pp-ocrv5-mobile-rec-telugu-int8.slab && slab-load buckets pp-ocrv5-mobile-rec-telugu-int8.slab rec-telugu-640-int8.slab rec-telugu-960-int8.slab rec-telugu-1280-int8.slab rec-telugu-1920-int8.slab slab-load meta set pp-ocrv5-mobile-rec-telugu-int8.slab default_backend.macos=gpu
Integration examples
Python
python
import slab
cfg = slab.Config(cache_dir="/tmp/slab_cache", license=open("license.slablic.txt").read())
detector = slab.Session(cfg, "pp-ocrv5-mobile-det-f16.slab")
reader = slab.Session(cfg, "pp-ocrv5-mobile-rec-latin-f16.slab") # one recognizer per script
photo = slab.Frame.open("sign.jpg")
for line in detector.run(slab.Input(frame=photo)).text_lines(): # top to bottom, left to right
out = reader.run(slab.Input(frame=photo, quad=line.points)) # Slab cuts out and straightens the line
if out.text_score >= 0.5:
print(out.text, round(out.text_score, 2))
Device & backend compatibility
Pack default: macos / GPU. Fast and quick to prepare: a 1080p photo's lines found in about 23 ms, each line read in 3 to 19 ms, and the whole pipeline on a 1080p menu in 90 ms. The Neural Engine runs the pipeline in 83 ms but takes 9 to 14 s to prepare each pack.
| Platform | Engine | Status | Precision |
|---|---|---|---|
| apple | CPU CPU | Supported Measured on macOS. | f32 |
| apple | Metal GPU | Supported Measured on macOS. The default. | f32 |
| apple | Apple Neural Engine NPU | Supported Measured on macOS. The Neural Engine computes in FP16. Opening prepares every input size of a pack: 9 to 14 s per pack. Apple's compiler logs errors for some of them while the runs still complete and match the other backends (see Accuracy). | f16 |
| android | CPU CPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
| android | Vulkan GPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
Performance
Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
243.8 ms
Measured time · scope below
Detector on a 1920 x 1080 photo, run whole on the 1920 x 1088 bucket, text_lines() included: median of 10. One 640 x 640 tile alone: 47.1 ms. A 1280 x 720 frame: 105.7 ms; a 4032 x 3024 photo (larger than every bucket, 640 x 640 tiles): 2316 ms.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
12.7 ms
Measured time · scope below
english recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 12.7 ms, 640: 21.1 ms, 960: 30.6 ms, 1280: 40.0 ms, 1920: 61.1 ms. Opening includes all five widths.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
377.7 ms
Measured time · scope below
Whole pipeline on a 1920 x 1080 photo of a chalkboard menu: the detector, then the English recognizer on each of its 11 lines, median of 10.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
18.0 ms
Measured time · scope below
chinese-japanese recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 18.0 ms, 640: 31.8 ms, 960: 45.7 ms, 1280: 60.5 ms, 1920: 91.0 ms. Opening includes all five widths.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
24.3 ms
Measured time · scope below
Detector on a 1920 x 1080 photo, run whole on the 1920 x 1088 bucket, text_lines() included: median of 10. One 640 x 640 tile alone: 4.3 ms. A 1280 x 720 frame: 12.1 ms; a 4032 x 3024 photo (larger than every bucket, 640 x 640 tiles): 272 ms.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
3.2 ms
Measured time · scope below
english recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 3.2 ms, 640: 5.0 ms, 960: 6.5 ms, 1280: 8.3 ms, 1920: 11.0 ms. Opening includes all five widths.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
73.0 ms
Measured time · scope below
Whole pipeline on a 1920 x 1080 photo of a chalkboard menu: the detector, then the English recognizer on each of its 11 lines, median of 10.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
4.8 ms
Measured time · scope below
chinese-japanese recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 4.8 ms, 640: 7.4 ms, 960: 10.0 ms, 1280: 12.2 ms, 1920: 18.9 ms. Opening includes all five widths.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
35.5 ms
Measured time · scope below
Detector on a 1920 x 1080 photo, run whole on the 1920 x 1088 bucket, text_lines() included: median of 10. One 640 x 640 tile alone: 5.4 ms. A 1280 x 720 frame: 15.8 ms; a 4032 x 3024 photo (larger than every bucket, 640 x 640 tiles): 300 ms.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
4.0 ms
Measured time · scope below
english recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 3.9 ms, 640: 4.4 ms, 960: 6.2 ms, 1280: 7.8 ms, 1920: 12.1 ms. Opening includes all five widths.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
82.7 ms
Measured time · scope below
Whole pipeline on a 1920 x 1080 photo of a chalkboard menu: the detector, then the English recognizer on each of its 11 lines, median of 10.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
4.2 ms
Measured time · scope below
chinese-japanese recognizer, one text line with cropping and CTC decoding, median of 50, by the width the line needs at height 48: 320: 4.2 ms, 640: 7.2 ms, 960: 9.3 ms, 1280: 11.6 ms, 1920: 17.4 ms. Opening includes all five widths.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · CPU
Android 17
870.0 ms
Measured time · scope below
Detector on a 1920 x 1080 photo, run whole on the 1920 x 1088 bucket, text_lines() included: median of 10. open_ms: opening the session. Peak memory (resident) after the runs: 654 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · CPU
Android 17
970.0 ms
Measured time · scope below
Whole pipeline on a 960 x 945 photo of a street sign (the first example on this page): the detector, then the English recognizer on each of its 7 lines, median of 10. Peak memory (resident) after the runs: 451 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
543.0 ms
Measured time · scope below
Detector on a 1920 x 1080 photo, run whole on the 1920 x 1088 bucket, text_lines() included: median of 10. open_ms: opening the session with the GPU programs already in the cache folder (the first open on a device compiles them, about 0.3 s more). Peak memory (resident) after the runs: 228 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
779.0 ms
Measured time · scope below
Whole pipeline on a 960 x 945 photo of a street sign (the first example on this page): the detector, then the English recognizer on each of its 7 lines, median of 10. Peak memory (resident) after the runs: 262 MB.
Accuracy checks
macos · GPU · int8
The PaddleOCR 3.7 pipeline with the same upstream models (Paddle inference; no document orientation, unwarping or line orientation; recognition in batches of 6, its default) on 53 public-domain and CC0 photos of signs, menus and labels (Wikimedia Commons), grouped by recognizer. A line counts when Slab's box overlaps PaddleOCR's by IoU 0.5 or more; confident lines are those PaddleOCR scores 0.9 or more
Confident lines found 317 of 346; 79.5% read exactly the same, character error rate 2.96%. All lines: 587 of 701 found. By recognizer (confident lines found, character error rate): chinese-japanese 56/57 at 2.0%; english 70/74 at 2.6%; latin 24/26 at 3.5%; eslav 29/31 at 1.2%; cyrillic 30/31 at 0.9%; arabic 47/51 at 1.8%; devanagari 8/23 at 1.9%; korean 4/4 at 0.0%; thai 40/40 at 6.4%; greek 8/8 at 4.1%; tamil 1/1 at 0.0%. Telugu has no test photo.
macos · CPU · int8
The PaddleOCR 3.7 pipeline with the same upstream models (Paddle inference; no document orientation, unwarping or line orientation; recognition in batches of 6, its default) on 53 public-domain and CC0 photos of signs, menus and labels (Wikimedia Commons), grouped by recognizer. A line counts when Slab's box overlaps PaddleOCR's by IoU 0.5 or more; confident lines are those PaddleOCR scores 0.9 or more
Confident lines found 317 of 346; 79.5% read exactly the same, character error rate 2.96%. All lines: 587 of 701 found. By recognizer (confident lines found, character error rate): chinese-japanese 56/57 at 2.0%; english 70/74 at 2.6%; latin 24/26 at 3.5%; eslav 29/31 at 1.2%; cyrillic 30/31 at 0.9%; arabic 47/51 at 1.8%; devanagari 8/23 at 1.9%; korean 4/4 at 0.0%; thai 40/40 at 6.4%; greek 8/8 at 4.1%; tamil 1/1 at 0.0%. Telugu has no test photo.
Before you choose this model
- The app picks the recognizer: nothing detects the language. Text in two scripts needs two recognizers (each run on the same lines).
- Not a document model: no layout, columns or tables. text_lines() comes sorted top to bottom, then left to right.
- Whether a line comes back as one box or as separate words is sensitive to small changes: on some photos Slab joins words that PaddleOCR splits, or the reverse (the text read is the same). ONNX Runtime shows the same sensitivity between two equally valid ways of sizing the photo.
- The detector runs the photo whole at sizes up to 1920 x 1088 (landscape) or 1088 x 1920 (portrait), padded to the nearest of nine sizes. Larger photos run as 640 x 640 tiles with 64 pixels of overlap, which are slower and agree less with PaddleOCR; scale them down first if the text is large.
- A line wider than 40 times its height is squeezed to 1920 x 48; very long lines are read less well.
- The Arabic recognizer is weaker on real signs than the others, in PaddleOCR as in Slab. The Telugu recognizer was not checked (no test photo).
- On the Neural Engine each pack takes 9 to 14 s to prepare; the GPU takes under a quarter of a second.