Pretrain / InterHand2.6M /code /finish_when_ready.py
WhynotGPT's picture
Add interhand_code
a1af790 verified
Raw History Blame Contribute Delete
635 Bytes
from pathlib import Path
import json,time,subprocess
r=Path('/SSD1/yangzijing/InterHand2.6M')
while True:
if (r/'audit/images_extraction_failure.json').exists():
raise SystemExit('Image extraction failed; see audit/images_extraction_failure.json')
p=r/'audit/images_extraction.json'
if p.exists() and json.loads(p.read_text()).get('status')=='complete':break
time.sleep(10)
a=json.loads((r/'audit/annotations_verification.json').read_text())
if not a['complete']:raise SystemExit('Annotations incomplete')
raise SystemExit(subprocess.call(['/SSD2/jiasen/envs/foundation_hand/bin/python','-u',str(r/'code/validate_dataset.py')]))