docs(planning): generate codebase map via gsd-map-codebase

This commit is contained in:
2026-03-29 21:35:24 +09:00
parent 3377b5f68d
commit aca7bf592a
7 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# CONVENTIONS
## Python & Scripting
- **Naming**: Pythonic `snake_case` for functions/variables. Internal/private helper functions are prefixed with `_` (e.g., `_dhash`, `_dedup_by_hash`).
- **Typing**: Extensive use of Python 3 type hinting (`List`, `Tuple`, `Optional`, `np.ndarray` for image matrices) to ensure correct data tracking through the pipeline.
- **Logging**: Script execution uses rich, numbered `print()` statements (e.g., `[1/5] ...`, ` → ...`) to give users immediate feedback on pipeline state given that processing can take minutes.
- **Windows Safety**: Manual stdout/stderr `sys.stdout.reconfigure(encoding="utf-8")` is used to prevent Unicode block crashes on Windows cmd.exe.
## Computer Vision Processing
- Memory optimization is heavily enforced (downscaling initial captures to `MAX_FRAME_WIDTH` of 1280px immediately upon read).
- Mathematical thresholds (MSE margins, TM_CCOEFF_NORMED thresholds) are hardcoded as upper-case CONSTANTS at the top of scripts for quick tuning.