Skip to main content

Accurate Pentagon Copying Test (PCT) evaluation using Combinatorial Optimization and Geometric Theory

Project description

Accurate Pentagon Copying Test (PCT) evaluation using Combinatorial Optimization and Geometric Theory

geompct is a research-oriented Python package for evaluating the Pentagon Copying Test (PCT) using classical computer vision and computational geometry. The project explores whether the structural and spatial properties required to assess a pentagon copying task can be captured directly through geometric reasoning, without relying on large deep learning models or complex feature pipelines.

Motivation and Scope

The motivation behind this work comes from a growing trend in the literature to apply heavyweight deep learning architectures to PCT evaluation. Many existing approaches extract high-dimensional features [1, 5], repeatedly downsample and upsample representations, and depend on opaque models that are difficult to interpret. For a task that is fundamentally geometric in nature, this complexity is often unnecessary. Angles, intersections, edge relations, and spatial consistency can be described explicitly using well-established geometric principles and classical computer vision techniques [2, 3]. Nonetheless, recent studies [4] have shown that even state-of-the-art multimodal large language models struggle with shape understanding, highlighting the limitations of purely data-driven approaches for geometry-centric tasks [5].

This repository is built on the hypothesis that a lightweight, interpretable algorithm is not only sufficient for evaluating the Pentagon Copying Test, but in many cases preferable. By operating directly on geometric properties, the evaluation process remains transparent and aligned with clinical reasoning. Each decision made by the algorithm can be inspected, explained, and traced back to concrete geometric constraints rather than latent representations.

The emphasis on lightweight computation is particularly important for long-term and real-world use. Applications targeting elderly populations benefit from algorithms that are efficient, stable, and easy to deploy on low-power or edge devices. Reducing computational cost also improves sustainability and lowers maintenance complexity, making the approach more suitable for longitudinal monitoring and real-world clinical support systems.

While the current focus of this project is on geometric structure and spatial accuracy, the framework naturally opens the door to additional research directions. In particular, analyzing the force, pressure, and stroke dynamics of hand-drawn inputs may provide further insight into motor control and cognitive decline. These aspects are especially relevant in the context of dementia research, where both drawing structure and execution quality can reflect disease progression. Future extensions of this work will explore how such signals can be integrated alongside geometric evaluation.

This package is intended as a research and evaluation tool. It does not perform diagnosis and is not designed to replace clinical judgment. Instead, it aims to provide a transparent and reproducible computational framework that can support neuropsychological research and the development of explainable assessment systems.


Installation

Create and activate a Python environment, then install the required dependencies.

conda create -n geompct python=3.10 -y
conda activate geompct
pip install -r requirements.txt

Or install directly via pip:

pip install geompct

Note that this package requires Python 3.10 or higher.

Usage

The main function to evaluate a Pentagon Copying Test (PCT) image is eval_pct. Below is an example of how to use it:

from geompct.eval import eval_pct
eval_pct(
    OUTPUT_DIR = "results/",
    IMG_SHAPE = (500, 500),
    fpath="path/to/your/pct_image.jpg"
)
  • OUTPUT_DIR: Directory where the results will be saved.
  • IMG_SHAPE: Tuple specifying the desired image shape (height, width).
  • fpath: File path to the PCT image to be evaluated.

License

This project is released under the MIT License. See the LICENSE file for details.


References

[1] Maruta J, Uchida K, Kurozumi H, Nogi S, Akada S, Nakanishi A, Shinoda M, Shiba M, Inoue K. Deep convolutional neural networks for automated scoring of pentagon copying test results. Sci Rep. 2022 Jun 14;12(1):9881. doi: 10.1038/s41598-022-13984-7. PMID: 35701481; PMCID: PMC9198090.

[2] Pengfei Zheng, Wilson Byiringiro, Weiwei Xie, Zhengkai Jiang, Can Cui, Yongjun Wu; An improved Harris corner detection method for honeycomb structures. AIP Advances 1 April 2025; 15 (4): 045028. https://doi.org/10.1063/5.0254564

[3] Kim N, Truty T, Duke Han S, Heo M, Buchman AS, Bennett DA, Tasaki S. Digital quantification of the MMSE interlocking pentagon areas: a three-stage algorithm. Sci Rep. 2024 Apr 19;14(1):9038. doi: 10.1038/s41598-024-59194-1. PMID: 38641631; PMCID: PMC11031600.

[4] Park I, Kim YJ, Kim YJ, Lee U. Automatic, Qualitative Scoring of the Interlocking Pentagon Drawing Test (PDT) based on U-Net and Mobile Sensor Data. Sensors (Basel). 2020 Feb 27;20(5):1283. doi: 10.3390/s20051283. PMID: 32120879; PMCID: PMC7085787.

[5] Rudman, W., Golovanevsky, M., Bar, A., Palit, V., LeCun, Y., Eickhoff, C., & Singh, R. (2025). Forgotten polygons: Multimodal large language models are shape-blind (arXiv preprint arXiv:2502.15969). https://arxiv.org/abs/2502.15969

Contact

For questions or feedback, feel free to open an issue on the GitHub repository: https://github.com/htdgv/memocare-imgprocx/issues

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

geompct-2.0.5.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

geompct-2.0.5.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file geompct-2.0.5.1.tar.gz.

File metadata

  • Download URL: geompct-2.0.5.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for geompct-2.0.5.1.tar.gz
Algorithm Hash digest
SHA256 e6f67e65ac966da8552dcf9152c4bd8876efb91efcf51e3d4f7c46a89f986ffa
MD5 ecf00f33908f23811b511e2de80ed04a
BLAKE2b-256 fb26d9fc81847c1d9d3b6b34e3eba46731967924a401b3208d1f48b7088fc4eb

See more details on using hashes here.

File details

Details for the file geompct-2.0.5.1-py3-none-any.whl.

File metadata

  • Download URL: geompct-2.0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for geompct-2.0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff3e7fd576f11218c34a13fcf7e8a5b098ccbf84e3871b8edf655469cee460e6
MD5 84f092046b6055cc71e0e35c35ab744d
BLAKE2b-256 74852ccca2a3ac0989bb79422e925758f8003fea01dd07490640042a1ac9f923

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