Add model card for GemDepth

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +59 -3
README.md CHANGED
@@ -1,3 +1,59 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: depth-estimation
4
+ ---
5
+
6
+ # GemDepth: Geometry-Embedded Features for 3D-Consistent Video Depth
7
+
8
+ GemDepth is a framework for 3D-consistent video depth estimation. It introduces a Geometry-Embedding Module (GEM) that predicts inter-frame camera poses to generate implicit geometric embeddings, providing the network with intrinsic 3D perception. Combined with an Alternating Spatio-Temporal Transformer (ASTT), GemDepth captures point-level correspondences to enhance spatial precision and enforce rigorous temporal consistency across complex dynamic scenarios.
9
+
10
+ - **Paper:** [GemDepth: Geometry-Embedded Features for 3D-Consistent Video Depth](https://arxiv.org/abs/2605.10525)
11
+ - **Repository:** [https://github.com/Yuecheng919/GemDepth](https://github.com/Yuecheng919/GemDepth)
12
+
13
+ ## Usage
14
+
15
+ To use GemDepth, first clone the repository and install the requirements:
16
+
17
+ ```bash
18
+ git clone https://github.com/Yuechengliu919/GemDepth
19
+ cd GemDepth
20
+ conda create -n gemdepth python=3.10
21
+ conda activate gemdepth
22
+ pip install -r requirements.txt
23
+ ```
24
+
25
+ Then, you can initialize the model and perform inference using the following snippet:
26
+
27
+ ```python
28
+ import torch
29
+ from model.gemdepth import GemDepth
30
+
31
+ DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
32
+
33
+ # Model configurations
34
+ model_configs = {
35
+ 'vits': {'encoder': 'vits', 'features': 64, 'out_channels': [48, 96, 192, 384]},
36
+ 'vitl': {'encoder': 'vitl', 'features': 256, 'out_channels': [256, 512, 1024, 1024]},
37
+ }
38
+
39
+ # Initialize model (e.g., vitl)
40
+ gemdepth = GemDepth(**model_configs['vitl'])
41
+ checkpoint = torch.load("./checkpoint/gemdepth.pth", map_location='cpu', weights_only=False)
42
+ gemdepth.load_state_dict(checkpoint, strict=True)
43
+ gemdepth = gemdepth.to(DEVICE).eval()
44
+
45
+ # Inference example
46
+ # frames, target_fps = read_video_frames(video_path, max_len, target_fps, 1280)
47
+ # depths, fps = gemdepth.infer_video_depth(frames, target_fps, input_size=1280, device=DEVICE)
48
+ ```
49
+
50
+ ## Citation
51
+
52
+ ```bibtex
53
+ @article{liu2026gemdepth,
54
+ title={GemDepth: Geometry-Embedded Features for 3D-Consistent Video Depth},
55
+ author={Yuecheng Liu and others},
56
+ journal={arXiv preprint arXiv:2605.10525},
57
+ year={2026}
58
+ }
59
+ ```