Dosu LogoDosu Logo
Ask
Join our Discord
DoclingPublic
IBM Docling
DocumentsDocling
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Type
Answer
Status
Published
Created
Dec 23, 2025
Updated
Apr 10, 2026
Created by
Dosu Bot
Updated by
Dosu Bot

Classification Filters for Picture Descriptions#

Deprecation Notice:

  • The parameters picture_description_local and picture_description_api are now deprecated. Please migrate to using picture_description_preset or picture_description_custom_config for specifying picture description models and options.
  • Similarly, for VLM pipelines, use vlm_pipeline_preset or vlm_pipeline_custom_config instead of the deprecated vlm_pipeline_model, vlm_pipeline_model_local, or vlm_pipeline_model_api fields.

For migration:

  • Use picture_description_preset to select a stable, admin-controlled preset (e.g., granite_vision, default).
  • Use picture_description_custom_config to specify a custom model and engine configuration (if allowed by your admin).
  • For VLM pipelines, use vlm_pipeline_preset or vlm_pipeline_custom_config in the same way.

Administrator Configuration for Custom Configs:
Custom configuration options are disabled by default and must be explicitly enabled by administrators via environment variables:

  • DOCLING_SERVE_ALLOW_CUSTOM_VLM_CONFIG - enables vlm_pipeline_custom_config
  • DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG - enables picture_description_custom_config
  • DOCLING_SERVE_ALLOW_CUSTOM_CODE_FORMULA_CONFIG - enables code_formula_custom_config
  • DOCLING_SERVE_ALLOW_CUSTOM_TABLE_STRUCTURE_CONFIG - enables custom table structure configuration
  • DOCLING_SERVE_ALLOW_CUSTOM_LAYOUT_CONFIG - enables custom layout configuration
  • DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_CLASSIFICATION_CONFIG - enables custom picture classification configuration
  • DOCLING_SERVE_ALLOW_CUSTOM_OCR_CONFIG - enables custom OCR configuration

These all default to false. If you attempt to use a custom configuration parameter without administrator authorization, API requests will receive a 422 error response. Confirm with your administrator that these features are enabled before using custom configuration options. For more details on these settings, see docs/configuration.md.

The new options provide more flexibility and future-proofing for model selection and configuration. Deprecated fields may be removed in a future release.

The rest of the classification filtering logic remains unchanged and is compatible with the new preset/custom config options.

Picture Classification Categories:
The DocumentFigureClassifier-v2.5 model supports a broad range of classification categories (15+ types) to identify different types of figures and images. This includes:

  • Chart types: bar_chart, pie_chart, line_chart, scatter_plot, box_plot
  • Images: photograph, full_page_image, page_thumbnail
  • Maps: geographical_map, topographical_map
  • Engineering: engineering_drawing
  • Chemistry: chemistry_structure
  • Other categories: music, calendar, crossword_puzzle, screenshot_from_computer, screenshot_from_manual, table
  • And additional types for various document figures

These classification labels are available for filtering and working with different types of figures/images in your document processing pipeline.

Classification-Based Picture Description Filters:
Docling provides fine-grained control over which pictures receive descriptions based on their classification results and confidence scores. Both PictureDescriptionLocal and PictureDescriptionApi configurations support the following filtering parameters:

  • classification_allow (List[PictureClassificationLabel] or NoneType): Only describe pictures whose predicted class is in this allow-list. When set, only pictures with classifications matching one of the specified labels will receive descriptions.

  • classification_deny (List[PictureClassificationLabel] or NoneType): Do not describe pictures whose predicted class is in this deny-list. When set, pictures with classifications matching any of the specified labels will not receive descriptions.

  • classification_min_confidence (float): Minimum classification confidence required before a picture can be described. This allows filtering based on how confident the classification model is about the picture's category.

These parameters give you precise control over which images are processed for description generation, helping optimize performance and focus on the most relevant visual content in your documents.

Chart Extraction Enrichment#

You can now extract structured tabular data from bar, pie, and line charts using the chart extraction enrichment model. This feature uses a vision-language model to convert supported chart images into CSV data, which is then parsed into table metadata.

  • To enable chart extraction, use the --enrich-chart-extraction CLI flag or set do_chart_extraction=True in pipeline options.
  • Chart extraction runs after picture classification and only processes images classified as bar_chart, pie_chart, or line_chart.
  • When chart extraction is enabled, picture classification is automatically turned on (since chart type predictions are required).
  • Extracted table data is stored in the tabular_chart field of the image metadata and can be exported or used in downstream processing.
  • Non-chart images are unaffected by this enrichment step.

Example CLI usage:

docling convert --enrich-chart-extraction ...

Note: Chart extraction is independent from image description and OCR. You can enable any combination of these enrichment steps as needed for your workflow.

Model Variants and Output Formats:
The chart_extraction_options field provides fine-grained control over chart extraction behavior:

  • Model variants:
    • granite-vision-v4 (GraniteVision 4.0): Default model, based on ibm-granite/granite-4.0-3b-vision
    • granite-vision (GraniteVision 3.3): Alternative model, based on ibm-granite/granite-vision-3.3-2b-chart2csv-preview
  • Output formats:
    • chart2csv: Extract chart data to CSV/table format (enabled by default)
    • chart2code: Generate Python code to recreate the chart (disabled by default)
    • chart2summary: Generate natural-language description of the chart (disabled by default)

Example configuration:

from docling.datamodel.chart_extraction_options import ChartExtractionModelKind, ChartExtractionModelOptions

pipeline_options.do_chart_extraction = True
pipeline_options.chart_extraction_options = ChartExtractionModelOptions(
    model=ChartExtractionModelKind.GRANITE_VISION_V4, # or GRANITE_VISION for 3.3
    chart2csv=True,
    chart2code=False,
    chart2summary=False
)

Export Functions and Picture Handling#

Export Parameters:
The export_to_markdown() and export_to_text() functions support the following key parameters:

  • include_annotations (bool): Whether to include annotations in the exported output (default: True for Markdown, not applicable for text)
  • mark_annotations (bool): Whether to mark annotations with special formatting in the export (default: False)
  • compact_tables (bool): Whether to use compact table format without column padding (default: False, Markdown only)
  • traverse_pictures (bool): Whether to traverse into picture items and serialize their text children (default: False)

Handling OCR Text in Scanned/Image-Based PDFs:
When processing scanned or image-based PDFs with force_full_page_ocr=True, the layout model classifies full-page scans as PictureItem nodes. OCR text items are added as children of that picture node in the document tree.

To export OCR text from these documents, you must set traverse_pictures=True when calling export_to_markdown() or export_to_text(). Without this parameter, the export functions will not traverse into picture nodes to retrieve child text items, resulting in empty or incomplete output despite OCR text being present in doc.texts.

Example usage for scanned PDFs:

# Required for scanned/image-based PDFs processed with full-page OCR
text = doc.export_to_text(traverse_pictures=True)
md = doc.export_to_markdown(traverse_pictures=True)

Annotation Export Configuration:

  • The preferred way to configure vision-language models (VLM) and picture description models is via the vlm_pipeline_preset, vlm_pipeline_custom_config, picture_description_preset, and picture_description_custom_config fields. The legacy fields (vlm_pipeline_model, vlm_pipeline_model_local, vlm_pipeline_model_api, picture_description_local, picture_description_api) are deprecated and will be removed in a future release.
  • Annotation export logic (_keep_deprecated_annotations, include_annotations, mark_annotations) works with both the new and legacy configuration fields. However, for future compatibility, migrate to the new preset/custom config fields.
  • The _keep_deprecated_annotations option controls whether the deprecated annotations attribute is populated in picture description and classification results. This option defaults to True for backward compatibility but may change to False in a future release.
  • When using the new configuration options, all annotation export controls (_keep_deprecated_annotations, include_annotations, mark_annotations) continue to function as described above.
  • For more details on the new configuration fields and migration, see the API usage documentation and model management guide.
Documents
Agentic Document Processing
API Authentication
Apple Silicon Support
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
ASR Language Configuration
Async Task Result Management
Audio and Video Processing
Bibliography Extraction and Parsing
Bounding Box Visualization
Caption-Figure Linking
Chart Extraction
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Chemical Notation OCR
Citation Data Modeling
CLI File Staging and Collision Handling
CLI Image Export Modes
How can I improve the resolution or quality of images extracted from a PDF using docling?
CLI Logging and Console Output
Code Chunking
Container Image Variants
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
What is the recommended Azure deployment option for a Docling-based Python SDK application using a custom Dockerfile with PyTorch and OCR, and why?
Cross-Platform Support
Custom Enrichment Models
Custom Layout Plugin Architecture
DocItemLabel Type System
DocLang Format
Docling Image Extraction
How can I improve the resolution or quality of images extracted from a PDF using docling?
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Docling Model Management
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
What is the recommended Azure deployment option for a Docling-based Python SDK application using a custom Dockerfile with PyTorch and OCR, and why?
Docling Performance Optimization
Docling Pipeline Configuration
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Docling Resource Requirements
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
What is the recommended Azure deployment option for a Docling-based Python SDK application using a custom Dockerfile with PyTorch and OCR, and why?
Docling Rust SDK
Docling Serve API Client
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
Docling Serve Configuration
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
How can you mount a PersistentVolumeClaim (PVC) in docling-serve on OpenShift to store EasyOCR models, and what steps are required to ensure docling-serve can access these models?
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Docling Serve Deployment
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
How can you mount a PersistentVolumeClaim (PVC) in docling-serve on OpenShift to store EasyOCR models, and what steps are required to ensure docling-serve can access these models?
Models handling in Docling Serve
skill.md
What is the recommended Azure deployment option for a Docling-based Python SDK application using a custom Dockerfile with PyTorch and OCR, and why?
Docling Serve Worker Architecture
DoclingDocument Builder API
Building a Modular IDP Pipeline with Docling Components
DoclingDocument Data Model
Building a Modular IDP Pipeline with Docling Components
DoclingDocument Hierarchization
DoclingDocument Java Serialization
DoclingDocument Serialization
DoclingDocument Text Formatting
Document Backends
Building a Modular IDP Pipeline with Docling Components
Document Chunk Metadata and Provenance
Document Chunking
Document Content Classification
Document Extraction Strategies
Document Figure Classification
Document Input Methods
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
Document Layout and Reading Order
How does Docling reconstruct reading order without using a large language model (LLM) call in an unsupervised manner?
Document Layout Detection Models
Building a Modular IDP Pipeline with Docling Components
Document Merging and Concatenation
Document Metadata
Document Pagination
Document Rotation and Orientation
Document Serialization Architecture
Document Token and Heading Schema
Document Tree Traversal
Document Type Classification and Routing
Document-to-Graph Pipeline
DocumentConverter Configuration
How can I use granite-docling to process all PDFs in a directory and output doctags?
DOCX Header/Footer Processing
DOCX Image Extraction
DOCX List Processing
DOCX Numbered Heading Processing
DOCX Reference and Citation Extraction
DOCX SDT Handling
DOCX Table Extraction
DOCX Text Formatting
Email Format Support
Enrichment Pipeline
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Entity Cardinality and Ranking
Excel Backend Processing
Extraction Pipeline Prompting
GPU Accelerator Support
GPU Memory Management
Heading Hierarchy Configuration
HTML Export Format
HuggingFace Transformers Integration
Hyperlink Spatial Matching
IBM Watsonx and Granite Integration
How can I use granite-docling to process all PDFs in a directory and output doctags?
Image Reference Handling
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
skill.md
Input Format and Image Support
Knowledge Graph Extraction
Large PDF Memory Management
Layout Detection Configuration
Layout Postprocessor
Layout Prediction Data Structures
Building a Modular IDP Pipeline with Docling Components
LibreOffice Integration
List Marker Normalization
Markdown Export Configuration
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
Markdown Processing
MCP Server Integration
Docling MCP in Docling Serve
Multi-Language API Integration
Native Library Compatibility
NuExtract Transformers Compatibility
Observability and Monitoring
How can you mount a PersistentVolumeClaim (PVC) in docling-serve on OpenShift to store EasyOCR models, and what steps are required to ensure docling-serve can access these models?
OCR Engine Configuration
OCR Engine Integration
OCR Language Support
ODF Backend Processing
ODF Chart Extraction
Open WebUI Integration
OpenCV Dependency Management
Optional Dependency Management
Package Architecture
skill.md
Page Assembly Pipeline
Parsed Page Access and Segmentation
PDF Document Pipeline
Building a Modular IDP Pipeline with Docling Components
PDF Page Range Selection
PDF Parse Lifecycle Management
PDF Pipeline Configuration
How can I improve the resolution or quality of images extracted from a PDF using docling?
PDF Rendering and OCR Pipeline
How can I improve the resolution or quality of images extracted from a PDF using docling?
PDF Spatial Filtering
PDF Text Extraction
PDF-to-RAG Pipeline
skill.md
Picture Classification Filtering
Picture Detection and Segmentation
Pipeline and Model Caching
skill.md
Pipeline Batch Size Configuration
Pipeline Error Logging
Pipeline Initialization and Dependency Loading
Pipeline Stage Architecture
PPTX Content Extraction
Pydantic-Based Extraction Templates
RAG Framework Connectors
RapidOCR Model Management
Redis Integration
Remote Inference Services
Resource Cleanup and Lifecycle Management
Reverse Proxy Configuration
RTL and Bidirectional Text Support
Security Hardening
Spatial Predicates and R-tree Indexing
Structured Information Extraction
How can I use granite-docling to process all PDFs in a directory and output doctags?
skill.md
Table Cell Formatting
Table Cell Text Matching
Table Chunking
Table Export and Serialization
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
Table Structure Recognition
Building a Modular IDP Pipeline with Docling Components
TableFormer Confidence Scoring
Task Cancellation and Resource Leaks
Text Element Merging and Dehyphenation
Threaded PDF Backend
Tokenizer Backends
Torch Compile Optimization
VLM Coordinate System and Image Scaling
VLM Extraction Pipeline
VLM Formula and Code Extraction
VLM Image Cropping
VLM Inference Configuration
VLM Inference Engine
Building a Modular IDP Pipeline with Docling Components
VLM Picture Description
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
VLM Pipeline
VLM Token Limits and Truncation
XML Backend Architecture
Can I use a custom OCR model in Docling, and how do I set its path in the pipeline options?
Can docling-serve fetch documents from object storage (e.g., S3)?
Comment corriger la phrase : "Je suis allé à l'école en pied et mains je parte par quotidien des beaucoup de kilomètres cela est importante" ?
Content Layers
Does Docling automatically detect the language of a document when sending images to Tesseract OCR, and how can it be configured?
How can I enable and use GPU acceleration with Docling?
How can I find page numbers and bounding box information for content in a chunk produced by the hybrid chunker, and what is the structure of the doc_items list within a chunk?
How can a student build a local, open-source LLM-based system to extract and analyze technical PDF documents (PMS/IDC) and generate instrumentation datasheets, using Python on a PC with limited resources?
How can a student build a local, open-source, privacy-preserving AI system to extract and query technical PDF documents (PMS/IDC) on a PC with limited resources?
How can you make Docling read/understand images embedded in a DOCX file, and what is the correct code to use the VlmPipeline for this purpose?
How can you use Docling's REST API to convert a PDF to Markdown and generate image descriptions using an OpenAI model?
How do I set up a complete multi-format document processing pipeline using Docling that handles technical PDFs, HTML files, images, videos, audio, codebases, and schematics, and exports everything to organized agent-friendly markdown files?
How do you install and use Docling in Python on WSL2, including integration with an AI agent?
How do you use HybridChunker in Docling, including saving and reloading the converted document?
How does Docling support parallel/multiprocessing for document conversion, and what do the key performance parameters (`page_chunk_size`, `doc_batch_concurrency`, `doc_batch_size`) do?
How to properly enable `enable_remote_services` in Docling Serve (CPU image) to use an external OpenAI-compatible API for picture description and formula enrichment, and what is the correct config format?
No Docling, o uso de CUDA é obrigatório para processar PDFs com extração de texto e descrição de imagens, ou é opcional?
Quais são as melhores opções de OCR para extração de tabelas financeiras complexas em PDFs usando Docling, incluindo alternativas externas e integração com plugins?
Quelle est l'origine et le statut des êtres mathématiques selon Platon et John Stuart Mill ?
What are all the parameters of HybridChunker in Docling, and how do you use it with a custom tokenizer?
What are all the pipelines that exist in Docling, including their purposes, selection criteria, and how they handle scanned documents?
What are the detailed pipeline options and processing behaviors for PDF, DOCX, PPTX, and XLSX files in the Python SDK?
What are the steps to convert a complex payment advice PDF to Excel using Docling?
What does 'RFLP' stand for or refer to?
What is the best practice for extracting text from a mixed PDF (digital + scanned pages) for enterprise financial document processing without a GPU and with limited costs?
What is the best practice for processing a mixed PDF (digital + scanned pages) containing sensitive financial data in Docling, given no GPU and limited cost?
What is the general sentiment expressed about the messy nature of documents and content in the Docling project?
What is the recommended architecture and implementation for processing a mixed PDF bundle (digital + scanned pages) for an enterprise financial payment verification system (like MRT Jakarta's AI-Augmented Payment Flow), with constraints of no GPU and limited cost?
When processing large PDFs (700+ pages) with Docling's StandardPdfPipeline, what causes the `std::bad_alloc` errors and what are the recommended workarounds?
Which is the better option for running Docling: using 'docling serve' in Azure Container Apps or code-based deployment in Azure Function App (Windows Premium plan)?
Why are bounding boxes not available for items (such as images, tables, text) when using VlmPipeline with certain VLM presets (like Qwen/Markdown)?
Zoom on Layer 1 (L1): Layout Detection & Routing in a Modular IDP Pipeline
คู่มือการดึงรูปภาพจาก PDF และสร้าง Markdown พร้อม Alternative Text ด้วย Docling