Join the Applied AI Summit | Free online conference | October 13-15, 2026
was successfully added to your cart.

New Spark OCR 3.12: Handwritten Text Recognition and Spark 3.2 support

Avatar photo
Senior data scientist on the Spark NLP team

This release comes with new models for Handwritten Text Recognition, Spark 3.2 support, bug fixes, and notebook examples.

Added to the ImageTextDetectorV2

  • New parameter ‘mergeIntersects’: merge bounding boxes corresponding to detected text regions, when multiple bounding boxes that belong to the same text line overlap.
  • New parameter ‘forceProcessing’: now you can force processing of the results to avoid repeating the computation of results in pipelines where the same results are consumed by different transformers.
  • New feature: sizeThreshold parameter sets the expected size for the recognized text. From now on, text size will be automatically detected when sizeThreshold is set to -1.

Added to the ImageToTextV2

  • New parameter ‘usePandasUdf’: support PandasUdf to allow batch processing internally.
  • New support for formatted output, and HOCR.

ocr.setOutputFormat(OcrOutputFormat.HOCR)

ocr.setOutputFormat(OcrOutputFormat.FORMATTED_TEXT)

Unknown
Unknown-2

Support for Spark 3.2

  • We added support for the latest Spark version, check the installation instructions below. Improved documentation on the website.

New Models

  • ocr_small_printed: Text recognition small model for printed text based on ImageToTextV2
  • ocr_small_handwritten: Text recognition small model for handwritten text based on ImageToTextV2
  • ocr_base_handwritten: Text recognition base model for handwritten text based on ImageToTextV2

New notebooks

+ SparkOcrImageToTextV2OutputFormats.ipynb, different output formats for ImageToTextV2

Get & Install it here

How useful was this post?

Try OCR tool for healthcare

See in action
Avatar photo
Senior data scientist on the Spark NLP team
Our additional expert:
Alberto Andreotti is a Senior Data Scientist at John Snow Labs, where he leads the development of Visual NLP solutions for healthcare. He has over a decade of experience in Machine Learning, working across industry and consulting with a particular focus on healthcare and applied AI. Alberto and his team build end-to-end solutions for extracting information from unstructured data, de-identifying sensitive information, and processing complex clinical documents. His work spans Machine Learning, Natural Language Processing, Computer Vision, and large-scale data processing. A lifelong learner, Alberto holds degrees in Engineering and Computer Science and is currently pursuing a third degree focused on Artificial Intelligence. Originally from Argentina, he enjoys spending his free time outdoors, particularly hiking and camping.

Reliable and verified information compiled by our editorial and professional team. John Snow Labs' Editorial Policy.

End-to-End No-Code Development of Visual NER Models for PDFs and Images

This video shows how available Visual NER models can be used for predictions, how data can be corrected and how visual models...
preloader