Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add ground truth decoder visualizer script

laurenspriemdf8c65c2d360
diff --git a/infra/ml/test/README.md b/infra/ml/test/README.md
index e91771bdd0..995734bb3f 100644
--- a/infra/ml/test/README.md
+++ b/infra/ml/test/README.md
@@ -70,6 +70,27 @@ Useful optional filters:
- `--file-id <fixture_name>` (repeatable)
- `--output-dir <custom_dir>`
+## Ground-Truth Decode Visualizer
+
+Render the exact Python ground-truth decode output (including EXIF orientation handling)
+for every manifest fixture, then review the generated gallery.
+
+```bash
+uv run --project infra/ml --no-sync --with pillow-heif \
+ python infra/ml/test/tools/visualize_ground_truth_decodes.py \
+ --manifest infra/ml/test/ground_truth/manifest.json \
+ --output-dir infra/ml/test/out/parity/python_decode_preview \
+ --open
+```
+
+This script calls `ground_truth._runtime.decode_image_rgb` directly, so it tracks
+decode/orientation behavior changes in the Python reference pipeline.
+
+Outputs:
+
+- `infra/ml/test/out/parity/python_decode_preview/index.html`
+- `infra/ml/test/out/parity/python_decode_preview/decoded/*.png`
+
## Golden Update / Maintenance
Goldens are runtime artifacts and are not committed.
diff --git a/infra/ml/test/tools/tmp_visualize_ground_truth_decodes.py b/infra/ml/test/tools/visualize_ground_truth_decodes.py
old mode 100644
new mode 100755
similarity index 100%
rename from infra/ml/test/tools/tmp_visualize_ground_truth_decodes.py
rename to infra/ml/test/tools/visualize_ground_truth_decodes.py