Commit ·
dafc1a9
1
Parent(s): 6786450
Rename dots-ocr-1.5 → dots-mocr (final release name)
Browse files- dots.mocr is the official final name for what was dots.ocr-1.5
- Model now on HF directly: rednote-hilab/dots.mocr (no ModelScope mirror needed)
- Added SVG prompt mode (--prompt-mode svg) with auto temperature/top_p
- SVG-optimized variant: rednote-hilab/dots.mocr-svg
- Updated README with new model entry and detailed docs
- Tested: OCR mode 3/3 on L4, SVG mode 3/3 on L4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files changed (2)
- README.md+42-3
- dots-ocr-1.5.py → dots-mocr.pyRenamed+85-59
6 unmodified lines7891011121329 unmodified lines43444546474849342 unmodified lines3923933943953963973986 unmodified lines> Part of [uv-scripts](https://huggingface.co/uv-scripts) - ready-to-run ML tools powered by UV and HuggingFace Jobs.15 OCR models from 0.9B to 8B parameters. Pick a model, point at your dataset, get markdown — no setup required.## 🚀 Quick Start29 unmodified lines| `dots-ocr.py` | [DoTS.ocr](https://huggingface.co/Tencent/DoTS.ocr) | 1.7B | vLLM | 100+ languages || `firered-ocr.py` | [FireRed-OCR](https://huggingface.co/FireRedTeam/FireRed-OCR) | 2.1B | vLLM | Qwen3-VL fine-tune, Apache 2.0 || `nanonets-ocr.py` | [Nanonets-OCR-s](https://huggingface.co/nanonets/Nanonets-OCR-s) | 2B | vLLM | LaTeX, tables, forms || `dots-ocr-1.5.py` | [DoTS.ocr-1.5](https://huggingface.co/davanstrien/dots.ocr-1.5) | 3B | vLLM | 7 prompt modes, layout + bbox, 100+ languages || `nanonets-ocr2.py` | [Nanonets-OCR2-3B](https://huggingface.co/nanonets/Nanonets-OCR2-s) | 3B | vLLM | Next-gen, Qwen2.5-VL base || `deepseek-ocr-vllm.py` | [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) | 4B | vLLM | 5 resolution + 5 prompt modes || `deepseek-ocr.py` | [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) | 4B | Transformers | Same model, Transformers backend |342 unmodified lines- 🔍 **Multi-column Layouts** - Handles complex document structures- ✨ **Thinking Traces** - Optional inclusion of reasoning process with `--include-thinking`### DoTS.ocr (`dots-ocr.py`)Compact multilingual OCR using [rednote-hilab/dots.ocr](https://huggingface.co/rednote-hilab/dots.ocr) with only 1.7B parameters:6 unmodified lines7891011121329 unmodified lines43444546474849342 unmodified lines3923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364376 unmodified lines> Part of [uv-scripts](https://huggingface.co/uv-scripts) - ready-to-run ML tools powered by UV and HuggingFace Jobs.19 OCR scripts covering models from 0.9B to 8B parameters. Pick a model, point at your dataset, get markdown — no setup required.## 🚀 Quick Start29 unmodified lines| `dots-ocr.py` | [DoTS.ocr](https://huggingface.co/Tencent/DoTS.ocr) | 1.7B | vLLM | 100+ languages || `firered-ocr.py` | [FireRed-OCR](https://huggingface.co/FireRedTeam/FireRed-OCR) | 2.1B | vLLM | Qwen3-VL fine-tune, Apache 2.0 || `nanonets-ocr.py` | [Nanonets-OCR-s](https://huggingface.co/nanonets/Nanonets-OCR-s) | 2B | vLLM | LaTeX, tables, forms || `dots-mocr.py` | [dots.mocr](https://huggingface.co/rednote-hilab/dots.mocr) | 3B | vLLM | 8 prompt modes incl. SVG generation, layout + bbox, 100+ languages || `nanonets-ocr2.py` | [Nanonets-OCR2-3B](https://huggingface.co/nanonets/Nanonets-OCR2-s) | 3B | vLLM | Next-gen, Qwen2.5-VL base || `deepseek-ocr-vllm.py` | [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) | 4B | vLLM | 5 resolution + 5 prompt modes || `deepseek-ocr.py` | [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) | 4B | Transformers | Same model, Transformers backend |342 unmodified lines- 🔍 **Multi-column Layouts** - Handles complex document structures- ✨ **Thinking Traces** - Optional inclusion of reasoning process with `--include-thinking`### dots.mocr (`dots-mocr.py`) — SVG generation + SOTA OCRAdvanced multilingual OCR and SVG generation using [rednote-hilab/dots.mocr](https://huggingface.co/rednote-hilab/dots.mocr) with 3B parameters:- 🌍 **100+ Languages** - Extensive multilingual support- 📝 **Document OCR** - Clean text extraction (default mode)- 📊 **Layout Analysis** - Structured output with bboxes and categories- 📐 **Formula recognition** - LaTeX format support- 🖼️ **SVG generation** - Convert charts, UI layouts, figures to editable SVG code- 🔀 **8 prompt modes** - OCR, layout-all, layout-only, web-parsing, scene-spotting, grounding-ocr, svg, general- 📄 **[Paper](https://arxiv.org/abs/2603.13032)** - 83.9% on olmOCR-Bench**SVG variant:** Use `--model rednote-hilab/dots.mocr-svg` with `--prompt-mode svg` for best SVG results.**Quick start:**```bash# Basic OCRhf jobs uv run --flavor l4x1 \-s HF_TOKEN \https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-mocr.py \your-input-dataset your-output-dataset \--max-samples 100# SVG generation from charts/figureshf jobs uv run --flavor l4x1 \-s HF_TOKEN \https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-mocr.py \your-charts svg-output \--prompt-mode svg --model rednote-hilab/dots.mocr-svg# Layout analysis with bounding boxeshf jobs uv run --flavor l4x1 \-s HF_TOKEN \https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-mocr.py \your-documents layout-output \--prompt-mode layout-all```### DoTS.ocr v1 (`dots-ocr.py`)Compact multilingual OCR using [rednote-hilab/dots.ocr](https://huggingface.co/rednote-hilab/dots.ocr) with only 1.7B parameters:
12 unmodified lines131415161718192021222324252627282930313233343520 unmodified lines565758596061626322 unmodified lines8687888990919293949526 unmodified lines12212312412512612731 unmodified lines1591601611621631641652 unmodified lines16816917017117217317416 unmodified lines19119219319419519619719819920020120220323 unmodified lines22722822923023123223323423523613 unmodified lines25025125225325425525612 unmodified lines26927027127227327427544 unmodified lines3203213223233243259 unmodified lines3353363373383393403412 unmodified lines34434534634734834935021 unmodified lines37237337437537637737874 unmodified lines45345445545645745845915 unmodified lines47547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055112 unmodified lines56456556656756856957057112 unmodified lines# ///"""Convert document images to markdown using DoTS.ocr-1.5 with vLLM.DoTS.ocr-1.5 is a 3B multilingual document parsing model with SOTA performanceon 100+ languages. Compared to v1 (1.7B), it adds web screen parsing, scene textspotting, SVG code generation, and stronger multilingual document parsing.Features:- Multilingual support (100+ languages)- Table extraction and formatting- Formula recognition- Layout-aware text extraction- Web screen parsing (NEW in v1.5)- Scene text spotting (NEW in v1.5)- SVG code generation (requires dots.ocr-1.5-svg variant)Model: rednote-hilab/dots.ocr-1.5vLLM: Officially supported (same DotsOCRForCausalLM architecture as v1)"""import argparse20 unmodified lines# ────────────────────────────────────────────────────────────────# DoTS OCR 1.5 Prompt Templates (from official dots.ocr repo)# Source: https://github.com/rednote-hilab/dots.ocr/blob/master/dots_ocr/utils/prompts.py# ────────────────────────────────────────────────────────────────PROMPT_TEMPLATES = {22 unmodified lines# resized_h, resized_w = smart_resize(orig_h, orig_w)# scale_x, scale_y = orig_w / resized_w, orig_h / resized_h"layout-only": """Please output the layout information from this PDF image, including each layout's bbox and its category. The bbox should be in the format [x1, y1, x2, y2]. The layout categories for the PDF document include ['Caption', 'Footnote', 'Formula', 'List-item', 'Page-footer', 'Page-header', 'Picture', 'Section-header', 'Table', 'Text', 'Title']. Do not output the corresponding text. The layout result should be in JSON format.""",# NEW in v1.5:"web-parsing": """Parsing the layout info of this webpage image with format json:\n""","scene-spotting": """Detect and recognize the text in the image.""","grounding-ocr": """Extract text from the given bounding box on the image (format: [x1, y1, x2, y2]).\nBounding Box:\n""","general": """ """,}26 unmodified lines# Convert to RGBpil_img = pil_img.convert("RGB")# Convert to base64 data URIbuf = io.BytesIO()pil_img.save(buf, format="PNG")31 unmodified linestags:- ocr- document-processing- dots-ocr-1.5- multilingual- markdown- uv-script2 unmodified lines# Document OCR using {model_name}This dataset contains OCR results from images in [{source_dataset}](https://huggingface.co/datasets/{source_dataset}) using DoTS.ocr-1.5, a 3B multilingual model with SOTA document parsing.## Processing Details16 unmodified lines## Model InformationDoTS.ocr-1.5 is a 3B multilingual document parsing model that excels at:- 100+ Languages — Multilingual document support- Table extraction — Structured data recognition- Formulas — Mathematical notation preservation- Layout-aware — Reading order and structure preservation- Web screen parsing — Webpage layout analysis- Scene text spotting — Text detection in natural scenes## Dataset Structure23 unmodified lines## ReproductionThis dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) DoTS OCR 1.5 script:```bashuv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-ocr-1.5.py \\{source_dataset} \\<output-dataset> \\--image-column {image_column} \\13 unmodified linesoutput_dataset: str,image_column: str = "image",batch_size: int = 16,model: str = "rednote-hilab/dots.ocr-1.5",max_model_len: int = 24000,max_tokens: int = 24000,gpu_memory_utilization: float = 0.9,12 unmodified linestop_p: float = 0.9,verbose: bool = False,):"""Process images from HF dataset through DoTS.ocr-1.5 model."""# Check CUDA availability firstcheck_cuda_availability()44 unmodified linesgpu_memory_utilization=gpu_memory_utilization,)sampling_params = SamplingParams(temperature=temperature,top_p=top_p,9 unmodified linesfor batch_indices in tqdm(partition_all(batch_size, range(len(dataset))),total=(len(dataset) + batch_size - 1) // batch_size,desc="DoTS.ocr-1.5 processing",):batch_indices = list(batch_indices)batch_images = [dataset[i][image_column] for i in batch_indices]2 unmodified lines# Create messages for batchbatch_messages = [make_ocr_message(img, prompt) for img in batch_images]# Process with vLLM (dots.ocr-1.5 needs "string" content format)outputs = llm.chat(batch_messages,sampling_params,21 unmodified lines# Handle inference_info tracking (for multi-model comparisons)inference_entry = {"model_id": model,"model_name": "DoTS.ocr-1.5","column_name": output_column,"timestamp": datetime.now().isoformat(),"prompt_mode": prompt_mode if not custom_prompt else "custom",74 unmodified linescard = DatasetCard(card_content)card.push_to_hub(output_dataset, token=HF_TOKEN)logger.info("DoTS.ocr-1.5 processing complete!")logger.info(f"Dataset available at: https://huggingface.co/datasets/{output_dataset}")15 unmodified lines# Show example usage if no argumentsif len(sys.argv) == 1:print("=" * 80)print("DoTS.ocr-1.5 Document Processing")print("=" * 80)print("\n3B multilingual OCR model supporting 100+ languages")print("\nFeatures:")print("- Multilingual support (100+ languages)")print("- Fast processing with vLLM")print("- Table extraction and formatting")print("- Formula recognition")print("- Layout-aware text extraction")print("- Web screen parsing (NEW in v1.5)")print("- Scene text spotting (NEW in v1.5)")print("\nPrompt modes:")print(" ocr - Text extraction (default)")print(" layout-all - Layout + bboxes + text (JSON)")print(" layout-only - Layout + bboxes only (JSON)")print(" web-parsing - Webpage layout analysis (JSON)")print(" scene-spotting - Scene text detection")print(" grounding-ocr - Text from bounding box region")print(" general - Free-form (use with --custom-prompt)")print("\nExample usage:")print("\n1. Basic OCR:")print(" uv run dots-ocr-1.5.py input-dataset output-dataset")print("\n2. Web screen parsing:")print(" uv run dots-ocr-1.5.py screenshots parsed --prompt-mode web-parsing")print("\n3. Scene text spotting:")print(" uv run dots-ocr-1.5.py photos detected --prompt-mode scene-spotting")print("\n4. Layout analysis with structure:")print(" uv run dots-ocr-1.5.py papers analyzed --prompt-mode layout-all")print("\n5. Running on HF Jobs:")print(" hf jobs uv run --flavor l4x1 \\")print(" -s HF_TOKEN \\")print(" https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-ocr-1.5.py \\")print(" input-dataset output-dataset")print("\n" + "=" * 80)print("\nFor full help, run: uv run dots-ocr-1.5.py --help")sys.exit(0)parser = argparse.ArgumentParser(description="Document OCR using DoTS.ocr-1.5 (3B multilingual model)",formatter_class=argparse.RawDescriptionHelpFormatter,epilog="""Prompt Modes (official DoTS.ocr-1.5 prompts):ocr - Simple text extraction (default)layout-all - Layout analysis with bboxes, categories, and text (JSON output)layout-only - Layout detection with bboxes and categories only (JSON output)web-parsing - Webpage layout analysis (JSON output) [NEW in v1.5]scene-spotting - Scene text detection and recognition [NEW in v1.5]grounding-ocr - Extract text from bounding box region [NEW in v1.5]general - Free-form QA (use with --custom-prompt) [NEW in v1.5]SVG Code Generation:For SVG output, use --model rednote-hilab/dots.ocr-1.5-svg with:--custom-prompt 'Please generate the SVG code based on the image.'Examples:# Basic text OCR (default)uv run dots-ocr-1.5.py my-docs analyzed-docs# Web screen parsinguv run dots-ocr-1.5.py screenshots parsed --prompt-mode web-parsing# Scene text spottinguv run dots-ocr-1.5.py photos spotted --prompt-mode scene-spotting# Full layout analysis with structureuv run dots-ocr-1.5.py papers structured --prompt-mode layout-all# Random sampling for testinguv run dots-ocr-1.5.py large-dataset test --max-samples 50 --shuffle""",)12 unmodified lines)parser.add_argument("--model",default="rednote-hilab/dots.ocr-1.5",help="Model to use (default: rednote-hilab/dots.ocr-1.5)",)parser.add_argument("--max-model-len",12 unmodified lines13141516171819202122232425262728293031323334353637383920 unmodified lines606162636465666722 unmodified lines9091929394959697989910010110226 unmodified lines12913013113213313413513613713813914031 unmodified lines1721731741751761771782 unmodified lines18118218318418518618716 unmodified lines20420520620720820921021121221321421521621723 unmodified lines24124224324424524624724824925013 unmodified lines26426526626726826927012 unmodified lines28328428528628728828944 unmodified lines3343353363373383393403413423433443459 unmodified lines3553563573583593603612 unmodified lines36436536636736836937021 unmodified lines39239339439539639739874 unmodified lines47347447547647747847915 unmodified lines49549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657712 unmodified lines59059159259359459559659712 unmodified lines# ///"""Convert document images to markdown using dots.mocr with vLLM.dots.mocr is a 3B multilingual document parsing model with SOTA performanceon 100+ languages. It excels at converting structured graphics (charts, UIlayouts, scientific figures) directly into SVG code. Core capabilities includegrounding, recognition, semantic understanding, and interactive dialogue.Features:- Multilingual support (100+ languages)- Table extraction and formatting- Formula recognition- Layout-aware text extraction- Web screen parsing- Scene text spotting- SVG code generation (use --prompt-mode svg, or --model rednote-hilab/dots.mocr-svg for best results)Model: rednote-hilab/dots.mocrSVG variant: rednote-hilab/dots.mocr-svgvLLM: Officially integrated since v0.11.0GitHub: https://github.com/rednote-hilab/dots.mocrPaper: https://arxiv.org/abs/2603.13032"""import argparse20 unmodified lines# ────────────────────────────────────────────────────────────────# dots.mocr Prompt Templates# Source: https://github.com/rednote-hilab/dots.mocr/blob/master/dots_mocr/utils/prompts.py# ────────────────────────────────────────────────────────────────PROMPT_TEMPLATES = {22 unmodified lines# resized_h, resized_w = smart_resize(orig_h, orig_w)# scale_x, scale_y = orig_w / resized_w, orig_h / resized_h"layout-only": """Please output the layout information from this PDF image, including each layout's bbox and its category. The bbox should be in the format [x1, y1, x2, y2]. The layout categories for the PDF document include ['Caption', 'Footnote', 'Formula', 'List-item', 'Page-footer', 'Page-header', 'Picture', 'Section-header', 'Table', 'Text', 'Title']. Do not output the corresponding text. The layout result should be in JSON format.""","web-parsing": """Parsing the layout info of this webpage image with format json:\n""","scene-spotting": """Detect and recognize the text in the image.""","grounding-ocr": """Extract text from the given bounding box on the image (format: [x1, y1, x2, y2]).\nBounding Box:\n""",# SVG code generation — {width} and {height} are replaced with actual image dimensions.# For best results, use --model rednote-hilab/dots.mocr-svg# Uses higher temperature (0.9) and top_p (1.0) per official recommendation."svg": """Please generate the SVG code based on the image. viewBox="0 0 {width} {height}" ""","general": """ """,}26 unmodified lines# Convert to RGBpil_img = pil_img.convert("RGB")# For SVG mode, inject actual image dimensions into the promptif "{width}" in prompt and "{height}" in prompt:prompt = prompt.replace("{width}", str(pil_img.width)).replace("{height}", str(pil_img.height))# Convert to base64 data URIbuf = io.BytesIO()pil_img.save(buf, format="PNG")31 unmodified linestags:- ocr- document-processing- dots-mocr- multilingual- markdown- uv-script2 unmodified lines# Document OCR using {model_name}This dataset contains OCR results from images in [{source_dataset}](https://huggingface.co/datasets/{source_dataset}) using dots.mocr, a 3B multilingual model with SOTA document parsing and SVG generation.## Processing Details16 unmodified lines## Model Informationdots.mocr is a 3B multilingual document parsing model that excels at:- 100+ Languages — Multilingual document support- Table extraction — Structured data recognition- Formulas — Mathematical notation preservation- Layout-aware — Reading order and structure preservation- Web screen parsing — Webpage layout analysis- Scene text spotting — Text detection in natural scenes- SVG code generation — Charts, UI layouts, scientific figures to SVG## Dataset Structure23 unmodified lines## ReproductionThis dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) dots.mocr script:```bashuv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-mocr.py \\{source_dataset} \\<output-dataset> \\--image-column {image_column} \\13 unmodified linesoutput_dataset: str,image_column: str = "image",batch_size: int = 16,model: str = "rednote-hilab/dots.mocr",max_model_len: int = 24000,max_tokens: int = 24000,gpu_memory_utilization: float = 0.9,12 unmodified linestop_p: float = 0.9,verbose: bool = False,):"""Process images from HF dataset through dots.mocr model."""# Check CUDA availability firstcheck_cuda_availability()44 unmodified linesgpu_memory_utilization=gpu_memory_utilization,)# SVG mode uses higher temperature/top_p per official recommendationif prompt_mode == "svg" and temperature == 0.1 and top_p == 0.9:logger.info("SVG mode: using recommended temperature=0.9, top_p=1.0")temperature = 0.9top_p = 1.0sampling_params = SamplingParams(temperature=temperature,top_p=top_p,9 unmodified linesfor batch_indices in tqdm(partition_all(batch_size, range(len(dataset))),total=(len(dataset) + batch_size - 1) // batch_size,desc="dots.mocr processing",):batch_indices = list(batch_indices)batch_images = [dataset[i][image_column] for i in batch_indices]2 unmodified lines# Create messages for batchbatch_messages = [make_ocr_message(img, prompt) for img in batch_images]# Process with vLLM (dots.mocr needs "string" content format)outputs = llm.chat(batch_messages,sampling_params,21 unmodified lines# Handle inference_info tracking (for multi-model comparisons)inference_entry = {"model_id": model,"model_name": "dots.mocr","column_name": output_column,"timestamp": datetime.now().isoformat(),"prompt_mode": prompt_mode if not custom_prompt else "custom",74 unmodified linescard = DatasetCard(card_content)card.push_to_hub(output_dataset, token=HF_TOKEN)logger.info("dots.mocr processing complete!")logger.info(f"Dataset available at: https://huggingface.co/datasets/{output_dataset}")15 unmodified lines# Show example usage if no argumentsif len(sys.argv) == 1:print("=" * 80)print("dots.mocr Document Processing")print("=" * 80)print("\n3B multilingual OCR model with SVG generation")print("\nFeatures:")print("- Multilingual support (100+ languages)")print("- Fast processing with vLLM")print("- Table extraction and formatting")print("- Formula recognition")print("- Layout-aware text extraction")print("- Web screen parsing")print("- Scene text spotting")print("- SVG code generation (charts, UI, figures)")print("\nPrompt modes:")print(" ocr - Text extraction (default)")print(" layout-all - Layout + bboxes + text (JSON)")print(" layout-only - Layout + bboxes only (JSON)")print(" web-parsing - Webpage layout analysis (JSON)")print(" scene-spotting - Scene text detection")print(" grounding-ocr - Text from bounding box region")print(" svg - SVG code generation")print(" general - Free-form (use with --custom-prompt)")print("\nExample usage:")print("\n1. Basic OCR:")print(" uv run dots-mocr.py input-dataset output-dataset")print("\n2. SVG generation:")print(" uv run dots-mocr.py charts svg-output --prompt-mode svg --model rednote-hilab/dots.mocr-svg")print("\n3. Web screen parsing:")print(" uv run dots-mocr.py screenshots parsed --prompt-mode web-parsing")print("\n4. Layout analysis with structure:")print(" uv run dots-mocr.py papers analyzed --prompt-mode layout-all")print("\n5. Running on HF Jobs:")print(" hf jobs uv run --flavor l4x1 \\")print(" -s HF_TOKEN \\")print(" https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-mocr.py \\")print(" input-dataset output-dataset")print("\n" + "=" * 80)print("\nFor full help, run: uv run dots-mocr.py --help")sys.exit(0)parser = argparse.ArgumentParser(description="Document OCR using dots.mocr (3B multilingual model with SVG generation)",formatter_class=argparse.RawDescriptionHelpFormatter,epilog="""Prompt Modes (official dots.mocr prompts):ocr - Simple text extraction (default)layout-all - Layout analysis with bboxes, categories, and text (JSON output)layout-only - Layout detection with bboxes and categories only (JSON output)web-parsing - Webpage layout analysis (JSON output)scene-spotting - Scene text detection and recognitiongrounding-ocr - Extract text from bounding box regionsvg - SVG code generation (auto-injects image dimensions into viewBox)general - Free-form QA (use with --custom-prompt)SVG Code Generation:Use --prompt-mode svg for SVG output. For best results, combine with--model rednote-hilab/dots.mocr-svg (the SVG-optimized variant).SVG mode automatically uses temperature=0.9, top_p=1.0 unless overridden.Examples:# Basic text OCR (default)uv run dots-mocr.py my-docs analyzed-docs# SVG generation with optimized variantuv run dots-mocr.py charts svg-out --prompt-mode svg --model rednote-hilab/dots.mocr-svg# Web screen parsinguv run dots-mocr.py screenshots parsed --prompt-mode web-parsing# Full layout analysis with structureuv run dots-mocr.py papers structured --prompt-mode layout-all# Random sampling for testinguv run dots-mocr.py large-dataset test --max-samples 50 --shuffle""",)12 unmodified lines)parser.add_argument("--model",default="rednote-hilab/dots.mocr",help="Model to use (default: rednote-hilab/dots.mocr, or rednote-hilab/dots.mocr-svg for SVG)",)parser.add_argument("--max-model-len",
README.md+42-3
dots-ocr-1.5.py → dots-mocr.pyRenamed+85-59