Milk Documentation¶
Welcome to the milk documentation!
milk provides a high-performance framework and tools for image processing and analysis, particularly suited for building real-time execution pipelines (such as Adaptive Optics loops) out of small modular units. The framework provides zero-copy tensor passing and instant parameter synchronization.
🚀 Getting Started¶
If you are new to the milk environment, follow these steps:
- Install milk — clone, build, and configure.
- CLI Overview — understand
milk-cliand standalone executables. - Shared Memory Streams — core concept: zero-copy image passing.
- Function Processing System (FPS) — core concept: process parameters and configuration.
- Developer Tutorial — write your first compute module.
🏛️ Core Architecture¶
For a deep dive into how milk components interact at a system level, these documents explain the underlying structures.
- Software Architecture: Top-level hierarchical overview of the system design, subsystems, and data flow.
- Programmer's Guide: The best starting point to understand the overall architecture, C API, and CMake setup.
- Dependency Graph: Visual map of module dependencies.
- FPS Standalone and CMD Modes: Execution context details for
milk-fpsexec-*binaries. - Process Info (
procinfo): Telemetry, heartbeat monitoring, and profiling. - Debugging: GDB, procinfo diagnostics, tmux log inspection, common failure patterns.
- Performance Tuning: CPU pinning, RT scheduling, shared memory, GPU acceleration.
- PGO & LTO Optimization: Profile-guided optimization + static LTO for 15–40% speedup.
🛠️ Developer Guides¶
Guidelines and tutorials for writing your own compute modules or extending the CLI framework.
- Coding Standards: C coding conventions for
milk. - Adding Plugins: How to build modules that compile alongside the core.
- Template Source Code: Breakdown of the example C module.
- Loading Custom Modules: Linking
.somodules at runtime. - Working With Git: Branching and commit workflow.
- Documenting Code: In-code documentation standards.
- Developer Tutorial: Step-by-step guide to writing your first module.
- Module Files Layout: Directory structure conventions.
- Python API: Accessing streams from Python with
pyMilkand numpy. - Valkey Integration: Multi-host FPS parameter sync via Valkey.
- Code Assist Tools: Agent rules and workflows for AI-assisted development.
📖 CLI & Tools Reference¶
- CLI Core Syntax: Argument parsing and command invocation rules.
- Readline Keys: Keyboard shortcuts inside the
milkshell. - Scripts Reference: All
milk-*shell scripts and utilities. - Help Text: Built-in help text reference.
- FAQ & Troubleshooting: Common issues and solutions.
- Automatically Generated Index: Complete list of all Markdown files in the repository.
🔬 API Reference¶
- Doxygen API Docs: Auto-generated C API reference with call graphs and source browser.
Can't find what you're looking for? Check the Automatically Generated Document Index for all plugin READMEs.