Instructions to use a-ml/FaceDepth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- DepthAnythingV2
How to use a-ml/FaceDepth with DepthAnythingV2:
# Install from https://github.com/DepthAnything/Depth-Anything-V2 # Load the model and infer depth from an image import cv2 import torch from depth_anything_v2.dpt import DepthAnythingV2 # instantiate the model model = DepthAnythingV2(encoder="<ENCODER>", features=<NUMBER_OF_FEATURES>, out_channels=<OUT_CHANNELS>) # load the weights filepath = hf_hub_download(repo_id="a-ml/FaceDepth", filename="depth_anything_v2_<ENCODER>.pth", repo_type="model") state_dict = torch.load(filepath, map_location="cpu") model.load_state_dict(state_dict).eval() raw_img = cv2.imread("your/image/path") depth = model.infer_image(raw_img) # HxW raw depth map in numpy - Notebooks
- Google Colab
- Kaggle
Add demo video, comparison grids, and figures
Browse files- .gitattributes +5 -0
- figures/comparison.jpg +3 -0
- figures/comparison_2.jpg +3 -0
- figures/facedepth_video_demo.gif +3 -0
- figures/facedepth_video_demo.mp4 +3 -0
- figures/teacher_compare.jpg +3 -0
- figures/training_curve.png +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,8 @@ saved_model/**/* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 36 |
+
figures/comparison.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
figures/comparison_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
figures/facedepth_video_demo.gif filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
figures/facedepth_video_demo.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
figures/teacher_compare.jpg filter=lfs diff=lfs merge=lfs -text
|
figures/comparison.jpg
ADDED
|
Git LFS Details
|
figures/comparison_2.jpg
ADDED
|
Git LFS Details
|
figures/facedepth_video_demo.gif
ADDED
|
Git LFS Details
|
figures/facedepth_video_demo.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a3fac81fe387f9657e72764184d3600dbe2cdbd27ea060156cae8a0c6547dff4
|
| 3 |
+
size 9835747
|
figures/teacher_compare.jpg
ADDED
|
Git LFS Details
|
figures/training_curve.png
ADDED
|