Update model card with paper link and sample usage snippets (#1)
Browse files- Update model card with paper link and sample usage snippets (207d01bfc369e87e21eed33e138fab6827b5cc1f)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
1 unmodified line23456789101112131410 unmodified lines2526272829303132331 unmodified linelicense: apache-2.0pipeline_tag: image-feature-extraction---# DeFM: Learning Foundation Representations from Depth for Robotics<div align="center">[](https://opensource.org/licenses/Apache-2.0)[](https://github.com/leggedrobotics/defm)[](TODO-link)[](https://de-fm.github.io/)</div>10 unmodified lines- **Compact efficient models**: We distill our DeFM-ViT-L into a family of smaller efficient CNNs as small as 3M params for robot policy learning.- **Robotics Proven**: Our encoder is proven effective for diverse robotic tasks such as navigation, manipulation and locomotion without task-specific fine-tuning.## UsageVisit our [github repo](https://github.com/leggedrobotics/defm) for details on how to use the models.## 📊 Model Zoo1 unmodified line2345678910111213141510 unmodified lines262728293031323334353637383940414243444546474849505152535455565758596061626364651 unmodified linelicense: apache-2.0pipeline_tag: image-feature-extraction---# DeFM: Learning Foundation Representations from Depth for Robotics<div align="center">[](https://opensource.org/licenses/Apache-2.0)[](https://github.com/leggedrobotics/defm)[](https://arxiv.org/abs/2601.18923)[](https://de-fm.github.io/)</div>10 unmodified lines- **Compact efficient models**: We distill our DeFM-ViT-L into a family of smaller efficient CNNs as small as 3M params for robot policy learning.- **Robotics Proven**: Our encoder is proven effective for diverse robotic tasks such as navigation, manipulation and locomotion without task-specific fine-tuning.## 🚀 Usage### 1. Loading the ModelLoad via **TorchHub** for easy integration:```pythonimport torch# Load the 307M Parameter Foundation Modelmodel = torch.hub.load('leggedrobotics/defm:main', 'defm_vit_l14', pretrained=True)model.eval().to("cuda")```### 2. PreprocessingDeFM requires depth maps to be processed into our metric-aware 3-channel format.```pythonfrom defm import preprocess_depth_image# Depth needs to be in meters (numpy array, tensor or PIL image)normalized_depth = preprocess_depth_image(metric_depth, target_size=518, patch_size=14)```### 3. Inference```pythonwith torch.no_grad():output = model.get_intermediate_layers(normalized_depth, n=1, reshape=True, return_class_token=True)spatial_tokens = output[0][0] # (B, C, H', W')class_token = output[0][1] # (B, C)```For more details, visit our [GitHub repository](https://github.com/leggedrobotics/defm).## 📊 Model Zoo
README.md+35-3