apozz commited on
Commit
d11dadc
·
verified ·
1 Parent(s): d658a46

add README.md

Browse files
Files changed (1) hide show
  1. README.md +124 -0
README.md ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: dinov3-license
4
+ license_link: https://huggingface.co/apozz/DAP-weights-safetensors/blob/main/LICENSE.dinov3.md
5
+ tags:
6
+ - depth-estimation
7
+ - panorama
8
+ - equirectangular
9
+ - "360"
10
+ - dinov3
11
+ - dpt
12
+ - safetensors
13
+ - comfyui
14
+ library_name: pytorch
15
+ pipeline_tag: depth-estimation
16
+ base_model: Insta360-Research/DAP-weights
17
+ ---
18
+
19
+ # DAP-weights-safetensors
20
+
21
+ This repository hosts a **safetensors-format mirror** of
22
+ [`Insta360-Research/DAP-weights`](https://huggingface.co/Insta360-Research/DAP-weights),
23
+ the official checkpoint released with the paper
24
+ [*Depth Any Panoramas (DAP): A Foundation Model for Panoramic Depth Estimation*](https://arxiv.org/abs/2512.16913)
25
+ by Lin et al. (Insta360 Research Team, 2025).
26
+
27
+ The model is a **metric depth estimator for 360° × 180° equirectangular panoramas**:
28
+ DINOv3-ViT-L/16 encoder + DPT depth head + a "range-mask" head that flags pixels
29
+ beyond the model's confident distance range.
30
+
31
+ **Nothing here is retrained.** The weights are bit-identical to the upstream
32
+ checkpoint; this mirror only changes the on-disk *format* (PyTorch `.pth` →
33
+ `.safetensors`) and removes storage-shared alias keys from the state-dict to
34
+ keep the file ~1.46 GB (matching the original) instead of ~2.5 GB.
35
+
36
+ ## Files
37
+
38
+ | File | Size | Description |
39
+ | --- | --- | --- |
40
+ | `dap_vitl.safetensors` | ~1.46 GB | All trainable tensors. 498 unique tensors (the upstream `.pth` exposed 858 keys; 360 were storage-aliased duplicates from `DINOv3Adapter.blocks` ↔ `DINOv3Adapter.model.blocks` — see "Implementation notes" below). |
41
+ | `LICENSE.dap.md` | — | DAP MIT license (Insta360 Research Team's contribution). |
42
+ | `LICENSE.dinov3.md` | — | DINOv3 License Agreement — governs the DINOv3 backbone weights inside the checkpoint, which are derivative works of Meta's DINOv3. |
43
+
44
+ ## License
45
+
46
+ The weights in this repository are governed by **two licenses simultaneously**:
47
+
48
+ 1. **DAP / Insta360 contribution → MIT** (`LICENSE.dap.md`)
49
+ 2. **DINOv3 backbone weights → [DINOv3 License Agreement](LICENSE.dinov3.md)**
50
+
51
+ The DINOv3 License is permissive but **not** MIT. By using these weights you
52
+ agree to its terms, including (non-exhaustive):
53
+
54
+ - You may use, reproduce, distribute, copy, modify, and create derivative works
55
+ of the DINO Materials.
56
+ - Your use **must comply with applicable laws and Trade Controls** (US OFAC, UN,
57
+ EU, UK sanctions; export controls).
58
+ - You may **not** use the model for, or encourage others to use it for, any
59
+ activities subject to ITAR or end-uses prohibited by Trade Controls — including
60
+ military or warfare purposes, nuclear industries or applications, espionage, or
61
+ the development or use of guns or illegal weapons.
62
+ - If you redistribute the weights or any derivative, you **must include a copy
63
+ of the DINOv3 License Agreement** alongside them.
64
+ - You may not reverse engineer, decompile, or discover the underlying components
65
+ of the DINO Materials.
66
+
67
+ See `LICENSE.dinov3.md` for the full text.
68
+
69
+ ## Acknowledgements
70
+
71
+ - **Upstream weights**: [`Insta360-Research/DAP-weights`](https://huggingface.co/Insta360-Research/DAP-weights)
72
+ - **DAP paper / code**: [Insta360-Research-Team/DAP on GitHub](https://github.com/Insta360-Research-Team/DAP)
73
+ - **DINOv3 backbone**: Meta AI Research (DINOv3 License Agreement applies to the
74
+ encoder weights inside this checkpoint).
75
+ - **DPT decoder lineage**: Depth Anything V2.
76
+
77
+ Neither Meta, Insta360 Research Team, nor any of the upstream authors endorse or
78
+ are affiliated with this mirror.
79
+
80
+ ## Citation
81
+
82
+ ```bibtex
83
+ @article{lin2025dap,
84
+ title = {Depth Any Panoramas: A Foundation Model for Panoramic Depth Estimation},
85
+ author = {Lin, Xin and Song, Meixi and Zhang, Dizhe and Lu, Wenxuan and Li, Haodong and Du, Bo and Yang, Ming-Hsuan and Nguyen, Truong and Qi, Lu},
86
+ journal = {arXiv:2512.16913},
87
+ year = {2025}
88
+ }
89
+ ```
90
+
91
+ ## Usage
92
+
93
+ The ergonomic path: install
94
+ [ComfyUI-DAP](https://github.com/PozzettiAndrea/ComfyUI-DAP), which auto-downloads
95
+ this file on first run.
96
+
97
+ Direct PyTorch load:
98
+
99
+ ```python
100
+ from huggingface_hub import hf_hub_download
101
+ from safetensors.torch import load_file
102
+
103
+ path = hf_hub_download("apozz/DAP-weights-safetensors", "dap_vitl.safetensors")
104
+ state = load_file(path)
105
+
106
+ # Load into a DAP model built with the upstream architecture.
107
+ # Use strict=False: storage-shared alias keys (DINOv3Adapter.blocks vs
108
+ # DINOv3Adapter.model.blocks) are deduplicated in this checkpoint and the
109
+ # missing aliases are populated automatically via the shared underlying storage.
110
+ model.load_state_dict(state, strict=False)
111
+ ```
112
+
113
+ ## Implementation notes
114
+
115
+ The upstream `model.pth` was a flat state-dict (plus an `epoch` integer) where
116
+ 360 tensor keys were storage-aliased duplicates: PyTorch's `state_dict()` walks
117
+ both `DINOv3Adapter.model.blocks.*` (canonical) and `DINOv3Adapter.blocks.*`
118
+ (alias registered by `self.blocks = self.model.blocks` in `DINOv3Adapter`).
119
+ `torch.save` stored each unique storage once; safetensors has no
120
+ storage-deduplication mechanism, so a naive `.clone()`-then-`save_file` would
121
+ double the file size. This mirror keeps only the canonical `.model.*` key for
122
+ each storage. When loaded into a fresh `DAP` model, the alias parameters are
123
+ populated automatically because they share underlying storage with the
124
+ canonical parameter.