orz2333's picture
Migrate HOT3D, OakInk-v1, OakInk-v2 and FreiHAND to shared-v1.1 (#4)
10ed3aa
Raw History Blame Contribute Delete
906 Bytes
#!/usr/bin/env python3
"""Validate v1.1 HOT3D views with the new reader; strict about missing media by default."""
import argparse
import json
from pathlib import Path
import torch
from hot3d_bundle import audit_view
def main():
p=argparse.ArgumentParser(description=__doc__);p.add_argument('view',type=Path)
p.add_argument('--schema',type=Path,default=Path(__file__).resolve().parents[1]/'doc/schema.json')
p.add_argument('--source',type=Path,help='matching v1.0 view for exact numeric/metadata comparison')
p.add_argument('--numerical-only',action='store_true',help='explicitly allow absent unchanged media/assets (NOT release approval)')
a=p.parse_args();torch.set_num_threads(1)
print(json.dumps(audit_view(a.view,json.loads(a.schema.read_text()),source=a.source,
require_media=not a.numerical_only),indent=2))
if __name__=='__main__':main()