--- title: Interactive bounding boxes OCR with Tesseract type: guide tier: all order: 55 hide_menu: true hide_frontmatter_title: true meta_title: Interactive bounding boxes OCR in Label Studio with a Tesseract backend meta_description: Tutorial for how to use Label Studio and Tesseract to assist with your OCR projects categories: - Computer Vision - Optical Character Recognition - Tesseract image: "/guide/ml_tutorials/tesseract.png" --- # Interactive bounding boxes OCR using Tesseract Use an OCR engine for interactive ML-assisted labeling, facilitating faster annotation for layout detection, classification, and recognition models. Tesseract is used for OCR but minimal adaptation is needed to connect other OCR engines or models. Tested against Label Studio 1.10.1, with basic support for both Label Studio Local File Storage and S3-compatible storage, with a example data storage with MinIO. ## Before you begin Before you begin: * Ensure git is installed * Ensure Docker Compose is installed. For MacOS and Windows users, we suggest using Docker Desktop. You must also install the [Label Studio ML backend](https://github.com/HumanSignal/label-studio-ml-backend?tab=readme-ov-file#quickstart). This tutorial uses the [`tesseract` example](https://github.com/HumanSignal/label-studio-ml-backend/tree/master/label_studio_ml/examples/tesseract). ### 1. Install Label Studio Launch Label Studio. You can follow the guide from the [official documentation](https://labelstud.io/guide/install.html) or use the following commands: ``` docker run -it \ -p 8080:8080 \ -v `pwd`/mydata:/label-studio/data \ heartexlabs/label-studio:latest ``` Optionally, you may enable local file serving in Label Studio ``` docker run -it \ -p 8080:8080 \ -v `pwd`/mydata:/label-studio/data \ --env LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true \ --env LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data/images \ heartexlabs/label-studio:latest ``` If you're using local file serving, be sure to [get a copy of the API token](https://labelstud.io/guide/user_account#Access-token) from Label Studio to connect the model. ### 2. Create a Label Studio project Create a new project for Tesseract OCR. In the project **Settings** set up the **Labeling Interface**. Fill in the following template code. It's important to specify `smart="true"` in `RectangleLabels`. ```