chaitnya26 bykang commited on
Commit
6b06130
·
verified ·
0 Parent(s):

Duplicate from depth-anything/Depth-Anything-V2-Large

Browse files

Co-authored-by: Bingyi Kang <[email protected]>

Files changed (3) hide show
  1. .gitattributes +35 -0
  2. README.md +65 -0
  3. depth_anything_v2_vitl.pth +3 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+
4
+ language:
5
+ - en
6
+ pipeline_tag: depth-estimation
7
+ library_name: depth-anything-v2
8
+ tags:
9
+ - depth
10
+ - relative depth
11
+ ---
12
+
13
+ # Depth-Anything-V2-Large
14
+
15
+ ## Introduction
16
+ Depth Anything V2 is trained from 595K synthetic labeled images and 62M+ real unlabeled images, providing the most capable monocular depth estimation (MDE) model with the following features:
17
+ - more fine-grained details than Depth Anything V1
18
+ - more robust than Depth Anything V1 and SD-based models (e.g., Marigold, Geowizard)
19
+ - more efficient (10x faster) and more lightweight than SD-based models
20
+ - impressive fine-tuned performance with our pre-trained models
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ git clone https://huggingface.co/spaces/depth-anything/Depth-Anything-V2
26
+ cd Depth-Anything-V2
27
+ pip install -r requirements.txt
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ Download the [model](https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth?download=true) first and put it under the `checkpoints` directory.
33
+
34
+ ```python
35
+ import cv2
36
+ import torch
37
+
38
+ from depth_anything_v2.dpt import DepthAnythingV2
39
+
40
+ model = DepthAnythingV2(encoder='vitl', features=256, out_channels=[256, 512, 1024, 1024])
41
+ model.load_state_dict(torch.load('checkpoints/depth_anything_v2_vitl.pth', map_location='cpu'))
42
+ model.eval()
43
+
44
+ raw_img = cv2.imread('your/image/path')
45
+ depth = model.infer_image(raw_img) # HxW raw depth map
46
+ ```
47
+
48
+ ## Citation
49
+
50
+ If you find this project useful, please consider citing:
51
+
52
+ ```bibtex
53
+ @article{depth_anything_v2,
54
+ title={Depth Anything V2},
55
+ author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Zhao, Zhen and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
56
+ journal={arXiv:2406.09414},
57
+ year={2024}
58
+ }
59
+
60
+ @inproceedings{depth_anything_v1,
61
+ title={Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data},
62
+ author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
63
+ booktitle={CVPR},
64
+ year={2024}
65
+ }
depth_anything_v2_vitl.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7ea19fa0ed99244e67b624c72b8580b7e9553043245905be58796a608eb9345
3
+ size 1341395338