Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Petrouil
/
Depth-Anything-V2-Tiny-hf-quant

Depth Estimation
ONNX
DepthAnythingV2
tiny
pruned
knowledge-distillation
int4
quantized
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use Petrouil/Depth-Anything-V2-Tiny-hf-quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • DepthAnythingV2

    How to use Petrouil/Depth-Anything-V2-Tiny-hf-quant 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 huggingface_hub import hf_hub_download
    
    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="Petrouil/Depth-Anything-V2-Tiny-hf-quant", filename="depth_anything_v2_<ENCODER>.pth", repo_type="model")
    state_dict = torch.load(filepath, map_location="cpu")
    model.load_state_dict(state_dict)
    model.eval()
    
    raw_img = cv2.imread("your/image/path")
    depth = model.infer_image(raw_img) # HxW raw depth map in numpy
        
  • Notebooks
  • Google Colab
  • Kaggle
Depth-Anything-V2-Tiny-hf-quant
36.3 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
Petrouil's picture
Petrouil
Upload folder using huggingface_hub
b44c929 verified 16 days ago
  • .gitattributes
    1.52 kB
    initial commit 16 days ago
  • LICENSE
    11.4 kB
    Upload folder using huggingface_hub 16 days ago
  • NOTICE
    1.36 kB
    Upload folder using huggingface_hub 16 days ago
  • README.md
    9.63 kB
    Upload folder using huggingface_hub 16 days ago
  • checksums.txt
    862 Bytes
    Upload folder using huggingface_hub 16 days ago
  • dav2s_8layer_int4_matmul_336x448.onnx
    18.1 MB
    xet
    Upload folder using huggingface_hub 16 days ago
  • dav2s_8layer_int4_matmul_dynamic.onnx
    18.2 MB
    xet
    Upload folder using huggingface_hub 16 days ago
  • example.py
    1.3 kB
    Upload folder using huggingface_hub 16 days ago
  • export_manifest.json
    1.77 kB
    Upload folder using huggingface_hub 16 days ago
  • metrics_336.json
    1.77 kB
    Upload folder using huggingface_hub 16 days ago
  • metrics_dynamic.json
    1.59 kB
    Upload folder using huggingface_hub 16 days ago
  • preprocessor_config.json
    572 Bytes
    Upload folder using huggingface_hub 16 days ago
  • requirements.txt
    42 Bytes
    Upload folder using huggingface_hub 16 days ago