RefSeg-CA / source /code /project_paths.py
nmsofficial's picture
Add verified public availability and human-evaluation guide
9126e0d verified
Raw
History Blame Contribute Delete
471 Bytes
"""Resolve bundled legacy dependencies without hard-coded cluster paths."""
from pathlib import Path
import os
def legacy_root(root):
if os.getenv('REFSEG_LEGACY_ROOT'):return Path(os.environ['REFSEG_LEGACY_ROOT']).resolve()
root=Path(root)
for p in [root/'legacy_project',root.parent/'refseg_scale_20260906',root.parent/'RefSeg_Scale_MVA']:
if p.exists():return p
raise FileNotFoundError('Bundled legacy_project missing; set REFSEG_LEGACY_ROOT')