File size: 7,160 Bytes
7a87926
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# DA3 Model Selection Guide

## Overview

DA3 provides multiple model series, each optimized for different use cases. This guide helps you choose the right model for YLFF workflows.

## Model Series

### 🌟 DA3 Main Series

**Models**: `DA3-GIANT`, `DA3-LARGE`, `DA3-BASE`, `DA3-SMALL`

**Capabilities**:

- βœ… Monocular depth estimation
- βœ… Multi-view depth estimation
- βœ… Pose-conditioned depth estimation
- βœ… Camera pose estimation
- βœ… 3D Gaussian estimation

**Characteristics**:

- Unified depth-ray representation
- **Not metric** (relative depth, requires scale alignment)
- Varying sizes: Giant (best quality) β†’ Small (fastest)

**Best For**:

- General-purpose visual geometry tasks
- When you need pose estimation but can handle scale alignment
- Fast iteration with smaller models

### πŸ“ DA3 Metric Series

**Models**: `DA3Metric-LARGE`

**Capabilities**:

- βœ… Monocular depth estimation
- βœ… **Metric depth** (real-world scale)

**Characteristics**:

- Specialized for metric depth
- Fine-tuned for real-world scale
- **No pose estimation**

**Best For**:

- Applications requiring real-world scale
- When you have poses from another source
- Metric depth-only workflows

### πŸ” DA3 Monocular Series

**Models**: `DA3Mono-LARGE`

**Capabilities**:

- βœ… High-quality relative monocular depth

**Characteristics**:

- Dedicated for monocular depth
- Superior geometric accuracy vs. disparity-based models
- **No pose estimation, not metric**

**Best For**:

- Single-image depth estimation
- When geometric accuracy is critical
- Relative depth is sufficient

### πŸ”— DA3 Nested Series

**Models**: `DA3NESTED-GIANT-LARGE`

**Capabilities**:

- βœ… Monocular depth estimation
- βœ… Multi-view depth estimation
- βœ… Pose-conditioned depth estimation
- βœ… Camera pose estimation
- βœ… **Metric depth** (real-world scale)

**Characteristics**:

- Combines giant model with metric model
- **Both pose estimation AND metric depth**
- Real-world metric scale reconstruction
- **Recommended for BA validation and fine-tuning**

**Best For**:

- βœ… **BA validation** (needs metric depth + poses)
- βœ… **Fine-tuning workflows** (needs metric depth + poses)
- βœ… Metric reconstruction at real-world scale
- βœ… When you need both pose and metric depth

## YLFF Recommendations

### For BA Validation

**Recommended**: `DA3NESTED-GIANT-LARGE`

**Why**:

- Provides both camera poses and metric depth
- Metric depth enables proper comparison with BA (real-world scale)
- Best accuracy for validation workflows

**Usage**:

```bash
# Auto-selects DA3NESTED-GIANT-LARGE
ylff validate arkit assets/examples/ARKit

# Or explicitly specify
ylff validate arkit assets/examples/ARKit \
    --model-name depth-anything/DA3NESTED-GIANT-LARGE
```

### For Fine-Tuning

**Recommended**: `DA3NESTED-GIANT-LARGE`

**Why**:

- Fine-tuning benefits from metric depth (real-world scale)
- Pose estimation needed for training
- Best starting point for improvement

**Usage**:

```bash
# Auto-selects DA3NESTED-GIANT-LARGE
ylff train start data/training

# Or explicitly specify
ylff train start data/training \
    --model-name depth-anything/DA3NESTED-GIANT-LARGE
```

### For Fast Experimentation

**Recommended**: `DA3-LARGE` or `DA3-BASE`

**Why**:

- Faster inference
- Still provides pose estimation
- Good for quick tests

**Usage**:

```bash
ylff validate sequence path/to/images \
    --model-name depth-anything/DA3-BASE
```

### For Metric Depth Only

**Recommended**: `DA3Metric-LARGE`

**Why**:

- Specialized for metric depth
- Best accuracy for metric-only tasks

**Note**: This model does **not** provide pose estimation. Use with external pose sources.

## Model Comparison

| Model                 | Pose Est. | Metric Depth | Speed   | Quality | Use Case                       |
| --------------------- | --------- | ------------ | ------- | ------- | ------------------------------ |
| DA3NESTED-GIANT-LARGE | βœ…        | βœ…           | Medium  | Best    | **BA validation, fine-tuning** |
| DA3-GIANT             | βœ…        | ❌           | Slow    | Best    | Best quality, non-metric       |
| DA3-LARGE             | βœ…        | ❌           | Medium  | High    | General purpose                |
| DA3-BASE              | βœ…        | ❌           | Fast    | Good    | Fast iteration                 |
| DA3-SMALL             | βœ…        | ❌           | Fastest | Good    | Fastest                        |
| DA3Metric-LARGE       | ❌        | βœ…           | Medium  | High    | Metric depth only              |
| DA3Mono-LARGE         | ❌        | ❌           | Medium  | High    | Monocular depth only           |

## Auto-Selection

YLFF automatically selects the best model for each use case:

```python
from ylff.models import get_recommended_model

# For BA validation
model = get_recommended_model("ba_validation")
# Returns: "depth-anything/DA3NESTED-GIANT-LARGE"

# For fine-tuning
model = get_recommended_model("fine_tuning")
# Returns: "depth-anything/DA3NESTED-GIANT-LARGE"

# For fast inference
model = get_recommended_model("fast")
# Returns: "depth-anything/DA3-SMALL"
```

## CLI Usage

### Auto-Select Model

```bash
# YLFF auto-selects DA3NESTED-GIANT-LARGE for BA validation
ylff validate arkit assets/examples/ARKit

# YLFF auto-selects DA3NESTED-GIANT-LARGE for fine-tuning
ylff train start data/training
```

### Explicit Model Selection

```bash
# Use specific model
ylff validate arkit assets/examples/ARKit \
    --model-name depth-anything/DA3-LARGE

# Use smaller model for speed
ylff validate sequence path/to/images \
    --model-name depth-anything/DA3-BASE
```

### List Available Models

```python
from ylff.models import list_available_models, get_model_info

# List all models
models = list_available_models()
for name, info in models.items():
    print(f"{name}: {info['description']}")

# Get specific model info
info = get_model_info("depth-anything/DA3NESTED-GIANT-LARGE")
print(info['capabilities'])
print(info['recommended_for'])
```

## Why DA3NESTED-GIANT-LARGE for BA Validation?

1. **Metric Depth**: BA works in real-world scale. Metric depth enables proper comparison.

2. **Pose Estimation**: BA validation compares predicted poses with BA-refined poses. Need pose estimation capability.

3. **Accuracy**: Nested model combines best of both worlds (giant model quality + metric specialization).

4. **Consistency**: Using metric depth ensures depth values are in real-world units, matching BA's output scale.

## Performance Considerations

- **DA3NESTED-GIANT-LARGE**: Slower but most accurate for BA workflows
- **DA3-LARGE**: Good balance for experimentation
- **DA3-BASE**: Faster, good for quick tests
- **DA3-SMALL**: Fastest, acceptable quality for rapid iteration

## Migration Guide

If you were using `DA3-LARGE` before:

```bash
# Old (still works)
ylff validate arkit assets/examples/ARKit \
    --model-name depth-anything/DA3-LARGE

# New (recommended, auto-selected)
ylff validate arkit assets/examples/ARKit
# Automatically uses DA3NESTED-GIANT-LARGE
```

The new default provides better results for BA validation due to metric depth support.