Instructions to use apple/DepthPro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Depth Pro
How to use apple/DepthPro with Depth Pro:
# Download checkpoint pip install huggingface-hub huggingface-cli download --local-dir checkpoints apple/DepthPro
import depth_pro # Load model and preprocessing transform model, transform = depth_pro.create_model_and_transforms() model.eval() # Load and preprocess an image. image, _, f_px = depth_pro.load_rgb("example.png") image = transform(image) # Run inference. prediction = model.infer(image, f_px=f_px) # Results: 1. Depth in meters depth = prediction["depth"] # Results: 2. Focal length in pixels focallength_px = prediction["focallength_px"] - Notebooks
- Google Colab
- Kaggle
How do I configure the output?
#7
by JoandasScone - opened
Hello,
How can I configure this (locally or online) in the following ways?
Output a raw 1080p or 4k image as opposed to the current output which scales-down the image, and attaches annotations / labels about the depth scale?
Output a monochrome zdepth image that uses black-to-white to annotate depth as opposed to a multi-coloured inverse depth map
Thank you.
JoandasScone changed discussion title from How do I configure the output to How do I configure the output?