Skip to main content

OCR-first chess screenshot analyzer with optional Ollama fallback

Project description

Chess Result Analyzer Ollama

OCR-first chess screenshot analysis with an optional Ollama fallback.

Features

  • OCR-first flow that skips Ollama when OCR confidence is already high
  • Optional Ollama fallback for uncertain screenshots
  • Chess.com mobile and desktop result parsing
  • Importable Python API
  • Desktop GUI uploader
  • CLI entrypoints

Install

pip install chess-result-analyzer-ollama

You also need the native Tesseract executable installed on your machine.

Python Usage

from chess_result_analyzer import OllamaSettings, analyze_chess_result

result = analyze_chess_result(
    "result.png",
    username="isco-olad",
    ollama=OllamaSettings(
        model="gemma3:4b",
        base_url="http://127.0.0.1:11434",
        mode="fallback",
    ),
)

print(result["winner"], result["winner_color"])
print(result["ollama_decision"], result["ollama_reason"])

Hosted Ollama

export OLLAMA_BASE_URL="https://ollama.com"
export OLLAMA_API_KEY="your-key"

CLI

chess-analyze --image result.png --username isco-olad
chess-analyze --image result.png --use-ollama --ollama-model gemma3:4b
chess-analyze-gui

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chess_result_analyzer_ollama-0.1.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chess_result_analyzer_ollama-0.1.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file chess_result_analyzer_ollama-0.1.1.tar.gz.

File metadata

File hashes

Hashes for chess_result_analyzer_ollama-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e868341d37e6039e16163660464bb3c6a4872a1476a0ed7c0c71f6c2a5d8bed9
MD5 23646c65ed59c6d4520548e083b238e9
BLAKE2b-256 e1fb364f1e580c7ffd6ddef553616c4e4f895f4d91dea1d7dc06eb7d78e61db1

See more details on using hashes here.

File details

Details for the file chess_result_analyzer_ollama-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chess_result_analyzer_ollama-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93f11c15ff5628e53fd69b96a1f3af2ccf20725e09f2336906e4a5b4fd533c19
MD5 b6557da32dbd301759685ce8e6bee262
BLAKE2b-256 071564bf113cada7fc9bbd4022bf98fd2e608ed0f5cbb8451ee5a8b03b821927

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page