Image-Text-to-Text
MLX
Safetensors
Chinese
ocr
rare-characters
ids
ideographic-description-sequence
glyphwiki
palaeography
Instructions to use OpenGlyph/OpenGlyph-OCR-IDS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenGlyph/OpenGlyph-OCR-IDS with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("OpenGlyph/OpenGlyph-OCR-IDS") config = load_config("OpenGlyph/OpenGlyph-OCR-IDS") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download ids-tables.json from OpenGlyph/OpenGlyph-OCR-IDS: direct link, hf CLI and curl.
- Browser
- Download file 4.25 kB
-
https://huggingface.co/OpenGlyph/OpenGlyph-OCR-IDS/resolve/main/ids-tables.json
- Command line
-
hf download hf://OpenGlyph/OpenGlyph-OCR-IDS/ids-tables.json
-
curl -L -o ids-tables.json https://huggingface.co/OpenGlyph/OpenGlyph-OCR-IDS/resolve/main/ids-tables.json
4.25 kB
| { | |
| "schema": "openglyph.ocr-ids.tables.v1", | |
| "note": "the IDS layer: its tokens (after the reader's, from first_id on), the input rows they are given (rows of the base vocabulary: begun = the rows whose mean <ids> takes, finished = the row of </ids>, structure = the row of each structure token), and what the speller is", | |
| "tokens": [ | |
| "<ids>", | |
| "</ids>", | |
| "⿰", | |
| "⿱", | |
| "⿲", | |
| "⿳", | |
| "⿴", | |
| "⿵", | |
| "⿶", | |
| "⿷", | |
| "⿸", | |
| "⿹", | |
| "⿺", | |
| "⿻" | |
| ], | |
| "first_id": 407129, | |
| "inputs": { | |
| "begun": [ | |
| 158, | |
| 159, | |
| 161, | |
| 162, | |
| 163, | |
| 164, | |
| 165, | |
| 172, | |
| 95724, | |
| 95725, | |
| 95727, | |
| 95728, | |
| 95729, | |
| 95730, | |
| 95731, | |
| 95732, | |
| 95733, | |
| 95734, | |
| 95735, | |
| 95736, | |
| 95737, | |
| 95738, | |
| 95739, | |
| 95740, | |
| 95741, | |
| 95742, | |
| 95743, | |
| 95745, | |
| 95746, | |
| 95747, | |
| 95748, | |
| 95749, | |
| 95750, | |
| 95751, | |
| 95752, | |
| 95754, | |
| 95755, | |
| 95756, | |
| 95757, | |
| 95758, | |
| 95760, | |
| 95763, | |
| 95764, | |
| 95766, | |
| 95767, | |
| 95768, | |
| 95769, | |
| 95770, | |
| 95771, | |
| 95773, | |
| 95774, | |
| 95775, | |
| 95776, | |
| 95777, | |
| 95778, | |
| 95780, | |
| 95781, | |
| 95782, | |
| 95783, | |
| 95784, | |
| 95785, | |
| 95786, | |
| 95787, | |
| 95788, | |
| 95790, | |
| 95791, | |
| 95792, | |
| 95794, | |
| 95795, | |
| 95796, | |
| 95798, | |
| 95799, | |
| 95800, | |
| 95801, | |
| 95803, | |
| 95804, | |
| 95805, | |
| 95806, | |
| 95807, | |
| 95808, | |
| 95809, | |
| 95811, | |
| 95812, | |
| 95816, | |
| 95817, | |
| 95818, | |
| 95819, | |
| 95820, | |
| 95821, | |
| 95823, | |
| 95827, | |
| 95830, | |
| 95831, | |
| 95832, | |
| 95834, | |
| 95837, | |
| 95838, | |
| 95843, | |
| 95846, | |
| 95848, | |
| 95850, | |
| 95851, | |
| 95853, | |
| 95857, | |
| 95861, | |
| 95862, | |
| 95863, | |
| 95864, | |
| 95866, | |
| 95867, | |
| 95868, | |
| 95870, | |
| 95875, | |
| 95876, | |
| 95877, | |
| 95878, | |
| 95884, | |
| 95885, | |
| 95886, | |
| 95888, | |
| 95891, | |
| 95893, | |
| 95894, | |
| 95897, | |
| 95898, | |
| 95899, | |
| 95900, | |
| 95904, | |
| 95906, | |
| 95908, | |
| 95914, | |
| 95919, | |
| 95920, | |
| 95925, | |
| 95926, | |
| 95927, | |
| 95931, | |
| 95935, | |
| 95937, | |
| 95939, | |
| 95941, | |
| 95947, | |
| 95950, | |
| 95951, | |
| 95956, | |
| 95957, | |
| 95964, | |
| 95965, | |
| 95967, | |
| 95968, | |
| 95970, | |
| 95976, | |
| 95977, | |
| 95978, | |
| 95985, | |
| 95987, | |
| 95991, | |
| 95992, | |
| 95993, | |
| 95994, | |
| 95995, | |
| 95998, | |
| 96000, | |
| 96002, | |
| 96008, | |
| 96014, | |
| 96015, | |
| 96016, | |
| 96018, | |
| 96027, | |
| 96030, | |
| 96034, | |
| 96035, | |
| 96036, | |
| 96039, | |
| 96046, | |
| 96047, | |
| 96049, | |
| 96054, | |
| 96055, | |
| 96057, | |
| 96058, | |
| 96064, | |
| 96073, | |
| 96078, | |
| 96084, | |
| 96095, | |
| 96104, | |
| 96107, | |
| 96109, | |
| 96118, | |
| 96119, | |
| 96124, | |
| 96134, | |
| 96136, | |
| 96145, | |
| 96148, | |
| 96164, | |
| 96166, | |
| 96169, | |
| 96174, | |
| 96175, | |
| 96187, | |
| 96194, | |
| 96204, | |
| 96210, | |
| 96211, | |
| 96224, | |
| 96231, | |
| 96240, | |
| 96246, | |
| 96247, | |
| 96248, | |
| 96258, | |
| 96269, | |
| 96272, | |
| 96274, | |
| 96286, | |
| 96298, | |
| 96303, | |
| 96320, | |
| 96334, | |
| 96338, | |
| 96339, | |
| 96340, | |
| 96361, | |
| 96362, | |
| 96372, | |
| 96377, | |
| 96387, | |
| 96394, | |
| 96400, | |
| 96401, | |
| 96413, | |
| 96414, | |
| 96422, | |
| 96423, | |
| 96441, | |
| 96455, | |
| 96463, | |
| 96475, | |
| 96485, | |
| 96486, | |
| 96503, | |
| 96519, | |
| 96562, | |
| 96570, | |
| 96579, | |
| 96587, | |
| 96632, | |
| 96633, | |
| 96641, | |
| 96643, | |
| 96654, | |
| 96666, | |
| 96667, | |
| 96668, | |
| 96682, | |
| 96695, | |
| 96696, | |
| 96707, | |
| 96708, | |
| 96733, | |
| 96745, | |
| 96757, | |
| 96758, | |
| 96775, | |
| 96776, | |
| 96777, | |
| 96806, | |
| 96807, | |
| 96830, | |
| 96842, | |
| 96873, | |
| 96874, | |
| 96900, | |
| 96901, | |
| 96957, | |
| 97013, | |
| 97031, | |
| 97069, | |
| 97112, | |
| 97113, | |
| 97114, | |
| 97115, | |
| 97116, | |
| 97188, | |
| 97212, | |
| 97230, | |
| 97232, | |
| 97233, | |
| 97271, | |
| 97272, | |
| 97315, | |
| 97316, | |
| 97370, | |
| 97371, | |
| 97372, | |
| 97482, | |
| 97549, | |
| 97611, | |
| 97618, | |
| 97619, | |
| 97697, | |
| 97783, | |
| 97784, | |
| 97854, | |
| 97882, | |
| 97987, | |
| 98114, | |
| 98115, | |
| 98248, | |
| 98401, | |
| 98603, | |
| 98604, | |
| 99108, | |
| 99109, | |
| 99118, | |
| 99431, | |
| 99436, | |
| 99908, | |
| 99917, | |
| 99918, | |
| 99920, | |
| 100257, | |
| 100352, | |
| 100449, | |
| 101422, | |
| 103471, | |
| 246873, | |
| 246883, | |
| 247033, | |
| 247081 | |
| ], | |
| "finished": 95742, | |
| "structure": { | |
| "⿰": 95920, | |
| "⿱": 96107, | |
| "⿲": 95747, | |
| "⿳": 95957, | |
| "⿴": 96361, | |
| "⿵": 96166, | |
| "⿶": 95998, | |
| "⿷": 96757, | |
| "⿸": 97232, | |
| "⿹": 96034, | |
| "⿺": 96830, | |
| "⿻": 96475 | |
| } | |
| }, | |
| "speller": { | |
| "vision": "all", | |
| "merger": 1, | |
| "rank": 64, | |
| "first_layer": 18, | |
| "rows": 1, | |
| "parts": 1, | |
| "vision_init": "", | |
| "vision_train": 1 | |
| } | |
| } | |