--- license: mit library_name: libreyolo pipeline_tag: depth-estimation tags: - depth-estimation - monocular-depth - gtr - pytorch - libreyolo --- # LibreGTRl-depth GTR-L monocular depth weights converted for LibreYOLO. GTR support is being prepared for LibreYOLO v1.6.0. Earlier PyPI releases may not include this model family. ## Usage With a LibreYOLO version that includes GTR depth: ```python from libreyolo import LibreYOLO model = LibreYOLO("LibreGTRl-depth.pt") result = model.predict("image.jpg")[0] inverse_depth = result.depth_map ``` The default input is a 640 by 640 stretch resize. This checkpoint supports the `depth` task only. ## Output `Results.depth_map` is relative inverse depth on the original image canvas: higher values are closer. The network's native output is metric depth from a log-depth head (`exp(clamp(logit, -4, 5))` metres); LibreYOLO returns its exact reciprocal, so `1 / depth_map` recovers the metre estimate. That scale holds only for cameras and scenes like the training data; treat it as relative otherwise. ## Source [Official GTR implementation](https://github.com/Intellindust-AI-Lab/GTR/tree/782e737efe2e6437ac537fbdcee089673d3376c1), source revision `782e737efe2e6437ac537fbdcee089673d3376c1`. [Published checkpoint](https://huggingface.co/Phoenix8125/GTR/blob/9fc62c8c2b2c976835d0f1c1ffc544dbc0f9e29f/depth/gtrdepth_l.pth), weight repository revision `9fc62c8c2b2c976835d0f1c1ffc544dbc0f9e29f`. Copyright (c) 2026 Intellindust-AI-Lab. The source code is MIT licensed and the publisher's weight repository explicitly declares MIT. The model was pretrained by its authors on a mixed metric-depth corpus (SUN RGB-D, DIODE, Virtual KITTI 2, KITTI, Hypersim, TartanAir, ARKitScenes and ImageNet pseudo-labels). ## Modifications Selected the EMA state dict and added LibreYOLO schema v1.0 metadata. Learned parameters and state-dict keys are unchanged. Training/optimizer state was removed. Conversion uses `weights/convert_gtr_weights.py` in the [LibreYOLO source repository](https://github.com/LibreYOLO/libreyolo). ## Validation Strict loading and exact CPU parity with the pinned upstream graph (maximum absolute difference 0.0 on the metre output at 640px, portable attention) were checked for this artifact, along with CPU prediction and fixed-resolution ONNX/TorchScript export. No independently reproduced benchmark accuracy or latency numbers are claimed here. ## License MIT. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).