61 lines
2.0 KiB
Python
61 lines
2.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Build camera-backed LAB E30 evidence from immutable A2 sources."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from k1link.compute.e30_materialization import build_e30_materialization
|
|
|
|
|
|
def main() -> None:
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--review-pack", type=Path, required=True)
|
|
parser.add_argument("--e29-root", type=Path, required=True)
|
|
parser.add_argument("--source-result-root", type=Path, required=True)
|
|
parser.add_argument("--source-pack-root", type=Path, required=True)
|
|
parser.add_argument("--local-surface-root", type=Path, required=True)
|
|
parser.add_argument("--camera-job", type=Path, required=True)
|
|
parser.add_argument("--ffmpeg", type=Path, required=True)
|
|
parser.add_argument(
|
|
"--output-root",
|
|
type=Path,
|
|
default=Path(".runtime/compute-experiments/e30/materializations"),
|
|
)
|
|
args = parser.parse_args()
|
|
|
|
result = build_e30_materialization(
|
|
review_pack_root=args.review_pack,
|
|
e29_root=args.e29_root,
|
|
source_result_root=args.source_result_root,
|
|
source_pack_root=args.source_pack_root,
|
|
local_surface_root=args.local_surface_root,
|
|
camera_job_root=args.camera_job,
|
|
ffmpeg_path=args.ffmpeg,
|
|
output_root=args.output_root,
|
|
)
|
|
print(
|
|
json.dumps(
|
|
{
|
|
"result_id": result.result_id,
|
|
"result_root": str(result.result_root),
|
|
"item_count": result.manifest["item_count"],
|
|
"camera_evidence_available": result.manifest[
|
|
"camera_evidence_available"
|
|
],
|
|
"human_review_complete": result.manifest[
|
|
"human_review_complete"
|
|
],
|
|
"lab_published": result.manifest["lab_published"],
|
|
},
|
|
ensure_ascii=False,
|
|
indent=2,
|
|
)
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|