Run this model with HF Jobs
Run zeromodels/tipsv2-l14-dpt on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/zeromodels/tipsv2-l14-dpt. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zeromodels/tipsv2-l14-dpt on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use zeromodels/tipsv2-l14-dpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/tipsv2-l14-dpt with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/tipsv2-l14-dpt") - Keras
How to use zeromodels/tipsv2-l14-dpt with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/tipsv2-l14-dpt") - Notebooks
- Google Colab
- Kaggle
See our collection for all versions of TIPSv2-DPT.
Run TIPSv2-DPT with Keras 3: JAX, PyTorch, or TensorFlow
zeromodels/tipsv2-l14-dpt
Paper: TIPSv2 (arXiv:2604.12012)
TIPSv2-DPT stacks DPT (Dense Prediction Transformer) heads on the TIPSv2 vision backbone. This single checkpoint serves three task classes: monocular depth estimation and semantic segmentation, or both at once.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of google/tipsv2-l14-dpt for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
✨ Quick start
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
import numpy as np
import keras
from zeromodels.models.tipsv2_dpt import (
Tipsv2DptDensePredict, # depth + segmentation
Tipsv2DptDepthEstimation, # depth only
Tipsv2DptSemanticSegment, # segmentation only
Tipsv2DptImageProcessor,
)
# all three load from the SAME repo
model = Tipsv2DptDensePredict.from_weights("zeromodels/tipsv2-l14-dpt")
proc = Tipsv2DptImageProcessor(image_resolution=448)
image = Image.open("your_image.jpg").convert("RGB")
pixel_values = proc(np.array(image))["pixel_values"]
out = model(pixel_values)
depth = keras.ops.convert_to_numpy(out["predicted_depth"]) # (1, H', W')
seg = keras.ops.convert_to_numpy(out["segmentation_logits"]) # (1, H', W', num_labels)
# single-task variants (same weights, one output each)
depth_model = Tipsv2DptDepthEstimation.from_weights("zeromodels/tipsv2-l14-dpt")
seg_model = Tipsv2DptSemanticSegment.from_weights("zeromodels/tipsv2-l14-dpt")
Variants:
| Variant | Hub |
|---|---|
tipsv2-b14-dpt |
zeromodels/tipsv2-b14-dpt |
tipsv2-l14-dpt |
zeromodels/tipsv2-l14-dpt |
tipsv2-so400m14-dpt |
zeromodels/tipsv2-so400m14-dpt |
tipsv2-g14-dpt |
zeromodels/tipsv2-g14-dpt |
Tips
- Set
KERAS_BACKENDbefore importing Keras / zeromodels. - The image processor rescales to
[0, 1](no mean/std normalization); input resolution is 448. - Outputs are at the DPT feature resolution; resize to the input size for visualization.
- Upstream checkpoint:
Tipsv2DptDensePredict.from_weights("hf:google/tipsv2-l14-dpt").
Special Thanks
A huge thank you to the TIPSv2 authors (Google DeepMind) and the HF community.
License: Apache-2.0 (matches the upstream google/tipsv2-l14-dpt checkpoint).
- Downloads last month
- 27
Model tree for zeromodels/tipsv2-l14-dpt
Base model
google/tipsv2-l14-dpt