Skip to main content

Cognitive assessment and visual scoring powered by LLMs

Project description

cat-cog

Cognitive assessment and visual scoring powered by LLMs.

cat-cog provides LLM-powered evaluation of hand-drawn images for neuropsychological testing. It builds on cat-stack, the shared classification engine for the CatLLM ecosystem.

Installation

pip install cat-cog

This automatically installs cat-stack (the LLM classification engine).

CERAD Constructional Praxis Scoring

Score hand-drawn shapes (circle, diamond, overlapping rectangles, cube) using LLM vision models. The function sends images to the LLM, classifies drawing features, then applies CERAD scoring rules.

from cat_cog import cerad_drawn_score

# Score circle drawings (max score: 2)
results = cerad_drawn_score(
    shape="circle",
    image_input="./circle_drawings/",
    api_key=OPENAI_KEY,
    user_model="gpt-4o",
)
print(results[["image_file", "score"]])

Supported shapes

Shape Max Score Features Assessed
circle 2 Closure, circularity
diamond 3 4 sides, equal sides, resemblance
rectangles 2 Overlap, crossing pattern
cube 4 Front face, internal lines, parallel faces, 3D quality

Using with multiple models

All cat_stack.classify() parameters are available via **kwargs:

results = cerad_drawn_score(
    shape="cube",
    image_input="./cube_drawings/",
    api_key=OPENAI_KEY,
    models=[
        ("gpt-4o", "openai", OPENAI_KEY),
        ("claude-sonnet-4-20250514", "anthropic", ANTHROPIC_KEY),
    ],
)

Future

  • Fine-tuned vision models for shape quality assessment (circle classifier, etc.)
  • Additional cognitive screening instruments (clock drawing tests, etc.)

Ecosystem

Package Domain
cat-stack General-purpose classification engine (base)
cat-cog Cognitive assessment & visual scoring (this package)
cat-survey Survey response classification
cat-vader Social media text
cat-ademic Academic papers & PDFs
cat-pol Political text

License

GPL-3.0-or-later

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

cat_cog-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

cat_cog-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file cat_cog-0.1.0.tar.gz.

File metadata

  • Download URL: cat_cog-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.14

File hashes

Hashes for cat_cog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94ec566fad348e77ece2ccc857debfae7ec9f13b1e490fbe879c3574fbcf9dde
MD5 ed341217a942bb6153f3dd7c52cfd59a
BLAKE2b-256 37ab47b02411b3cde2e1b0125e66703be23b9be07a708ccab6e4a5343786f6f2

See more details on using hashes here.

File details

Details for the file cat_cog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cat_cog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.14

File hashes

Hashes for cat_cog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbfecb9eae819a926bba808014a9d0099c23a3d5b81f0cfb56448f1308dbbb3a
MD5 77314d00c85150bba4ad828cf7d39c14
BLAKE2b-256 611f21087e33519def2fb00eeb00d5baf315ad2571f82761e67fa79a4f025eca

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