Photoshot Retouch Part 4 — Engine and editable layer format
Checkpoint ID: photoshot-retouch-04-lab-2026-11-29

From PowerShell in this lab folder, use Windows x64 and Python 3.10.
  py -3.10 -m venv .venv
  .\.venv\Scripts\python.exe -m pip install -r requirements-lock.txt
  .\.venv\Scripts\python.exe start\01_predict.py
  .\.venv\Scripts\python.exe finished\reproduce_engine.py

The formula exercise is the starting checkpoint. finished/reproduce_engine.py
imports the frozen service/engine.py and supplies controlled tool outputs.
Engine output includes versioned manifests, 8-/16-bit RGB streams and 8-bit
masks, reassembled PNGs and a strict comparison in verification/engine-checks.json.
The four PNGs in fixtures/ are generated. White regions in *-roi.png show
where a change can occur. The separate *-protected.png files show zero and
partial alpha samples for each RGBA depth. Python 3.10.6 on Windows was tested
using a new virtual environment, captured in verification/fresh-install.log.

Optional API replay with actual tools and MediaPipe CPU inference:
  $env:RETOUCH_MODELS = Join-Path $PWD.Path '.models'
  Push-Location finished
  ..\.venv\Scripts\python.exe -m service.models
  Pop-Location
  .\.venv\Scripts\python.exe finished\reproduce_api.py

The installer fetches versioned Google model files and checks SHA-256. The
optional API runner stages the worker, verified models and image in a Windows
temporary folder, runs on 127.0.0.1 and uses an isolated database. On Windows
use a temporary folder with an ASCII path for MediaPipe and OpenCV.
The bundle includes no model weights. Optional OcuFlow and other model
providers were outside this check. The astronaut fixture is a NASA photo of
Eileen Collins, via scikit-image's public-domain sample. Synthetic fixtures
are generated by the included runner. The editor adapter is reference source.
The bundle is the local review copy. No remote posting is part of this run.

Previous sample sources:
https://scikit-image.org/docs/stable/api/skimage.data.html#skimage.data.astronaut
https://ai.google.dev/edge/mediapipe/solutions/vision/face_landmarker
https://ai.google.dev/edge/mediapipe/solutions/vision/image_segmenter

