Repository navigation
Development
TonyD365 edited this page Oct 27, 2026
·
1 revision
git clone https://github.com/TonyD365/Inkhue && cd Inkhue
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt # app + training + tools
.venv/bin/python -m inkhue # the apprequirements-app.txt alone is enough to run the app.
python -m inkhue.cli encode photo.jpg page.png --width-in 6
python -m inkhue.cli simulate page.png scan.png # software print + scan
python -m inkhue.cli decode scan.png color.pngpython -m pytest tests # incl. the app window, headless
ruff check .
python scripts/benchmark.py # ~1 min: 4 photos x 5 print/scan conditions x 3 seedsEvery pull request runs lint, tests on macOS / Windows / Linux, a packaged-app self-test and the benchmark against main (posted as a PR comment; a drop in decode success fails the check). PRs that touch packaging also build, install and self-test all four installers.
python scripts/make_dataset.py data/div2k/DIV2K_train_HR --crops 8 --size 128 --out data/train.npz
python scripts/train.py --data data/train.npz --steps 8000 # Apple GPU (MPS) or CUDA
python -m inkhue.refiner_onnx models/refiner.pt models/refiner.onnxThe app ships only models/refiner.onnx. Include the benchmark result in your PR.
- Merge everything into
main(branch protection requires the CI checks). - Create a GitHub release with a tag like
v1.2.0, not marked pre-release. - The release workflow builds the four installers, installs and self-tests each, uploads them and
SHA256SUMS.txt, and attests their provenance. Installed apps update from the release marked Latest.
Use a pre-release to test the build without updating anyone.
- Never change the on-paper format constants (
inkhue/payload.py,halftone.py,layout.py) without a newVERSIONand backwards-compatible decoding.tests/test_format.pyenforces this. - No encryption: hidden from the eye, not from people.
Using Inkhue
Inside
中文