Hub#
Utilities for downloading models from HuggingFace Hub.
Models are cached locally after first download (~500MB each).
download_model#
download_model
#
Download model config and weights from HuggingFace.
Files are cached locally after first download.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Model name (e.g., 'outdoor-resnet101') |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Path, Path]
|
Tuple of (config_path, weights_path) |
Raises:
| Type | Description |
|---|---|
ValueError
|
If model name is not recognized |
Source code in src/panodac/hub.py
load_config#
load_config
#
Load model configuration from JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to config JSON file |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Configuration dictionary |
Available Models#
Models are hosted at huggingface.co/yuliangguo/depth-any-camera.
| Model | Config File | Weights File |
|---|---|---|
outdoor-resnet101 |
dac_resnet101_outdoor.json |
dac_resnet101_outdoor.pt |
outdoor-swinl |
dac_swinl_outdoor.json |
dac_swinl_outdoor.pt |
indoor-resnet101 |
dac_resnet101_indoor.json |
dac_resnet101_indoor.pt |
indoor-swinl |
dac_swinl_indoor.json |
dac_swinl_indoor.pt |