How yeonsumia/palmistry works
Project type and purpose
• This is a single-machine, Python-based image-processing pipeline for view-invariant palm line analysis. It takes HEIC/JPG palm images, rectifies them to a standard pose, detects principal lines via a deep model, classifies those lines, and measures their lengths.
File structure
• Top-level modules:
• code/: main pipeline code and driver script (read_palm.py)
• warp/: traditional and v2 warping implementations
• classification/: line grouping & classification utilities
• detect/: experimental notebooks and saved model checkpoints
• Key scripts in code/:
• rectification.py – uses MediaPipe to extract landmarks
• warping*.py – uses those landmarks to warp the image
• detection.py & model.py – loads a PyTorch model to detect lines
• classification.py & lineseg.py – skeletonizes and groups pixels, then K-means to label line segments
• measurement.py – calculates length per line using thresholds and landmarks
• tools.py – shared helpers (I/O, visualization)
README for additional insights
• Four clear pipeline steps: warping, detection, classification, measurement
• External libs: MediaPipe, PyTorch/torchvision, scikit-image, OpenCV, pillow-heif
• Entry point: code/read_palm.py, which orchestrates the steps