> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/rtr46/meikipop/llms.txt
> Use this file to discover all available pages before exploring further.

# OCR providers

> Learn about the available OCR providers in meikipop and how to switch between them for optimal performance and privacy.

meikipop supports multiple OCR (Optical Character Recognition) providers, allowing you to choose the best engine for your specific needs. Each provider offers different trade-offs between speed, accuracy, privacy, and system requirements.

## Available providers

<Steps>
  <Step title="Google Lens (remote)">
    The default OCR provider that offers excellent accuracy and works across all platforms.

    **Characteristics:**

    * **Cloud-based:** Requires internet connection
    * **Platform support:** Windows, Linux, macOS
    * **Accuracy:** Excellent Japanese text recognition
    * **Speed:** Fast, but depends on network latency
    * **Privacy:** Images are sent to Google servers

    **Configuration options:**

    You can reduce bandwidth usage by enabling low bandwidth mode in `config.ini`:

    ```ini theme={null}
    [Settings]
    glens_low_bandwidth = true
    ```

    This scales images down by √0.5, converts to grayscale, and quantizes to 16 colors.
  </Step>

  <Step title="meikiocr (local)">
    A high-performance local OCR engine specifically optimized for Japanese text in video games.

    **Characteristics:**

    * **Fully offline:** No internet required
    * **Platform support:** Windows, Linux, macOS
    * **Accuracy:** Optimized for game text
    * **Speed:** Very fast local processing
    * **Privacy:** All processing happens locally

    <Tip>
      meikiocr is ideal for gaming scenarios where you want complete privacy and don't want to rely on internet connectivity.
    </Tip>

    The provider automatically downloads required models on first use and selects the optimal backend (CUDA, CoreML, or CPU) based on your system.
  </Step>

  <Step title="Chrome Screen AI (local)">
    Uses Chrome's built-in Screen AI library for local OCR processing.

    **Characteristics:**

    * **Fully offline:** No internet required
    * **Platform support:** Windows, Linux
    * **Accuracy:** Good for general text
    * **Speed:** Fast local processing
    * **Privacy:** All processing happens locally

    <Warning>
      This provider requires manual setup. You need to download the Screen AI component from [Chrome's infrastructure packages](https://chrome-infra-packages.appspot.com/p/chromium/third_party/screen-ai) and extract it to `~/.config/screen_ai/` on Linux or the equivalent location on Windows.
    </Warning>

    The provider will automatically throttle large images by resizing them to a maximum of 2000x2000 pixels to prevent performance issues.
  </Step>

  <Step title="owocr (websocket)">
    Connects to a local [owocr](https://github.com/AuroraWright/owocr) instance running as a websocket server.

    **Characteristics:**

    * **Flexible backends:** Support for multiple OCR engines
    * **Local or remote:** Can run locally or on another machine
    * **Platform support:** Any platform that can run owocr
    * **Accuracy:** Depends on chosen owocr backend
    * **Speed:** Depends on backend and connection

    <Note>
      owocr version 1.15.0 or newer is required, and you must use an OCR backend that supports coordinates (OneOCR, Apple Live Text, Google Lens, or Bing).
    </Note>
  </Step>
</Steps>

## Switching OCR providers

You can change your OCR provider at any time through the system tray menu or by editing the configuration file.

<Tabs>
  <Tab title="System tray menu">
    1. Right-click the meikipop icon in your system tray
    2. Navigate to **OCR Provider**
    3. Select your desired provider from the list
    4. meikipop will immediately start using the new provider
  </Tab>

  <Tab title="Configuration file">
    Edit `config.ini` in the meikipop directory:

    ```ini theme={null}
    [Settings]
    ocr_provider = Google Lens (remote)
    ```

    Replace the value with one of the following:

    * `Google Lens (remote)`
    * `meikiocr (local)`
    * `Chrome Screen AI (local)`
    * `owocr (Websocket)`
    * `Dummy OCR (Developer Template)`
  </Tab>
</Tabs>

## Setting up owocr

To use the owocr provider, you need to run owocr with specific configuration:

<CodeGroup>
  ```bash Linux/macOS theme={null}
  pip install -U "owocr>=1.15"
  owocr -r websocket -w websocket -of json -e glens
  ```

  ```powershell Windows theme={null}
  pip install -U "owocr>=1.15"
  owocr -r websocket -w websocket -of json -e glens
  ```
</CodeGroup>

<Info>
  Replace `glens` with your preferred owocr backend. Supported backends with coordinates include:

  * `glens` - Google Lens
  * `oneocr` - OneOCR
  * `apple` - Apple Live Text (macOS only)
  * `bing` - Bing OCR
</Info>

The owocr provider connects to `ws://127.0.0.1:7331` by default and maintains a persistent websocket connection for optimal performance.

## Creating a custom provider

If none of the built-in providers meet your needs, you can create your own OCR provider. See the [Custom OCR Provider guide](/development/creating-custom-provider) for detailed instructions.

The basic requirements are:

1. Create a new directory in `src/ocr/providers/`
2. Add a `provider.py` file with a class inheriting from `OcrProvider`
3. Implement the `scan()` method to return normalized `Paragraph` objects
4. Set a unique `NAME` property for your provider

meikipop will automatically discover and load your custom provider on startup.

## Provider comparison

| Provider             | Offline | Setup Required               | Best For                     |
| -------------------- | ------- | ---------------------------- | ---------------------------- |
| **Google Lens**      | No      | None                         | General use, high accuracy   |
| **meikiocr**         | Yes     | None (auto-downloads models) | Gaming, privacy, offline use |
| **Chrome Screen AI** | Yes     | Manual component download    | Privacy with minimal setup   |
| **owocr**            | Depends | owocr installation           | Flexibility, custom backends |

<Tip>
  Start with Google Lens for ease of use, then switch to meikiocr if you need offline capabilities or prefer local processing.
</Tip>
