Instructions to use Qtn-Cls/LocalMeshEngine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Trellis
How to use Qtn-Cls/LocalMeshEngine with Trellis:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download multivue/cameras/source/src/depth_anything_3/utils/api_helpers.py from Qtn-Cls/LocalMeshEngine: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/Qtn-Cls/LocalMeshEngine/resolve/main/multivue/cameras/source/src/depth_anything_3/utils/api_helpers.py
- Command line
-
hf download hf://Qtn-Cls/LocalMeshEngine/multivue/cameras/source/src/depth_anything_3/utils/api_helpers.py
-
curl -L -o api_helpers.py https://huggingface.co/Qtn-Cls/LocalMeshEngine/resolve/main/multivue/cameras/source/src/depth_anything_3/utils/api_helpers.py
1.63 kB
| import argparse | |
| def parse_scalar(s): | |
| if not isinstance(s, str): | |
| return s | |
| t = s.strip() | |
| l = t.lower() | |
| if l == "true": | |
| return True | |
| if l == "false": | |
| return False | |
| if l in ("none", "null"): | |
| return None | |
| try: | |
| return int(t, 10) | |
| except Exception: | |
| pass | |
| try: | |
| return float(t) | |
| except Exception: | |
| return s | |
| def fn_kv_csv(s: str) -> dict[str, dict[str, object]]: | |
| """ | |
| Parse a string of comma-separated triplets: fn:key:value | |
| Returns: | |
| dict[fn_name] -> dict[key] = parsed_value | |
| Example: | |
| "fn1:width:1920,fn1:height:1080,fn2:quality:0.8" | |
| -> {"fn1": {"width": 1920, "height": 1080}, "fn2": {"quality": 0.8}} | |
| """ | |
| result: dict[str, dict[str, object]] = {} | |
| if not s: | |
| return result | |
| for item in s.split(","): | |
| if not item: | |
| continue | |
| parts = item.split(":", 2) # allow value to contain ":" beyond first two separators | |
| if len(parts) < 3: | |
| raise argparse.ArgumentTypeError(f"Bad item '{item}', expected FN:KEY:VALUE") | |
| fn, key, raw_val = parts[0], parts[1], parts[2] | |
| # If you need to allow colons in values, join leftover parts: | |
| # fn, key, raw_val = parts[0], parts[1], ":".join(parts[2:]) | |
| if not fn: | |
| raise argparse.ArgumentTypeError(f"Bad item '{item}': empty function name") | |
| if not key: | |
| raise argparse.ArgumentTypeError(f"Bad item '{item}': empty key") | |
| val = parse_scalar(raw_val) | |
| bucket = result.setdefault(fn, {}) | |
| bucket[key] = val | |
| return result | |