This repo is intended to support deployment of the Text-Spotting code from the MapReader project in a simple and convenient manner.
The deployment includes the following packages from the Maps as Data project:
Please see those repositories for more information.
At present there is a uv-based configuration and a Dockerfile which have been tested and confirmed to work for CUDA-enabled environments. There may be a simple web service added at some point, such that images can be POSTed to an API endpoint and JSON returned.
- Ensure the appropriate NVIDIA drivers for your system are installed.
- Clone the repository.
- Ensure both
uvand the NVIDIA CUDA Toolkit is installed (the config here expects CUDA >= 12) - Run inference:
uv run python spot-text.py /opt/maps/map.tiff
-
Ensure both docker and the NVIDIA Container Toolkit are installed.
-
Build the image:
docker build -t text-spotting-as-a-service . -
Run inference:
docker run --rm --gpus all -v /path/to/maps:/opt/maps text-spotting-as-a-service:latest uv run python spot-text.py /opt/maps/map.tiff
❯ uv run python spot-text.py --help
Usage: spot-text.py [OPTIONS] IMAGE_PATH [OUTPUT_PATH] COMMAND [ARGS]...
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────╮
│ * image_path PATH Path to the image [required] │
│ output_path [OUTPUT_PATH] Output path (defaults to stdout) │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --verbose -v │
│ --quiet -q │
│ --version │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────╯