Sign inSign up

fybre/doctr-api

By fybre

Updated about 1 year ago

docTR OCR REST API, based on API framework from Mindee

Image
0

1.3K

fybre/doctr-api repository overview

docTR API - Docker

Docker image based on the sample API framework by Mindee

Provides OCR capabilities to your applications via REST endpoints.

docTR Github: https://github.com/mindee/doctr

My Github repo for Dockerfile and code: https://github.com/Fybre/doctr-api

I have just added a couple of endpoints for extracting plain text from files, rather than json dictionaries, and made it a bit easier to run with docker compose.

docker-compose.yaml

services:
  doctr-api:
    image: fybre/doctr-api
    container_name: doctr-api
    ports:
      - 8080:8080

Lazy option:

mkdir doctr-api
cd doctr-api
wget https://raw.githubusercontent.com/Fybre/doctr-api/refs/heads/main/docker-compose.yaml
docker compose up -d

Usage:

For documentation, navigate to http://localhost:8080/docs (or whatever IP and port you deployed to)

The following endpoints are available:

/detection/ - Perform text detection

/ocr/ - Perform OCR, returns json formatted results

/kie/ - Perform KIE

/ocrtext/ - Performs OCR returning text result - result.render()

/ocrtext/single/ - Simple endpoint to perform OCR on a single file, no other parameters needed

/ocrjson/ - Performs OCR, returns simple json with extracted text

/ocrjson/single/ - Simple endpoint to perform OCR on a single file, no other parameters needed. Returns simple json with extracted text

Tag summary

Content type

Image

Digest

sha256:93ea3f4b9

Size

4.3 GB

Last updated

about 1 year ago

docker pull fybre/doctr-api